Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2436da5c
Commit
2436da5c
authored
Jul 13, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Add some new information classes.
parent
962622e6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
117 additions
and
21 deletions
+117
-21
process.c
dlls/kernelbase/process.c
+7
-7
file.c
dlls/ntdll/unix/file.c
+6
-6
sync.c
dlls/wow64/sync.c
+2
-2
winternl.h
include/winternl.h
+102
-6
No files found.
dlls/kernelbase/process.c
View file @
2436da5c
...
...
@@ -805,15 +805,15 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetExitCodeProcess( HANDLE process, LPDWORD exit_c
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
GetHandleInformation
(
HANDLE
handle
,
DWORD
*
flags
)
{
OBJECT_
DATA
_INFORMATION
info
;
OBJECT_
HANDLE_FLAG
_INFORMATION
info
;
if
(
!
set_ntstatus
(
NtQueryObject
(
handle
,
Object
Data
Information
,
&
info
,
sizeof
(
info
),
NULL
)))
if
(
!
set_ntstatus
(
NtQueryObject
(
handle
,
Object
HandleFlag
Information
,
&
info
,
sizeof
(
info
),
NULL
)))
return
FALSE
;
if
(
flags
)
{
*
flags
=
0
;
if
(
info
.
Inherit
Handle
)
*
flags
|=
HANDLE_FLAG_INHERIT
;
if
(
info
.
Inherit
)
*
flags
|=
HANDLE_FLAG_INHERIT
;
if
(
info
.
ProtectFromClose
)
*
flags
|=
HANDLE_FLAG_PROTECT_FROM_CLOSE
;
}
return
TRUE
;
...
...
@@ -1123,21 +1123,21 @@ UINT WINAPI DECLSPEC_HOTPATCH SetHandleCount( UINT count )
*/
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
((
mask
&
(
HANDLE_FLAG_INHERIT
|
HANDLE_FLAG_PROTECT_FROM_CLOSE
))
!=
(
HANDLE_FLAG_INHERIT
|
HANDLE_FLAG_PROTECT_FROM_CLOSE
))
{
if
(
!
set_ntstatus
(
NtQueryObject
(
handle
,
Object
Data
Information
,
&
info
,
sizeof
(
info
),
NULL
)))
if
(
!
set_ntstatus
(
NtQueryObject
(
handle
,
Object
HandleFlag
Information
,
&
info
,
sizeof
(
info
),
NULL
)))
return
FALSE
;
}
if
(
mask
&
HANDLE_FLAG_INHERIT
)
info
.
Inherit
Handle
=
(
flags
&
HANDLE_FLAG_INHERIT
)
!=
0
;
info
.
Inherit
=
(
flags
&
HANDLE_FLAG_INHERIT
)
!=
0
;
if
(
mask
&
HANDLE_FLAG_PROTECT_FROM_CLOSE
)
info
.
ProtectFromClose
=
(
flags
&
HANDLE_FLAG_PROTECT_FROM_CLOSE
)
!=
0
;
return
set_ntstatus
(
NtSetInformationObject
(
handle
,
Object
Data
Information
,
&
info
,
sizeof
(
info
)
));
return
set_ntstatus
(
NtSetInformationObject
(
handle
,
Object
HandleFlag
Information
,
&
info
,
sizeof
(
info
)
));
}
...
...
dlls/ntdll/unix/file.c
View file @
2436da5c
...
...
@@ -7159,9 +7159,9 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas
break
;
}
case
Object
Data
Information
:
case
Object
HandleFlag
Information
:
{
OBJECT_
DATA
_INFORMATION
*
p
=
ptr
;
OBJECT_
HANDLE_FLAG
_INFORMATION
*
p
=
ptr
;
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
);
if
(
status
==
STATUS_SUCCESS
)
{
p
->
Inherit
Handle
=
(
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
;
if
(
used_len
)
*
used_len
=
sizeof
(
*
p
);
}
...
...
@@ -7203,9 +7203,9 @@ NTSTATUS WINAPI NtSetInformationObject( HANDLE handle, OBJECT_INFORMATION_CLASS
switch
(
info_class
)
{
case
Object
Data
Information
:
case
Object
HandleFlag
Information
:
{
OBJECT_
DATA
_INFORMATION
*
p
=
ptr
;
OBJECT_
HANDLE_FLAG
_INFORMATION
*
p
=
ptr
;
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
->
mask
=
HANDLE_FLAG_INHERIT
|
HANDLE_FLAG_PROTECT_FROM_CLOSE
;
if
(
p
->
Inherit
Handle
)
req
->
flags
|=
HANDLE_FLAG_INHERIT
;
if
(
p
->
Inherit
)
req
->
flags
|=
HANDLE_FLAG_INHERIT
;
if
(
p
->
ProtectFromClose
)
req
->
flags
|=
HANDLE_FLAG_PROTECT_FROM_CLOSE
;
status
=
wine_server_call
(
req
);
}
...
...
dlls/wow64/sync.c
View file @
2436da5c
...
...
@@ -944,7 +944,7 @@ NTSTATUS WINAPI wow64_NtQueryObject( UINT *args )
switch
(
class
)
{
case
ObjectBasicInformation
:
/* OBJECT_BASIC_INFORMATION */
case
Object
DataInformation
:
/* OBJECT_DATA
_INFORMATION */
case
Object
HandleFlagInformation
:
/* OBJECT_HANDLE_FLAG
_INFORMATION */
return
NtQueryObject
(
handle
,
class
,
ptr
,
len
,
retlen
);
case
ObjectNameInformation
:
/* OBJECT_NAME_INFORMATION */
...
...
@@ -1371,7 +1371,7 @@ NTSTATUS WINAPI wow64_NtSetInformationObject( UINT *args )
switch
(
class
)
{
case
Object
DataInformation
:
/* OBJECT_DATA
_INFORMATION */
case
Object
HandleFlagInformation
:
/* OBJECT_HANDLE_FLAG
_INFORMATION */
return
NtSetInformationObject
(
handle
,
class
,
ptr
,
len
);
default:
...
...
include/winternl.h
View file @
2436da5c
...
...
@@ -1615,6 +1615,12 @@ typedef enum _FSINFOCLASS {
FileFsControlInformation
,
FileFsFullSizeInformation
,
FileFsObjectIdInformation
,
FileFsDriverPathInformation
,
FileFsVolumeFlagsInformation
,
FileFsSectorSizeInformation
,
FileFsDataCopyInformation
,
FileFsMetadataSizeInformation
,
FileFsFullSizeInformationEx
,
FileFsMaximumInformation
}
FS_INFORMATION_CLASS
,
*
PFS_INFORMATION_CLASS
;
...
...
@@ -1627,6 +1633,8 @@ typedef enum _KEY_INFORMATION_CLASS {
KeyFlagsInformation
,
KeyVirtualizationInformation
,
KeyHandleTagsInformation
,
KeyTrustInformation
,
KeyLayerInformation
,
MaxKeyInfoClass
}
KEY_INFORMATION_CLASS
;
...
...
@@ -1635,7 +1643,8 @@ typedef enum _KEY_VALUE_INFORMATION_CLASS {
KeyValueFullInformation
,
KeyValuePartialInformation
,
KeyValueFullInformationAlign64
,
KeyValuePartialInformationAlign64
KeyValuePartialInformationAlign64
,
KeyValueLayerInformation
,
}
KEY_VALUE_INFORMATION_CLASS
;
typedef
enum
_OBJECT_INFORMATION_CLASS
{
...
...
@@ -1643,7 +1652,9 @@ typedef enum _OBJECT_INFORMATION_CLASS {
ObjectNameInformation
,
ObjectTypeInformation
,
ObjectTypesInformation
,
ObjectDataInformation
ObjectHandleFlagInformation
,
ObjectSessionInformation
,
ObjectSessionObjectInformation
,
}
OBJECT_INFORMATION_CLASS
,
*
POBJECT_INFORMATION_CLASS
;
typedef
enum
_PROCESSINFOCLASS
{
...
...
@@ -1699,9 +1710,66 @@ typedef enum _PROCESSINFOCLASS {
ProcessConsoleHostProcess
=
49
,
ProcessWindowInformation
=
50
,
ProcessHandleInformation
=
51
,
ProcessMitigationPolicy
=
52
,
ProcessDynamicFunctionTableInformation
=
53
,
ProcessHandleCheckingMode
=
54
,
ProcessKeepAliveCount
=
55
,
ProcessRevokeFileHandles
=
56
,
ProcessWorkingSetControl
=
57
,
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
,
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
,
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
,
#ifdef __WINESRC__
ProcessWineMakeProcessSystem
=
1000
,
...
...
@@ -1945,6 +2013,22 @@ typedef enum _SYSTEM_INFORMATION_CLASS {
SystemDifRemovePluginVerificationOnDriver
=
220
,
SystemShadowStackInformation
=
221
,
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__
SystemWineVersionInformation
=
1000
,
#endif
...
...
@@ -2023,6 +2107,11 @@ typedef enum _THREADINFOCLASS {
ThreadManageWritesToExecutableMemory
,
ThreadPowerThrottlingState
,
ThreadWorkloadClass
,
ThreadCreateStateChange
,
ThreadApplyStateChange
,
ThreadStrongerBadHandleChecks
,
ThreadEffectiveIoPriority
,
ThreadEffectivePagePriority
,
MaxThreadInfoClass
,
#ifdef __WINESRC__
ThreadWineNativeThreadName
=
1000
,
...
...
@@ -2074,6 +2163,8 @@ typedef enum _MEMORY_INFORMATION_CLASS {
MemoryEnclaveImageInformation
,
MemoryBasicInformationCapped
,
MemoryPhysicalContiguityInformation
,
MemoryBadInformation
,
MemoryBadInformationAllProcesses
,
#ifdef __WINESRC__
MemoryWineUnixFuncs
=
1000
,
MemoryWineUnixWow64Funcs
,
...
...
@@ -2170,7 +2261,12 @@ typedef enum
{
VmPrefetchInformation
,
VmPagePriorityInformation
,
VmCfgCallTargetInformation
VmCfgCallTargetInformation
,
VmPageDirtyStateInformation
,
VmImageHotPatchInformation
,
VmPhysicalContiguityInformation
,
VmVirtualMachinePrepopulateInformation
,
VmRemoveFromWorkingSetInformation
,
}
VIRTUAL_MEMORY_INFORMATION_CLASS
,
*
PVIRTUAL_MEMORY_INFORMATION_CLASS
;
typedef
struct
_MEMORY_RANGE_ENTRY
...
...
@@ -2331,10 +2427,10 @@ typedef struct _OBJECT_ATTRIBUTES {
}
OBJECT_ATTRIBUTES
,
*
POBJECT_ATTRIBUTES
;
#endif
typedef
struct
_OBJECT_
DATA
_INFORMATION
{
BOOLEAN
Inherit
Handle
;
typedef
struct
_OBJECT_
HANDLE_FLAG
_INFORMATION
{
BOOLEAN
Inherit
;
BOOLEAN
ProtectFromClose
;
}
OBJECT_
DATA_INFORMATION
,
*
POBJECT_DATA
_INFORMATION
;
}
OBJECT_
HANDLE_FLAG_INFORMATION
,
*
POBJECT_HANDLE_FLAG
_INFORMATION
;
typedef
struct
_OBJECT_BASIC_INFORMATION
{
ULONG
Attributes
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment