Old 19th October 2005, 07:27   #1
MishaWTW
Junior Member
 
Join Date: Oct 2005
Location: Russia, Moscow
Posts: 1
Send a message via ICQ to MishaWTW
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.
MishaWTW is offline   Reply With Quote
Old 20th October 2005, 18:22   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump