Archive: Maybe a simple question for expert, a dll


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...


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.


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...


Look in the exdll.h
Find this functions:
setuservariable


setuservariable(INST_0, "I'm in $0")

Above should returned into $0.

thank u all...I got it :)


It is however recommended to use the stack instead of registers like $0, then you can always choose which variable to use.