By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,404 Members | 938 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,404 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.
Jul 23 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.