mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:17:14 +00:00
include: Add some new information classes.
This commit is contained in:
parent
962622e67d
commit
2436da5cef
|
@ -805,15 +805,15 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetExitCodeProcess( HANDLE process, LPDWORD exit_c
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI DECLSPEC_HOTPATCH GetHandleInformation( HANDLE handle, DWORD *flags )
|
BOOL WINAPI DECLSPEC_HOTPATCH GetHandleInformation( HANDLE handle, DWORD *flags )
|
||||||
{
|
{
|
||||||
OBJECT_DATA_INFORMATION info;
|
OBJECT_HANDLE_FLAG_INFORMATION info;
|
||||||
|
|
||||||
if (!set_ntstatus( NtQueryObject( handle, ObjectDataInformation, &info, sizeof(info), NULL )))
|
if (!set_ntstatus( NtQueryObject( handle, ObjectHandleFlagInformation, &info, sizeof(info), NULL )))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (flags)
|
if (flags)
|
||||||
{
|
{
|
||||||
*flags = 0;
|
*flags = 0;
|
||||||
if (info.InheritHandle) *flags |= HANDLE_FLAG_INHERIT;
|
if (info.Inherit) *flags |= HANDLE_FLAG_INHERIT;
|
||||||
if (info.ProtectFromClose) *flags |= HANDLE_FLAG_PROTECT_FROM_CLOSE;
|
if (info.ProtectFromClose) *flags |= HANDLE_FLAG_PROTECT_FROM_CLOSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1123,21 +1123,21 @@ UINT WINAPI DECLSPEC_HOTPATCH SetHandleCount( UINT count )
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI DECLSPEC_HOTPATCH SetHandleInformation( HANDLE handle, DWORD mask, DWORD flags )
|
BOOL WINAPI DECLSPEC_HOTPATCH SetHandleInformation( HANDLE handle, DWORD mask, DWORD flags )
|
||||||
{
|
{
|
||||||
OBJECT_DATA_INFORMATION info;
|
OBJECT_HANDLE_FLAG_INFORMATION info;
|
||||||
|
|
||||||
/* if not setting both fields, retrieve current value first */
|
/* if not setting both fields, retrieve current value first */
|
||||||
if ((mask & (HANDLE_FLAG_INHERIT | HANDLE_FLAG_PROTECT_FROM_CLOSE)) !=
|
if ((mask & (HANDLE_FLAG_INHERIT | HANDLE_FLAG_PROTECT_FROM_CLOSE)) !=
|
||||||
(HANDLE_FLAG_INHERIT | HANDLE_FLAG_PROTECT_FROM_CLOSE))
|
(HANDLE_FLAG_INHERIT | HANDLE_FLAG_PROTECT_FROM_CLOSE))
|
||||||
{
|
{
|
||||||
if (!set_ntstatus( NtQueryObject( handle, ObjectDataInformation, &info, sizeof(info), NULL )))
|
if (!set_ntstatus( NtQueryObject( handle, ObjectHandleFlagInformation, &info, sizeof(info), NULL )))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (mask & HANDLE_FLAG_INHERIT)
|
if (mask & HANDLE_FLAG_INHERIT)
|
||||||
info.InheritHandle = (flags & HANDLE_FLAG_INHERIT) != 0;
|
info.Inherit = (flags & HANDLE_FLAG_INHERIT) != 0;
|
||||||
if (mask & HANDLE_FLAG_PROTECT_FROM_CLOSE)
|
if (mask & HANDLE_FLAG_PROTECT_FROM_CLOSE)
|
||||||
info.ProtectFromClose = (flags & HANDLE_FLAG_PROTECT_FROM_CLOSE) != 0;
|
info.ProtectFromClose = (flags & HANDLE_FLAG_PROTECT_FROM_CLOSE) != 0;
|
||||||
|
|
||||||
return set_ntstatus( NtSetInformationObject( handle, ObjectDataInformation, &info, sizeof(info) ));
|
return set_ntstatus( NtSetInformationObject( handle, ObjectHandleFlagInformation, &info, sizeof(info) ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7159,9 +7159,9 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case ObjectDataInformation:
|
case ObjectHandleFlagInformation:
|
||||||
{
|
{
|
||||||
OBJECT_DATA_INFORMATION* p = ptr;
|
OBJECT_HANDLE_FLAG_INFORMATION* p = ptr;
|
||||||
|
|
||||||
if (len < sizeof(*p)) return STATUS_INVALID_BUFFER_SIZE;
|
if (len < sizeof(*p)) return STATUS_INVALID_BUFFER_SIZE;
|
||||||
|
|
||||||
|
@ -7173,7 +7173,7 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas
|
||||||
status = wine_server_call( req );
|
status = wine_server_call( req );
|
||||||
if (status == STATUS_SUCCESS)
|
if (status == STATUS_SUCCESS)
|
||||||
{
|
{
|
||||||
p->InheritHandle = (reply->old_flags & HANDLE_FLAG_INHERIT) != 0;
|
p->Inherit = (reply->old_flags & HANDLE_FLAG_INHERIT) != 0;
|
||||||
p->ProtectFromClose = (reply->old_flags & HANDLE_FLAG_PROTECT_FROM_CLOSE) != 0;
|
p->ProtectFromClose = (reply->old_flags & HANDLE_FLAG_PROTECT_FROM_CLOSE) != 0;
|
||||||
if (used_len) *used_len = sizeof(*p);
|
if (used_len) *used_len = sizeof(*p);
|
||||||
}
|
}
|
||||||
|
@ -7203,9 +7203,9 @@ NTSTATUS WINAPI NtSetInformationObject( HANDLE handle, OBJECT_INFORMATION_CLASS
|
||||||
|
|
||||||
switch (info_class)
|
switch (info_class)
|
||||||
{
|
{
|
||||||
case ObjectDataInformation:
|
case ObjectHandleFlagInformation:
|
||||||
{
|
{
|
||||||
OBJECT_DATA_INFORMATION* p = ptr;
|
OBJECT_HANDLE_FLAG_INFORMATION* p = ptr;
|
||||||
|
|
||||||
if (len < sizeof(*p)) return STATUS_INVALID_BUFFER_SIZE;
|
if (len < sizeof(*p)) return STATUS_INVALID_BUFFER_SIZE;
|
||||||
|
|
||||||
|
@ -7213,7 +7213,7 @@ NTSTATUS WINAPI NtSetInformationObject( HANDLE handle, OBJECT_INFORMATION_CLASS
|
||||||
{
|
{
|
||||||
req->handle = wine_server_obj_handle( handle );
|
req->handle = wine_server_obj_handle( handle );
|
||||||
req->mask = HANDLE_FLAG_INHERIT | HANDLE_FLAG_PROTECT_FROM_CLOSE;
|
req->mask = HANDLE_FLAG_INHERIT | HANDLE_FLAG_PROTECT_FROM_CLOSE;
|
||||||
if (p->InheritHandle) req->flags |= HANDLE_FLAG_INHERIT;
|
if (p->Inherit) req->flags |= HANDLE_FLAG_INHERIT;
|
||||||
if (p->ProtectFromClose) req->flags |= HANDLE_FLAG_PROTECT_FROM_CLOSE;
|
if (p->ProtectFromClose) req->flags |= HANDLE_FLAG_PROTECT_FROM_CLOSE;
|
||||||
status = wine_server_call( req );
|
status = wine_server_call( req );
|
||||||
}
|
}
|
||||||
|
|
|
@ -944,7 +944,7 @@ NTSTATUS WINAPI wow64_NtQueryObject( UINT *args )
|
||||||
switch (class)
|
switch (class)
|
||||||
{
|
{
|
||||||
case ObjectBasicInformation: /* OBJECT_BASIC_INFORMATION */
|
case ObjectBasicInformation: /* OBJECT_BASIC_INFORMATION */
|
||||||
case ObjectDataInformation: /* OBJECT_DATA_INFORMATION */
|
case ObjectHandleFlagInformation: /* OBJECT_HANDLE_FLAG_INFORMATION */
|
||||||
return NtQueryObject( handle, class, ptr, len, retlen );
|
return NtQueryObject( handle, class, ptr, len, retlen );
|
||||||
|
|
||||||
case ObjectNameInformation: /* OBJECT_NAME_INFORMATION */
|
case ObjectNameInformation: /* OBJECT_NAME_INFORMATION */
|
||||||
|
@ -1371,7 +1371,7 @@ NTSTATUS WINAPI wow64_NtSetInformationObject( UINT *args )
|
||||||
|
|
||||||
switch (class)
|
switch (class)
|
||||||
{
|
{
|
||||||
case ObjectDataInformation: /* OBJECT_DATA_INFORMATION */
|
case ObjectHandleFlagInformation: /* OBJECT_HANDLE_FLAG_INFORMATION */
|
||||||
return NtSetInformationObject( handle, class, ptr, len );
|
return NtSetInformationObject( handle, class, ptr, len );
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1615,6 +1615,12 @@ typedef enum _FSINFOCLASS {
|
||||||
FileFsControlInformation,
|
FileFsControlInformation,
|
||||||
FileFsFullSizeInformation,
|
FileFsFullSizeInformation,
|
||||||
FileFsObjectIdInformation,
|
FileFsObjectIdInformation,
|
||||||
|
FileFsDriverPathInformation,
|
||||||
|
FileFsVolumeFlagsInformation,
|
||||||
|
FileFsSectorSizeInformation,
|
||||||
|
FileFsDataCopyInformation,
|
||||||
|
FileFsMetadataSizeInformation,
|
||||||
|
FileFsFullSizeInformationEx,
|
||||||
FileFsMaximumInformation
|
FileFsMaximumInformation
|
||||||
} FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
|
} FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
|
||||||
|
|
||||||
|
@ -1627,6 +1633,8 @@ typedef enum _KEY_INFORMATION_CLASS {
|
||||||
KeyFlagsInformation,
|
KeyFlagsInformation,
|
||||||
KeyVirtualizationInformation,
|
KeyVirtualizationInformation,
|
||||||
KeyHandleTagsInformation,
|
KeyHandleTagsInformation,
|
||||||
|
KeyTrustInformation,
|
||||||
|
KeyLayerInformation,
|
||||||
MaxKeyInfoClass
|
MaxKeyInfoClass
|
||||||
} KEY_INFORMATION_CLASS;
|
} KEY_INFORMATION_CLASS;
|
||||||
|
|
||||||
|
@ -1635,7 +1643,8 @@ typedef enum _KEY_VALUE_INFORMATION_CLASS {
|
||||||
KeyValueFullInformation,
|
KeyValueFullInformation,
|
||||||
KeyValuePartialInformation,
|
KeyValuePartialInformation,
|
||||||
KeyValueFullInformationAlign64,
|
KeyValueFullInformationAlign64,
|
||||||
KeyValuePartialInformationAlign64
|
KeyValuePartialInformationAlign64,
|
||||||
|
KeyValueLayerInformation,
|
||||||
} KEY_VALUE_INFORMATION_CLASS;
|
} KEY_VALUE_INFORMATION_CLASS;
|
||||||
|
|
||||||
typedef enum _OBJECT_INFORMATION_CLASS {
|
typedef enum _OBJECT_INFORMATION_CLASS {
|
||||||
|
@ -1643,7 +1652,9 @@ typedef enum _OBJECT_INFORMATION_CLASS {
|
||||||
ObjectNameInformation,
|
ObjectNameInformation,
|
||||||
ObjectTypeInformation,
|
ObjectTypeInformation,
|
||||||
ObjectTypesInformation,
|
ObjectTypesInformation,
|
||||||
ObjectDataInformation
|
ObjectHandleFlagInformation,
|
||||||
|
ObjectSessionInformation,
|
||||||
|
ObjectSessionObjectInformation,
|
||||||
} OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS;
|
} OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS;
|
||||||
|
|
||||||
typedef enum _PROCESSINFOCLASS {
|
typedef enum _PROCESSINFOCLASS {
|
||||||
|
@ -1699,9 +1710,66 @@ typedef enum _PROCESSINFOCLASS {
|
||||||
ProcessConsoleHostProcess = 49,
|
ProcessConsoleHostProcess = 49,
|
||||||
ProcessWindowInformation = 50,
|
ProcessWindowInformation = 50,
|
||||||
ProcessHandleInformation = 51,
|
ProcessHandleInformation = 51,
|
||||||
|
ProcessMitigationPolicy = 52,
|
||||||
|
ProcessDynamicFunctionTableInformation = 53,
|
||||||
|
ProcessHandleCheckingMode = 54,
|
||||||
|
ProcessKeepAliveCount = 55,
|
||||||
|
ProcessRevokeFileHandles = 56,
|
||||||
|
ProcessWorkingSetControl = 57,
|
||||||
ProcessHandleTable = 58,
|
ProcessHandleTable = 58,
|
||||||
|
ProcessCheckStackExtentsMode = 59,
|
||||||
|
ProcessCommandLineInformation = 60,
|
||||||
|
ProcessProtectionInformation = 61,
|
||||||
|
ProcessMemoryExhaustion = 62,
|
||||||
|
ProcessFaultInformation = 63,
|
||||||
|
ProcessTelemetryIdInformation = 64,
|
||||||
|
ProcessCommitReleaseInformation = 65,
|
||||||
|
ProcessDefaultCpuSetsInformation = 66,
|
||||||
|
ProcessAllowedCpuSetsInformation = 67,
|
||||||
|
ProcessSubsystemProcess = 68,
|
||||||
|
ProcessJobMemoryInformation = 69,
|
||||||
|
ProcessInPrivate = 70,
|
||||||
|
ProcessRaiseUMExceptionOnInvalidHandleClose = 71,
|
||||||
|
ProcessIumChallengeResponse = 72,
|
||||||
|
ProcessChildProcessInformation = 73,
|
||||||
|
ProcessHighGraphicsPriorityInformation = 74,
|
||||||
|
ProcessSubsystemInformation = 75,
|
||||||
|
ProcessEnergyValues = 76,
|
||||||
ProcessPowerThrottlingState = 77,
|
ProcessPowerThrottlingState = 77,
|
||||||
|
ProcessReserved3Information = 78,
|
||||||
|
ProcessWin32kSyscallFilterInformation = 79,
|
||||||
|
ProcessDisableSystemAllowedCpuSets = 80,
|
||||||
|
ProcessWakeInformation = 81,
|
||||||
|
ProcessEnergyTrackingState = 82,
|
||||||
|
ProcessManageWritesToExecutableMemory = 83,
|
||||||
|
ProcessCaptureTrustletLiveDump = 84,
|
||||||
|
ProcessTelemetryCoverage = 85,
|
||||||
|
ProcessEnclaveInformation = 86,
|
||||||
|
ProcessEnableReadWriteVmLogging = 87,
|
||||||
|
ProcessUptimeInformation = 88,
|
||||||
|
ProcessImageSection = 89,
|
||||||
|
ProcessDebugAuthInformation = 90,
|
||||||
|
ProcessSystemResourceManagement = 91,
|
||||||
|
ProcessSequenceNumber = 92,
|
||||||
|
ProcessLoaderDetour = 93,
|
||||||
|
ProcessSecurityDomainInformation = 94,
|
||||||
|
ProcessCombineSecurityDomainsInformation = 95,
|
||||||
|
ProcessEnableLogging = 96,
|
||||||
ProcessLeapSecondInformation = 97,
|
ProcessLeapSecondInformation = 97,
|
||||||
|
ProcessFiberShadowStackAllocation = 98,
|
||||||
|
ProcessFreeFiberShadowStackAllocation = 99,
|
||||||
|
ProcessAltSystemCallInformation = 100,
|
||||||
|
ProcessDynamicEHContinuationTargets = 101,
|
||||||
|
ProcessDynamicEnforcedCetCompatibleRanges = 102,
|
||||||
|
ProcessCreateStateChange = 103,
|
||||||
|
ProcessApplyStateChange = 104,
|
||||||
|
ProcessEnableOptionalXStateFeatures = 105,
|
||||||
|
ProcessAltPrefetchParam = 106,
|
||||||
|
ProcessAssignCpuPartitions = 107,
|
||||||
|
ProcessPriorityClassEx = 108,
|
||||||
|
ProcessMembershipInformation = 109,
|
||||||
|
ProcessEffectiveIoPriority = 110,
|
||||||
|
ProcessEffectivePagePriority = 111,
|
||||||
MaxProcessInfoClass,
|
MaxProcessInfoClass,
|
||||||
#ifdef __WINESRC__
|
#ifdef __WINESRC__
|
||||||
ProcessWineMakeProcessSystem = 1000,
|
ProcessWineMakeProcessSystem = 1000,
|
||||||
|
@ -1945,6 +2013,22 @@ typedef enum _SYSTEM_INFORMATION_CLASS {
|
||||||
SystemDifRemovePluginVerificationOnDriver = 220,
|
SystemDifRemovePluginVerificationOnDriver = 220,
|
||||||
SystemShadowStackInformation = 221,
|
SystemShadowStackInformation = 221,
|
||||||
SystemBuildVersionInformation = 222,
|
SystemBuildVersionInformation = 222,
|
||||||
|
SystemPoolLimitInformation = 223,
|
||||||
|
SystemCodeIntegrityAddDynamicStore = 224,
|
||||||
|
SystemCodeIntegrityClearDynamicStores = 225,
|
||||||
|
SystemDifPoolTrackingInformation = 226,
|
||||||
|
SystemPoolZeroingInformation = 227,
|
||||||
|
SystemDpcWatchdogInformation = 228,
|
||||||
|
SystemDpcWatchdogInformation2 = 229,
|
||||||
|
SystemSupportedProcessorArchitectures2 = 230,
|
||||||
|
SystemSingleProcessorRelationshipInformation = 231,
|
||||||
|
SystemXfgCheckFailureInformation = 232,
|
||||||
|
SystemIommuStateInformation = 233,
|
||||||
|
SystemHypervisorMinrootInformation = 234,
|
||||||
|
SystemHypervisorBootPagesInformation = 235,
|
||||||
|
SystemPointerAuthInformation = 236,
|
||||||
|
SystemSecureKernelDebuggerInformation = 237,
|
||||||
|
SystemOriginalImageFeatureInformation = 238,
|
||||||
#ifdef __WINESRC__
|
#ifdef __WINESRC__
|
||||||
SystemWineVersionInformation = 1000,
|
SystemWineVersionInformation = 1000,
|
||||||
#endif
|
#endif
|
||||||
|
@ -2023,6 +2107,11 @@ typedef enum _THREADINFOCLASS {
|
||||||
ThreadManageWritesToExecutableMemory,
|
ThreadManageWritesToExecutableMemory,
|
||||||
ThreadPowerThrottlingState,
|
ThreadPowerThrottlingState,
|
||||||
ThreadWorkloadClass,
|
ThreadWorkloadClass,
|
||||||
|
ThreadCreateStateChange,
|
||||||
|
ThreadApplyStateChange,
|
||||||
|
ThreadStrongerBadHandleChecks,
|
||||||
|
ThreadEffectiveIoPriority,
|
||||||
|
ThreadEffectivePagePriority,
|
||||||
MaxThreadInfoClass,
|
MaxThreadInfoClass,
|
||||||
#ifdef __WINESRC__
|
#ifdef __WINESRC__
|
||||||
ThreadWineNativeThreadName = 1000,
|
ThreadWineNativeThreadName = 1000,
|
||||||
|
@ -2074,6 +2163,8 @@ typedef enum _MEMORY_INFORMATION_CLASS {
|
||||||
MemoryEnclaveImageInformation,
|
MemoryEnclaveImageInformation,
|
||||||
MemoryBasicInformationCapped,
|
MemoryBasicInformationCapped,
|
||||||
MemoryPhysicalContiguityInformation,
|
MemoryPhysicalContiguityInformation,
|
||||||
|
MemoryBadInformation,
|
||||||
|
MemoryBadInformationAllProcesses,
|
||||||
#ifdef __WINESRC__
|
#ifdef __WINESRC__
|
||||||
MemoryWineUnixFuncs = 1000,
|
MemoryWineUnixFuncs = 1000,
|
||||||
MemoryWineUnixWow64Funcs,
|
MemoryWineUnixWow64Funcs,
|
||||||
|
@ -2170,7 +2261,12 @@ typedef enum
|
||||||
{
|
{
|
||||||
VmPrefetchInformation,
|
VmPrefetchInformation,
|
||||||
VmPagePriorityInformation,
|
VmPagePriorityInformation,
|
||||||
VmCfgCallTargetInformation
|
VmCfgCallTargetInformation,
|
||||||
|
VmPageDirtyStateInformation,
|
||||||
|
VmImageHotPatchInformation,
|
||||||
|
VmPhysicalContiguityInformation,
|
||||||
|
VmVirtualMachinePrepopulateInformation,
|
||||||
|
VmRemoveFromWorkingSetInformation,
|
||||||
} VIRTUAL_MEMORY_INFORMATION_CLASS, *PVIRTUAL_MEMORY_INFORMATION_CLASS;
|
} VIRTUAL_MEMORY_INFORMATION_CLASS, *PVIRTUAL_MEMORY_INFORMATION_CLASS;
|
||||||
|
|
||||||
typedef struct _MEMORY_RANGE_ENTRY
|
typedef struct _MEMORY_RANGE_ENTRY
|
||||||
|
@ -2331,10 +2427,10 @@ typedef struct _OBJECT_ATTRIBUTES {
|
||||||
} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
|
} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct _OBJECT_DATA_INFORMATION {
|
typedef struct _OBJECT_HANDLE_FLAG_INFORMATION {
|
||||||
BOOLEAN InheritHandle;
|
BOOLEAN Inherit;
|
||||||
BOOLEAN ProtectFromClose;
|
BOOLEAN ProtectFromClose;
|
||||||
} OBJECT_DATA_INFORMATION, *POBJECT_DATA_INFORMATION;
|
} OBJECT_HANDLE_FLAG_INFORMATION, *POBJECT_HANDLE_FLAG_INFORMATION;
|
||||||
|
|
||||||
typedef struct _OBJECT_BASIC_INFORMATION {
|
typedef struct _OBJECT_BASIC_INFORMATION {
|
||||||
ULONG Attributes;
|
ULONG Attributes;
|
||||||
|
|
Loading…
Reference in a new issue