| |

VerySource

 Forgot password?
 Register
Search
View: 939|Reply: 1

What does callback mean?

[Copy link]

2

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-6 11:30:01
| Show all posts |Read mode
What does a callback function mean? Does one module provide an interface for another module to actively call to notify it of an event?
Reply

Use magic Report

0

Threads

13

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-1-7 06:57:01
| Show all posts
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! "
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list