Archive: plugin function signature


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?


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.


Thanks that really help...and thanks for the quick reply!