|
|
#1 |
|
Junior Member
Join Date: Jun 2007
Posts: 4
|
plugin function signature
First time post!
I've been using NSIS for a few days now and I'm creating my first plugin (using VC++). I looked at the exdll.h file, and also at some of the Contrib plugins (InstallOptions, etc). The plugin functions in InstallOptions use 4 parameters, but the example plugin function in exdll.c uses 5 (the same 4 plus an 'extra_parameters'). Which one is correct? I'm assuming that the exdll.c function is up-to-date and the other ones are just old, but in that case how do those plugins still work? |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,338
|
Newer plug-ins that need the fifth parameter use it. Older plug-ins that don't need it, simply don't use it.
The functions use cdecl calling convention so its the caller's responsibility to clear the stack after the function returns. So the caller, the installer in this case, can pass as many extra arguments as it wants without affecting older plug-ins. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2007
Posts: 4
|
Thanks that really help...and thanks for the quick reply!
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|