Skip to content
⌘ NSIS Forum Archive

can stubs load plugins without extracting?

4 posts

roytam1#

can stubs load plugins without extracting?

It would be nice if it is possible to load plugins without extracting, and directly loading from memory like py2exe, which uses this code:
Anders#
This is a hacky way to load a dll and will probably cause problems with:
  • Things that use LoadLibrary/GetProcAddress, the toolhelp api or any other means to enumerate loaded modules
  • Probably breaks Manifest/Sxs loading and registration free COM.
  • DLLMain thread start/end notifications (CRT etc)
  • SEH issues on AMD64?
  • DEP shimming?
  • Is it compatible with our license?


It just seems like a non-trivial amount of work for very little benefit and it will probably slow down plugin calls.
DrO#
it seems a very convoluted way to do things when it's at odds with how the OS is setup to handle dlls, etc. am sure it has it's uses, but is it really suited for an installer... probably not.
LoRd_MuldeR#
Originally Posted by roytam1 View Post
It would be nice if it is possible to load plugins without extracting, and directly loading from memory like py2exe, which uses this code:
https://github.com/fancycode/MemoryModule
Remember that NSIS is OpenSource. So if loading a plugin as a DLL file really is a problem, you could still modify the NSIS "exehead" to include the desired functionality directly. In other words: The "plugin" could be linked statically.