一个有趣的东西,检查64位系统中的进程是32位还是64位

int GetResourceId(void)
{
    typedef BOOL (*P_IsWow64Process)(HANDLE, BOOL *);

    HMODULE kernel32 = LoadLibrary(L"kernel32.dll");

    P_IsWow64Process __sys_IsWow64Process =
        (P_IsWow64Process)GetProcAddress(kernel32, "IsWow64Process");

    if (__sys_IsWow64Process) {

        BOOL x64;
        if (! __sys_IsWow64Process(GetCurrentProcess(), &x64))
            x64 = FALSE;
        if (x64)
            return 6464;
    }

    return 3232;
}

原文地址:https://www.cnblogs.com/leoTsou/p/14184111.html