System plugin: Try harder to find dll export function

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6243 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2012-06-21 23:13:05 +00:00
parent 8aa67f8987
commit 7cd38f2367

View file

@ -818,7 +818,7 @@ SystemProc *PrepareProc(BOOL NeedForCall)
// Get proc address // Get proc address
proc->Proc = NSISGetProcAddress(proc->Dll, proc->ProcName); proc->Proc = NSISGetProcAddress(proc->Dll, proc->ProcName);
if (UsedTString) if (UsedTString || !proc->Proc)
{ {
FARPROC tproc; FARPROC tproc;
TCHAR*ProcName = proc->ProcName; // This buffer has room for us to party on TCHAR*ProcName = proc->ProcName; // This buffer has room for us to party on
@ -829,9 +829,11 @@ SystemProc *PrepareProc(BOOL NeedForCall)
STRSET2CH(ProcName+cch, _T('A'), _T('\0')); STRSET2CH(ProcName+cch, _T('A'), _T('\0'));
#endif #endif
tproc = NSISGetProcAddress(proc->Dll, ProcName); tproc = NSISGetProcAddress(proc->Dll, ProcName);
if (tproc) proc->Proc = tproc; if (tproc)
proc->Proc = tproc;
else
proc->ProcResult = PR_ERROR;
} }
if (!proc->Proc) proc->ProcResult = PR_ERROR;
} }
break; break;
case PT_STRUCT: case PT_STRUCT: