yuhoo
asked on
CallBack Function
I am making a DLL, that at certain point should call back some function in my main EXE.
How to do this?
I need a small example of exported DLL function, that will receive information about address of call-back function in EXE, and example of calling call-back function from DLL.
I am using MS VC, and I work in plain C.
How to do this?
I need a small example of exported DLL function, that will receive information about address of call-back function in EXE, and example of calling call-back function from DLL.
I am using MS VC, and I work in plain C.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It is easy, just have another function defined in DLL:
setFuncPointer(EXEEXPORTPR OC lpcfunc);
Let the exe call this function and pass the pointer in.
setFuncPointer(EXEEXPORTPR
Let the exe call this function and pass the pointer in.
ASKER
I can't follow you, Can you give me real example?
I suppose I should define lpcfunc as:
EXEEXPORTPROC *lpcfunc;
but how to define function that retrieves EXE's function pointer?