custom plugin still unloading with SetPluginUnload alwaysoff or /NOUNLOAD
I have written a custom plugin that I would like to be kept loaded after the first call.
I am using custom functions Register and Unregister in this way:
Function .onInit
SetPluginUnload alwaysoff
NsisWMPlugin::Register /NOUNLOAD
FunctionEnd
Function .onGUIEnd
SetPluginUnload manual
NsisWMPlugin::Unregister ; NOTE no /NOUNLOAD this time
FunctionEnd
I've added messageboxes in the custom DllMain for ATTACH and DETACH so I can see when the DLL is loaded and unloaded.
If I add loads of calls to custom functions in .onInit then the DLL gets loaded once as I expect but after this function the DLL seems to get loaded/unloaded everytime even though each call has got /NOUNLOAD (which should be unnecessary as I've called SetPluginUnload alwaysoff?
I've tried the call to SetPluginUnload outside .onInit but this doesn't seem to help either.