Skip to content
⌘ NSIS Forum Archive

Understanding a user-made plugin function's prototype

3 posts

sifadil#

Understanding a user-made plugin function's prototype

Hello.
I was looking through the extdll example in order to create my own plugin. A plugin's function should have the following prototype :
void __declspec(dllexport) myFunction(HWND hwndParent, int string_size, LPTSTR variables, stack_t **stacktop, extra_parameters *extra, ...)
I was able to tell what every parameter is for except the parameter variables. In the case of the extdll example, variables contains the same value as $0 which is shown in a message box by this example.
So, I'm wondering why would I need this parameter if i can use getuservariable() to get Registers values.
Thanks.
Anders#
The init macro you need in a function for getuservariable to work uses it. It does not just contain $0, it contains all the variables. $1 starts at +1024 or whatever the string size is.