YY-Thunks icon indicating copy to clipboard operation
YY-Thunks copied to clipboard

QT6.5 依赖缺失(QT问题统一在这里回复)

Open IULOVE opened this issue 1 year ago • 5 comments

背景

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

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

需要处理的函数列表

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

  • [ ] NCryptFreeObject
  • [ ] NCryptGetProperty
  • [ ] NCryptSignHash

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

  • [x] Shell_NotifyIconGetRect
    • https://www.cnblogs.com/swarmbees/p/5812031.html
  • [x] SHGetStockIconInfo
    • 可以直接从shell32.dll中加载图标资源

d3d9.dll

  • [x] Direct3DCreate9Ex 不存在时返回失败

d3d11.dll

  • [x] D3D11CreateDevice 不存在时返回失败

DbgHelp.dll

  • [x] SymSetSearchPathW 调用SymSetSearchPath
  • [x] SymGetSearchPathW 调用SymGetSearchPath

dwrite.dll

  • [x] DWriteCreateFactory 不存在时返回失败

dxgi.dll

  • [x] CreateDXGIFactory1 不存在时返回失
  • [x] CreateDXGIFactory2

dxva2.dll

  • [x] DXVA2CreateDirect3DDeviceManager9 不存在时返回失败
  • [x] DXVA2CreateVideoService 不存在时返回失败

uiautomationcore.dll

  • [x] UiaClientsAreListening
  • [x] UiaHostProviderFromHwnd
  • [x] UiaRaiseAutomationEvent

user32.dll

  • [x] ChangeWindowMessageFilterEx 调用 ChangeWindowMessageFilter
  • [x] ChangeWindowMessageFilter 返回成功
  • [x] UpdateLayeredWindowIndirect 调用UpdateLayeredWindow
  • [x] AddClipboardFormatListener 返回成功
  • [x] RemoveClipboardFormatListener 返回成功
  • [x] RegisterPowerSettingNotification 返回成功
  • [x] UnregisterPowerSettingNotification 返回成功
  • [x] DisplayConfigGetDeviceInfo 返回失败
  • [x] GetDisplayConfigBufferSizes 返回失败
  • [x] QueryDisplayConfig 返回失败
  • [x] AreDpiAwarenessContextsEqual
  • [x] EnableNonClientDpiScaling
  • [x] GetAwarenessFromDpiAwarenessContext
  • [ ] GetPointerDeviceRects
  • [x] GetPointerFrameTouchInfo
  • [x] GetPointerFrameTouchInfoHistory
  • [x] GetPointerInfo
  • [x] GetPointerPenInfoHistory
  • [x] GetThreadDpiAwarenessContext
  • [x] GetWindowDpiAwarenessContext
  • [x] SetDisplayAutoRotationPreferences
  • [x] SkipPointerFrameMessages
  • [x] InitializeTouchInjection
  • [x] InjectTouchInput

uxtheme.dll

  • [x] DrawThemeTextEx
  • [x] GetThemeTransitionDuration
  • [x] SetWindowThemeAttribute

iphlpapi.dll

  • [x] ConvertInterfaceLuidToGuid 调用 GetIfEntry
  • [x] ConvertInterfaceLuidToIndex Index等效Luid

kernel32.dll

  • [x] SetProcessDEPPolicy NtSetInformationProcess
  • [x] GetSystemDEPPolicy 直接返回始终关闭
  • [x] GetCurrentPackageFullName

api-ms-win-shcore-scaling-l1-1-1.dll

  • [x] GetProcessDpiAwareness

IULOVE avatar Feb 25 '24 05:02 IULOVE

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

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

mingkuang-Chuyu avatar Apr 02 '24 11:04 mingkuang-Chuyu

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)

lygstate avatar May 26 '24 16:05 lygstate

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

mingkuang-Chuyu avatar May 27 '24 04:05 mingkuang-Chuyu

https://github.com/Chuyu-Team/YY-Thunks/issues/111

mingkuang-Chuyu avatar Aug 08 '24 16:08 mingkuang-Chuyu

image

GetPointerDeviceRects since windows 8 https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getpointerdevicerects

this function still not adapted in the newest version. 最新版本中, 还差这个函数需要适配.

Returned monitor screen size and TRUE in the implantation of VxKex source code. VxKex 源码中, 实现方式为返回屏幕尺寸, 并返回 TRUE

image

I write an approachable code sample here instead of a PR, due to the un-synchronized master branch. 因为目前不是主分支, 我就不交PR了, 直接写在这里:

(先占坑)

(先占坑)

BH2WFR avatar Sep 12 '24 07:09 BH2WFR

未来所有API缺失均在此问题中跟进:https://github.com/Chuyu-Team/YY-Thunks/issues/138

mingkuang-Chuyu avatar Jan 25 '25 15:01 mingkuang-Chuyu