Skip to content
⌘ NSIS Forum Archive

Maybe a simple question for expert, a dll

6 posts

venne#

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#
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#
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#
Look in the exdll.h
Find this functions:
setuservariable

setuservariable(INST_0, "I'm in $0")
Above should returned into $0.
Joost Verburg#
It is however recommended to use the stack instead of registers like $0, then you can always choose which variable to use.