Debug (DLL MFC) -> Debug (Static MFC)

R

ringos75

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,"LoadEffect");


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.aspx?scid=kb;en-us;q148652

Thanks in advance.


PS: sorry for my bad english.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top