mirror of
https://github.com/processhacker/phnt
synced 2026-06-08 16:49:04 +00:00
Update headers for 20H1
This commit is contained in:
+2120
File diff suppressed because it is too large
Load Diff
@@ -285,6 +285,14 @@ NtFilterBootOption(
|
||||
#define EVENT_QUERY_STATE 0x0001
|
||||
#endif
|
||||
|
||||
#ifndef EVENT_MODIFY_STATE
|
||||
#define EVENT_MODIFY_STATE 0x0002
|
||||
#endif
|
||||
|
||||
#ifndef EVENT_ALL_ACCESS
|
||||
#define EVENT_ALL_ACCESS (EVENT_QUERY_STATE|EVENT_MODIFY_STATE|STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE)
|
||||
#endif
|
||||
|
||||
typedef enum _EVENT_INFORMATION_CLASS
|
||||
{
|
||||
EventBasicInformation
|
||||
@@ -1249,22 +1257,22 @@ typedef enum _SYSTEM_INFORMATION_CLASS
|
||||
SystemHandleInformation, // q: SYSTEM_HANDLE_INFORMATION
|
||||
SystemObjectInformation, // q: SYSTEM_OBJECTTYPE_INFORMATION mixed with SYSTEM_OBJECT_INFORMATION
|
||||
SystemPageFileInformation, // q: SYSTEM_PAGEFILE_INFORMATION
|
||||
SystemVdmInstemulInformation, // q
|
||||
SystemVdmInstemulInformation, // q: SYSTEM_VDM_INSTEMUL_INFO
|
||||
SystemVdmBopInformation, // not implemented // 20
|
||||
SystemFileCacheInformation, // q: SYSTEM_FILECACHE_INFORMATION; s (requires SeIncreaseQuotaPrivilege) (info for WorkingSetTypeSystemCache)
|
||||
SystemPoolTagInformation, // q: SYSTEM_POOLTAG_INFORMATION
|
||||
SystemInterruptInformation, // q: SYSTEM_INTERRUPT_INFORMATION
|
||||
SystemDpcBehaviorInformation, // q: SYSTEM_DPC_BEHAVIOR_INFORMATION; s: SYSTEM_DPC_BEHAVIOR_INFORMATION (requires SeLoadDriverPrivilege)
|
||||
SystemFullMemoryInformation, // not implemented
|
||||
SystemFullMemoryInformation, // not implemented // SYSTEM_MEMORY_USAGE_INFORMATION
|
||||
SystemLoadGdiDriverInformation, // s (kernel-mode only)
|
||||
SystemUnloadGdiDriverInformation, // s (kernel-mode only)
|
||||
SystemTimeAdjustmentInformation, // q: SYSTEM_QUERY_TIME_ADJUST_INFORMATION; s: SYSTEM_SET_TIME_ADJUST_INFORMATION (requires SeSystemtimePrivilege)
|
||||
SystemSummaryMemoryInformation, // not implemented
|
||||
SystemSummaryMemoryInformation, // not implemented // SYSTEM_MEMORY_USAGE_INFORMATION
|
||||
SystemMirrorMemoryInformation, // s (requires license value "Kernel-MemoryMirroringSupported") (requires SeShutdownPrivilege) // 30
|
||||
SystemPerformanceTraceInformation, // q; s: (type depends on EVENT_TRACE_INFORMATION_CLASS)
|
||||
SystemObsolete0, // not implemented
|
||||
SystemExceptionInformation, // q: SYSTEM_EXCEPTION_INFORMATION
|
||||
SystemCrashDumpStateInformation, // s (requires SeDebugPrivilege)
|
||||
SystemCrashDumpStateInformation, // s: SYSTEM_CRASH_DUMP_STATE_INFORMATION (requires SeDebugPrivilege)
|
||||
SystemKernelDebuggerInformation, // q: SYSTEM_KERNEL_DEBUGGER_INFORMATION
|
||||
SystemContextSwitchInformation, // q: SYSTEM_CONTEXT_SWITCH_INFORMATION
|
||||
SystemRegistryQuotaInformation, // q: SYSTEM_REGISTRY_QUOTA_INFORMATION; s (requires SeIncreaseQuotaPrivilege)
|
||||
@@ -1305,7 +1313,7 @@ typedef enum _SYSTEM_INFORMATION_CLASS
|
||||
SystemWatchdogTimerInformation, // q (kernel-mode only); s (kernel-mode only)
|
||||
SystemLogicalProcessorInformation, // q: SYSTEM_LOGICAL_PROCESSOR_INFORMATION
|
||||
SystemWow64SharedInformationObsolete, // not implemented
|
||||
SystemRegisterFirmwareTableInformationHandler, // s (kernel-mode only)
|
||||
SystemRegisterFirmwareTableInformationHandler, // s: SYSTEM_FIRMWARE_TABLE_HANDLER // (kernel-mode only)
|
||||
SystemFirmwareTableInformation, // SYSTEM_FIRMWARE_TABLE_INFORMATION
|
||||
SystemModuleInformationEx, // q: RTL_PROCESS_MODULE_INFORMATION_EX
|
||||
SystemVerifierTriageInformation, // not implemented
|
||||
@@ -1314,10 +1322,10 @@ typedef enum _SYSTEM_INFORMATION_CLASS
|
||||
SystemFileCacheInformationEx, // q: SYSTEM_FILECACHE_INFORMATION; s (requires SeIncreaseQuotaPrivilege) (same as SystemFileCacheInformation)
|
||||
SystemThreadPriorityClientIdInformation, // s: SYSTEM_THREAD_CID_PRIORITY_INFORMATION (requires SeIncreaseBasePriorityPrivilege)
|
||||
SystemProcessorIdleCycleTimeInformation, // q: SYSTEM_PROCESSOR_IDLE_CYCLE_TIME_INFORMATION[]
|
||||
SystemVerifierCancellationInformation, // not implemented // name:wow64:whNT32QuerySystemVerifierCancellationInformation
|
||||
SystemVerifierCancellationInformation, // SYSTEM_VERIFIER_CANCELLATION_INFORMATION // name:wow64:whNT32QuerySystemVerifierCancellationInformation
|
||||
SystemProcessorPowerInformationEx, // not implemented
|
||||
SystemRefTraceInformation, // q; s: SYSTEM_REF_TRACE_INFORMATION // ObQueryRefTraceInformation
|
||||
SystemSpecialPoolInformation, // q; s (requires SeDebugPrivilege) // MmSpecialPoolTag, then MmSpecialPoolCatchOverruns != 0
|
||||
SystemSpecialPoolInformation, // q; s: SYSTEM_SPECIAL_POOL_INFORMATION (requires SeDebugPrivilege) // MmSpecialPoolTag, then MmSpecialPoolCatchOverruns != 0
|
||||
SystemProcessIdInformation, // q: SYSTEM_PROCESS_ID_INFORMATION
|
||||
SystemErrorPortInformation, // s (requires SeTcbPrivilege)
|
||||
SystemBootEnvironmentInformation, // q: SYSTEM_BOOT_ENVIRONMENT_INFORMATION // 90
|
||||
@@ -1326,15 +1334,15 @@ typedef enum _SYSTEM_INFORMATION_CLASS
|
||||
SystemTimeZoneInformation, // s (requires SeTimeZonePrivilege)
|
||||
SystemImageFileExecutionOptionsInformation, // s: SYSTEM_IMAGE_FILE_EXECUTION_OPTIONS_INFORMATION (requires SeTcbPrivilege)
|
||||
SystemCoverageInformation, // q; s // name:wow64:whNT32QuerySystemCoverageInformation; ExpCovQueryInformation
|
||||
SystemPrefetchPatchInformation, // not implemented
|
||||
SystemVerifierFaultsInformation, // s (requires SeDebugPrivilege)
|
||||
SystemPrefetchPatchInformation, // SYSTEM_PREFETCH_PATCH_INFORMATION
|
||||
SystemVerifierFaultsInformation, // s: SYSTEM_VERIFIER_FAULTS_INFORMATION (requires SeDebugPrivilege)
|
||||
SystemSystemPartitionInformation, // q: SYSTEM_SYSTEM_PARTITION_INFORMATION
|
||||
SystemSystemDiskInformation, // q: SYSTEM_SYSTEM_DISK_INFORMATION
|
||||
SystemProcessorPerformanceDistribution, // q: SYSTEM_PROCESSOR_PERFORMANCE_DISTRIBUTION // 100
|
||||
SystemNumaProximityNodeInformation,
|
||||
SystemDynamicTimeZoneInformation, // q; s (requires SeTimeZonePrivilege)
|
||||
SystemCodeIntegrityInformation, // q: SYSTEM_CODEINTEGRITY_INFORMATION // SeCodeIntegrityQueryInformation
|
||||
SystemProcessorMicrocodeUpdateInformation, // s
|
||||
SystemProcessorMicrocodeUpdateInformation, // s: SYSTEM_PROCESSOR_MICROCODE_UPDATE_INFORMATION
|
||||
SystemProcessorBrandString, // q // HaliQuerySystemInformation -> HalpGetProcessorBrandString, info class 23
|
||||
SystemVirtualAddressInformation, // q: SYSTEM_VA_LIST_INFORMATION[]; s: SYSTEM_VA_LIST_INFORMATION[] (requires SeIncreaseQuotaPrivilege) // MmQuerySystemVaInformation
|
||||
SystemLogicalProcessorAndGroupInformation, // q: SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX // since WIN7 // KeQueryLogicalProcessorRelationship
|
||||
@@ -1345,7 +1353,7 @@ typedef enum _SYSTEM_INFORMATION_CLASS
|
||||
SystemVhdBootInformation, // q: SYSTEM_VHD_BOOT_INFORMATION
|
||||
SystemCpuQuotaInformation, // q; s // PsQueryCpuQuotaInformation
|
||||
SystemNativeBasicInformation, // not implemented
|
||||
SystemSpare1, // not implemented
|
||||
SystemErrorPortTimeouts, // SYSTEM_ERROR_PORT_TIMEOUTS
|
||||
SystemLowPriorityIoInformation, // q: SYSTEM_LOW_PRIORITY_IO_INFORMATION
|
||||
SystemTpmBootEntropyInformation, // q: TPM_BOOT_ENTROPY_NT_RESULT // ExQueryTpmBootEntropyInformation
|
||||
SystemVerifierCountersInformation, // q: SYSTEM_VERIFIER_COUNTERS_INFORMATION
|
||||
@@ -1361,18 +1369,18 @@ typedef enum _SYSTEM_INFORMATION_CLASS
|
||||
SystemBadPageInformation,
|
||||
SystemProcessorProfileControlArea, // q; s: SYSTEM_PROCESSOR_PROFILE_CONTROL_AREA
|
||||
SystemCombinePhysicalMemoryInformation, // s: MEMORY_COMBINE_INFORMATION, MEMORY_COMBINE_INFORMATION_EX, MEMORY_COMBINE_INFORMATION_EX2 // 130
|
||||
SystemEntropyInterruptTimingCallback,
|
||||
SystemEntropyInterruptTimingInformation,
|
||||
SystemConsoleInformation, // q: SYSTEM_CONSOLE_INFORMATION
|
||||
SystemPlatformBinaryInformation, // q: SYSTEM_PLATFORM_BINARY_INFORMATION
|
||||
SystemThrottleNotificationInformation,
|
||||
SystemPolicyInformation, // SYSTEM_POLICY_INFORMATION
|
||||
SystemHypervisorProcessorCountInformation, // q: SYSTEM_HYPERVISOR_PROCESSOR_COUNT_INFORMATION
|
||||
SystemDeviceDataInformation, // q: SYSTEM_DEVICE_DATA_INFORMATION
|
||||
SystemDeviceDataEnumerationInformation,
|
||||
SystemDeviceDataEnumerationInformation, // q: SYSTEM_DEVICE_DATA_INFORMATION
|
||||
SystemMemoryTopologyInformation, // q: SYSTEM_MEMORY_TOPOLOGY_INFORMATION
|
||||
SystemMemoryChannelInformation, // q: SYSTEM_MEMORY_CHANNEL_INFORMATION
|
||||
SystemBootLogoInformation, // q: SYSTEM_BOOT_LOGO_INFORMATION // 140
|
||||
SystemProcessorPerformanceInformationEx, // q: SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION_EX // since WINBLUE
|
||||
SystemSpare0,
|
||||
SystemCriticalProcessErrorLogInformation,
|
||||
SystemSecureBootPolicyInformation, // q: SYSTEM_SECUREBOOT_POLICY_INFORMATION
|
||||
SystemPageFileInformationEx, // q: SYSTEM_PAGEFILE_INFORMATION_EX
|
||||
SystemSecureBootInformation, // q: SYSTEM_SECUREBOOT_INFORMATION
|
||||
@@ -1385,7 +1393,7 @@ typedef enum _SYSTEM_INFORMATION_CLASS
|
||||
SystemElamCertificateInformation, // s: SYSTEM_ELAM_CERTIFICATE_INFORMATION
|
||||
SystemOfflineDumpConfigInformation,
|
||||
SystemProcessorFeaturesInformation, // q: SYSTEM_PROCESSOR_FEATURES_INFORMATION
|
||||
SystemRegistryReconciliationInformation,
|
||||
SystemRegistryReconciliationInformation, // s: NULL (requires admin) (flushes registry hives)
|
||||
SystemEdidInformation,
|
||||
SystemManufacturingInformation, // q: SYSTEM_MANUFACTURING_INFORMATION // since THRESHOLD
|
||||
SystemEnergyEstimationConfigInformation, // q: SYSTEM_ENERGY_ESTIMATION_CONFIG_INFORMATION
|
||||
@@ -1410,7 +1418,7 @@ typedef enum _SYSTEM_INFORMATION_CLASS
|
||||
SystemWin32WerStartCallout,
|
||||
SystemSecureKernelProfileInformation, // q: SYSTEM_SECURE_KERNEL_HYPERGUARD_PROFILE_INFORMATION
|
||||
SystemCodeIntegrityPlatformManifestInformation, // q: SYSTEM_SECUREBOOT_PLATFORM_MANIFEST_INFORMATION // since REDSTONE
|
||||
SystemInterruptSteeringInformation, // 180
|
||||
SystemInterruptSteeringInformation, // SYSTEM_INTERRUPT_STEERING_INFORMATION_INPUT // 180
|
||||
SystemSupportedProcessorArchitectures,
|
||||
SystemMemoryUsageInformation, // q: SYSTEM_MEMORY_USAGE_INFORMATION
|
||||
SystemCodeIntegrityCertificateInformation, // q: SYSTEM_CODEINTEGRITY_CERTIFICATE_INFORMATION
|
||||
@@ -1440,6 +1448,19 @@ typedef enum _SYSTEM_INFORMATION_CLASS
|
||||
SystemFlags2Information, // q: SYSTEM_FLAGS_INFORMATION
|
||||
SystemSecurityModelInformation, // SYSTEM_SECURITY_MODEL_INFORMATION // since 19H1
|
||||
SystemCodeIntegritySyntheticCacheInformation,
|
||||
SystemFeatureConfigurationInformation, // SYSTEM_FEATURE_CONFIGURATION_INFORMATION // since 20H1 // 210
|
||||
SystemFeatureConfigurationSectionInformation, // SYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION
|
||||
SystemFeatureUsageSubscriptionInformation,
|
||||
SystemSecureSpeculationControlInformation, // SECURE_SPECULATION_CONTROL_INFORMATION
|
||||
// SystemSpacesBootInformation = 214,
|
||||
// SystemFwRamdiskInformation = 215,
|
||||
// SystemWheaIpmiHardwareInformation = 216,
|
||||
// SystemDifSetRuleClassInformation = 217,
|
||||
// SystemDifClearRuleClassInformation = 218,
|
||||
// SystemDifApplyPluginVerificationOnDriver = 219,
|
||||
// SystemDifRemovePluginVerificationOnDriver = 220,
|
||||
// SystemShadowStackInformation = 221, // SYSTEM_SHADOW_STACK_INFORMATION
|
||||
// SystemBuildVersionInformation = 222, // SYSTEM_BUILD_VERSION_INFORMATION
|
||||
MaxSystemInfoClass
|
||||
} SYSTEM_INFORMATION_CLASS;
|
||||
|
||||
@@ -1769,6 +1790,44 @@ typedef struct _SYSTEM_PAGEFILE_INFORMATION
|
||||
UNICODE_STRING PageFileName;
|
||||
} SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
|
||||
|
||||
typedef struct _SYSTEM_VDM_INSTEMUL_INFO
|
||||
{
|
||||
ULONG SegmentNotPresent;
|
||||
ULONG VdmOpcode0F;
|
||||
ULONG OpcodeESPrefix;
|
||||
ULONG OpcodeCSPrefix;
|
||||
ULONG OpcodeSSPrefix;
|
||||
ULONG OpcodeDSPrefix;
|
||||
ULONG OpcodeFSPrefix;
|
||||
ULONG OpcodeGSPrefix;
|
||||
ULONG OpcodeOPER32Prefix;
|
||||
ULONG OpcodeADDR32Prefix;
|
||||
ULONG OpcodeINSB;
|
||||
ULONG OpcodeINSW;
|
||||
ULONG OpcodeOUTSB;
|
||||
ULONG OpcodeOUTSW;
|
||||
ULONG OpcodePUSHF;
|
||||
ULONG OpcodePOPF;
|
||||
ULONG OpcodeINTnn;
|
||||
ULONG OpcodeINTO;
|
||||
ULONG OpcodeIRET;
|
||||
ULONG OpcodeINBimm;
|
||||
ULONG OpcodeINWimm;
|
||||
ULONG OpcodeOUTBimm;
|
||||
ULONG OpcodeOUTWimm;
|
||||
ULONG OpcodeINB;
|
||||
ULONG OpcodeINW;
|
||||
ULONG OpcodeOUTB;
|
||||
ULONG OpcodeOUTW;
|
||||
ULONG OpcodeLOCKPrefix;
|
||||
ULONG OpcodeREPNEPrefix;
|
||||
ULONG OpcodeREPPrefix;
|
||||
ULONG OpcodeHLT;
|
||||
ULONG OpcodeCLI;
|
||||
ULONG OpcodeSTI;
|
||||
ULONG BopCount;
|
||||
} SYSTEM_VDM_INSTEMUL_INFO, *PSYSTEM_VDM_INSTEMUL_INFO;
|
||||
|
||||
#define MM_WORKING_SET_MAX_HARD_ENABLE 0x1
|
||||
#define MM_WORKING_SET_MAX_HARD_DISABLE 0x2
|
||||
#define MM_WORKING_SET_MIN_HARD_ENABLE 0x4
|
||||
@@ -1874,11 +1933,11 @@ typedef enum _EVENT_TRACE_INFORMATION_CLASS
|
||||
EventTraceHeapTracingInformation, // EVENT_TRACE_HEAP_TRACING_INFORMATION
|
||||
EventTraceHeapSummaryTracingInformation, // EVENT_TRACE_HEAP_TRACING_INFORMATION
|
||||
EventTracePoolTagFilterInformation, // EVENT_TRACE_TAG_FILTER_INFORMATION
|
||||
EventTracePebsTracingInformation, // EVENT_TRACE_SYSTEM_EVENT_INFORMATION
|
||||
EventTracePebsTracingInformation, // EVENT_TRACE_SYSTEM_EVENT_INFORMATION
|
||||
EventTraceProfileConfigInformation, // EVENT_TRACE_PROFILE_COUNTER_INFORMATION
|
||||
EventTraceProfileSourceListInformation, // EVENT_TRACE_PROFILE_LIST_INFORMATION
|
||||
EventTraceProfileEventListInformation, // EVENT_TRACE_SYSTEM_EVENT_INFORMATION
|
||||
EventTraceProfileCounterListInformation, // EVENT_TRACE_PROFILE_COUNTER_INFORMATION
|
||||
EventTraceProfileEventListInformation, // EVENT_TRACE_SYSTEM_EVENT_INFORMATION
|
||||
EventTraceProfileCounterListInformation, // EVENT_TRACE_PROFILE_COUNTER_INFORMATION
|
||||
EventTraceStackCachingInformation, // EVENT_TRACE_STACK_CACHING_INFORMATION
|
||||
EventTraceObjectTypeFilterInformation, // EVENT_TRACE_TAG_FILTER_INFORMATION
|
||||
EventTraceSoftRestartInformation, // EVENT_TRACE_SOFT_RESTART_INFORMATION
|
||||
@@ -2047,6 +2106,18 @@ typedef struct _SYSTEM_EXCEPTION_INFORMATION
|
||||
ULONG ByteWordEmulationCount;
|
||||
} SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
|
||||
|
||||
typedef enum _SYSTEM_CRASH_DUMP_CONFIGURATION_CLASS
|
||||
{
|
||||
SystemCrashDumpDisable,
|
||||
SystemCrashDumpReconfigure,
|
||||
SystemCrashDumpInitializationComplete
|
||||
} SYSTEM_CRASH_DUMP_CONFIGURATION_CLASS, *PSYSTEM_CRASH_DUMP_CONFIGURATION_CLASS;
|
||||
|
||||
typedef struct _SYSTEM_CRASH_DUMP_STATE_INFORMATION
|
||||
{
|
||||
SYSTEM_CRASH_DUMP_CONFIGURATION_CLASS CrashDumpConfigurationClass;
|
||||
} SYSTEM_CRASH_DUMP_STATE_INFORMATION, *PSYSTEM_CRASH_DUMP_STATE_INFORMATION;
|
||||
|
||||
typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION
|
||||
{
|
||||
BOOLEAN KernelDebuggerEnabled;
|
||||
@@ -2320,6 +2391,22 @@ typedef struct _SYSTEM_FIRMWARE_TABLE_INFORMATION
|
||||
} SYSTEM_FIRMWARE_TABLE_INFORMATION, *PSYSTEM_FIRMWARE_TABLE_INFORMATION;
|
||||
#endif
|
||||
|
||||
#if (PHNT_MODE != PHNT_MODE_KERNEL)
|
||||
// private
|
||||
typedef NTSTATUS (__cdecl* PFNFTH)(
|
||||
_Inout_ PSYSTEM_FIRMWARE_TABLE_INFORMATION SystemFirmwareTableInfo
|
||||
);
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_FIRMWARE_TABLE_HANDLER
|
||||
{
|
||||
ULONG ProviderSignature;
|
||||
BOOLEAN Register;
|
||||
PFNFTH FirmwareTableHandler;
|
||||
PVOID DriverObject;
|
||||
} SYSTEM_FIRMWARE_TABLE_HANDLER, *PSYSTEM_FIRMWARE_TABLE_HANDLER;
|
||||
#endif
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_MEMORY_LIST_INFORMATION
|
||||
{
|
||||
@@ -2358,6 +2445,25 @@ typedef struct _SYSTEM_PROCESSOR_IDLE_CYCLE_TIME_INFORMATION
|
||||
ULONGLONG CycleTime;
|
||||
} SYSTEM_PROCESSOR_IDLE_CYCLE_TIME_INFORMATION, *PSYSTEM_PROCESSOR_IDLE_CYCLE_TIME_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_VERIFIER_ISSUE
|
||||
{
|
||||
ULONGLONG IssueType;
|
||||
PVOID Address;
|
||||
ULONGLONG Parameters[2];
|
||||
} SYSTEM_VERIFIER_ISSUE, *PSYSTEM_VERIFIER_ISSUE;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_VERIFIER_CANCELLATION_INFORMATION
|
||||
{
|
||||
ULONG CancelProbability;
|
||||
ULONG CancelThreshold;
|
||||
ULONG CompletionThreshold;
|
||||
ULONG CancellationVerifierDisabled;
|
||||
ULONG AvailableIssues;
|
||||
SYSTEM_VERIFIER_ISSUE Issues[128];
|
||||
} SYSTEM_VERIFIER_CANCELLATION_INFORMATION, *PSYSTEM_VERIFIER_CANCELLATION_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_REF_TRACE_INFORMATION
|
||||
{
|
||||
@@ -2367,6 +2473,13 @@ typedef struct _SYSTEM_REF_TRACE_INFORMATION
|
||||
UNICODE_STRING TracePoolTags;
|
||||
} SYSTEM_REF_TRACE_INFORMATION, *PSYSTEM_REF_TRACE_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_SPECIAL_POOL_INFORMATION
|
||||
{
|
||||
ULONG PoolTag;
|
||||
ULONG Flags;
|
||||
} SYSTEM_SPECIAL_POOL_INFORMATION, *PSYSTEM_SPECIAL_POOL_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_PROCESS_ID_INFORMATION
|
||||
{
|
||||
@@ -2391,6 +2504,7 @@ typedef struct _SYSTEM_BOOT_ENVIRONMENT_INFORMATION
|
||||
ULONGLONG DbgMeasuredLaunchCapable : 1; // 19H1
|
||||
ULONGLONG DbgSystemHiveReplace : 1;
|
||||
ULONGLONG DbgMeasuredLaunchSmmProtections : 1;
|
||||
ULONGLONG DbgMeasuredLaunchSmmLevel : 7; // 20H1
|
||||
};
|
||||
};
|
||||
} SYSTEM_BOOT_ENVIRONMENT_INFORMATION, *PSYSTEM_BOOT_ENVIRONMENT_INFORMATION;
|
||||
@@ -2402,6 +2516,21 @@ typedef struct _SYSTEM_IMAGE_FILE_EXECUTION_OPTIONS_INFORMATION
|
||||
ULONG FlagsToDisable;
|
||||
} SYSTEM_IMAGE_FILE_EXECUTION_OPTIONS_INFORMATION, *PSYSTEM_IMAGE_FILE_EXECUTION_OPTIONS_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_PREFETCH_PATCH_INFORMATION
|
||||
{
|
||||
ULONG PrefetchPatchCount;
|
||||
} SYSTEM_PREFETCH_PATCH_INFORMATION, *PSYSTEM_PREFETCH_PATCH_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_VERIFIER_FAULTS_INFORMATION
|
||||
{
|
||||
ULONG Probability;
|
||||
ULONG MaxProbability;
|
||||
UNICODE_STRING PoolTags;
|
||||
UNICODE_STRING Applications;
|
||||
} SYSTEM_VERIFIER_FAULTS_INFORMATION, *PSYSTEM_VERIFIER_FAULTS_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_VERIFIER_INFORMATION_EX
|
||||
{
|
||||
@@ -2480,6 +2609,12 @@ typedef struct _SYSTEM_CODEINTEGRITY_INFORMATION
|
||||
ULONG CodeIntegrityOptions;
|
||||
} SYSTEM_CODEINTEGRITY_INFORMATION, *PSYSTEM_CODEINTEGRITY_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_PROCESSOR_MICROCODE_UPDATE_INFORMATION
|
||||
{
|
||||
ULONG Operation;
|
||||
} SYSTEM_PROCESSOR_MICROCODE_UPDATE_INFORMATION, *PSYSTEM_PROCESSOR_MICROCODE_UPDATE_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef enum _SYSTEM_VA_TYPE
|
||||
{
|
||||
@@ -2556,6 +2691,13 @@ typedef struct _SYSTEM_VHD_BOOT_INFORMATION
|
||||
WCHAR OsVhdParentVolume[ANYSIZE_ARRAY];
|
||||
} SYSTEM_VHD_BOOT_INFORMATION, *PSYSTEM_VHD_BOOT_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_ERROR_PORT_TIMEOUTS
|
||||
{
|
||||
ULONG StartTimeout;
|
||||
ULONG CommTimeout;
|
||||
} SYSTEM_ERROR_PORT_TIMEOUTS, *PSYSTEM_ERROR_PORT_TIMEOUTS;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_LOW_PRIORITY_IO_INFORMATION
|
||||
{
|
||||
@@ -2789,6 +2931,16 @@ typedef struct _SYSTEM_PLATFORM_BINARY_INFORMATION
|
||||
ULONG CommandLineBufferSize;
|
||||
} SYSTEM_PLATFORM_BINARY_INFORMATION, *PSYSTEM_PLATFORM_BINARY_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_POLICY_INFORMATION
|
||||
{
|
||||
PVOID InputData;
|
||||
PVOID OutputData;
|
||||
ULONG InputDataSize;
|
||||
ULONG OutputDataSize;
|
||||
ULONG Version;
|
||||
} SYSTEM_POLICY_INFORMATION, *PSYSTEM_POLICY_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_HYPERVISOR_PROCESSOR_COUNT_INFORMATION
|
||||
{
|
||||
@@ -2859,7 +3011,7 @@ typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION_EX
|
||||
} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION_EX, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION_EX;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_SECUREBOOT_POLICY_INFORMATION
|
||||
typedef struct _SYSTEM_SECUREBOOT_POLICY_INFORMATION
|
||||
{
|
||||
GUID PolicyPublisher;
|
||||
ULONG PolicyVersion;
|
||||
@@ -2918,7 +3070,7 @@ typedef union _ENERGY_STATE_DURATION
|
||||
|
||||
typedef struct _PROCESS_ENERGY_VALUES
|
||||
{
|
||||
ULONGLONG Cycles[4][2];
|
||||
ULONGLONG Cycles[2][4];
|
||||
ULONGLONG DiskEnergy;
|
||||
ULONGLONG NetworkTailEnergy;
|
||||
ULONGLONG MBBTailEnergy;
|
||||
@@ -2985,7 +3137,7 @@ typedef struct _PROCESS_ENERGY_VALUES_EXTENSION
|
||||
ENERGY_STATE_DURATION PSMBackgroundDuration;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
ULONG KeyboardInput;
|
||||
ULONG MouseInput;
|
||||
} PROCESS_ENERGY_VALUES_EXTENSION, *PPROCESS_ENERGY_VALUES_EXTENSION;
|
||||
@@ -3094,7 +3246,7 @@ typedef struct _SYSTEM_HYPERVISOR_DETAIL_INFORMATION
|
||||
// private
|
||||
typedef struct _SYSTEM_PROCESSOR_CYCLE_STATS_INFORMATION
|
||||
{
|
||||
ULONGLONG Cycles[4][2];
|
||||
ULONGLONG Cycles[2][4];
|
||||
} SYSTEM_PROCESSOR_CYCLE_STATS_INFORMATION, *PSYSTEM_PROCESSOR_CYCLE_STATS_INFORMATION;
|
||||
|
||||
// private
|
||||
@@ -3109,12 +3261,13 @@ typedef struct _SYSTEM_VSM_PROTECTION_INFORMATION
|
||||
BOOLEAN DmaProtectionsAvailable;
|
||||
BOOLEAN DmaProtectionsInUse;
|
||||
BOOLEAN HardwareMbecAvailable; // REDSTONE4 (CVE-2018-3639)
|
||||
BOOLEAN ApicVirtualizationAvailable; // 20H1
|
||||
} SYSTEM_VSM_PROTECTION_INFORMATION, *PSYSTEM_VSM_PROTECTION_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_KERNEL_DEBUGGER_FLAGS
|
||||
{
|
||||
UCHAR KernelDebuggerIgnoreUmExceptions;
|
||||
BOOLEAN KernelDebuggerIgnoreUmExceptions;
|
||||
} SYSTEM_KERNEL_DEBUGGER_FLAGS, *PSYSTEM_KERNEL_DEBUGGER_FLAGS;
|
||||
|
||||
// private
|
||||
@@ -3216,6 +3369,16 @@ typedef struct _SYSTEM_SECUREBOOT_PLATFORM_MANIFEST_INFORMATION
|
||||
UCHAR PlatformManifest[1];
|
||||
} SYSTEM_SECUREBOOT_PLATFORM_MANIFEST_INFORMATION, *PSYSTEM_SECUREBOOT_PLATFORM_MANIFEST_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_INTERRUPT_STEERING_INFORMATION_INPUT
|
||||
{
|
||||
ULONG Gsiv;
|
||||
UCHAR ControllerInterrupt;
|
||||
UCHAR EdgeInterrupt;
|
||||
UCHAR IsPrimaryInterrupt;
|
||||
GROUP_AFFINITY TargetAffinity;
|
||||
} SYSTEM_INTERRUPT_STEERING_INFORMATION_INPUT, *PSYSTEM_INTERRUPT_STEERING_INFORMATION_INPUT;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_MEMORY_USAGE_INFORMATION
|
||||
{
|
||||
@@ -3318,7 +3481,7 @@ typedef struct _SYSTEM_KERNEL_VA_SHADOW_INFORMATION
|
||||
{
|
||||
union
|
||||
{
|
||||
ULONG Flags;
|
||||
ULONG KvaShadowFlags;
|
||||
struct
|
||||
{
|
||||
ULONG KvaShadowEnabled : 1;
|
||||
@@ -3429,6 +3592,39 @@ typedef struct _SYSTEM_SECURITY_MODEL_INFORMATION
|
||||
};
|
||||
} SYSTEM_SECURITY_MODEL_INFORMATION, *PSYSTEM_SECURITY_MODEL_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_FEATURE_CONFIGURATION_INFORMATION
|
||||
{
|
||||
ULONGLONG ChangeStamp;
|
||||
struct _RTL_FEATURE_CONFIGURATION* Configuration; // see ntrtl.h for types
|
||||
} SYSTEM_FEATURE_CONFIGURATION_INFORMATION, *PSYSTEM_FEATURE_CONFIGURATION_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION_ENTRY
|
||||
{
|
||||
ULONGLONG ChangeStamp;
|
||||
PVOID Section;
|
||||
ULONGLONG Size;
|
||||
} SYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION_ENTRY, *PSYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION_ENTRY;
|
||||
|
||||
// private
|
||||
typedef struct _SYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION
|
||||
{
|
||||
ULONGLONG OverallChangeStamp;
|
||||
SYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION_ENTRY Descriptors[3];
|
||||
} SYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION, *PSYSTEM_FEATURE_CONFIGURATION_SECTIONS_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef union _SECURE_SPECULATION_CONTROL_INFORMATION
|
||||
{
|
||||
ULONG KvaShadowSupported : 1;
|
||||
ULONG KvaShadowEnabled : 1;
|
||||
ULONG KvaShadowUserGlobal : 1;
|
||||
ULONG KvaShadowPcid : 1;
|
||||
ULONG MbClearEnabled : 1;
|
||||
ULONG Reserved : 27;
|
||||
} SECURE_SPECULATION_CONTROL_INFORMATION, *PSECURE_SPECULATION_CONTROL_INFORMATION;
|
||||
|
||||
#if (PHNT_MODE != PHNT_MODE_KERNEL)
|
||||
|
||||
NTSYSCALLAPI
|
||||
@@ -3819,9 +4015,9 @@ typedef struct _KUSER_SHARED_DATA
|
||||
|
||||
USHORT UnparkedProcessorCount;
|
||||
ULONG EnclaveFeatureMask[4];
|
||||
|
||||
|
||||
ULONG TelemetryCoverageRound;
|
||||
|
||||
|
||||
USHORT UserModeGlobalLogger[16];
|
||||
ULONG ImageFileExecutionOptions;
|
||||
|
||||
@@ -3865,7 +4061,7 @@ C_ASSERT(FIELD_OFFSET(KUSER_SHARED_DATA, SafeBootMode) == 0x2ec);
|
||||
C_ASSERT(FIELD_OFFSET(KUSER_SHARED_DATA, TickCount) == 0x320);
|
||||
C_ASSERT(FIELD_OFFSET(KUSER_SHARED_DATA, TickCountQuad) == 0x320);
|
||||
C_ASSERT(FIELD_OFFSET(KUSER_SHARED_DATA, XState) == 0x3d8);
|
||||
//C_ASSERT(sizeof(KUSER_SHARED_DATA) == 0x70C); // VS2017 has some weird issue with this.
|
||||
//C_ASSERT(sizeof(KUSER_SHARED_DATA) == 0x70C); // VS2019 has some weird issue with this.
|
||||
|
||||
#define USER_SHARED_DATA ((KUSER_SHARED_DATA * const)0x7ffe0000)
|
||||
|
||||
|
||||
@@ -455,7 +455,7 @@ typedef struct _FILE_RENAME_INFORMATION
|
||||
#define FILE_RENAME_IGNORE_READONLY_ATTRIBUTE 0x00000040
|
||||
#endif
|
||||
|
||||
#if (_WIN32_WINNT >= PHNT_19H1)
|
||||
#if (PHNT_VERSION >= PHNT_19H1)
|
||||
#define FILE_RENAME_FORCE_RESIZE_TARGET_SR 0x00000080
|
||||
#define FILE_RENAME_FORCE_RESIZE_SOURCE_SR 0x00000100
|
||||
#define FILE_RENAME_FORCE_RESIZE_SR 0x00000180
|
||||
@@ -540,7 +540,7 @@ typedef struct _FILE_REPARSE_POINT_INFORMATION
|
||||
typedef struct _FILE_LINK_ENTRY_INFORMATION
|
||||
{
|
||||
ULONG NextEntryOffset;
|
||||
LONGLONG ParentFileId;
|
||||
LONGLONG ParentFileId; // LARGE_INTEGER
|
||||
ULONG FileNameLength;
|
||||
WCHAR FileName[1];
|
||||
} FILE_LINK_ENTRY_INFORMATION, *PFILE_LINK_ENTRY_INFORMATION;
|
||||
@@ -931,7 +931,7 @@ typedef struct _FILE_ID_GLOBAL_TX_DIR_INFORMATION
|
||||
typedef struct _FILE_OBJECTID_INFORMATION
|
||||
{
|
||||
LONGLONG FileReference;
|
||||
UCHAR ObjectId[16];
|
||||
UCHAR ObjectId[16]; // GUID
|
||||
union
|
||||
{
|
||||
struct
|
||||
@@ -1754,6 +1754,24 @@ typedef enum _IO_SESSION_STATE
|
||||
IoSessionStateMax
|
||||
} IO_SESSION_STATE;
|
||||
|
||||
|
||||
// Sessions
|
||||
|
||||
#if (PHNT_MODE != PHNT_MODE_KERNEL)
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_VISTA)
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtOpenSession(
|
||||
_Out_ PHANDLE SessionHandle,
|
||||
_In_ ACCESS_MASK DesiredAccess,
|
||||
_In_ POBJECT_ATTRIBUTES ObjectAttributes
|
||||
);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_WIN7)
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
@@ -1889,6 +1907,10 @@ typedef struct _REPARSE_DATA_BUFFER
|
||||
#define FSCTL_PIPE_GET_HANDLE_ATTRIBUTE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 14, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define FSCTL_PIPE_SET_HANDLE_ATTRIBUTE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define FSCTL_PIPE_FLUSH CTL_CODE(FILE_DEVICE_NAMED_PIPE, 16, METHOD_BUFFERED, FILE_WRITE_DATA)
|
||||
#define FSCTL_PIPE_DISABLE_IMPERSONATE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 17, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define FSCTL_PIPE_SILO_ARRIVAL CTL_CODE(FILE_DEVICE_NAMED_PIPE, 18, METHOD_BUFFERED, FILE_WRITE_DATA)
|
||||
#define FSCTL_PIPE_CREATE_SYMLINK CTL_CODE(FILE_DEVICE_NAMED_PIPE, 19, METHOD_BUFFERED, FILE_SPECIAL_ACCESS)
|
||||
#define FSCTL_PIPE_DELETE_SYMLINK CTL_CODE(FILE_DEVICE_NAMED_PIPE, 20, METHOD_BUFFERED, FILE_SPECIAL_ACCESS)
|
||||
|
||||
#define FSCTL_PIPE_INTERNAL_READ CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2045, METHOD_BUFFERED, FILE_READ_DATA)
|
||||
#define FSCTL_PIPE_INTERNAL_WRITE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2046, METHOD_BUFFERED, FILE_WRITE_DATA)
|
||||
@@ -1964,6 +1986,55 @@ typedef struct _FILE_PIPE_CLIENT_PROCESS_BUFFER_EX
|
||||
WCHAR ClientComputerBuffer[FILE_PIPE_COMPUTER_NAME_LENGTH + 1]; // null-terminated
|
||||
} FILE_PIPE_CLIENT_PROCESS_BUFFER_EX, *PFILE_PIPE_CLIENT_PROCESS_BUFFER_EX;
|
||||
|
||||
// Control structure for FSCTL_PIPE_SILO_ARRIVAL
|
||||
|
||||
typedef struct _FILE_PIPE_SILO_ARRIVAL_INPUT
|
||||
{
|
||||
HANDLE JobHandle;
|
||||
} FILE_PIPE_SILO_ARRIVAL_INPUT, *PFILE_PIPE_SILO_ARRIVAL_INPUT;
|
||||
|
||||
//
|
||||
// Flags for create symlink
|
||||
//
|
||||
|
||||
//
|
||||
// A global symlink will cause resolution of the symlink's target to occur in
|
||||
// the host silo (i.e. not in any current silo). For example, if there is a
|
||||
// symlink at \Device\Silos\37\Device\NamedPipe\symlink then the target will be
|
||||
// resolved as \Device\NamedPipe\target instead of \Device\Silos\37\Device\NamedPipe\target
|
||||
//
|
||||
#define FILE_PIPE_SYMLINK_FLAG_GLOBAL 0x1
|
||||
|
||||
//
|
||||
// A relative symlink will cause resolution of the symlink's target to occur relative
|
||||
// to the root of the named pipe file system. For example, if there is a symlink at
|
||||
// \Device\NamedPipe\symlink that has a target called "target", then the target will
|
||||
// be resolved as \Device\NamedPipe\target
|
||||
//
|
||||
#define FILE_PIPE_SYMLINK_FLAG_RELATIVE 0x2
|
||||
|
||||
#define FILE_PIPE_SYMLINK_VALID_FLAGS \
|
||||
(FILE_PIPE_SYMLINK_FLAG_GLOBAL | FILE_PIPE_SYMLINK_FLAG_RELATIVE)
|
||||
|
||||
// Control structure for FSCTL_PIPE_CREATE_SYMLINK
|
||||
|
||||
typedef struct _FILE_PIPE_CREATE_SYMLINK_INPUT
|
||||
{
|
||||
USHORT NameOffset;
|
||||
USHORT NameLength;
|
||||
USHORT SubstituteNameOffset;
|
||||
USHORT SubstituteNameLength;
|
||||
ULONG Flags;
|
||||
} FILE_PIPE_CREATE_SYMLINK_INPUT, *PFILE_PIPE_CREATE_SYMLINK_INPUT;
|
||||
|
||||
// Control structure for FSCTL_PIPE_DELETE_SYMLINK
|
||||
|
||||
typedef struct _FILE_PIPE_DELETE_SYMLINK_INPUT
|
||||
{
|
||||
USHORT NameOffset;
|
||||
USHORT NameLength;
|
||||
} FILE_PIPE_DELETE_SYMLINK_INPUT, *PFILE_PIPE_DELETE_SYMLINK_INPUT;
|
||||
|
||||
// Mailslot FS control definitions
|
||||
|
||||
#define MAILSLOT_CLASS_FIRSTCLASS 1
|
||||
|
||||
@@ -556,6 +556,22 @@ LdrStandardizeSystemPath(
|
||||
_In_ PUNICODE_STRING SystemPath
|
||||
);
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_WINBLUE)
|
||||
typedef struct _LDR_FAILURE_DATA
|
||||
{
|
||||
NTSTATUS Status;
|
||||
WCHAR DllName[0x20];
|
||||
WCHAR AdditionalInfo[0x20];
|
||||
} LDR_FAILURE_DATA, *PLDR_FAILURE_DATA;
|
||||
|
||||
NTSYSAPI
|
||||
PLDR_FAILURE_DATA
|
||||
NTAPI
|
||||
LdrGetFailureData(
|
||||
VOID
|
||||
);
|
||||
#endif
|
||||
|
||||
// private
|
||||
typedef struct _PS_MITIGATION_OPTIONS_MAP
|
||||
{
|
||||
|
||||
+1
-3
@@ -12,8 +12,6 @@
|
||||
#ifndef _NTLPCAPI_H
|
||||
#define _NTLPCAPI_H
|
||||
|
||||
// Local Inter-process Communication
|
||||
|
||||
#define PORT_CONNECT 0x0001
|
||||
#define PORT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1)
|
||||
|
||||
@@ -497,7 +495,7 @@ typedef struct _ALPC_HANDLE_ATTR
|
||||
} ALPC_HANDLE_ATTR, *PALPC_HANDLE_ATTR;
|
||||
|
||||
#define ALPC_SECFLG_CREATE_HANDLE 0x20000 // dbg
|
||||
#define ALPC_SECFLG_NOSECTIONHANDLE 0x40000
|
||||
#define ALPC_SECFLG_NOSECTIONHANDLE 0x40000
|
||||
// private
|
||||
typedef struct _ALPC_SECURITY_ATTR
|
||||
{
|
||||
|
||||
@@ -84,10 +84,12 @@ typedef enum _MEMORY_INFORMATION_CLASS
|
||||
MemoryWorkingSetExInformation, // MEMORY_WORKING_SET_EX_INFORMATION
|
||||
MemorySharedCommitInformation, // MEMORY_SHARED_COMMIT_INFORMATION
|
||||
MemoryImageInformation, // MEMORY_IMAGE_INFORMATION
|
||||
MemoryRegionInformationEx,
|
||||
MemoryRegionInformationEx, // MEMORY_REGION_INFORMATION
|
||||
MemoryPrivilegedBasicInformation,
|
||||
MemoryEnclaveImageInformation, // MEMORY_ENCLAVE_IMAGE_INFORMATION // since REDSTONE3
|
||||
MemoryBasicInformationCapped
|
||||
MemoryBasicInformationCapped, // 10
|
||||
MemoryPhysicalContiguityInformation, // MEMORY_PHYSICAL_CONTIGUITY_INFORMATION // since 20H1
|
||||
MaxMemoryInfoClass
|
||||
} MEMORY_INFORMATION_CLASS;
|
||||
#else
|
||||
#define MemoryBasicInformation 0x0
|
||||
@@ -101,6 +103,7 @@ typedef enum _MEMORY_INFORMATION_CLASS
|
||||
#define MemoryPrivilegedBasicInformation 0x8
|
||||
#define MemoryEnclaveImageInformation 0x9
|
||||
#define MemoryBasicInformationCapped 0xA
|
||||
#define MemoryPhysicalContiguityInformation 0xB
|
||||
#endif
|
||||
|
||||
typedef struct _MEMORY_WORKING_SET_BLOCK
|
||||
@@ -147,6 +150,7 @@ typedef struct _MEMORY_REGION_INFORMATION
|
||||
SIZE_T RegionSize;
|
||||
SIZE_T CommitSize;
|
||||
ULONG_PTR PartitionId; // 19H1
|
||||
ULONG_PTR NodePreference; // 20H1
|
||||
} MEMORY_REGION_INFORMATION, *PMEMORY_REGION_INFORMATION;
|
||||
|
||||
// private
|
||||
@@ -244,6 +248,40 @@ typedef struct _MEMORY_ENCLAVE_IMAGE_INFORMATION
|
||||
UCHAR AuthorID[32];
|
||||
} MEMORY_ENCLAVE_IMAGE_INFORMATION, *PMEMORY_ENCLAVE_IMAGE_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef enum _MEMORY_PHYSICAL_CONTIGUITY_UNIT_STATE
|
||||
{
|
||||
MemoryNotContiguous,
|
||||
MemoryAlignedAndContiguous,
|
||||
MemoryNotResident,
|
||||
MemoryNotEligibleToMakeContiguous,
|
||||
MemoryContiguityStateMax,
|
||||
} MEMORY_PHYSICAL_CONTIGUITY_UNIT_STATE;
|
||||
|
||||
// private
|
||||
typedef struct _MEMORY_PHYSICAL_CONTIGUITY_UNIT_INFORMATION
|
||||
{
|
||||
union
|
||||
{
|
||||
ULONG AllInformation;
|
||||
struct
|
||||
{
|
||||
ULONG State : 2;
|
||||
ULONG Reserved : 30;
|
||||
};
|
||||
};
|
||||
} MEMORY_PHYSICAL_CONTIGUITY_UNIT_INFORMATION, *PMEMORY_PHYSICAL_CONTIGUITY_UNIT_INFORMATION;
|
||||
|
||||
// private
|
||||
typedef struct _MEMORY_PHYSICAL_CONTIGUITY_INFORMATION
|
||||
{
|
||||
PVOID VirtualAddress;
|
||||
ULONG_PTR Size;
|
||||
ULONG_PTR ContiguityUnitSize;
|
||||
ULONG Flags;
|
||||
PMEMORY_PHYSICAL_CONTIGUITY_UNIT_INFORMATION ContiguityUnitInformation;
|
||||
} MEMORY_PHYSICAL_CONTIGUITY_INFORMATION, *PMEMORY_PHYSICAL_CONTIGUITY_INFORMATION;
|
||||
|
||||
#define MMPFNLIST_ZERO 0
|
||||
#define MMPFNLIST_FREE 1
|
||||
#define MMPFNLIST_STANDBY 2
|
||||
@@ -441,7 +479,8 @@ typedef struct _SECTION_INTERNAL_IMAGE_INFORMATION
|
||||
struct
|
||||
{
|
||||
ULONG ImageExportSuppressionEnabled : 1;
|
||||
ULONG Reserved : 31;
|
||||
ULONG ImageCetShadowStacksReady : 1; // 20H1
|
||||
ULONG Reserved : 30;
|
||||
};
|
||||
};
|
||||
} SECTION_INTERNAL_IMAGE_INFORMATION, *PSECTION_INTERNAL_IMAGE_INFORMATION;
|
||||
@@ -547,7 +586,10 @@ typedef enum _VIRTUAL_MEMORY_INFORMATION_CLASS
|
||||
VmPagePriorityInformation,
|
||||
VmCfgCallTargetInformation, // CFG_CALL_TARGET_LIST_INFORMATION // REDSTONE2
|
||||
VmPageDirtyStateInformation, // REDSTONE3
|
||||
VmImageHotPatchInformation // 19H1
|
||||
VmImageHotPatchInformation, // 19H1
|
||||
VmPhysicalContiguityInformation, // 20H1
|
||||
VmVirtualMachinePrepopulateInformation,
|
||||
MaxVmInfoClass
|
||||
} VIRTUAL_MEMORY_INFORMATION_CLASS;
|
||||
|
||||
typedef struct _MEMORY_RANGE_ENTRY
|
||||
@@ -640,7 +682,7 @@ NtCreateSectionEx(
|
||||
_In_ ULONG SectionPageProtection,
|
||||
_In_ ULONG AllocationAttributes,
|
||||
_In_opt_ HANDLE FileHandle,
|
||||
_In_ PMEM_EXTENDED_PARAMETER ExtendedParameters,
|
||||
_Inout_updates_opt_(ExtendedParameterCount) PMEM_EXTENDED_PARAMETER ExtendedParameters,
|
||||
_In_ ULONG ExtendedParameterCount
|
||||
);
|
||||
#endif
|
||||
@@ -902,23 +944,6 @@ NtFreeUserPhysicalPages(
|
||||
|
||||
#endif
|
||||
|
||||
// Sessions
|
||||
|
||||
#if (PHNT_MODE != PHNT_MODE_KERNEL)
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_VISTA)
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtOpenSession(
|
||||
_Out_ PHANDLE SessionHandle,
|
||||
_In_ ACCESS_MASK DesiredAccess,
|
||||
_In_ POBJECT_ATTRIBUTES ObjectAttributes
|
||||
);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// Misc.
|
||||
|
||||
#if (PHNT_MODE != PHNT_MODE_KERNEL)
|
||||
|
||||
@@ -240,7 +240,7 @@ NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtClose(
|
||||
_In_ HANDLE Handle
|
||||
_In_ _Post_ptr_invalid_ HANDLE Handle
|
||||
);
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_THRESHOLD)
|
||||
|
||||
+7
-4
@@ -95,8 +95,9 @@ typedef struct _PEB
|
||||
PVOID SubSystemData;
|
||||
PVOID ProcessHeap;
|
||||
PRTL_CRITICAL_SECTION FastPebLock;
|
||||
PVOID IFEOKey;
|
||||
PSLIST_HEADER AtlThunkSListPtr;
|
||||
PVOID IFEOKey;
|
||||
|
||||
union
|
||||
{
|
||||
ULONG CrossProcessFlags;
|
||||
@@ -289,7 +290,9 @@ typedef struct _TEB
|
||||
#endif
|
||||
|
||||
CHAR PlaceholderCompatibilityMode;
|
||||
CHAR PlaceholderReserved[11];
|
||||
BOOLEAN PlaceholderHydrationAlwaysExplicit;
|
||||
CHAR PlaceholderReserved[10];
|
||||
|
||||
ULONG ProxiedProcessId;
|
||||
ACTIVATION_CONTEXT_STACK ActivationStack;
|
||||
|
||||
@@ -305,6 +308,7 @@ typedef struct _TEB
|
||||
#endif
|
||||
|
||||
BOOLEAN InstrumentationCallbackDisabled;
|
||||
BOOLEAN UnalignedLoadStoreExceptions;
|
||||
#ifndef _WIN64
|
||||
UCHAR SpareBytes[23];
|
||||
ULONG TxFsContext;
|
||||
@@ -380,8 +384,7 @@ typedef struct _TEB
|
||||
ULONG IsImpersonating;
|
||||
PVOID NlsCache;
|
||||
PVOID pShimData;
|
||||
USHORT HeapVirtualAffinity;
|
||||
USHORT LowFragHeapDataSlot;
|
||||
ULONG HeapData;
|
||||
HANDLE CurrentTransactionHandle;
|
||||
PTEB_ACTIVE_FRAME ActiveFrame;
|
||||
PVOID FlsData;
|
||||
|
||||
+24
-24
@@ -83,30 +83,30 @@ typedef struct _PLUGPLAY_EVENT_BLOCK
|
||||
|
||||
typedef enum _PLUGPLAY_CONTROL_CLASS
|
||||
{
|
||||
PlugPlayControlEnumerateDevice,
|
||||
PlugPlayControlRegisterNewDevice,
|
||||
PlugPlayControlDeregisterDevice,
|
||||
PlugPlayControlInitializeDevice,
|
||||
PlugPlayControlStartDevice,
|
||||
PlugPlayControlUnlockDevice,
|
||||
PlugPlayControlQueryAndRemoveDevice,
|
||||
PlugPlayControlUserResponse,
|
||||
PlugPlayControlGenerateLegacyDevice,
|
||||
PlugPlayControlGetInterfaceDeviceList,
|
||||
PlugPlayControlProperty,
|
||||
PlugPlayControlDeviceClassAssociation,
|
||||
PlugPlayControlGetRelatedDevice,
|
||||
PlugPlayControlGetInterfaceDeviceAlias,
|
||||
PlugPlayControlDeviceStatus,
|
||||
PlugPlayControlGetDeviceDepth,
|
||||
PlugPlayControlQueryDeviceRelations,
|
||||
PlugPlayControlTargetDeviceRelation,
|
||||
PlugPlayControlQueryConflictList,
|
||||
PlugPlayControlRetrieveDock,
|
||||
PlugPlayControlResetDevice,
|
||||
PlugPlayControlHaltDevice,
|
||||
PlugPlayControlGetBlockedDriverList,
|
||||
PlugPlayControlGetDeviceInterfaceEnabled,
|
||||
PlugPlayControlEnumerateDevice, // PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA
|
||||
PlugPlayControlRegisterNewDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
|
||||
PlugPlayControlDeregisterDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
|
||||
PlugPlayControlInitializeDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
|
||||
PlugPlayControlStartDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
|
||||
PlugPlayControlUnlockDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
|
||||
PlugPlayControlQueryAndRemoveDevice, // PLUGPLAY_CONTROL_QUERY_AND_REMOVE_DATA
|
||||
PlugPlayControlUserResponse, // PLUGPLAY_CONTROL_USER_RESPONSE_DATA
|
||||
PlugPlayControlGenerateLegacyDevice, // PLUGPLAY_CONTROL_LEGACY_DEVGEN_DATA
|
||||
PlugPlayControlGetInterfaceDeviceList, // PLUGPLAY_CONTROL_INTERFACE_LIST_DATA
|
||||
PlugPlayControlProperty, // PLUGPLAY_CONTROL_PROPERTY_DATA
|
||||
PlugPlayControlDeviceClassAssociation, // PLUGPLAY_CONTROL_CLASS_ASSOCIATION_DATA
|
||||
PlugPlayControlGetRelatedDevice, // PLUGPLAY_CONTROL_RELATED_DEVICE_DATA
|
||||
PlugPlayControlGetInterfaceDeviceAlias, // PLUGPLAY_CONTROL_INTERFACE_ALIAS_DATA
|
||||
PlugPlayControlDeviceStatus, // PLUGPLAY_CONTROL_STATUS_DATA
|
||||
PlugPlayControlGetDeviceDepth, // PLUGPLAY_CONTROL_DEPTH_DATA
|
||||
PlugPlayControlQueryDeviceRelations, // PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA
|
||||
PlugPlayControlTargetDeviceRelation, // PLUGPLAY_CONTROL_TARGET_RELATION_DATA
|
||||
PlugPlayControlQueryConflictList, // PLUGPLAY_CONTROL_CONFLICT_LIST
|
||||
PlugPlayControlRetrieveDock, // PLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA
|
||||
PlugPlayControlResetDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
|
||||
PlugPlayControlHaltDevice, // PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
|
||||
PlugPlayControlGetBlockedDriverList, // PLUGPLAY_CONTROL_BLOCKED_DRIVER_DATA
|
||||
PlugPlayControlGetDeviceInterfaceEnabled, // PLUGPLAY_CONTROL_DEVICE_INTERFACE_ENABLED
|
||||
MaxPlugPlayControl
|
||||
} PLUGPLAY_CONTROL_CLASS, *PPLUGPLAY_CONTROL_CLASS;
|
||||
|
||||
|
||||
@@ -119,13 +119,13 @@ typedef enum _PROCESSINFOCLASS
|
||||
ProcessLdtInformation, // qs: PROCESS_LDT_INFORMATION // 10
|
||||
ProcessLdtSize, // s: PROCESS_LDT_SIZE
|
||||
ProcessDefaultHardErrorMode, // qs: ULONG
|
||||
ProcessIoPortHandlers, // (kernel-mode only)
|
||||
ProcessIoPortHandlers, // (kernel-mode only) // PROCESS_IO_PORT_HANDLER_INFORMATION
|
||||
ProcessPooledUsageAndLimits, // q: POOLED_USAGE_AND_LIMITS
|
||||
ProcessWorkingSetWatch, // q: PROCESS_WS_WATCH_INFORMATION[]; s: void
|
||||
ProcessUserModeIOPL,
|
||||
ProcessUserModeIOPL, // qs: ULONG (requires SeTcbPrivilege)
|
||||
ProcessEnableAlignmentFaultFixup, // s: BOOLEAN
|
||||
ProcessPriorityClass, // qs: PROCESS_PRIORITY_CLASS
|
||||
ProcessWx86Information,
|
||||
ProcessWx86Information, // qs: ULONG (requires SeTcbPrivilege) (VdmAllowed)
|
||||
ProcessHandleCount, // q: ULONG, PROCESS_HANDLE_INFORMATION // 20
|
||||
ProcessAffinityMask, // s: KAFFINITY
|
||||
ProcessPriorityBoost, // qs: ULONG
|
||||
@@ -206,6 +206,8 @@ typedef enum _PROCESSINFOCLASS
|
||||
ProcessLeapSecondInformation, // PROCESS_LEAP_SECOND_INFORMATION
|
||||
ProcessFiberShadowStackAllocation, // PROCESS_FIBER_SHADOW_STACK_ALLOCATION_INFORMATION // since 19H1
|
||||
ProcessFreeFiberShadowStackAllocation, // PROCESS_FREE_FIBER_SHADOW_STACK_ALLOCATION_INFORMATION
|
||||
ProcessAltSystemCallInformation, // since 20H1 // 100
|
||||
ProcessDynamicEHContinuationTargets, // PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION
|
||||
MaxProcessInfoClass
|
||||
} PROCESSINFOCLASS;
|
||||
#endif
|
||||
@@ -658,6 +660,7 @@ typedef struct _PROCESS_MITIGATION_POLICY_INFORMATION
|
||||
PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY PayloadRestrictionPolicy;
|
||||
PROCESS_MITIGATION_CHILD_PROCESS_POLICY ChildProcessPolicy;
|
||||
PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY SideChannelIsolationPolicy;
|
||||
PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY UserShadowStackPolicy;
|
||||
};
|
||||
} PROCESS_MITIGATION_POLICY_INFORMATION, *PPROCESS_MITIGATION_POLICY_INFORMATION;
|
||||
|
||||
@@ -796,7 +799,6 @@ typedef struct _PROCESS_JOB_MEMORY_INFO
|
||||
typedef struct _PROCESS_CHILD_PROCESS_INFORMATION
|
||||
{
|
||||
BOOLEAN ProhibitChildProcesses;
|
||||
//BOOLEAN EnableAutomaticOverride; // REDSTONE2
|
||||
BOOLEAN AlwaysAllowSecureChildProcess; // REDSTONE3
|
||||
BOOLEAN AuditProhibitChildProcesses;
|
||||
} PROCESS_CHILD_PROCESS_INFORMATION, *PPROCESS_CHILD_PROCESS_INFORMATION;
|
||||
@@ -1162,7 +1164,7 @@ NtResumeProcess(
|
||||
// Windows 8 and above
|
||||
#define NtCurrentProcessToken() ((HANDLE)(LONG_PTR)-4)
|
||||
#define NtCurrentThreadToken() ((HANDLE)(LONG_PTR)-5)
|
||||
#define NtCurrentEffectiveToken() ((HANDLE)(LONG_PTR)-6)
|
||||
#define NtCurrentThreadEffectiveToken() ((HANDLE)(LONG_PTR)-6)
|
||||
#define NtCurrentSilo() ((HANDLE)(LONG_PTR)-1)
|
||||
|
||||
// Not NT, but useful.
|
||||
@@ -1391,14 +1393,14 @@ NtQueueApcThread(
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_WIN7)
|
||||
|
||||
#define APC_FORCE_THREAD_SIGNAL ((HANDLE)1) // UserApcReserveHandle
|
||||
#define APC_FORCE_THREAD_SIGNAL ((HANDLE)1) // ReserveHandle
|
||||
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NtQueueApcThreadEx(
|
||||
_In_ HANDLE ThreadHandle,
|
||||
_In_opt_ HANDLE UserApcReserveHandle,
|
||||
_In_opt_ HANDLE ReserveHandle, // NtAllocateReserveObject
|
||||
_In_ PPS_APC_ROUTINE ApcRoutine,
|
||||
_In_opt_ PVOID ApcArgument1,
|
||||
_In_opt_ PVOID ApcArgument2,
|
||||
|
||||
@@ -1313,7 +1313,7 @@ NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
RtlFreeOemString(
|
||||
_In_ POEM_STRING OemString
|
||||
_Inout_ POEM_STRING OemString
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
@@ -1365,7 +1365,7 @@ NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlAppendStringToString(
|
||||
_In_ PSTRING Destination,
|
||||
_Inout_ PSTRING Destination,
|
||||
_In_ PSTRING Source
|
||||
);
|
||||
|
||||
@@ -1427,7 +1427,7 @@ VOID
|
||||
NTAPI
|
||||
RtlInitUnicodeString(
|
||||
_Out_ PUNICODE_STRING DestinationString,
|
||||
_In_opt_ PCWSTR SourceString
|
||||
_In_opt_z_ PCWSTR SourceString
|
||||
);
|
||||
#endif
|
||||
|
||||
@@ -1436,15 +1436,17 @@ NTSTATUS
|
||||
NTAPI
|
||||
RtlInitUnicodeStringEx(
|
||||
_Out_ PUNICODE_STRING DestinationString,
|
||||
_In_opt_ PCWSTR SourceString
|
||||
_In_opt_z_ PCWSTR SourceString
|
||||
);
|
||||
|
||||
_Success_(return != 0)
|
||||
_Must_inspect_result_
|
||||
NTSYSAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
RtlCreateUnicodeString(
|
||||
_Out_ PUNICODE_STRING DestinationString,
|
||||
_In_ PCWSTR SourceString
|
||||
_In_z_ PCWSTR SourceString
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
@@ -1702,6 +1704,15 @@ RtlUpcaseUnicodeStringToOemString(
|
||||
_In_ BOOLEAN AllocateDestinationString
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlOemStringToCountedUnicodeString(
|
||||
_Inout_ PUNICODE_STRING DestinationString,
|
||||
_In_ PCOEM_STRING SourceString,
|
||||
_In_ BOOLEAN AllocateDestinationString
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
@@ -1882,8 +1893,8 @@ NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
RtlInitCodePageTable(
|
||||
_In_ PUSHORT TableBase,
|
||||
_Out_ PCPTABLEINFO CodePageTable
|
||||
_In_reads_z_(2) PUSHORT TableBase,
|
||||
_Inout_ PCPTABLEINFO CodePageTable
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
@@ -2250,7 +2261,23 @@ RtlDecompressBufferEx(
|
||||
_In_reads_bytes_(CompressedBufferSize) PUCHAR CompressedBuffer,
|
||||
_In_ ULONG CompressedBufferSize,
|
||||
_Out_ PULONG FinalUncompressedSize,
|
||||
_In_ PVOID WorkSpace
|
||||
_In_opt_ PVOID WorkSpace
|
||||
);
|
||||
#endif
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_WINBLUE)
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlDecompressBufferEx2(
|
||||
_In_ USHORT CompressionFormat,
|
||||
_Out_writes_bytes_to_(UncompressedBufferSize, *FinalUncompressedSize) PUCHAR UncompressedBuffer,
|
||||
_In_ ULONG UncompressedBufferSize,
|
||||
_In_reads_bytes_(CompressedBufferSize) PUCHAR CompressedBuffer,
|
||||
_In_ ULONG CompressedBufferSize,
|
||||
_In_ ULONG UncompressedChunkSize,
|
||||
_Out_ PULONG FinalUncompressedSize,
|
||||
_In_opt_ PVOID WorkSpace
|
||||
);
|
||||
#endif
|
||||
|
||||
@@ -2268,6 +2295,23 @@ RtlDecompressFragment(
|
||||
_In_ PVOID WorkSpace
|
||||
);
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_WINBLUE)
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlDecompressFragmentEx(
|
||||
_In_ USHORT CompressionFormat,
|
||||
_Out_writes_bytes_to_(UncompressedFragmentSize, *FinalUncompressedSize) PUCHAR UncompressedFragment,
|
||||
_In_ ULONG UncompressedFragmentSize,
|
||||
_In_reads_bytes_(CompressedBufferSize) PUCHAR CompressedBuffer,
|
||||
_In_ ULONG CompressedBufferSize,
|
||||
_In_range_(<, CompressedBufferSize) ULONG FragmentOffset,
|
||||
_In_ ULONG UncompressedChunkSize,
|
||||
_Out_ PULONG FinalUncompressedSize,
|
||||
_In_ PVOID WorkSpace
|
||||
);
|
||||
#endif
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
@@ -2950,7 +2994,7 @@ NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
RtlSetExtendedFeaturesMask(
|
||||
__out PCONTEXT_EX ContextEx,
|
||||
_Out_ PCONTEXT_EX ContextEx,
|
||||
_Out_ ULONG64 FeatureMask
|
||||
);
|
||||
|
||||
@@ -3194,33 +3238,90 @@ RtlGuardCheckLongJumpTarget(
|
||||
|
||||
// Memory
|
||||
|
||||
_Must_inspect_result_
|
||||
NTSYSAPI
|
||||
SIZE_T
|
||||
NTAPI
|
||||
RtlCompareMemoryUlong(
|
||||
_In_ PVOID Source,
|
||||
_In_reads_bytes_(Length) PVOID Source,
|
||||
_In_ SIZE_T Length,
|
||||
_In_ ULONG Pattern
|
||||
);
|
||||
|
||||
#if defined(_M_AMD64)
|
||||
FORCEINLINE
|
||||
VOID
|
||||
RtlFillMemoryUlong(
|
||||
_Out_writes_bytes_all_(Length) PVOID Destination,
|
||||
_In_ SIZE_T Length,
|
||||
_In_ ULONG Pattern
|
||||
)
|
||||
{
|
||||
PULONG Address = (PULONG)Destination;
|
||||
|
||||
//
|
||||
// If the number of DWORDs is not zero, then fill the specified buffer
|
||||
// with the specified pattern.
|
||||
//
|
||||
|
||||
if ((Length /= 4) != 0) {
|
||||
|
||||
//
|
||||
// If the destination is not quadword aligned (ignoring low bits),
|
||||
// then align the destination by storing one DWORD.
|
||||
//
|
||||
|
||||
if (((ULONG64)Address & 4) != 0) {
|
||||
*Address = Pattern;
|
||||
if ((Length -= 1) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
Address += 1;
|
||||
}
|
||||
|
||||
//
|
||||
// If the number of QWORDs is not zero, then fill the destination
|
||||
// buffer a QWORD at a time.
|
||||
//
|
||||
|
||||
__stosq((PULONG64)(Address),
|
||||
Pattern | ((ULONG64)Pattern << 32),
|
||||
Length / 2);
|
||||
|
||||
if ((Length & 1) != 0) {
|
||||
Address[Length - 1] = Pattern;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
#else
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
RtlFillMemoryUlong(
|
||||
_Out_ PVOID Destination,
|
||||
_Out_writes_bytes_all_(Length) PVOID Destination,
|
||||
_In_ SIZE_T Length,
|
||||
_In_ ULONG Pattern
|
||||
);
|
||||
#endif
|
||||
|
||||
#if defined(_M_AMD64)
|
||||
|
||||
#define RtlFillMemoryUlonglong(Destination, Length, Pattern) \
|
||||
__stosq((PULONG64)(Destination), Pattern, (Length) / 8)
|
||||
|
||||
#else
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
RtlFillMemoryUlonglong(
|
||||
_Out_ PVOID Destination,
|
||||
_Out_writes_bytes_all_(Length) PVOID Destination,
|
||||
_In_ SIZE_T Length,
|
||||
_In_ ULONGLONG Pattern
|
||||
);
|
||||
|
||||
#endif
|
||||
// Environment
|
||||
|
||||
NTSYSAPI
|
||||
@@ -3632,8 +3733,8 @@ NTAPI
|
||||
RtlGenerate8dot3Name(
|
||||
_In_ PUNICODE_STRING Name,
|
||||
_In_ BOOLEAN AllowExtendedCharacters,
|
||||
_In_ PGENERATE_NAME_CONTEXT Context,
|
||||
_Out_ PUNICODE_STRING Name8dot3
|
||||
_Inout_ PGENERATE_NAME_CONTEXT Context,
|
||||
_Inout_ PUNICODE_STRING Name8dot3
|
||||
);
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_WIN8)
|
||||
@@ -3767,6 +3868,9 @@ typedef struct _RTL_HEAP_INFORMATION
|
||||
PRTL_HEAP_ENTRY Entries;
|
||||
} RTL_HEAP_INFORMATION, *PRTL_HEAP_INFORMATION;
|
||||
|
||||
#define RTL_HEAP_SIGNATURE 0xFFEEFFEEUL
|
||||
#define RTL_HEAP_SEGMENT_SIGNATURE 0xDDEEDDEEUL
|
||||
|
||||
typedef struct _RTL_PROCESS_HEAPS
|
||||
{
|
||||
ULONG NumberOfHeaps;
|
||||
@@ -3811,6 +3915,7 @@ typedef struct _RTL_HEAP_PARAMETERS
|
||||
#define HEAP_CLASS_8 0x00008000 // CSR port heap
|
||||
#define HEAP_CLASS_MASK 0x0000f000
|
||||
|
||||
_Must_inspect_result_
|
||||
NTSYSAPI
|
||||
PVOID
|
||||
NTAPI
|
||||
@@ -3827,9 +3932,12 @@ NTSYSAPI
|
||||
PVOID
|
||||
NTAPI
|
||||
RtlDestroyHeap(
|
||||
_Frees_ptr_ PVOID HeapHandle
|
||||
_In_ _Post_invalid_ PVOID HeapHandle
|
||||
);
|
||||
|
||||
_Must_inspect_result_
|
||||
_Ret_maybenull_
|
||||
_Post_writable_byte_size_(Size)
|
||||
NTSYSAPI
|
||||
PVOID
|
||||
NTAPI
|
||||
@@ -3839,6 +3947,18 @@ RtlAllocateHeap(
|
||||
_In_ SIZE_T Size
|
||||
);
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_WIN8)
|
||||
_Success_(return != 0)
|
||||
NTSYSAPI
|
||||
LOGICAL
|
||||
NTAPI
|
||||
RtlFreeHeap(
|
||||
_In_ PVOID HeapHandle,
|
||||
_In_opt_ ULONG Flags,
|
||||
_Frees_ptr_opt_ PVOID BaseAddress
|
||||
);
|
||||
#else
|
||||
_Success_(return)
|
||||
NTSYSAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
@@ -3847,6 +3967,7 @@ RtlFreeHeap(
|
||||
_In_opt_ ULONG Flags,
|
||||
_Frees_ptr_opt_ PVOID BaseAddress
|
||||
);
|
||||
#endif
|
||||
|
||||
NTSYSAPI
|
||||
SIZE_T
|
||||
@@ -4575,6 +4696,16 @@ RtlQueryProcessDebugInformation(
|
||||
_Inout_ PRTL_DEBUG_INFORMATION Buffer
|
||||
);
|
||||
|
||||
// rev
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSetProcessDebugInformation(
|
||||
_In_ HANDLE UniqueProcessId,
|
||||
_In_ ULONG Flags,
|
||||
_Inout_ PRTL_DEBUG_INFORMATION Buffer
|
||||
);
|
||||
|
||||
// Messages
|
||||
|
||||
NTSYSAPI
|
||||
@@ -4796,6 +4927,7 @@ RtlUniform(
|
||||
_Inout_ PULONG Seed
|
||||
);
|
||||
|
||||
_Ret_range_(<=, MAXLONG)
|
||||
NTSYSAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
@@ -4803,6 +4935,7 @@ RtlRandom(
|
||||
_Inout_ PULONG Seed
|
||||
);
|
||||
|
||||
_Ret_range_(<=, MAXLONG)
|
||||
NTSYSAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
@@ -4810,6 +4943,8 @@ RtlRandomEx(
|
||||
_Inout_ PULONG Seed
|
||||
);
|
||||
|
||||
#define RTL_IMPORT_TABLE_HASH_REVISION 1
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
@@ -5647,7 +5782,7 @@ RtlGetIntegerAtom(
|
||||
|
||||
// SIDs
|
||||
|
||||
_Check_return_
|
||||
_Must_inspect_result_
|
||||
NTSYSAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
@@ -5655,7 +5790,7 @@ RtlValidSid(
|
||||
_In_ PSID Sid
|
||||
);
|
||||
|
||||
_Check_return_
|
||||
_Must_inspect_result_
|
||||
NTSYSAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
@@ -5664,7 +5799,7 @@ RtlEqualSid(
|
||||
_In_ PSID Sid2
|
||||
);
|
||||
|
||||
_Check_return_
|
||||
_Must_inspect_result_
|
||||
NTSYSAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
@@ -5687,7 +5822,7 @@ RtlFreeSid(
|
||||
_In_ _Post_invalid_ PSID Sid
|
||||
);
|
||||
|
||||
_Check_return_
|
||||
_Must_inspect_result_
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
@@ -5705,6 +5840,19 @@ RtlAllocateAndInitializeSid(
|
||||
_Outptr_ PSID *Sid
|
||||
);
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_WIN8)
|
||||
_Must_inspect_result_
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlAllocateAndInitializeSidEx(
|
||||
_In_ PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
|
||||
_In_ UCHAR SubAuthorityCount,
|
||||
_In_reads_(SubAuthorityCount) PULONG SubAuthorities,
|
||||
_Outptr_ PSID *Sid
|
||||
);
|
||||
#endif
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
@@ -5760,7 +5908,7 @@ NTSTATUS
|
||||
NTAPI
|
||||
RtlCopySid(
|
||||
_In_ ULONG DestinationSidLength,
|
||||
_In_reads_bytes_(DestinationSidLength) PSID DestinationSid,
|
||||
_Out_writes_bytes_(DestinationSidLength) PSID DestinationSid,
|
||||
_In_ PSID SourceSid
|
||||
);
|
||||
|
||||
@@ -6023,7 +6171,7 @@ NTAPI
|
||||
RtlGetDaclSecurityDescriptor(
|
||||
_In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
_Out_ PBOOLEAN DaclPresent,
|
||||
_Out_ PACL *Dacl,
|
||||
_Outptr_result_maybenull_ PACL *Dacl,
|
||||
_Out_ PBOOLEAN DaclDefaulted
|
||||
);
|
||||
|
||||
@@ -6047,23 +6195,13 @@ RtlGetSaclSecurityDescriptor(
|
||||
_Out_ PBOOLEAN SaclDefaulted
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlGetSaclSecurityDescriptor(
|
||||
_In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
_Out_ PBOOLEAN SaclPresent,
|
||||
_Out_ PACL *Sacl,
|
||||
_Out_ PBOOLEAN SaclDefaulted
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSetOwnerSecurityDescriptor(
|
||||
_Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
_In_opt_ PSID Owner,
|
||||
_In_opt_ BOOLEAN OwnerDefaulted
|
||||
_In_ BOOLEAN OwnerDefaulted
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
@@ -6071,7 +6209,7 @@ NTSTATUS
|
||||
NTAPI
|
||||
RtlGetOwnerSecurityDescriptor(
|
||||
_In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
_Out_ PSID *Owner,
|
||||
_Outptr_result_maybenull_ PSID *Owner,
|
||||
_Out_ PBOOLEAN OwnerDefaulted
|
||||
);
|
||||
|
||||
@@ -6081,7 +6219,7 @@ NTAPI
|
||||
RtlSetGroupSecurityDescriptor(
|
||||
_Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
_In_opt_ PSID Group,
|
||||
_In_opt_ BOOLEAN GroupDefaulted
|
||||
_In_ BOOLEAN GroupDefaulted
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
@@ -6089,7 +6227,7 @@ NTSTATUS
|
||||
NTAPI
|
||||
RtlGetGroupSecurityDescriptor(
|
||||
_In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
_Out_ PSID *Group,
|
||||
_Outptr_result_maybenull_ PSID *Group,
|
||||
_Out_ PBOOLEAN GroupDefaulted
|
||||
);
|
||||
|
||||
@@ -7810,6 +7948,56 @@ RtlIsPartialPlaceholderFileInfo(
|
||||
_Out_ PBOOLEAN IsPartialPlaceholder
|
||||
);
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_REDSTONE3)
|
||||
|
||||
#undef PHCM_MAX
|
||||
#define PHCM_APPLICATION_DEFAULT ((CHAR)0)
|
||||
#define PHCM_DISGUISE_PLACEHOLDERS ((CHAR)1)
|
||||
#define PHCM_EXPOSE_PLACEHOLDERS ((CHAR)2)
|
||||
#define PHCM_MAX ((CHAR)2)
|
||||
|
||||
#define PHCM_ERROR_INVALID_PARAMETER ((CHAR)-1)
|
||||
#define PHCM_ERROR_NO_TEB ((CHAR)-2)
|
||||
|
||||
NTSYSAPI
|
||||
CHAR
|
||||
NTAPI
|
||||
RtlQueryThreadPlaceholderCompatibilityMode(
|
||||
VOID
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
CHAR
|
||||
NTAPI
|
||||
RtlSetThreadPlaceholderCompatibilityMode(
|
||||
_In_ CHAR Mode
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_REDSTONE4)
|
||||
|
||||
#undef PHCM_MAX
|
||||
#define PHCM_DISGUISE_FULL_PLACEHOLDERS ((CHAR)3)
|
||||
#define PHCM_MAX ((CHAR)3)
|
||||
#define PHCM_ERROR_NO_PEB ((CHAR)-3)
|
||||
|
||||
NTSYSAPI
|
||||
CHAR
|
||||
NTAPI
|
||||
RtlQueryProcessPlaceholderCompatibilityMode(
|
||||
VOID
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
CHAR
|
||||
NTAPI
|
||||
RtlSetProcessPlaceholderCompatibilityMode(
|
||||
_In_ CHAR Mode
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
// rev
|
||||
NTSYSAPI
|
||||
BOOLEAN
|
||||
@@ -7892,22 +8080,24 @@ RtlIsMultiUsersInSessionSku(
|
||||
// private
|
||||
typedef enum _RTL_BSD_ITEM_TYPE
|
||||
{
|
||||
RtlBsdItemVersionNumber,
|
||||
RtlBsdItemProductType,
|
||||
RtlBsdItemAabEnabled,
|
||||
RtlBsdItemAabTimeout,
|
||||
RtlBsdItemBootGood,
|
||||
RtlBsdItemBootShutdown,
|
||||
RtlBsdSleepInProgress,
|
||||
RtlBsdItemVersionNumber, // q; s: ULONG
|
||||
RtlBsdItemProductType, // q; s: NT_PRODUCT_TYPE (ULONG)
|
||||
RtlBsdItemAabEnabled, // q: s: BOOLEAN
|
||||
RtlBsdItemAabTimeout, // q: s: UCHAR
|
||||
RtlBsdItemBootGood, // q: s: BOOLEAN
|
||||
RtlBsdItemBootShutdown, // q: s: BOOLEAN
|
||||
RtlBsdSleepInProgress, // q: s: BOOLEAN
|
||||
RtlBsdPowerTransition,
|
||||
RtlBsdItemBootAttemptCount,
|
||||
RtlBsdItemBootCheckpoint,
|
||||
RtlBsdItemBootId,
|
||||
RtlBsdItemShutdownBootId,
|
||||
RtlBsdItemReportedAbnormalShutdownBootId,
|
||||
RtlBsdItemBootAttemptCount, // q: s: UCHAR
|
||||
RtlBsdItemBootCheckpoint, // q: s: UCHAR
|
||||
RtlBsdItemBootId, // q; s: ULONG (USER_SHARED_DATA->BootId)
|
||||
RtlBsdItemShutdownBootId, // q; s: ULONG
|
||||
RtlBsdItemReportedAbnormalShutdownBootId, // q; s: ULONG
|
||||
RtlBsdItemErrorInfo,
|
||||
RtlBsdItemPowerButtonPressInfo,
|
||||
RtlBsdItemChecksum,
|
||||
RtlBsdItemChecksum, // q: s: UCHAR
|
||||
RtlBsdPowerTransitionExtension,
|
||||
RtlBsdItemFeatureConfigurationState, // q; s: ULONG
|
||||
RtlBsdItemMax
|
||||
} RTL_BSD_ITEM_TYPE;
|
||||
|
||||
@@ -7965,6 +8155,30 @@ RtlCheckBootStatusIntegrity(
|
||||
_Out_ PBOOLEAN Verified
|
||||
);
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_REDSTONE3)
|
||||
// rev
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlGetSystemBootStatus(
|
||||
_In_ RTL_BSD_ITEM_TYPE BootStatusInformationClass,
|
||||
_Out_ PVOID DataBuffer,
|
||||
_In_ ULONG DataLength,
|
||||
_Out_opt_ PULONG ReturnLength
|
||||
);
|
||||
|
||||
// rev
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSetSystemBootStatus(
|
||||
_In_ RTL_BSD_ITEM_TYPE BootStatusInformationClass,
|
||||
_In_ PVOID DataBuffer,
|
||||
_In_ ULONG DataLength,
|
||||
_Out_opt_ PULONG ReturnLength
|
||||
);
|
||||
#endif
|
||||
|
||||
// rev
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
@@ -8035,4 +8249,143 @@ RtlFlushSecureMemoryCache(
|
||||
_In_opt_ SIZE_T MemoryLength
|
||||
);
|
||||
|
||||
#if (PHNT_VERSION >= PHNT_REDSTONE3)
|
||||
|
||||
// Feature configuration
|
||||
|
||||
typedef struct __RTL_FEATURE_USAGE_REPORT
|
||||
{
|
||||
ULONG FeatureId;
|
||||
USHORT ReportingKind;
|
||||
USHORT ReportingOptions;
|
||||
} RTL_FEATURE_USAGE_REPORT, *PRTL_FEATURE_USAGE_REPORT;
|
||||
|
||||
// rev
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlNotifyFeatureUsage(
|
||||
_In_ PRTL_FEATURE_USAGE_REPORT FeatureUsageReport
|
||||
);
|
||||
|
||||
typedef enum _RTL_FEATURE_CONFIGURATION_TYPE
|
||||
{
|
||||
RtlFeatureConfigurationBoot,
|
||||
RtlFeatureConfigurationRuntime,
|
||||
RtlFeatureConfigurationCount
|
||||
} RTL_FEATURE_CONFIGURATION_TYPE;
|
||||
|
||||
// rev
|
||||
typedef struct _RTL_FEATURE_CONFIGURATION
|
||||
{
|
||||
ULONG FeatureId;
|
||||
union
|
||||
{
|
||||
ULONG Flags;
|
||||
struct
|
||||
{
|
||||
ULONG Priority : 4;
|
||||
ULONG EnabledState : 2;
|
||||
ULONG IsWexpConfiguration : 1;
|
||||
ULONG HasSubscriptions : 1;
|
||||
ULONG Variant : 6;
|
||||
ULONG VariantPayloadKind : 2;
|
||||
ULONG Reserved : 16;
|
||||
};
|
||||
};
|
||||
ULONG VariantPayload;
|
||||
} RTL_FEATURE_CONFIGURATION, *PRTL_FEATURE_CONFIGURATION;
|
||||
|
||||
// rev
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlQueryFeatureConfiguration(
|
||||
_In_ ULONG FeatureId,
|
||||
_In_ RTL_FEATURE_CONFIGURATION_TYPE FeatureType,
|
||||
_Inout_ PULONGLONG ChangeStamp,
|
||||
_In_ PRTL_FEATURE_CONFIGURATION FeatureConfiguration
|
||||
);
|
||||
|
||||
// rev
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSetFeatureConfigurations(
|
||||
_Inout_ PULONGLONG ChangeStamp,
|
||||
_In_ RTL_FEATURE_CONFIGURATION_TYPE FeatureType,
|
||||
_In_ PRTL_FEATURE_CONFIGURATION FeatureConfiguration,
|
||||
_In_ ULONG FeatureConfigurationCount
|
||||
);
|
||||
|
||||
// rev
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlQueryAllFeatureConfigurations(
|
||||
_In_ RTL_FEATURE_CONFIGURATION_TYPE FeatureType,
|
||||
_Inout_ PULONGLONG ChangeStamp,
|
||||
_Out_ PRTL_FEATURE_CONFIGURATION FeatureConfigurations,
|
||||
_Inout_ PULONG FeatureConfigurationCount
|
||||
);
|
||||
|
||||
// rev
|
||||
NTSYSAPI
|
||||
ULONGLONG
|
||||
NTAPI
|
||||
RtlQueryFeatureConfigurationChangeStamp(
|
||||
VOID
|
||||
);
|
||||
|
||||
// rev
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlQueryFeatureUsageNotificationSubscriptions(
|
||||
_Out_ PRTL_FEATURE_CONFIGURATION FeatureConfiguration,
|
||||
_Inout_ PULONG FeatureConfigurationCount
|
||||
);
|
||||
|
||||
typedef VOID (NTAPI *PRTL_FEATURE_CONFIGURATION_CHANGE_NOTIFICAION)(
|
||||
_In_opt_ PVOID Context
|
||||
);
|
||||
|
||||
// rev
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlRegisterFeatureConfigurationChangeNotification(
|
||||
_In_ PRTL_FEATURE_CONFIGURATION_CHANGE_NOTIFICAION Callback,
|
||||
_In_opt_ PVOID Context,
|
||||
_Inout_opt_ PULONGLONG ChangeStamp,
|
||||
_Out_ PHANDLE NotificationHandle
|
||||
);
|
||||
|
||||
// rev
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlUnregisterFeatureConfigurationChangeNotification(
|
||||
_In_ HANDLE NotificationHandle
|
||||
);
|
||||
|
||||
// rev
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSubscribeForFeatureUsageNotification(
|
||||
_In_ PRTL_FEATURE_CONFIGURATION FeatureConfiguration,
|
||||
_In_ ULONG FeatureConfigurationCount
|
||||
);
|
||||
|
||||
// rev
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlUnsubscribeFromFeatureUsageNotifications(
|
||||
_In_ PRTL_FEATURE_CONFIGURATION FeatureConfiguration,
|
||||
_In_ ULONG FeatureConfigurationCount
|
||||
);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -254,7 +254,7 @@ NTAPI
|
||||
NtDuplicateToken(
|
||||
_In_ HANDLE ExistingTokenHandle,
|
||||
_In_ ACCESS_MASK DesiredAccess,
|
||||
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
|
||||
_In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
|
||||
_In_ BOOLEAN EffectiveOnly,
|
||||
_In_ TOKEN_TYPE TokenType,
|
||||
_Out_ PHANDLE NewTokenHandle
|
||||
@@ -266,7 +266,7 @@ NTAPI
|
||||
NtQueryInformationToken(
|
||||
_In_ HANDLE TokenHandle,
|
||||
_In_ TOKEN_INFORMATION_CLASS TokenInformationClass,
|
||||
_Out_writes_bytes_(TokenInformationLength) PVOID TokenInformation,
|
||||
_Out_writes_bytes_to_opt_(TokenInformationLength, *ReturnLength) PVOID TokenInformation,
|
||||
_In_ ULONG TokenInformationLength,
|
||||
_Out_ PULONG ReturnLength
|
||||
);
|
||||
|
||||
@@ -666,7 +666,7 @@ NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwClose(
|
||||
_In_ HANDLE Handle
|
||||
_In_ _Post_ptr_invalid_ HANDLE Handle
|
||||
);
|
||||
|
||||
NTSYSCALLAPI
|
||||
@@ -1114,7 +1114,7 @@ ZwCreateSectionEx(
|
||||
_In_ ULONG SectionPageProtection,
|
||||
_In_ ULONG AllocationAttributes,
|
||||
_In_opt_ HANDLE FileHandle,
|
||||
_In_ PMEM_EXTENDED_PARAMETER ExtendedParameters,
|
||||
_Inout_updates_opt_(ExtendedParameterCount) PMEM_EXTENDED_PARAMETER ExtendedParameters,
|
||||
_In_ ULONG ExtendedParameterCount
|
||||
);
|
||||
|
||||
@@ -1482,7 +1482,7 @@ NTAPI
|
||||
ZwDuplicateToken(
|
||||
_In_ HANDLE ExistingTokenHandle,
|
||||
_In_ ACCESS_MASK DesiredAccess,
|
||||
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
|
||||
_In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
|
||||
_In_ BOOLEAN EffectiveOnly,
|
||||
_In_ TOKEN_TYPE TokenType,
|
||||
_Out_ PHANDLE NewTokenHandle
|
||||
@@ -2657,6 +2657,22 @@ ZwQueryDirectoryFile(
|
||||
_In_ BOOLEAN RestartScan
|
||||
);
|
||||
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwQueryDirectoryFileEx(
|
||||
_In_ HANDLE FileHandle,
|
||||
_In_opt_ HANDLE Event,
|
||||
_In_opt_ PIO_APC_ROUTINE ApcRoutine,
|
||||
_In_opt_ PVOID ApcContext,
|
||||
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
|
||||
_Out_ PVOID FileInformation,
|
||||
_In_ ULONG Length,
|
||||
_In_ FILE_INFORMATION_CLASS FileInformationClass,
|
||||
_In_ ULONG QueryFlags,
|
||||
_In_opt_ PUNICODE_STRING FileName
|
||||
);
|
||||
|
||||
NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
@@ -2817,7 +2833,7 @@ NTAPI
|
||||
ZwQueryInformationToken(
|
||||
_In_ HANDLE TokenHandle,
|
||||
_In_ TOKEN_INFORMATION_CLASS TokenInformationClass,
|
||||
_Out_writes_bytes_(TokenInformationLength) PVOID TokenInformation,
|
||||
_Out_writes_bytes_to_opt_(TokenInformationLength, *ReturnLength) PVOID TokenInformation,
|
||||
_In_ ULONG TokenInformationLength,
|
||||
_Out_ PULONG ReturnLength
|
||||
);
|
||||
@@ -4213,11 +4229,11 @@ NTSYSCALLAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ZwTraceControl(
|
||||
_In_ ULONG FunctionCode,
|
||||
_In_reads_bytes_opt_(InBufferLen) PVOID InBuffer,
|
||||
_In_ ULONG InBufferLen,
|
||||
_Out_writes_bytes_opt_(OutBufferLen) PVOID OutBuffer,
|
||||
_In_ ULONG OutBufferLen,
|
||||
_In_ TRACE_CONTROL_INFORMATION_CLASS TraceInformationClass,
|
||||
_In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer,
|
||||
_In_ ULONG InputBufferLength,
|
||||
_Out_writes_bytes_opt_(TraceInformationLength) PVOID TraceInformation,
|
||||
_In_ ULONG TraceInformationLength,
|
||||
_Out_ PULONG ReturnLength
|
||||
);
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#define PHNT_REDSTONE5 106
|
||||
#define PHNT_19H1 107
|
||||
#define PHNT_19H2 108
|
||||
#define PHNT_20H1 109
|
||||
|
||||
#ifndef PHNT_MODE
|
||||
#define PHNT_MODE PHNT_MODE_USER
|
||||
@@ -100,6 +101,7 @@ extern "C" {
|
||||
#include <nttp.h>
|
||||
#include <ntxcapi.h>
|
||||
|
||||
#include <ntd3dkmt.h>
|
||||
#include <ntwow64.h>
|
||||
|
||||
#include <ntlsa.h>
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ typedef struct DECLSPEC_ALIGN(MEMORY_ALLOCATION_ALIGNMENT) _QUAD_PTR
|
||||
typedef ULONG LOGICAL;
|
||||
typedef ULONG *PLOGICAL;
|
||||
|
||||
typedef _Success_(return >= 0) LONG NTSTATUS;
|
||||
typedef _Return_type_success_(return >= 0) LONG NTSTATUS;
|
||||
typedef NTSTATUS *PNTSTATUS;
|
||||
|
||||
// Cardinal types
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
// This header file provides access to Win32, plus NTSTATUS values and some access mask values.
|
||||
|
||||
#ifndef __cplusplus
|
||||
#ifndef CINTERFACE
|
||||
#define CINTERFACE
|
||||
#endif
|
||||
@@ -21,6 +22,7 @@
|
||||
#ifndef COBJMACROS
|
||||
#define COBJMACROS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef INITGUID
|
||||
#define INITGUID
|
||||
|
||||
+22
-24
@@ -12,8 +12,6 @@
|
||||
#ifndef _SUBPROCESSTAG_H
|
||||
#define _SUBPROCESSTAG_H
|
||||
|
||||
// Subprocess tag information
|
||||
|
||||
typedef enum _TAG_INFO_LEVEL
|
||||
{
|
||||
eTagInfoLevelNameFromTag = 1, // TAG_INFO_NAME_FROM_TAG
|
||||
@@ -30,14 +28,14 @@ typedef enum _TAG_TYPE
|
||||
|
||||
typedef struct _TAG_INFO_NAME_FROM_TAG_IN_PARAMS
|
||||
{
|
||||
DWORD dwPid;
|
||||
DWORD dwTag;
|
||||
ULONG dwPid;
|
||||
ULONG dwTag;
|
||||
} TAG_INFO_NAME_FROM_TAG_IN_PARAMS, *PTAG_INFO_NAME_FROM_TAG_IN_PARAMS;
|
||||
|
||||
typedef struct _TAG_INFO_NAME_FROM_TAG_OUT_PARAMS
|
||||
{
|
||||
DWORD eTagType;
|
||||
LPWSTR pszName;
|
||||
ULONG eTagType;
|
||||
PWSTR pszName;
|
||||
} TAG_INFO_NAME_FROM_TAG_OUT_PARAMS, *PTAG_INFO_NAME_FROM_TAG_OUT_PARAMS;
|
||||
|
||||
typedef struct _TAG_INFO_NAME_FROM_TAG
|
||||
@@ -48,14 +46,14 @@ typedef struct _TAG_INFO_NAME_FROM_TAG
|
||||
|
||||
typedef struct _TAG_INFO_NAMES_REFERENCING_MODULE_IN_PARAMS
|
||||
{
|
||||
DWORD dwPid;
|
||||
LPWSTR pszModule;
|
||||
ULONG dwPid;
|
||||
PWSTR pszModule;
|
||||
} TAG_INFO_NAMES_REFERENCING_MODULE_IN_PARAMS, *PTAG_INFO_NAMES_REFERENCING_MODULE_IN_PARAMS;
|
||||
|
||||
typedef struct _TAG_INFO_NAMES_REFERENCING_MODULE_OUT_PARAMS
|
||||
{
|
||||
DWORD eTagType;
|
||||
LPWSTR pmszNames;
|
||||
ULONG eTagType;
|
||||
PWSTR pmszNames;
|
||||
} TAG_INFO_NAMES_REFERENCING_MODULE_OUT_PARAMS, *PTAG_INFO_NAMES_REFERENCING_MODULE_OUT_PARAMS;
|
||||
|
||||
typedef struct _TAG_INFO_NAMES_REFERENCING_MODULE
|
||||
@@ -66,20 +64,20 @@ typedef struct _TAG_INFO_NAMES_REFERENCING_MODULE
|
||||
|
||||
typedef struct _TAG_INFO_NAME_TAG_MAPPING_IN_PARAMS
|
||||
{
|
||||
DWORD dwPid;
|
||||
ULONG dwPid;
|
||||
} TAG_INFO_NAME_TAG_MAPPING_IN_PARAMS, *PTAG_INFO_NAME_TAG_MAPPING_IN_PARAMS;
|
||||
|
||||
typedef struct _TAG_INFO_NAME_TAG_MAPPING_ELEMENT
|
||||
{
|
||||
DWORD eTagType;
|
||||
DWORD dwTag;
|
||||
LPWSTR pszName;
|
||||
LPWSTR pszGroupName;
|
||||
ULONG eTagType;
|
||||
ULONG dwTag;
|
||||
PWSTR pszName;
|
||||
PWSTR pszGroupName;
|
||||
} TAG_INFO_NAME_TAG_MAPPING_ELEMENT, *PTAG_INFO_NAME_TAG_MAPPING_ELEMENT;
|
||||
|
||||
typedef struct _TAG_INFO_NAME_TAG_MAPPING_OUT_PARAMS
|
||||
{
|
||||
DWORD cElements;
|
||||
ULONG cElements;
|
||||
PTAG_INFO_NAME_TAG_MAPPING_ELEMENT pNameTagMappingElements;
|
||||
} TAG_INFO_NAME_TAG_MAPPING_OUT_PARAMS, *PTAG_INFO_NAME_TAG_MAPPING_OUT_PARAMS;
|
||||
|
||||
@@ -90,18 +88,18 @@ typedef struct _TAG_INFO_NAME_TAG_MAPPING
|
||||
} TAG_INFO_NAME_TAG_MAPPING, *PTAG_INFO_NAME_TAG_MAPPING;
|
||||
|
||||
_Must_inspect_result_
|
||||
DWORD
|
||||
ULONG
|
||||
WINAPI
|
||||
I_QueryTagInformation(
|
||||
_In_opt_ LPCWSTR pszMachineName,
|
||||
_In_ TAG_INFO_LEVEL eInfoLevel,
|
||||
_Inout_ PVOID pTagInfo
|
||||
_In_opt_ PCWSTR MachineName,
|
||||
_In_ TAG_INFO_LEVEL InfoLevel,
|
||||
_Inout_ PVOID TagInfo
|
||||
);
|
||||
|
||||
typedef DWORD (WINAPI *PQUERY_TAG_INFORMATION)(
|
||||
_In_opt_ LPCWSTR pszMachineName,
|
||||
_In_ TAG_INFO_LEVEL eInfoLevel,
|
||||
_Inout_ PVOID pTagInfo
|
||||
typedef ULONG (WINAPI *PQUERY_TAG_INFORMATION)(
|
||||
_In_opt_ PCWSTR MachineName,
|
||||
_In_ TAG_INFO_LEVEL InfoLevel,
|
||||
_Inout_ PVOID TagInfo
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user