From 2b0c2f2787cd8b88ea8644c4c3a1c20d432ca1cb Mon Sep 17 00:00:00 2001 From: kichik Date: Thu, 11 Nov 2004 21:28:25 +0000 Subject: [PATCH] Only use the GetModuleHandle trick for plug-ins, otherwise just load and unload. If RegDLL uses /NOUNLOAD, unloading will be skipped, but GetModuleHandle won't be used. git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3763 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/exec.c | 2 +- Source/script.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index a1d6d8a5..4cd95d21 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -916,7 +916,7 @@ static int NSISCALL ExecuteEntry(entry *entry_) char *buf1=GetStringFromParm(-0x10); char *buf0=GetStringFromParm(0x01); - if (parm3) + if (parm4) h=GetModuleHandle(buf1); if (!h) h=LoadLibrary(buf1); diff --git a/Source/script.cpp b/Source/script.cpp index 425bc3c3..5a8d37c3 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -5482,6 +5482,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) ent.offsets[1]=add_string(funcname); ent.offsets[2]=0; ent.offsets[3]=nounload|build_plugin_unload; + ent.offsets[4]=1; ret=add_entry(&ent); if (ret != PS_OK) { return ret;