win32 problem on NT4
> Oops: > > "NetHack.exe - Entry Point Not Found > > The procedure entry point Process32Next could not be located in the dynamic link > library KERNEL32.dll." > > And the program refuses to run. Same goes for NetHackW.exe. > > Windows NT 4 (to be precise: 4.00.1381, SP6) > IE 5.0 (to be precise: 5.00.2919.6307) > > The Help for Process32Next shows the following compatibility list: > QuickInfo > Windows NT: Requires version 5.0 or later. > Windows: Requires Windows 95 or later. > Windows CE: Unsupported. > Header: Declared in tlhelp32.h. > Import Library: Use kernel32.lib.
This commit is contained in:
@@ -243,7 +243,20 @@ int pid;
|
||||
HANDLE hProcessSnap = NULL;
|
||||
PROCESSENTRY32 pe32 = {0};
|
||||
boolean bRet = FALSE;
|
||||
HINSTANCE hinstLib;
|
||||
genericptr_t ProcTest;
|
||||
BOOL fFreeResult;
|
||||
|
||||
hinstLib = LoadLibrary("KERNEL32");
|
||||
if (hinstLib != NULL) {
|
||||
ProcTest = (genericptr_t) GetProcAddress(hinstLib, "Process32Next");
|
||||
if (!ProcTest) {
|
||||
fFreeResult = FreeLibrary(hinstLib);
|
||||
return FALSE;
|
||||
}
|
||||
fFreeResult = FreeLibrary(hinstLib);
|
||||
}
|
||||
|
||||
hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
||||
if (hProcessSnap == INVALID_HANDLE_VALUE)
|
||||
return FALSE;
|
||||
|
||||
@@ -408,6 +408,20 @@ int pid;
|
||||
HANDLE hProcessSnap = NULL;
|
||||
PROCESSENTRY32 pe32 = {0};
|
||||
boolean bRet = FALSE;
|
||||
HINSTANCE hinstLib;
|
||||
genericptr_t ProcTest;
|
||||
BOOL fFreeResult;
|
||||
|
||||
hinstLib = LoadLibrary("KERNEL32");
|
||||
if (hinstLib != NULL) {
|
||||
ProcTest = (genericptr_t) GetProcAddress(hinstLib, "Process32Next");
|
||||
if (!ProcTest) {
|
||||
fFreeResult = FreeLibrary(hinstLib);
|
||||
return FALSE;
|
||||
}
|
||||
fFreeResult = FreeLibrary(hinstLib);
|
||||
}
|
||||
|
||||
|
||||
hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
||||
if (hProcessSnap == INVALID_HANDLE_VALUE)
|
||||
|
||||
Reference in New Issue
Block a user