Chuyu-Team / YY-Thunks

Fix DecodePointer, EncodePointer,RegDeleteKeyEx etc. APIs not found in Windows XP RTM.
MIT License
495 stars 102 forks source link

QT6.5 依赖d3d11等XP不支持的API #71

Open IULOVE opened 4 months ago

IULOVE commented 4 months ago

背景

我知道这不是yy-thunks 的问题,但是我 https://github.com/cxxzhang/qt6_5_for_xp 这里带的yy-thunks就不会依赖d3d11 ,这个的yy-thunks比原版的大是被他修改过的吗?

准备通过逆向手段分析上述修改版YY-Thunk obj文件,取其精华化。

需要处理的函数列表

Ncrypt.dll(cxxzhang分支下直接返回了失败,因为这是重要功能,没有直接采纳)

Shell32.dll(cxxzhang分支下直接返回了失败,但是直觉感觉这二个接口应该可以模拟)

d3d9.dll

d3d11.dll

DbgHelp.dll

dwrite.dll

dxgi.dll

dxva2.dll

uiautomationcore.dll

user32.dll

uxtheme.dll

iphlpapi.dll

kernel32.dll

mingkuang-Chuyu commented 3 months ago

是的,你提供的github仓库里的YY-Thunks带了try_get_module_d3d11之类的。很明显不是我这边的原版。

但是目标作者没有提供修改后的YY-Thunks源代码……

lygstate commented 1 month ago

GetThemePartSize

#if (YY_Thunks_Support_Version < NTDDI_WIN6)

// Windows Vista [desktop apps only]
// Windows Server 2008 [desktop apps only]
__DEFINE_THUNK(
    uxtheme,
    28,
    HRESULT,
    STDAPICALLTYPE,
    GetThemePartSize,
        _In_ HTHEME hTheme,
        _In_opt_ HDC hdc,
        _In_ int iPartId,
        _In_ int iStateId,
        _In_opt_ LPCRECT prc,
        _In_ enum THEMESIZE eSize,
        _Out_ SIZE *psz)
{
    if (auto const pGetThemePartSize = try_get_GetThemePartSize())
    {
        return pGetThemePartSize(hTheme, hdc, iPartId, iStateId, prc, eSize, psz);
    }

    return __HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED);
}

#endif // (YY_Thunks_Support_Version < NTDDI_WIN6)
mingkuang-Chuyu commented 1 month ago

@lygstate 我本地的XP SP3这个GetThemePartSize导出函数是存在的。