Just load the library

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7293 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2021-08-17 18:30:33 +00:00
parent 0be4164270
commit 1768555f2b
3 changed files with 5 additions and 5 deletions

View file

@ -13,11 +13,11 @@ static LPSTR InetGetErrorStringAllocA(DWORD ec)
DWORD flags = FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_IGNORE_INSERTS;
if (FormatMessageA(flags|FORMAT_MESSAGE_FROM_SYSTEM, 0, ec, 0, (LPSTR) &buf, 0, 0))
return buf;
HMODULE hMod = GetModuleHandle(TEXT("WinInet"));
HMODULE hMod = LoadSysLibrary("WinInet");
if (hMod && FormatMessageA(flags|FORMAT_MESSAGE_FROM_HMODULE, hMod, ec, 0, (LPSTR) &buf, 0, 0))
return buf;
#if 0 // We are not using WinHttp* functions
hMod = GetModuleHandle(TEXT("WinHTTP"));
hMod = LoadSysLibrary("WinHTTP");
if (hMod && FormatMessageA(flags|FORMAT_MESSAGE_FROM_HMODULE, hMod, ec, 0, (LPSTR) &buf, 0, 0))
return buf;
#endif