i.m C,C++ beginner user.
how make callback fuction in the DLL?
and how call "callback fuction" in the host program?
sorry about my basic question....
help....
i.m C,C++ beginner user.
how make callback fuction in the DLL?
and how call "callback fuction" in the host program?
sorry about my basic question....
help....
Callback function?Originally posted by kimcs
i.m C,C++ beginner user.
how make callback fuction in the DLL?
and how call "callback fuction" in the host program?
sorry about my basic question....
help....
DLL?
These are "basic" questions from a beginner user? Quite advanced if you ask me.
I don't remember exactly how the callback function I used works, but MSDN may have your answer.
Definition: Politics -- Latin, from
poly meaning many and
tics meaning blood sucking parasites
-- Tom Smothers
I think what you are trying to say is "export" functions.
Well, since this is Windows specific just declare your functions with __declspec(export) and include the .lib in your host program.
Are you asking about DLLMain()? I think you need to clarify the situation.
>how make callback fuction in the DLL?
>and how call "callback fuction" in the host program?
Not easy stuff for a beginner, but here's an explanation.
Normally an application calls functions provided by a DLL. Sometimes, however, it handy to have the DLL call a function in the application. A typical example of when this may be done, is when the application may call a routine in DLL which takes a long time to complete. During the workings of this function, it may periodically call a 'callback' function in the application to provide it with progress information and allow it to terminate the routine early (if the user clicks abort). To implemet a callback, you normally have to pass the DLL a pointer to your callback function.