I would like to execute my NSIS function TryMe from plugin (.dll).
This is my NSIS code:
Function TryMe
MessageBox MB_OK "TryMe"
FunctionEnd
Function LicensePage
GetDlgItem $0 $HWNDPARENT 1
GetFunctionAddress $2 TryMe # $2 Contains correct values, I checked it
Dll::Dll /NOUNLOAD $2
Pop $1
FunctionEnd And this is my C++ code:extern "C" __stdcall void Dll(HWND hWndParent, int string_size,
char *variables, stack_t **stacktop, extra_parameters *extra)
{
DLL_INIT();
..... some other code like popping HWND etc...
if(popstring(tmp)) {
extra->exec_flags->exec_error = TRUE;
return;
}
int iFunc = myatoi(tmp.c_str()); // HERE I GET THE SAME NUMBER
// AS IN ABOVE NSIS CODE - address of function
extra->ExecuteCodeSegment(iFunc, 0); // here I want
// to execute my NSIS function, but it does nothing I checked everything severaltimes, iFunc is filled with correct value but nothing happens in extra->ExecuteCodeSegment.What I am doing wrong?