What is a CALLBACK function ? Why it is used ?<br> Thanks<br> Moonoo
A callback function is a function that you write that could be called by outside code (i.e. by windows functions). You set up a callback function by passing the address of your function to the API from which your callback is referenced.<br><br>For example, I want my application to handle runtime exceptions rather than letting C++ runtime take care of things for me. So I wrote a function called my_exception_handler(int, EXCEPTION_POINTERS*) and I call a Microsoft function called _set_se_translator and pass it the address of my_exception_handler. <br><br>In the example above, my_exception_handler is a callback function -- I will never call it myself, but I pass the address of it to an API that will cause it to possibly be called.<br><br>Hope that helps!<br><br> <p>Pat Gleason<br><a href=mailto:gleason@megsinet.net>gleason@megsinet.net</a><br><a href= > </a><br>
its basically a Function pointer, it points to a function in memory, can be used inside and outside of a programming language some languagues cannot use callback functions from say VC++, like visual basic cant(unless you use an API by another dll and such) <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href=
</a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.