xref: /reactos/sdk/include/xdk/obfuncs.h (revision c2c66aff)
1*c2c66affSColin Finck $if (_WDMDDK_)
2*c2c66affSColin Finck /******************************************************************************
3*c2c66affSColin Finck  *                          Object Manager Functions                          *
4*c2c66affSColin Finck  ******************************************************************************/
5*c2c66affSColin Finck $endif (_WDMDDK_)
6*c2c66affSColin Finck 
7*c2c66affSColin Finck #if (NTDDI_VERSION >= NTDDI_WIN2K)
8*c2c66affSColin Finck $if (_WDMDDK_)
9*c2c66affSColin Finck _IRQL_requires_max_(DISPATCH_LEVEL)
10*c2c66affSColin Finck NTKERNELAPI
11*c2c66affSColin Finck LONG_PTR
12*c2c66affSColin Finck FASTCALL
13*c2c66affSColin Finck ObfDereferenceObject(
14*c2c66affSColin Finck   _In_ PVOID Object);
15*c2c66affSColin Finck #define ObDereferenceObject ObfDereferenceObject
16*c2c66affSColin Finck 
17*c2c66affSColin Finck _IRQL_requires_max_(APC_LEVEL)
18*c2c66affSColin Finck NTKERNELAPI
19*c2c66affSColin Finck NTSTATUS
20*c2c66affSColin Finck NTAPI
21*c2c66affSColin Finck ObGetObjectSecurity(
22*c2c66affSColin Finck   _In_ PVOID Object,
23*c2c66affSColin Finck   _Out_ PSECURITY_DESCRIPTOR *SecurityDescriptor,
24*c2c66affSColin Finck   _Out_ PBOOLEAN MemoryAllocated);
25*c2c66affSColin Finck 
26*c2c66affSColin Finck _IRQL_requires_max_(DISPATCH_LEVEL)
27*c2c66affSColin Finck NTKERNELAPI
28*c2c66affSColin Finck LONG_PTR
29*c2c66affSColin Finck FASTCALL
30*c2c66affSColin Finck ObfReferenceObject(
31*c2c66affSColin Finck   _In_ PVOID Object);
32*c2c66affSColin Finck #define ObReferenceObject ObfReferenceObject
33*c2c66affSColin Finck 
34*c2c66affSColin Finck _IRQL_requires_max_(APC_LEVEL)
35*c2c66affSColin Finck NTKERNELAPI
36*c2c66affSColin Finck NTSTATUS
37*c2c66affSColin Finck NTAPI
38*c2c66affSColin Finck ObReferenceObjectByHandle(
39*c2c66affSColin Finck   _In_ HANDLE Handle,
40*c2c66affSColin Finck   _In_ ACCESS_MASK DesiredAccess,
41*c2c66affSColin Finck   _In_opt_ POBJECT_TYPE ObjectType,
42*c2c66affSColin Finck   _In_ KPROCESSOR_MODE AccessMode,
43*c2c66affSColin Finck   _Out_ PVOID *Object,
44*c2c66affSColin Finck   _Out_opt_ POBJECT_HANDLE_INFORMATION HandleInformation);
45*c2c66affSColin Finck 
46*c2c66affSColin Finck _IRQL_requires_max_(DISPATCH_LEVEL)
47*c2c66affSColin Finck NTKERNELAPI
48*c2c66affSColin Finck NTSTATUS
49*c2c66affSColin Finck NTAPI
50*c2c66affSColin Finck ObReferenceObjectByPointer(
51*c2c66affSColin Finck   _In_ PVOID Object,
52*c2c66affSColin Finck   _In_ ACCESS_MASK DesiredAccess,
53*c2c66affSColin Finck   _In_opt_ POBJECT_TYPE ObjectType,
54*c2c66affSColin Finck   _In_ KPROCESSOR_MODE AccessMode);
55*c2c66affSColin Finck 
56*c2c66affSColin Finck _IRQL_requires_max_(APC_LEVEL)
57*c2c66affSColin Finck NTKERNELAPI
58*c2c66affSColin Finck VOID
59*c2c66affSColin Finck NTAPI
60*c2c66affSColin Finck ObReleaseObjectSecurity(
61*c2c66affSColin Finck   _In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
62*c2c66affSColin Finck   _In_ BOOLEAN MemoryAllocated);
63*c2c66affSColin Finck $endif (_WDMDDK_)
64*c2c66affSColin Finck $if (_NTIFS_)
65*c2c66affSColin Finck 
66*c2c66affSColin Finck NTKERNELAPI
67*c2c66affSColin Finck NTSTATUS
68*c2c66affSColin Finck NTAPI
69*c2c66affSColin Finck ObInsertObject(
70*c2c66affSColin Finck   _In_ PVOID Object,
71*c2c66affSColin Finck   _Inout_opt_ PACCESS_STATE PassedAccessState,
72*c2c66affSColin Finck   _In_opt_ ACCESS_MASK DesiredAccess,
73*c2c66affSColin Finck   _In_ ULONG ObjectPointerBias,
74*c2c66affSColin Finck   _Out_opt_ PVOID *NewObject,
75*c2c66affSColin Finck   _Out_opt_ PHANDLE Handle);
76*c2c66affSColin Finck 
77*c2c66affSColin Finck NTKERNELAPI
78*c2c66affSColin Finck NTSTATUS
79*c2c66affSColin Finck NTAPI
80*c2c66affSColin Finck ObOpenObjectByPointer(
81*c2c66affSColin Finck   _In_ PVOID Object,
82*c2c66affSColin Finck   _In_ ULONG HandleAttributes,
83*c2c66affSColin Finck   _In_opt_ PACCESS_STATE PassedAccessState,
84*c2c66affSColin Finck   _In_ ACCESS_MASK DesiredAccess,
85*c2c66affSColin Finck   _In_opt_ POBJECT_TYPE ObjectType,
86*c2c66affSColin Finck   _In_ KPROCESSOR_MODE AccessMode,
87*c2c66affSColin Finck   _Out_ PHANDLE Handle);
88*c2c66affSColin Finck 
89*c2c66affSColin Finck NTKERNELAPI
90*c2c66affSColin Finck VOID
91*c2c66affSColin Finck NTAPI
92*c2c66affSColin Finck ObMakeTemporaryObject(
93*c2c66affSColin Finck   _In_ PVOID Object);
94*c2c66affSColin Finck 
95*c2c66affSColin Finck NTKERNELAPI
96*c2c66affSColin Finck NTSTATUS
97*c2c66affSColin Finck NTAPI
98*c2c66affSColin Finck ObQueryNameString(
99*c2c66affSColin Finck   _In_ PVOID Object,
100*c2c66affSColin Finck   _Out_writes_bytes_opt_(Length) POBJECT_NAME_INFORMATION ObjectNameInfo,
101*c2c66affSColin Finck   _In_ ULONG Length,
102*c2c66affSColin Finck   _Out_ PULONG ReturnLength);
103*c2c66affSColin Finck 
104*c2c66affSColin Finck NTKERNELAPI
105*c2c66affSColin Finck NTSTATUS
106*c2c66affSColin Finck NTAPI
107*c2c66affSColin Finck ObQueryObjectAuditingByHandle(
108*c2c66affSColin Finck   _In_ HANDLE Handle,
109*c2c66affSColin Finck   _Out_ PBOOLEAN GenerateOnClose);
110*c2c66affSColin Finck $endif (_NTIFS_)
111*c2c66affSColin Finck #endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
112*c2c66affSColin Finck 
113*c2c66affSColin Finck #if (NTDDI_VERSION >= NTDDI_VISTA)
114*c2c66affSColin Finck $if (_WDMDDK_)
115*c2c66affSColin Finck NTKERNELAPI
116*c2c66affSColin Finck VOID
117*c2c66affSColin Finck NTAPI
118*c2c66affSColin Finck ObDereferenceObjectDeferDelete(
119*c2c66affSColin Finck   _In_ PVOID Object);
120*c2c66affSColin Finck $endif (_WDMDDK_)
121*c2c66affSColin Finck $if (_NTIFS_)
122*c2c66affSColin Finck 
123*c2c66affSColin Finck NTKERNELAPI
124*c2c66affSColin Finck BOOLEAN
125*c2c66affSColin Finck NTAPI
126*c2c66affSColin Finck ObIsKernelHandle(
127*c2c66affSColin Finck   _In_ HANDLE Handle);
128*c2c66affSColin Finck $endif (_NTIFS_)
129*c2c66affSColin Finck #endif
130*c2c66affSColin Finck 
131*c2c66affSColin Finck $if (_WDMDDK_)
132*c2c66affSColin Finck #if (NTDDI_VERSION >= NTDDI_VISTASP1)
133*c2c66affSColin Finck NTKERNELAPI
134*c2c66affSColin Finck NTSTATUS
135*c2c66affSColin Finck NTAPI
136*c2c66affSColin Finck ObRegisterCallbacks(
137*c2c66affSColin Finck   _In_ POB_CALLBACK_REGISTRATION CallbackRegistration,
138*c2c66affSColin Finck   _Outptr_ PVOID *RegistrationHandle);
139*c2c66affSColin Finck 
140*c2c66affSColin Finck NTKERNELAPI
141*c2c66affSColin Finck VOID
142*c2c66affSColin Finck NTAPI
143*c2c66affSColin Finck ObUnRegisterCallbacks(
144*c2c66affSColin Finck   _In_ PVOID RegistrationHandle);
145*c2c66affSColin Finck 
146*c2c66affSColin Finck NTKERNELAPI
147*c2c66affSColin Finck USHORT
148*c2c66affSColin Finck NTAPI
149*c2c66affSColin Finck ObGetFilterVersion(VOID);
150*c2c66affSColin Finck 
151*c2c66affSColin Finck #endif /* (NTDDI_VERSION >= NTDDI_VISTASP1) */
152*c2c66affSColin Finck $endif (_WDMDDK_)
153*c2c66affSColin Finck 
154*c2c66affSColin Finck #if (NTDDI_VERSION >= NTDDI_WIN7)
155*c2c66affSColin Finck $if (_WDMDDK_)
156*c2c66affSColin Finck _IRQL_requires_max_(APC_LEVEL)
157*c2c66affSColin Finck NTKERNELAPI
158*c2c66affSColin Finck NTSTATUS
159*c2c66affSColin Finck NTAPI
160*c2c66affSColin Finck ObReferenceObjectByHandleWithTag(
161*c2c66affSColin Finck   _In_ HANDLE Handle,
162*c2c66affSColin Finck   _In_ ACCESS_MASK DesiredAccess,
163*c2c66affSColin Finck   _In_opt_ POBJECT_TYPE ObjectType,
164*c2c66affSColin Finck   _In_ KPROCESSOR_MODE AccessMode,
165*c2c66affSColin Finck   _In_ ULONG Tag,
166*c2c66affSColin Finck   _Out_ PVOID *Object,
167*c2c66affSColin Finck   _Out_opt_ POBJECT_HANDLE_INFORMATION HandleInformation);
168*c2c66affSColin Finck 
169*c2c66affSColin Finck _IRQL_requires_max_(DISPATCH_LEVEL)
170*c2c66affSColin Finck NTKERNELAPI
171*c2c66affSColin Finck LONG_PTR
172*c2c66affSColin Finck FASTCALL
173*c2c66affSColin Finck ObfReferenceObjectWithTag(
174*c2c66affSColin Finck   _In_ PVOID Object,
175*c2c66affSColin Finck   _In_ ULONG Tag);
176*c2c66affSColin Finck 
177*c2c66affSColin Finck _IRQL_requires_max_(DISPATCH_LEVEL)
178*c2c66affSColin Finck NTKERNELAPI
179*c2c66affSColin Finck NTSTATUS
180*c2c66affSColin Finck NTAPI
181*c2c66affSColin Finck ObReferenceObjectByPointerWithTag(
182*c2c66affSColin Finck   _In_ PVOID Object,
183*c2c66affSColin Finck   _In_ ACCESS_MASK DesiredAccess,
184*c2c66affSColin Finck   _In_opt_ POBJECT_TYPE ObjectType,
185*c2c66affSColin Finck   _In_ KPROCESSOR_MODE AccessMode,
186*c2c66affSColin Finck   _In_ ULONG Tag);
187*c2c66affSColin Finck 
188*c2c66affSColin Finck _IRQL_requires_max_(DISPATCH_LEVEL)
189*c2c66affSColin Finck NTKERNELAPI
190*c2c66affSColin Finck LONG_PTR
191*c2c66affSColin Finck FASTCALL
192*c2c66affSColin Finck ObfDereferenceObjectWithTag(
193*c2c66affSColin Finck   _In_ PVOID Object,
194*c2c66affSColin Finck   _In_ ULONG Tag);
195*c2c66affSColin Finck 
196*c2c66affSColin Finck NTKERNELAPI
197*c2c66affSColin Finck VOID
198*c2c66affSColin Finck NTAPI
199*c2c66affSColin Finck ObDereferenceObjectDeferDeleteWithTag(
200*c2c66affSColin Finck   _In_ PVOID Object,
201*c2c66affSColin Finck   _In_ ULONG Tag);
202*c2c66affSColin Finck 
203*c2c66affSColin Finck #define ObDereferenceObject ObfDereferenceObject
204*c2c66affSColin Finck #define ObReferenceObject ObfReferenceObject
205*c2c66affSColin Finck #define ObDereferenceObjectWithTag ObfDereferenceObjectWithTag
206*c2c66affSColin Finck #define ObReferenceObjectWithTag ObfReferenceObjectWithTag
207*c2c66affSColin Finck $endif (_WDMDDK_)
208*c2c66affSColin Finck $if (_NTIFS_)
209*c2c66affSColin Finck 
210*c2c66affSColin Finck NTKERNELAPI
211*c2c66affSColin Finck NTSTATUS
212*c2c66affSColin Finck NTAPI
213*c2c66affSColin Finck ObOpenObjectByPointerWithTag(
214*c2c66affSColin Finck   _In_ PVOID Object,
215*c2c66affSColin Finck   _In_ ULONG HandleAttributes,
216*c2c66affSColin Finck   _In_opt_ PACCESS_STATE PassedAccessState,
217*c2c66affSColin Finck   _In_ ACCESS_MASK DesiredAccess,
218*c2c66affSColin Finck   _In_opt_ POBJECT_TYPE ObjectType,
219*c2c66affSColin Finck   _In_ KPROCESSOR_MODE AccessMode,
220*c2c66affSColin Finck   _In_ ULONG Tag,
221*c2c66affSColin Finck   _Out_ PHANDLE Handle);
222*c2c66affSColin Finck 
223*c2c66affSColin Finck NTKERNELAPI
224*c2c66affSColin Finck ULONG
225*c2c66affSColin Finck NTAPI
226*c2c66affSColin Finck ObGetObjectPointerCount(
227*c2c66affSColin Finck     _In_ PVOID Object
228*c2c66affSColin Finck );
229*c2c66affSColin Finck 
230*c2c66affSColin Finck $endif (_NTIFS_)
231*c2c66affSColin Finck #endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
232*c2c66affSColin Finck 
233