I have a DLL that will be loaded by a program, and that DLL will in turn load another DLL to handle some stuff that ought not to be in the main DLL. However, the second DLL needs to be able to talk to the first DLL. Is it possible for a DLL to use exported functions in the DLL that loaded it? For instance
- Program loads DLL A with LoadLibrary.
- DLL A loads DLL B with LoadLibrary.
- DLL A calls some functions in DLL B with GetProcAddress.
- B in turn does GetProcAddress on DLL A and calls some functions.
- DLL A is hobnobbing with the main program as DLL B is doing things and calling DLL A's exported functions.
Will this work, and is it the proper way to do it?
void Import(function1fromA, function2fromA, function3fromA)which will be called by DLL A. - MSalters