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
This commit is contained in:
kichik 2004-11-11 21:28:25 +00:00
parent 424322a142
commit 2b0c2f2787
2 changed files with 2 additions and 1 deletions

View file

@ -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);

View file

@ -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;