venne
1st March 2004 14:10 UTC
Maybe a simple question for expert, a dll
Hi, everyone
Is there someone know why I can't got return Value from Dll that be wroten by myself.
I put this dll into the directory of Plugins. and it can be compiled correctly.
Just like this:
Function .onInit
check::CheckSth ???
IntCmp 1 $R0...
FunctionEnd
???: Where is my return value?? I can't check it at all...
Joost Verburg
1st March 2004 14:42 UTC
If you want to write an NSIS plugin, include the ExDLL header file in the Contrib\ExDLL folder. Then you will have direct access to the NSIS stack.
venne
1st March 2004 14:55 UTC
thanks for your reply...
that's mean: I can't obtain the return value directly as normal.. I must deal with the NSIS stack? Could u show me a sample code? thx...
Joel
1st March 2004 15:12 UTC
Look in the exdll.h
Find this functions:
setuservariable
setuservariable(INST_0, "I'm in $0")
Above should returned into $0.
venne
1st March 2004 15:24 UTC
thank u all...I got it :)
Joost Verburg
1st March 2004 15:30 UTC
It is however recommended to use the stack instead of registers like $0, then you can always choose which variable to use.