I've done a custom dll (plugin) for NSIS and i'm experiencing strange behavior : the DLL work fine on every computer until i execute it (within an installer) under a Virtual machine.
I'm using Virtual PC for this.
It seems that the stack doesn't work and the plugin returns parameters send in the call.
For example:
myDLL::MyFunction param1 param2 ...
Pop $0
Pop $1
Messagebox MB_OK "$0$1"
Returns:
param1, param2, ....
in place of : "OK", myReturnedValue
Any idea ?
Custom Dll unstable behavior
4 posts
It's probably failing to load due to missing dependencies. Compile it as a static DLL. If you're on a recent version of Visual Studio, you're probably missing MSVCR80.DLL. If not, it's probably a debug build and you're missing MSVCRTD.DLL.
In fact, it was a compil option error.
I changed DLL Multithread (/MD) to Multithread (/MT) and it works fine.
It could be a good idea if there was a help file explaining how to build a NSIS DLL (with compiler option too).
Thanks for the help anyway.
I changed DLL Multithread (/MD) to Multithread (/MT) and it works fine.
It could be a good idea if there was a help file explaining how to build a NSIS DLL (with compiler option too).
Thanks for the help anyway.
That's not a compile error, that's exactly compiling it as a static DLL. Instead of depending on libc in an external DLL, you're depending on libc statically.
All the required complier options are configured in exdll.dsp.
All the required complier options are configured in exdll.dsp.