This article is written on the assumption that you know the concept of the Pointer

1. Introduction

When we use API, we can study about the Callback function. And we can know why people usually use the Funciont Pointer (in API operation).


2. Function Pointer

A Pointer has a address of its variable. Likewise, a Funtion Pointer has a address of its function. This Function Pointer can be used as a parameter of other function. And it is applied on the Callback Function. (So we have to know what is teh Function Pointer)

2-1. Materialization of Function Pointer

Data type of Function Pointer must match with data type of function referenced by.


3. Callback Function

In normal case, functions are called out by an user when he or she want to operate. But sometimes, some interrupts occur in time we can’t predict, then some functions are called out. We call these functions to “Callback Function(s)” For example, we can catch the call when we are playing the game. Then the screen of our phone will be changed to express the Call Screen. At this moment, the call(exactly, the function expressing the Call Screen) is the Callback Function.

3-1. Materialization Callback Function

We can often find the Callback Function in the case of calling out between the Applications and the OS. We make the code of Callback Function in the Application, and make the code of calling out in the OS. And the Callback Function will be called out if an specific event is occured in the OS.