Archive: Calling third-party dll using Next button on custom page


Calling third-party dll using Next button on custom page
Hi. I've created custom page with some edit controls and want to call function from my DLL when Next button is pressed. Then strange things happen. If there is no controls with NOTIFY flag on my page, but Next (which "has" NOTIFY always), installer freezes/crashes while calling the function. If I add some button with NOTIFY flag, it's all ok. It doesn't matter, if I use that added button, or no.
NSIS 2.09

There is my custom page leave function:

Function leaveserver
ReadINIStr $1 "$PLUGINSDIR\setup.ini" "Settings" "State"
StrCmp $1 0 Exit
Abort
Exit:
Call CheckSQL
StrCmp $1 0 +2 +1
Abort
FunctionEnd

...and CheckSQL func...

Function CheckSQL
SetPluginUnload alwaysoff
SetOutPath $TEMP
Delete $TEMP\InstallDll.dll
IfFileExists $TEMP\InstallDll.dll +2 +1
File DLL\InstallDll.dll ; copy dll there
ReadINIStr $1 "$PLUGINSDIR\setup.ini" "Field 5" "State"
ReadINIStr $2 "$PLUGINSDIR\setup.ini" "Field 6" "State"
ReadINIStr $3 "$PLUGINSDIR\setup.ini" "Field 1" "State"
System::Call '$TEMP\InstallDll::Mess(t,t,t) i(r1,r2,r3).r1'
SetPluginUnload manual
System::Free 0
FunctionEnd

Current workaround: Added button with NOTIFY flag, disabled and hidden below edit control.
ps: Sorry for my buggy English.


Can you attach a complete minimal example and more information? I can't reproduce the problem. Maybe it also happens with some plug-ins that come with the default package?