From f4d0d53445f58cb0046d92b8dbb7564fecb933b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 29 Nov 2025 18:50:22 +0100 Subject: [PATCH] [NTDLL_APITEST] Adjust ThreadHideFromDebugger support for NtQueryInformationThread() probing tests (#8486) --- modules/rostests/apitests/ntdll/probelib.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/rostests/apitests/ntdll/probelib.c b/modules/rostests/apitests/ntdll/probelib.c index a44a2eb346b..e3ce8b3d16f 100644 --- a/modules/rostests/apitests/ntdll/probelib.c +++ b/modules/rostests/apitests/ntdll/probelib.c @@ -281,13 +281,20 @@ QuerySetThreadValidator( case ThreadZeroTlsCell: case ThreadIdealProcessor: case ThreadSetTlsArrayAddress: - case ThreadHideFromDebugger: case ThreadSwitchLegacyState: { SpecialStatus = STATUS_INVALID_INFO_CLASS; break; } + /* This class supports queries only on Vista and above */ + case ThreadHideFromDebugger: + { + if (GetNTVersion() < _WIN32_WINNT_VISTA) + SpecialStatus = STATUS_INVALID_INFO_CLASS; + break; + } + /* These classes don't exist in Server 2003 SP2 */ case ThreadEventPair_Reusable: case ThreadLastSystemCall: @@ -329,7 +336,7 @@ QuerySetThreadValidator( /* * This class doesn't take a strict type for size length. - * The function happily succeds on an information length + * The function happily succeeds on an information length * mismatch scenario with STATUS_SUCCESS. */ case ThreadHideFromDebugger: