Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt6.5和libcef109在适配XP时一些缺失的API #85

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions src/Thunks/UIAutomationCore.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,69 @@ namespace YY::Thunks
return E_NOTIMPL;
}
#endif

#if (YY_Thunks_Support_Version < NTDDI_WIN6)

//UiaGetReservedMixedAttributeValue
__DEFINE_THUNK(
uiautomationcore,
4,
HRESULT,
WINAPI,
UiaGetReservedMixedAttributeValue,
_Outptr_ IUnknown** punkMixedAttributeValue
)
{
if (auto const pUiaGetReservedMixedAttributeValue = try_get_UiaGetReservedMixedAttributeValue())
{
return pUiaGetReservedMixedAttributeValue(punkMixedAttributeValue);
}

return E_NOTIMPL;
}

#endif

#if (YY_Thunks_Support_Version < NTDDI_WIN6)
//UiaGetReservedNotSupportedValue
__DEFINE_THUNK(
uiautomationcore,
4,
HRESULT,
WINAPI,
UiaGetReservedNotSupportedValue,
_Outptr_ IUnknown** punkNotSupportedValue
)
{
if (auto const pUiaGetReservedNotSupportedValue = try_get_UiaGetReservedNotSupportedValue())
{
return pUiaGetReservedNotSupportedValue(punkNotSupportedValue);
}

return E_NOTIMPL;
}
#endif
#if (YY_Thunks_Support_Version < NTDDI_WIN6)
//UiaRaiseStructureChangedEvent

__DEFINE_THUNK(
uiautomationcore,
16,
HRESULT,
WINAPI,
UiaRaiseStructureChangedEvent,
IRawElementProviderSimple* pProvider,
enum StructureChangeType structureChangeType,
int* pRuntimeId,
int cRuntimeIdLen
)
{
if (auto const pUiaRaiseStructureChangedEvent = try_get_UiaRaiseStructureChangedEvent())
{
return pUiaRaiseStructureChangedEvent(pProvider, structureChangeType, pRuntimeId, cRuntimeIdLen);
}

return E_NOTIMPL;
}
#endif
}
5 changes: 5 additions & 0 deletions src/Thunks/YY_Thunks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
_APPLY(dxva2, "dxva2" , 0 ) \
_APPLY(uxtheme, "uxtheme" , 0 ) \
_APPLY(uiautomationcore, "uiautomationcore" , 0 ) \
_APPLY(ncrypt, "ncrypt" , 0 ) \
_APPLY(credui, "credui" , 0 ) \
_APPLY(wevtapi, "wevtapi" , 0 ) \
_APPLY(esent, "esent" , 0 ) \
_APPLY(propsys, "propsys" , 0 ) \
_APPLY(psapi, "psapi" , 0 ) \
_APPLY(pdh, "pdh" , 0 ) \
_APPLY(version, "version" , 0 ) \
Expand Down
46 changes: 46 additions & 0 deletions src/Thunks/credui.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

#include <wincred.h>

namespace YY
{
namespace Thunks
{

#if (YY_Thunks_Support_Version < NTDDI_WIN6)
//CredUIPromptForWindowsCredentialsW
//Minimum supported client Windows Vista
//Minimum supported server Windows Server 2008
__DEFINE_THUNK(
credui,
36,
DWORD,
WINAPI,
CredUIPromptForWindowsCredentialsW,
_In_opt_ PCREDUI_INFOW pUiInfo,
_In_ DWORD dwAuthError,
_Inout_ ULONG* pulAuthPackage,
_In_reads_bytes_opt_(ulInAuthBufferSize) LPCVOID pvInAuthBuffer,
_In_ ULONG ulInAuthBufferSize,
_Outptr_result_bytebuffer_to_(*pulOutAuthBufferSize, *pulOutAuthBufferSize) LPVOID* ppvOutAuthBuffer,
_Out_ ULONG* pulOutAuthBufferSize,
_Inout_opt_ BOOL* pfSave,
_In_ DWORD dwFlags
)
{
if (auto const pCredUIPromptForWindowsCredentialsW = try_get_CredUIPromptForWindowsCredentialsW())
{
return pCredUIPromptForWindowsCredentialsW(pUiInfo, dwAuthError, pulAuthPackage, pvInAuthBuffer, ulInAuthBufferSize, ppvOutAuthBuffer,
pulOutAuthBufferSize, pfSave, dwFlags);
}

return ERROR_CANCELLED;
}

#endif




}//namespace Thunks

} //namespace YY
23 changes: 23 additions & 0 deletions src/Thunks/dwmapi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,5 +260,28 @@ namespace YY
return S_OK;
}
#endif

#if (YY_Thunks_Support_Version < NTDDI_WIN6)

//Minimum supported client Windows Vista
//Minimum supported server Windows Server 2008
__DEFINE_THUNK(
dwmapi,
8,
HRESULT,
STDAPICALLTYPE,
DwmGetCompositionTimingInfo,
_In_ HWND hWnd,
_Out_ DWM_TIMING_INFO* pTimingInfo
)
{
if (auto const pDwmGetCompositionTimingInfo = try_get_DwmGetCompositionTimingInfo())
{
return pDwmGetCompositionTimingInfo(hWnd, pTimingInfo);
}

return __HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER);
}
#endif
} // namespace Thunks
} // namespace YY
26 changes: 26 additions & 0 deletions src/Thunks/dxgi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,30 @@ namespace YY::Thunks
return E_NOINTERFACE;
}
#endif

#if (YY_Thunks_Support_Version < NTDDI_WIN7)

//Minimum supported client Windows Vista
//Minimum supported server Windows Server 2008
__DEFINE_THUNK(
dxgi,
8,
HRESULT,
STDAPICALLTYPE,
CreateDXGIFactory,
REFIID riid,
_COM_Outptr_ void** ppFactory
)
{
if (auto const pCreateDXGIFactory = try_get_CreateDXGIFactory())
{
return pCreateDXGIFactory(riid, ppFactory);
}

return DXGI_ERROR_ACCESS_DENIED;
}
#endif



}
Loading