We have a program that is downloaded around 1000 users per day. Installer is NSIS based. Recently we wrote a plugin for it and it seems that in some cases plugin can't be loaded/function can't be executed on some user machines. 1 of 4 installers fails.
Here is the function from plugin.
That is how it calledEXTERN_C void __declspec(dllexport) __cdecl test(HWND hwndParent, int string_size,
LPTSTR variables, stack_t **stacktop,
extra_parameters *extra, ...)
{
EXDLL_INIT();
{
pushstring("TEST");
}
}
That is how it sended to the server
Var VAL_TEST
Function .onInit
ourPlugin::test
Pop $VAL_TEST
FunctionEnd
And in 1 of 4 times test is empty. It means that plugin didn't return value, but installer didn't crashed because query is successfull. What could be the problem?
Section "Main"
inetc::get /SILENT "https://ourcompanyurl.com/api/?test=$VAL_TEST" $TEMP\r /END
SectionEnd
Only one thought - may be something with DLL loading? All plugins examples that I saw were compiled with /NODEFAULTLIB but I compiled with default libs, because my c++ code didn't compiled without it. Could it be the problem?