"0x%lx or special status (0x%lx) expected but got 0x%lx for class information %lu in query information process operation!\n",ExpectedStatus,SpecialStatus,Status,InfoClassIndex);
"0x%lx or special status (0x%lx) expected but got 0x%lx for class information %lu in set information process operation!\n",ExpectedStatus,SpecialStatus,Status,InfoClassIndex);
break;
}
default:
break;
}
}
VOID
QuerySetThreadValidator(
_In_ALIGNMENT_PROBE_MODEValidationMode,
_In_ULONGInfoClassIndex,
_In_PVOIDInfoPointer,
_In_ULONGInfoLength,
_In_NTSTATUSExpectedStatus)
{
NTSTATUSStatus,SpecialStatus=STATUS_SUCCESS;
/* Before doing anything, check if we want query or set validation */
switch(ValidationMode)
{
caseQUERY:
{
switch(InfoClassIndex)
{
/* These classes don't belong in the query group */
caseThreadPriority:
caseThreadBasePriority:
caseThreadAffinityMask:
caseThreadImpersonationToken:
caseThreadEnableAlignmentFaultFixup:
caseThreadZeroTlsCell:
caseThreadIdealProcessor:
caseThreadSetTlsArrayAddress:
caseThreadHideFromDebugger:
caseThreadSwitchLegacyState:
{
SpecialStatus=STATUS_INVALID_INFO_CLASS;
break;
}
/* These classes don't exist in Server 2003 SP2 */
"0x%lx or special status (0x%lx) expected but got 0x%lx for class information %lu in query information thread operation!\n",ExpectedStatus,SpecialStatus,Status,InfoClassIndex);
break;
}
caseSET:
{
switch(InfoClassIndex)
{
/* This class is not implemented in Windows Server 2003 SP2 */
caseThreadSwitchLegacyState:
{
SpecialStatus=STATUS_NOT_IMPLEMENTED;
break;
}
/*
*Thisclassdoesn'ttakeastricttypeforsizelength.
*Thefunctionhappilysuccedsonaninformationlength
*mismatchscenariowithSTATUS_SUCCESS.
*/
caseThreadHideFromDebugger:
{
SpecialStatus=STATUS_INFO_LENGTH_MISMATCH;
break;
}
/* These classes don't belong in the set group */
caseThreadBasicInformation:
caseThreadTimes:
caseThreadDescriptorTableEntry:
caseThreadPerformanceCount:
caseThreadAmILastThread:
caseThreadIsIoPending:
caseThreadIsTerminated:
{
SpecialStatus=STATUS_INVALID_INFO_CLASS;
break;
}
/* These classes don't exist in Server 2003 SP2 */
caseThreadEventPair_Reusable:
caseThreadLastSystemCall:
caseThreadIoPriority:
caseThreadCycleTime:
caseThreadPagePriority:
caseThreadActualBasePriority:
caseThreadTebInformation:
caseThreadCSwitchMon:
{
SpecialStatus=STATUS_INVALID_INFO_CLASS;
break;
}
/* Alignment probing is not performed for this class */
"0x%lx or special status (0x%lx) expected but got 0x%lx for class information %lu in set information thread operation!\n",ExpectedStatus,SpecialStatus,Status,InfoClassIndex);