hi,
i've done an application that it have to link dynamically some my dll
(plugin). In debug mode (Shared MFC DLL) i haven't any problem. If i
try to compile the project in debug mode and link static MFC i've some
problem when i try to call some plugin function. The plugin dll is
compiled and linked at same mode (debug and Static MFC) of the Main
Application. In the main application i load the plugin with this
method:
HINSTANCE _hDLL=LoadLibrary(PathNameDLL);
loader=(LoaderType)GetProcAddress(_hDLL,"LoadEffec t");
eff=loader(InterfacePlug,this,Parent->GetParent());
'eff' is a class and loader(...) create an instance of class. When i
try to call this funcion of class:
eff->SaveSetUp(tmp);
i've an error. the function SaveSetUp(...) write some info in file
tmp:
void __stdcall FileWrite::SaveSetUp(FILE *SetUp) // Salva il SetUp!
{
if (SetUp!=0)
{
int lenfile=strlen(FileName2Write);
fwrite(&lenfile,sizeof(int),1,SetUp); // The error fire here!!!!!
fwrite(FileName2Write,sizeof(char),1024,SetUp);
}
}
Any idea what is the problem?? In the debug mode (Shared MFC DLL) i
haven't any problem... To compile the main application in debug mode
(Static Link MFC DLL) to correct linking i use this microsoft
indication:
http://support.microsoft.com/default...;en-us;q148652
Thanks in advance.
PS: sorry for my bad english.