|
The principle of a callback function is actually a function pointer. Message processing like windows and linux are callback functions.
"The callback function is not written by your own program, but by other things, such as the Windows operating system, such as other programs, etc. But when it is called, I do not know. The callback function is generally The types of parameters and return values are defined according to the caller's requirements. You provide the caller with the entry address of your callback function, and then when the caller has any event, you can call this function to notify you at any time. , And pass parameters in a pre-defined form. So many people like to say that the callback function is really a bit like the BP machine you bring with you: tell others the number and call you when it has something! " |
|