Calling external dll and returning value
Hi.
In my installer I've made calls to a 3rd party dll in the following way :
<DLL_name>::<function_name> <parameters, if any>
I've made such calls directly, not using any plug-in or system call.
Now I want to call a function from a dll, which returns a value. So I do a 'pushstring(parameter_name, NSIS_MAX_STRLEN)' @ the end of the called function within the dll. There is only one string that I'm returning from the function to the dll.
However, I am not able to retrieve the value within NSIS. I tried to pop from stack using $0 and $R0, but to no avail.
I also tried using System::Call '<DLL_name>::<function_name>(t, *i) i(.r0, r1r1).r2'
But in that case, my dll ain't getting called at all.I'm not clear about how the parameters are returned if we use System::Call.
What am I doing wrong here? How do I make the call in NSIS?
Thanks.
Rohit.