ReactOS 0.4.16-dev-319-g6cf4263
obfuncs.h
Go to the documentation of this file.
1/*++ NDK Version: 0098
2
3Copyright (c) Alex Ionescu. All rights reserved.
4
5Header Name:
6
7 obfuncs.h
8
9Abstract:
10
11 Function definitions for the Object Manager
12
13Author:
14
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16
17--*/
18
19#ifndef _OBFUNCS_H
20#define _OBFUNCS_H
21
22//
23// Dependencies
24//
25#include <umtypes.h>
26#include <pstypes.h>
27#include <obtypes.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#ifndef NTOS_MODE_USER
34
35//
36// Object Functions
37//
46);
47
54);
55
60 _In_opt_ KPROCESSOR_MODE ObjectAttributesAccessMode,
64 _Inout_opt_ PVOID ParseContext,
65 _In_ ULONG ObjectSize,
66 _In_opt_ ULONG PagedPoolCharge,
67 _In_opt_ ULONG NonPagedPoolCharge,
69);
70
75 _In_ PUNICODE_STRING TypeName,
76 _In_ POBJECT_TYPE_INITIALIZER ObjectTypeInitializer,
79);
80
82VOID
87);
88
94);
95
100 _In_ PSECURITY_DESCRIPTOR InputSecurityDescriptor,
101 _Out_ PSECURITY_DESCRIPTOR *OutputSecurityDescriptor,
102 _In_ ULONG RefBias
103);
104
107NTAPI
114 _Inout_opt_ PVOID ParseContext,
116);
117
120NTAPI
128 _Inout_opt_ PVOID ParseContext,
130);
131
133VOID
134NTAPI
138);
139
142NTAPI
147);
148
151NTAPI
158);
159
161VOID
162NTAPI
165);
166
167#endif
168
169//
170// Native Calls
171//
174NTAPI
177);
178
182NTAPI
184 _In_ PUNICODE_STRING SubsystemName,
185 _In_opt_ PVOID HandleId,
187);
188
191NTAPI
196);
197
200NTAPI
202 _Out_ PHANDLE SymbolicLinkHandle,
206);
207
211NTAPI
213 _In_ PUNICODE_STRING SubsystemName,
214 _In_opt_ PVOID HandleId,
216);
217
220NTAPI
222 _In_ HANDLE SourceProcessHandle,
229);
230
233NTAPI
236);
237
240NTAPI
243);
244
247NTAPI
252);
253
256NTAPI
258 _Out_ PHANDLE JobHandle,
261);
262
265NTAPI
267 _Out_ PHANDLE SymbolicLinkHandle,
270);
271
274NTAPI
283);
284
289NTAPI
296);
297
302NTAPI
309);
310
313NTAPI
315 _In_ HANDLE SymLinkObjHandle,
317 _Out_opt_ PULONG DataWritten
318);
319
322NTAPI
324 _In_ HANDLE ObjectHandle,
328);
329
332NTAPI
337);
338
341NTAPI
343 _In_ HANDLE SignalObject,
344 _In_ HANDLE WaitObject,
347);
348
351NTAPI
358);
359
361NTAPI
364 _In_ PLONG Handles,
368);
369
372NTAPI
377);
378
381NTAPI
384);
385
388NTAPI
390 _In_ PUNICODE_STRING SubsystemName,
391 _In_ PVOID HandleId,
393);
394
397NTAPI
402);
403
406NTAPI
408 _Out_ PHANDLE SymbolicLinkHandle,
412);
413
416NTAPI
418 _In_ PUNICODE_STRING SubsystemName,
419 _In_ PVOID HandleId,
421);
422
426NTAPI
427ZwDuplicateObject(
428 _In_ HANDLE SourceProcessHandle,
435);
436
439NTAPI
442);
443
446NTAPI
449);
450
453NTAPI
458);
459
462NTAPI
464 _Out_ PHANDLE JobHandle,
467);
468
471NTAPI
473 _Out_ PHANDLE SymbolicLinkHandle,
476);
477
481NTAPI
482ZwQueryDirectoryObject(
490);
491
494NTAPI
496 _In_ HANDLE ObjectHandle,
500);
501
504NTAPI
506 _In_ HANDLE SignalObject,
507 _In_ HANDLE WaitObject,
510);
511
514NTAPI
521);
522
523#ifdef NTOS_MODE_USER
524
528NTAPI
529ZwQueryObject(
535);
536
540NTAPI
541ZwQuerySecurityObject(
547);
548
552NTAPI
553ZwQuerySymbolicLinkObject(
554 _In_ HANDLE LinkHandle,
557);
558
562NTAPI
563ZwSetSecurityObject(
567);
568
574NTAPI
575ZwWaitForSingleObject(
579);
580
581#endif /* NTOS_MODE_USER */
582
583#ifdef __cplusplus
584}; // extern "C"
585#endif
586
587#endif
NTSTATUS NtQueryObject(IN HANDLE Handle, IN OBJECT_INFO_CLASS ObjectInformationClass, OUT PVOID ObjectInformation, IN ULONG ObjectInformationLength, OUT PULONG ReturnLength)
static HANDLE DirectoryHandle
Definition: ObType.c:48
unsigned char BOOLEAN
Type
Definition: Type.h:7
LONG NTSTATUS
Definition: precomp.h:26
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
Definition: batclass.h:188
#define NTSYSAPI
Definition: ntoskrnl.h:12
Definition: bufpool.h:45
LONG ObjectCount
Definition: comsup.c:7
IN CINT OUT PVOID ObjectInformation
Definition: conport.c:48
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define NULL
Definition: types.h:112
#define _IRQL_requires_max_(irql)
Definition: driverspecs.h:230
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define APC_LEVEL
Definition: env_spec_w32.h:695
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1231
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
ULONG Handle
Definition: gdb_input.c:15
enum _OBJECT_INFORMATION_CLASS OBJECT_INFORMATION_CLASS
ObjectType
Definition: metafile.c:81
static PLARGE_INTEGER Time
Definition: time.c:105
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
_In_ PVOID _In_ BOOLEAN Alertable
Definition: exfuncs.h:453
_In_ OBJECT_INFORMATION_CLASS _In_ ULONG _Out_opt_ PULONG ReturnLength
Definition: obfuncs.h:296
_In_ OBJECT_INFORMATION_CLASS ObjectInformationClass
Definition: obfuncs.h:292
_Out_ PVOID _In_ ULONG _In_ BOOLEAN ReturnSingleEntry
Definition: obfuncs.h:486
NTSYSCALLAPI NTSTATUS NTAPI NtCreateDirectoryObject(_Out_ PHANDLE DirectoryHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
_Out_ PVOID _In_ ULONG _In_ BOOLEAN _In_ BOOLEAN RestartScan
Definition: obfuncs.h:487
NTKERNELAPI BOOLEAN NTAPI ObFindHandleForObject(_In_ PEPROCESS Process, _In_ PVOID Object, _In_ POBJECT_TYPE ObjectType, _In_opt_ POBJECT_HANDLE_INFORMATION HandleInformation, _Out_opt_ PHANDLE Handle)
NTSYSAPI NTSTATUS NTAPI ZwDeleteObjectAuditAlarm(_In_ PUNICODE_STRING SubsystemName, _In_ PVOID HandleId, _In_ BOOLEAN GenerateOnClose)
NTSYSAPI NTSTATUS NTAPI ZwSignalAndWaitForSingleObject(_In_ HANDLE SignalObject, _In_ HANDLE WaitObject, _In_ BOOLEAN Alertable, _In_opt_ PLARGE_INTEGER Time)
NTKERNELAPI NTSTATUS NTAPI ObLogSecurityDescriptor(_In_ PSECURITY_DESCRIPTOR InputSecurityDescriptor, _Out_ PSECURITY_DESCRIPTOR *OutputSecurityDescriptor, _In_ ULONG RefBias)
NTKERNELAPI ULONG NTAPI ObGetObjectPointerCount(_In_ PVOID Object)
NTSYSAPI NTSTATUS NTAPI ZwOpenSymbolicLinkObject(_Out_ PHANDLE SymbolicLinkHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
NTSYSAPI NTSTATUS NTAPI ZwOpenDirectoryObject(_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
_In_ HANDLE SourceHandle
Definition: obfuncs.h:429
NTSYSAPI NTSTATUS NTAPI ZwWaitForMultipleObjects(_In_ ULONG Count, _In_ HANDLE Object[], _In_ WAIT_TYPE WaitType, _In_ BOOLEAN Alertable, _In_ PLARGE_INTEGER Time)
NTKERNELAPI VOID NTAPI ObDereferenceObjectDeferDelete(_In_ PVOID Object)
NTSYSCALLAPI NTSTATUS NTAPI NtDuplicateObject(_In_ HANDLE SourceProcessHandle, _In_ HANDLE SourceHandle, _In_ HANDLE TargetProcessHandle, _Out_ PHANDLE TargetHandle, _In_ ACCESS_MASK DesiredAccess, _In_ ULONG HandleAttributes, _In_ ULONG Options)
NTSYSAPI NTSTATUS NTAPI ZwMakePermanentObject(_In_ HANDLE Object)
NTKERNELAPI NTSTATUS NTAPI ObSetSecurityObjectByPointer(_In_ PVOID Object, _In_ SECURITY_INFORMATION SecurityInformation, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor)
NTSYSCALLAPI NTSTATUS NTAPI NtWaitForMultipleObjects(_In_ ULONG Count, _In_ HANDLE Object[], _In_ WAIT_TYPE WaitType, _In_ BOOLEAN Alertable, _In_ PLARGE_INTEGER Time)
NTSYSCALLAPI NTSTATUS NTAPI NtWaitForSingleObject(_In_ HANDLE Object, _In_ BOOLEAN Alertable, _In_opt_ PLARGE_INTEGER Timeout)
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
_In_ HANDLE _In_opt_ HANDLE _Out_opt_ PHANDLE TargetHandle
Definition: obfuncs.h:431
NTSYSAPI NTSTATUS NTAPI ZwCreateSymbolicLinkObject(_Out_ PHANDLE SymbolicLinkHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ PUNICODE_STRING Name)
__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtCloseObjectAuditAlarm(_In_ PUNICODE_STRING SubsystemName, _In_opt_ PVOID HandleId, _In_ BOOLEAN GenerateOnClose)
NTSYSAPI NTSTATUS NTAPI ZwMakeTemporaryObject(_In_ HANDLE Handle)
NTSYSAPI NTSTATUS NTAPI ZwSetInformationObject(_In_ HANDLE ObjectHandle, _In_ OBJECT_INFORMATION_CLASS ObjectInformationClass, _In_ PVOID ObjectInformation, _In_ ULONG Length)
NTSYSAPI NTSTATUS NTAPI ZwCreateDirectoryObject(_Out_ PHANDLE DirectoryHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
NTSYSCALLAPI NTSTATUS NTAPI NtSignalAndWaitForSingleObject(_In_ HANDLE SignalObject, _In_ HANDLE WaitObject, _In_ BOOLEAN Alertable, _In_ PLARGE_INTEGER Time)
NTKERNELAPI NTSTATUS NTAPI ObOpenObjectByName(_In_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ POBJECT_TYPE ObjectType, _In_ KPROCESSOR_MODE AccessMode, _In_opt_ PACCESS_STATE PassedAccessState, _In_ ACCESS_MASK DesiredAccess, _Inout_opt_ PVOID ParseContext, _Out_ PHANDLE Handle)
NTKERNELAPI NTSTATUS NTAPI ObCloseHandle(_In_ HANDLE Handle, _In_ KPROCESSOR_MODE AccessMode)
NTSYSCALLAPI NTSTATUS NTAPI NtOpenJobObject(_Out_ PHANDLE JobHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
NTKERNELAPI NTSTATUS NTAPI ObCreateObject(_In_opt_ KPROCESSOR_MODE ObjectAttributesAccessMode, _In_ POBJECT_TYPE ObjectType, _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ KPROCESSOR_MODE AccessMode, _Inout_opt_ PVOID ParseContext, _In_ ULONG ObjectSize, _In_opt_ ULONG PagedPoolCharge, _In_opt_ ULONG NonPagedPoolCharge, _Out_ PVOID *Object)
NTSYSCALLAPI NTSTATUS NTAPI NtQueryDirectoryObject(_In_ HANDLE DirectoryHandle, _Out_ PVOID Buffer, _In_ ULONG BufferLength, _In_ BOOLEAN ReturnSingleEntry, _In_ BOOLEAN RestartScan, _Inout_ PULONG Context, _Out_opt_ PULONG ReturnLength)
NTSYSCALLAPI NTSTATUS NTAPI NtClose(_In_ HANDLE Handle)
_In_ HANDLE _In_opt_ HANDLE _Out_opt_ PHANDLE _In_ ACCESS_MASK _In_ ULONG HandleAttributes
Definition: obfuncs.h:433
_In_ SECURITY_INFORMATION SecurityInformation
Definition: obfuncs.h:305
NTSYSCALLAPI NTSTATUS NTAPI NtSetInformationObject(_In_ HANDLE ObjectHandle, _In_ OBJECT_INFORMATION_CLASS ObjectInformationClass, _In_ PVOID ObjectInformation, _In_ ULONG Length)
NTKERNELAPI NTSTATUS NTAPI ObReferenceObjectByName(_In_ PUNICODE_STRING ObjectName, _In_ ULONG Attributes, _In_opt_ PACCESS_STATE PassedAccessState, _In_opt_ ACCESS_MASK DesiredAccess, _In_ POBJECT_TYPE ObjectType, _In_ KPROCESSOR_MODE AccessMode, _Inout_opt_ PVOID ParseContext, _Out_ PVOID *Object)
NTKERNELAPI NTSTATUS NTAPI ObAssignSecurity(_In_ PACCESS_STATE AccessState, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PVOID Object, _In_ POBJECT_TYPE Type)
NTSYSAPI NTSTATUS NTAPI ZwCloseObjectAuditAlarm(_In_ PUNICODE_STRING SubsystemName, _In_ PVOID HandleId, _In_ BOOLEAN GenerateOnClose)
NTSYSCALLAPI NTSTATUS NTAPI NtSetSecurityObject(_In_ HANDLE Handle, _In_ SECURITY_INFORMATION SecurityInformation, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor)
NTSYSCALLAPI NTSTATUS NTAPI NtMakeTemporaryObject(_In_ HANDLE Handle)
NTKERNELAPI VOID NTAPI ObReferenceSecurityDescriptor(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Count)
NTSYSCALLAPI NTSTATUS NTAPI NtMakePermanentObject(_In_ HANDLE Object)
NTKERNELAPI VOID NTAPI ObDereferenceSecurityDescriptor(_Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Count)
NTSYSCALLAPI NTSTATUS NTAPI NtQuerySymbolicLinkObject(_In_ HANDLE SymLinkObjHandle, _Out_ PUNICODE_STRING LinkTarget, _Out_opt_ PULONG DataWritten)
NTKERNELAPI NTSTATUS NTAPI ObCreateObjectType(_In_ PUNICODE_STRING TypeName, _In_ POBJECT_TYPE_INITIALIZER ObjectTypeInitializer, _Reserved_ PVOID Reserved, _Out_ POBJECT_TYPE *ObjectType)
NTSYSAPI NTSTATUS NTAPI ZwOpenJobObject(_Out_ PHANDLE JobHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
NTSYSCALLAPI NTSTATUS NTAPI NtCreateSymbolicLinkObject(_Out_ PHANDLE SymbolicLinkHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ PUNICODE_STRING Name)
NTSTATUS NTAPI NtWaitForMultipleObjects32(_In_ ULONG ObjectCount, _In_ PLONG Handles, _In_ WAIT_TYPE WaitType, _In_ BOOLEAN Alertable, _In_opt_ PLARGE_INTEGER TimeOut)
NTSYSCALLAPI NTSTATUS NTAPI NtOpenDirectoryObject(_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
_In_ SECURITY_INFORMATION _In_ ULONG _Out_ PULONG LengthNeeded
Definition: obfuncs.h:309
_In_ HANDLE _In_opt_ HANDLE TargetProcessHandle
Definition: obfuncs.h:430
_In_ OBJECT_INFORMATION_CLASS _In_ ULONG ObjectInformationLength
Definition: obfuncs.h:294
NTSYSCALLAPI NTSTATUS NTAPI NtOpenSymbolicLinkObject(_Out_ PHANDLE SymbolicLinkHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtDeleteObjectAuditAlarm(_In_ PUNICODE_STRING SubsystemName, _In_opt_ PVOID HandleId, _In_ BOOLEAN GenerateOnClose)
#define _Out_opt_
Definition: no_sal2.h:214
#define _Inout_
Definition: no_sal2.h:162
#define _Out_writes_bytes_opt_(s)
Definition: no_sal2.h:228
#define _Out_writes_bytes_to_(s, c)
Definition: no_sal2.h:190
#define _Inout_opt_
Definition: no_sal2.h:216
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#define _Reserved_
Definition: no_sal2.h:504
#define _When_(c, a)
Definition: no_sal2.h:38
int Count
Definition: noreturn.cpp:7
ULONG ACCESS_MASK
Definition: nt_native.h:40
#define NTSYSCALLAPI
Definition: ntbasedef.h:204
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
enum _WAIT_TYPE WAIT_TYPE
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
NTSTATUS NTAPI NtQuerySecurityObject(IN HANDLE Handle, IN SECURITY_INFORMATION SecurityInformation, OUT PSECURITY_DESCRIPTOR SecurityDescriptor, IN ULONG Length, OUT PULONG ResultLength)
Definition: obsecure.c:803
static ULONG Timeout
Definition: ping.c:61
WaitType
Definition: shlextdbg.cpp:386
#define __kernel_entry
Definition: specstrings.h:355
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
int32_t * PLONG
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2658
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
Definition: wdfdevice.h:3534
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
#define NTKERNELAPI
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:191
_In_ PVOID _Out_opt_ PULONG_PTR _Outptr_opt_ PCUNICODE_STRING * ObjectName
Definition: cmfuncs.h:64
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
_In_ PEPROCESS _In_ KPROCESSOR_MODE AccessMode
Definition: mmfuncs.h:396
_In_ ACCESS_MASK _In_opt_ POBJECT_TYPE _In_ KPROCESSOR_MODE _Out_ PVOID _Out_opt_ POBJECT_HANDLE_INFORMATION HandleInformation
Definition: obfuncs.h:44
_Inout_opt_ PACCESS_STATE PassedAccessState
Definition: obfuncs.h:71
_In_opt_ PVOID _In_opt_ PUNICODE_STRING _In_ PSECURITY_DESCRIPTOR _In_ PACCESS_STATE _In_ BOOLEAN _In_ BOOLEAN _In_ KPROCESSOR_MODE _In_opt_ GUID _Out_ PBOOLEAN GenerateOnClose
Definition: sefuncs.h:422
_In_opt_ PVOID _In_opt_ PUNICODE_STRING _In_ PSECURITY_DESCRIPTOR _In_ PACCESS_STATE AccessState
Definition: sefuncs.h:417
_Inout_ PUNICODE_STRING LinkTarget
Definition: zwfuncs.h:292