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

posted on 2020-12-24 14:58  LeoTsou  阅读(109)  评论(0编辑  收藏  举报