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;
}

标签: sys, x64, 有趣, kernel32, BOOL, IsWow64Process

相关文章推荐

添加新评论,含*的栏目为必填