Hello All,
I have been trying to fix the following problem; this bit of code works fine when it is compiled as part of a Windows application but when I move it out to a DLL I get the debug error - esp not saved etc. The error is obviously caused by some sort of stack problem but why in the DLL and not the application? Any ideas.
HINSTANCE h_instdll;
PROC func1;
h_instdll = LoadLibrary(dllname);
if (h_instdll == NULL)
{
handle error
}
func1 = GetProcAddress(h_instdll, funcname);
retval = func1(......); // generates esp error in DLL