![]() |
| | #1 |
| Registered User Join Date: Jun 2008
Posts: 1
| I am writing a library. Any exe will build with this library. The library exposes a API which the exe calls. The API inturn registers a callback function. Now how do i wait for the control to return to this callback function. So the sequence of operations is as follows 1) Api Call 2) Call another lib API and register Callback function 3) Process the result in call back function 4) Resume operation from the point where we call the next lib api and register the callback ie from point 2 5)further process the data in the first API 6) return the result of the API call to the exe TIA |
| poorkoder is offline | |
| | #2 |
| Registered User Join Date: Mar 2003
Posts: 3,844
| Are you wrapping an asynchronous API with a synchronous API? In other words, does the underlying API invoke the callback within the context of another thread? Or does the callback get invoked within the same thread that performed step #2? Windows or *nix or both? gg |
| Codeplug is offline | |
![]() |
| Tags |
| api, c programming, callbacks, semaphores, waiting |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Delegate function implementation in C++ for class callback invocation | just_me | Windows Programming | 1 | 08-24-2008 11:39 AM |
| Screwy Linker Error - VC2005 | Tonto | C++ Programming | 5 | 06-19-2007 02:39 PM |
| Including lib in a lib | bibiteinfo | C++ Programming | 0 | 02-07-2006 02:28 PM |
| Please Help - Problem with Compilers | toonlover | C++ Programming | 5 | 07-23-2005 10:03 AM |
| Question.. | pode | Windows Programming | 12 | 12-19-2004 07:05 PM |