Using C++ DLL
Hi,
I am using VStudio 2005 to create a DLL to be used by one of our installers but and I can't get System::Call to work.
I think it is because of the name decoration of the functions. I can debug the DLL and see that the main function is being called and the DLL is being loaded.
Does anybody know how to deal with the name decoration?
I am using
#ifdef NSWWW_EXPORTS
#define NSWWW_API __declspec(dllexport)
#else
#define NSWWW_API __declspec(dllimport)
#endif
and the function is:
NSWWW_API int fnnsWWW(int i)
{
MessageBox(NULL, _T("fnnsWWW"), _T("Test"), MB_OK);
return 42;
}
The call to System::Call returns "error"
SetPluginUnload alwaysoff
InitPluginsDir
File /oname=$PLUGINSDIR\nsWWW.dll nsWWW.dll
...
SetOutPath $PLUGINSDIR
System::Call 'nsWWW::fnnsWWW(i r0) i .r6'
MessageBox MB_OK $6
Any help is welcome!
Thanks