EnumProcessModules failed with error 299 on 32bit win7
问题 My code is running on win7 32bit, but when I use EnumProcessModules , it returned false and getlasterror() return error code 299, which declare that the program is 32bit and this statement can not be running on 64bit system. I wonder why this happens, and why the system thinks that I am running on a 64bit OS? The code I use: HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPid); if (hProcess) { HMODULE hMod = NULL; DWORD cbNeeded = 0; if (EnumProcessModules(hProcess, &hMod, sizeof