-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fea #71, 让qt5.15.12支持XP,扩充DEPPolicy接口
- 添加 SetProcessDEPPolicy - 添加 GetSystemDEPPolicy
- Loading branch information
1 parent
241874c
commit d9d43cc
Showing
9 changed files
with
415 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
namespace YY::Thunks | ||
{ | ||
#if (YY_Thunks_Support_Version < NTDDI_WIN7) | ||
|
||
// 最低受支持的客户端 Windows 7 [仅限桌面应用] | ||
// 最低受支持的服务器 Windows Server 2008 R2[仅限桌面应用] | ||
__DEFINE_THUNK( | ||
user32, | ||
16, | ||
BOOL, | ||
WINAPI, | ||
ChangeWindowMessageFilterEx, | ||
_In_ HWND _hWnd, | ||
_In_ UINT _uMessage, | ||
_In_ DWORD _uAction, | ||
_Inout_opt_ PCHANGEFILTERSTRUCT _pChangeFilterStruct | ||
) | ||
{ | ||
if (const auto _pfnChangeWindowMessageFilterEx = try_get_ChangeWindowMessageFilterEx()) | ||
{ | ||
return _pfnChangeWindowMessageFilterEx(_hWnd, _uMessage, _uAction, _pChangeFilterStruct); | ||
} | ||
|
||
if (_hWnd == NULL || (_pChangeFilterStruct && _pChangeFilterStruct->cbSize != sizeof(CHANGEFILTERSTRUCT))) | ||
{ | ||
SetLastError(ERROR_INVALID_PARAMETER); | ||
return FALSE; | ||
} | ||
|
||
DWORD _fFlag; | ||
if (_uAction == MSGFLT_ALLOW || _uAction == MSGFLT_DISALLOW) | ||
{ | ||
_fFlag = _uAction; | ||
} | ||
else if (_uAction == MSGFLT_RESET) | ||
{ | ||
// 默认情况下大于WM_USER的全部阻止,这是系统规则。 | ||
_fFlag = _uMessage >= WM_USER ? MSGFLT_REMOVE : MSGFLT_ADD; | ||
} | ||
else | ||
{ | ||
SetLastError(ERROR_INVALID_PARAMETER); | ||
return FALSE; | ||
} | ||
|
||
auto _bRet = ChangeWindowMessageFilter(_uMessage, _fFlag); | ||
if (_bRet && _pChangeFilterStruct) | ||
{ | ||
_pChangeFilterStruct->ExtStatus = MSGFLTINFO_NONE; | ||
} | ||
|
||
return _bRet; | ||
} | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
namespace YY::Thunks | ||
{ | ||
#if (YY_Thunks_Support_Version < NTDDI_WIN6) | ||
|
||
// 最低受支持的客户端 Windows Vista [仅限桌面应用] | ||
// 最低受支持的服务器 Windows Server 2008[仅限桌面应用] | ||
__DEFINE_THUNK( | ||
user32, | ||
4, | ||
BOOL, | ||
WINAPI, | ||
AddClipboardFormatListener, | ||
_In_ HWND _hWnd | ||
) | ||
{ | ||
if (const auto _pfnAddClipboardFormatListener = try_get_AddClipboardFormatListener()) | ||
{ | ||
return _pfnAddClipboardFormatListener(_hWnd); | ||
} | ||
|
||
return TRUE; | ||
} | ||
#endif | ||
|
||
|
||
#if (YY_Thunks_Support_Version < NTDDI_WIN6) | ||
|
||
// 最低受支持的客户端 Windows Vista [仅限桌面应用] | ||
// 最低受支持的服务器 Windows Server 2008[仅限桌面应用] | ||
__DEFINE_THUNK( | ||
user32, | ||
4, | ||
BOOL, | ||
WINAPI, | ||
RemoveClipboardFormatListener, | ||
_In_ HWND _hWnd | ||
) | ||
{ | ||
if (const auto _pfnRemoveClipboardFormatListener = try_get_RemoveClipboardFormatListener()) | ||
{ | ||
return _pfnRemoveClipboardFormatListener(_hWnd); | ||
} | ||
|
||
return TRUE; | ||
} | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#include <winuser.h> | ||
|
||
namespace YY::Thunks | ||
{ | ||
#if (YY_Thunks_Support_Version < NTDDI_WIN6) | ||
|
||
// 最低受支持的客户端 在 Windows Vista 和更高版本的 Windows 操作系统中可用。 | ||
__DEFINE_THUNK( | ||
user32, | ||
4, | ||
LONG, | ||
WINAPI, | ||
DisplayConfigGetDeviceInfo, | ||
_Inout_ DISPLAYCONFIG_DEVICE_INFO_HEADER* requestPacket | ||
) | ||
{ | ||
if (const auto _pfnDisplayConfigGetDeviceInfo = try_get_DisplayConfigGetDeviceInfo()) | ||
{ | ||
return _pfnDisplayConfigGetDeviceInfo(requestPacket); | ||
} | ||
|
||
return ERROR_NOT_SUPPORTED; | ||
} | ||
#endif | ||
|
||
|
||
#if (YY_Thunks_Support_Version < NTDDI_WIN6) | ||
|
||
// 最低受支持的客户端 在 Windows Vista 和更高版本的 Windows 操作系统中可用。 | ||
__DEFINE_THUNK( | ||
user32, | ||
12, | ||
LONG, | ||
WINAPI, | ||
GetDisplayConfigBufferSizes, | ||
_In_ UINT32 flags, | ||
_Out_ UINT32* numPathArrayElements, | ||
_Out_ UINT32* numModeInfoArrayElements | ||
) | ||
{ | ||
if (const auto _pfnGetDisplayConfigBufferSizes = try_get_GetDisplayConfigBufferSizes()) | ||
{ | ||
return _pfnGetDisplayConfigBufferSizes(flags, numPathArrayElements, numModeInfoArrayElements); | ||
} | ||
|
||
return ERROR_NOT_SUPPORTED; | ||
} | ||
#endif | ||
|
||
|
||
#if (YY_Thunks_Support_Version < NTDDI_WIN6) | ||
|
||
// 最低受支持的客户端 在 Windows Vista 和更高版本的 Windows 操作系统中可用。 | ||
__DEFINE_THUNK( | ||
user32, | ||
24, | ||
LONG, | ||
WINAPI, | ||
QueryDisplayConfig, | ||
_In_ UINT32 flags, | ||
_Inout_ UINT32* numPathArrayElements, | ||
_Out_writes_to_(*numPathArrayElements, *numPathArrayElements) DISPLAYCONFIG_PATH_INFO* pathArray, | ||
_Inout_ UINT32* numModeInfoArrayElements, | ||
_Out_writes_to_(*numModeInfoArrayElements, *numModeInfoArrayElements) DISPLAYCONFIG_MODE_INFO* modeInfoArray, | ||
_When_(!(flags & QDC_DATABASE_CURRENT), _Pre_null_) | ||
_When_(flags & QDC_DATABASE_CURRENT, _Out_) | ||
DISPLAYCONFIG_TOPOLOGY_ID* currentTopologyId | ||
) | ||
{ | ||
if (const auto _pfnQueryDisplayConfig = try_get_QueryDisplayConfig()) | ||
{ | ||
return _pfnQueryDisplayConfig(flags, numPathArrayElements, pathArray, numModeInfoArrayElements, modeInfoArray, currentTopologyId); | ||
} | ||
|
||
return ERROR_NOT_SUPPORTED; | ||
} | ||
#endif | ||
} |
Oops, something went wrong.