ReactOS 0.4.17-dev-470-gf9e3448
obfuncs.h File Reference
#include <umtypes.h>
#include <pstypes.h>
#include <obtypes.h>
Include dependency graph for obfuncs.h:

Go to the source code of this file.

Functions

NTKERNELAPI NTSTATUS NTAPI ObAssignSecurity (_In_ PACCESS_STATE AccessState, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PVOID Object, _In_ POBJECT_TYPE Type)
 
NTKERNELAPI NTSTATUS NTAPI ObCloseHandle (_In_ HANDLE Handle, _In_ KPROCESSOR_MODE AccessMode)
 
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)
 
NTKERNELAPI NTSTATUS NTAPI ObCreateObjectType (_In_ PUNICODE_STRING TypeName, _In_ POBJECT_TYPE_INITIALIZER ObjectTypeInitializer, _Reserved_ PVOID Reserved, _Out_ POBJECT_TYPE *ObjectType)
 
NTKERNELAPI VOID NTAPI ObDereferenceObjectDeferDelete (_In_ PVOID Object)
 
NTKERNELAPI VOID NTAPI ObDereferenceSecurityDescriptor (_Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Count)
 
NTKERNELAPI BOOLEAN NTAPI ObFindHandleForObject (_In_ PEPROCESS Process, _In_ PVOID Object, _In_ POBJECT_TYPE ObjectType, _In_opt_ POBJECT_HANDLE_INFORMATION HandleInformation, _Out_opt_ PHANDLE Handle)
 
NTKERNELAPI ULONG NTAPI ObGetObjectPointerCount (_In_ PVOID Object)
 
NTKERNELAPI NTSTATUS NTAPI ObLogSecurityDescriptor (_In_ PSECURITY_DESCRIPTOR InputSecurityDescriptor, _Out_ PSECURITY_DESCRIPTOR *OutputSecurityDescriptor, _In_ ULONG RefBias)
 
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 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 VOID NTAPI ObReferenceSecurityDescriptor (_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Count)
 
NTKERNELAPI NTSTATUS NTAPI ObSetHandleAttributes (_In_ HANDLE Handle, _In_ POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleFlags, _In_ KPROCESSOR_MODE PreviousMode)
 Sets the attributes (inheritable and protect-from-close) of an existing object handle.
 
NTKERNELAPI NTSTATUS NTAPI ObSetSecurityObjectByPointer (_In_ PVOID Object, _In_ SECURITY_INFORMATION SecurityInformation, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor)
 
NTSYSCALLAPI NTSTATUS NTAPI NtClose (_In_ HANDLE Handle)
 
__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtCloseObjectAuditAlarm (_In_ PUNICODE_STRING SubsystemName, _In_opt_ PVOID HandleId, _In_ BOOLEAN GenerateOnClose)
 
NTSYSCALLAPI NTSTATUS NTAPI NtCreateDirectoryObject (_Out_ PHANDLE DirectoryHandle, _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)
 
__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtDeleteObjectAuditAlarm (_In_ PUNICODE_STRING SubsystemName, _In_opt_ PVOID HandleId, _In_ BOOLEAN GenerateOnClose)
 
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)
 
NTSYSCALLAPI NTSTATUS NTAPI NtMakePermanentObject (_In_ HANDLE Object)
 
NTSYSCALLAPI NTSTATUS NTAPI NtMakeTemporaryObject (_In_ HANDLE Handle)
 
NTSYSCALLAPI NTSTATUS NTAPI NtOpenDirectoryObject (_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
 
NTSYSCALLAPI NTSTATUS NTAPI NtOpenJobObject (_Out_ PHANDLE JobHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
 
NTSYSCALLAPI NTSTATUS NTAPI NtOpenSymbolicLinkObject (_Out_ PHANDLE SymbolicLinkHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
 
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)
 
 _IRQL_requires_max_ (PASSIVE_LEVEL) __kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtQueryObject(_In_opt_ HANDLE Handle
 Queries information details about a security descriptor.
 
_In_ OBJECT_INFORMATION_CLASS _Out_writes_bytes_opt_ (ObjectInformationLength) PVOID ObjectInformation
 
_In_ SECURITY_INFORMATION _Out_writes_bytes_opt_ (Length) PSECURITY_DESCRIPTOR SecurityDescriptor
 
NTSYSCALLAPI NTSTATUS NTAPI NtQuerySymbolicLinkObject (_In_ HANDLE SymLinkObjHandle, _Out_ PUNICODE_STRING LinkTarget, _Out_opt_ PULONG DataWritten)
 
NTSYSCALLAPI NTSTATUS NTAPI NtSetInformationObject (_In_ HANDLE ObjectHandle, _In_ OBJECT_INFORMATION_CLASS ObjectInformationClass, _In_reads_bytes_(Length) PVOID ObjectInformation, _In_ ULONG Length)
 Sets information for an object or for a handle to an object.
 
NTSYSCALLAPI NTSTATUS NTAPI NtSetSecurityObject (_In_ HANDLE Handle, _In_ SECURITY_INFORMATION SecurityInformation, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor)
 
NTSYSCALLAPI NTSTATUS NTAPI NtSignalAndWaitForSingleObject (_In_ HANDLE SignalObject, _In_ HANDLE WaitObject, _In_ BOOLEAN Alertable, _In_ PLARGE_INTEGER Time)
 
NTSYSCALLAPI NTSTATUS NTAPI NtWaitForMultipleObjects (_In_ ULONG Count, _In_ HANDLE Object[], _In_ WAIT_TYPE WaitType, _In_ BOOLEAN Alertable, _In_ PLARGE_INTEGER Time)
 
NTSTATUS NTAPI NtWaitForMultipleObjects32 (_In_ ULONG ObjectCount, _In_ PLONG Handles, _In_ WAIT_TYPE WaitType, _In_ BOOLEAN Alertable, _In_opt_ PLARGE_INTEGER TimeOut)
 
NTSYSCALLAPI NTSTATUS NTAPI NtWaitForSingleObject (_In_ HANDLE Object, _In_ BOOLEAN Alertable, _In_opt_ PLARGE_INTEGER Timeout)
 
NTSYSAPI NTSTATUS NTAPI ZwClose (_In_ HANDLE Handle)
 
NTSYSAPI NTSTATUS NTAPI ZwCloseObjectAuditAlarm (_In_ PUNICODE_STRING SubsystemName, _In_ PVOID HandleId, _In_ BOOLEAN GenerateOnClose)
 
NTSYSAPI NTSTATUS NTAPI ZwCreateDirectoryObject (_Out_ PHANDLE DirectoryHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
 
NTSYSAPI NTSTATUS NTAPI ZwCreateSymbolicLinkObject (_Out_ PHANDLE SymbolicLinkHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ PUNICODE_STRING Name)
 
NTSYSAPI NTSTATUS NTAPI ZwDeleteObjectAuditAlarm (_In_ PUNICODE_STRING SubsystemName, _In_ PVOID HandleId, _In_ BOOLEAN GenerateOnClose)
 
NTSYSAPI NTSTATUS NTAPI ZwMakePermanentObject (_In_ HANDLE Object)
 
NTSYSAPI NTSTATUS NTAPI ZwMakeTemporaryObject (_In_ HANDLE Handle)
 
NTSYSAPI NTSTATUS NTAPI ZwOpenDirectoryObject (_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
 
NTSYSAPI NTSTATUS NTAPI ZwOpenJobObject (_Out_ PHANDLE JobHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
 
NTSYSAPI NTSTATUS NTAPI ZwOpenSymbolicLinkObject (_Out_ PHANDLE SymbolicLinkHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
 
NTSYSAPI NTSTATUS NTAPI ZwSetInformationObject (_In_ HANDLE ObjectHandle, _In_ OBJECT_INFORMATION_CLASS ObjectInformationClass, _In_ PVOID ObjectInformation, _In_ ULONG Length)
 
NTSYSAPI NTSTATUS NTAPI ZwSignalAndWaitForSingleObject (_In_ HANDLE SignalObject, _In_ HANDLE WaitObject, _In_ BOOLEAN Alertable, _In_opt_ PLARGE_INTEGER Time)
 
NTSYSAPI NTSTATUS NTAPI ZwWaitForMultipleObjects (_In_ ULONG Count, _In_ HANDLE Object[], _In_ WAIT_TYPE WaitType, _In_ BOOLEAN Alertable, _In_ PLARGE_INTEGER Time)
 

Variables

_In_ OBJECT_INFORMATION_CLASS ObjectInformationClass
 
_In_ OBJECT_INFORMATION_CLASS _In_ ULONG ObjectInformationLength
 
_In_ OBJECT_INFORMATION_CLASS _In_ ULONG _Out_opt_ PULONG ReturnLength
 
_In_ SECURITY_INFORMATION SecurityInformation
 
_In_ SECURITY_INFORMATION _In_ ULONG Length
 
_In_ SECURITY_INFORMATION _In_ ULONG _Out_ PULONG LengthNeeded
 
_In_ HANDLE SourceHandle
 
_In_ HANDLE _In_opt_ HANDLE TargetProcessHandle
 
_In_ HANDLE _In_opt_ HANDLE _Out_opt_ PHANDLE TargetHandle
 
_In_ HANDLE _In_opt_ HANDLE _Out_opt_ PHANDLE _In_ ACCESS_MASK DesiredAccess
 
_In_ HANDLE _In_opt_ HANDLE _Out_opt_ PHANDLE _In_ ACCESS_MASK _In_ ULONG HandleAttributes
 
_In_ HANDLE _In_opt_ HANDLE _Out_opt_ PHANDLE _In_ ACCESS_MASK _In_ ULONG _In_ ULONG Options
 
_Out_ PVOID Buffer
 
_Out_ PVOID _In_ ULONG BufferLength
 
_Out_ PVOID _In_ ULONG _In_ BOOLEAN ReturnSingleEntry
 
_Out_ PVOID _In_ ULONG _In_ BOOLEAN _In_ BOOLEAN RestartScan
 
_Out_ PVOID _In_ ULONG _In_ BOOLEAN _In_ BOOLEAN _Inout_ PULONG Context
 

Function Documentation

◆ _IRQL_requires_max_()

_IRQL_requires_max_ ( PASSIVE_LEVEL  )

Queries information details about a security descriptor.

Computes the quota size of a security descriptor.

Assigns a security descriptor for a new object.

An extended function that assigns a security descriptor for a new object.

Frees a security descriptor.

An extended function that sets new information data to a security descriptor.

Modifies some information data about a security descriptor.

Parameters
[in]SecurityInformationSecurity information details to be queried from a security descriptor.
[out]SecurityDescriptorThe returned security descriptor with security information data.
[in,out]LengthThe returned length of a security descriptor.
[in,out]ObjectsSecurityDescriptorThe returned object security descriptor.
Returns
Returns STATUS_SUCCESS if the operations have been completed successfully and that the specific information about the security descriptor has been queried. STATUS_BUFFER_TOO_SMALL is returned if the buffer size is too small to contain the queried info about the security descriptor.
Parameters
[in]ObjectIf specified, the function will use this arbitrary object that points to an object security descriptor.
[in]SecurityInformationSecurity information details to be set.
[in]SecurityDescriptorA security descriptor where its info is to be changed.
[in,out]ObjectsSecurityDescriptorThe returned pointer to security descriptor objects.
[in]PoolTypePool type for the new security descriptor to allocate.
[in]GenericMappingThe generic mapping of access rights masks.
Returns
See SeSetSecurityDescriptorInfoEx.
Parameters
[in]ObjectIf specified, the function will use this arbitrary object that points to an object security descriptor.
[in]SecurityInformationSecurity information details to be set.
[in]SecurityDescriptorA security descriptor where its info is to be changed.
[in,out]ObjectsSecurityDescriptorThe returned pointer to security descriptor objects.
[in]AutoInheritFlagsFlags bitmask inheritation, influencing how the security descriptor can be inherited and if it can be in the first place.
[in]PoolTypePool type for the new security descriptor to allocate.
[in]GenericMappingThe generic mapping of access rights masks.
Returns
Returns STATUS_SUCCESS if the operations have been completed without problems and that new info has been set to the security descriptor. STATUS_NO_SECURITY_ON_OBJECT is returned if the object does not have a security descriptor. STATUS_INSUFFICIENT_RESOURCES is returned if memory pool allocation for the new security descriptor with new info set has failed.
Parameters
[in]SecurityDescriptorA security descriptor to be freed from memory.
Returns
Returns STATUS_SUCCESS.
Parameters
[in]_ParentDescriptorA security descriptor of the parent object that is being created.
[in]_ExplicitDescriptorAn explicit security descriptor that is applied to a new object.
[out]NewDescriptorThe new allocated security descriptor.
[in]ObjectTypeThe type of the new object.
[in]IsDirectoryObjectSet this to TRUE if the newly created object is a directory object, otherwise set this to FALSE.
[in]AutoInheritFlagsAutomatic inheritance flags that influence how access control entries within ACLs from security descriptors are inherited.
[in]SubjectContextSecurity subject context of the new object.
[in]GenericMappingGeneric mapping of access mask rights.
[in]PoolTypeThis parameter is unused.
Returns
Returns STATUS_SUCCESS if the operations have been completed successfully and that the security descriptor has been assigned to the new object. STATUS_NO_TOKEN is returned if the caller hasn't supplied a valid argument to a security subject context. STATUS_INVALID_OWNER is returned if the caller hasn't supplied a parent descriptor that belongs to the main user (owner). STATUS_INVALID_PRIMARY_GROUP is returned by the same reason as with the previous NTSTATUS code. The two NTSTATUS codes are returned if the calling thread stated that the owner and/or group is defaulted to the parent descriptor (SEF_DEFAULT_OWNER_FROM_PARENT and/or SEF_DEFAULT_GROUP_FROM_PARENT respectively). STATUS_INSUFFICIENT_RESOURCES is returned if memory pool allocation for the descriptor buffer has failed. A failure NTSTATUS is returned otherwise.
Parameters
[in]ParentDescriptorA security descriptor of the parent object that is being created.
[in]ExplicitDescriptorAn explicit security descriptor that is applied to a new object.
[out]NewDescriptorThe new allocated security descriptor.
[in]IsDirectoryObjectSet this to TRUE if the newly created object is a directory object, otherwise set this to FALSE.
[in]SubjectContextSecurity subject context of the new object.
[in]GenericMappingGeneric mapping of access mask rights.
[in]PoolTypeThis parameter is unused.
Returns
See SeAssignSecurityEx.
Parameters
[in]SecurityDescriptorA security descriptor.
[out]QuotaInfoSizeThe returned quota size of the given security descriptor to the caller. The function may return 0 to this parameter if the descriptor doesn't have a group or a discretionary access control list (DACL) even.
Returns
Returns STATUS_SUCCESS if the quota size of a security descriptor has been computed successfully. STATUS_UNKNOWN_REVISION is returned if the security descriptor has an invalid revision.

Definition at line 923 of file Messaging.c.

75{
76 PFLT_SERVER_PORT_OBJECT PortObject;
78
79 /* The caller must allow at least one connection */
80 if (MaxConnections == 0)
81 {
83 }
84
85 /* The request must be for a kernel handle */
86 if (!(ObjectAttributes->Attributes & OBJ_KERNEL_HANDLE))
87 {
89 }
90
91 /*
92 * Get rundown protection on the target to stop the owner
93 * from unloading whilst this port object is open. It gets
94 * removed in the FltpServerPortClose callback
95 */
97 if (!NT_SUCCESS(Status))
98 {
99 return Status;
100 }
101
102 /* Create the server port object for this filter */
107 NULL,
109 0,
110 0,
111 (PVOID *)&PortObject);
112 if (NT_SUCCESS(Status))
113 {
114 /* Zero out the struct */
115 RtlZeroMemory(PortObject, sizeof(FLT_SERVER_PORT_OBJECT));
116
117 /* Increment the ref count on the target filter */
119
120 /* Setup the filter port object */
121 PortObject->Filter = Filter;
125 PortObject->Cookie = ServerPortCookie;
126 PortObject->MaxConnections = MaxConnections;
127
128 /* Insert the object */
129 Status = ObInsertObject(PortObject,
130 NULL,
132 0,
133 NULL,
135 if (NT_SUCCESS(Status))
136 {
137 /* Lock the connection list */
139
140 /* Add the new port object to the connection list and increment the count */
143
144 /* Unlock the connection list*/
146 }
147 }
148
149 if (!NT_SUCCESS(Status))
150 {
151 /* Allow the filter to be cleaned up */
153 }
154
155 return Status;
156}
static const INTERNET_PORT ServerPort
Definition: CWebService.cpp:11
POBJECT_TYPE ServerPortObjectType
Definition: Messaging.c:24
VOID FLTAPI FltObjectDereference(_Inout_ PVOID Object)
Definition: Object.c:53
NTSTATUS FLTAPI FltObjectReference(_Inout_ PVOID Object)
Definition: Object.c:41
LONG NTSTATUS
Definition: precomp.h:26
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define NULL
Definition: types.h:112
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define InsertTailList(ListHead, Entry)
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1801
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY MessageNotifyCallback
Definition: fltkernel.h:1877
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY ConnectNotifyCallback
Definition: fltkernel.h:1875
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID ServerPortCookie
Definition: fltkernel.h:1874
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY DisconnectNotifyCallback
Definition: fltkernel.h:1876
ULONG FltpObjectPointerReference(_In_ PFLT_OBJECT Object)
Definition: Object.c:322
Status
Definition: gdiplustypes.h:24
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
static LONG MaxConnections
#define KernelMode
Definition: asm.h:38
#define FILE_READ_DATA
Definition: nt_native.h:628
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
NTSTATUS NTAPI ObInsertObject(IN PVOID Object, IN PACCESS_STATE AccessState OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG ObjectPointerBias, OUT PVOID *NewObject OPTIONAL, OUT PHANDLE Handle)
Definition: obhandle.c:2938
NTSTATUS NTAPI ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL, IN POBJECT_TYPE Type, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN KPROCESSOR_MODE AccessMode, IN OUT PVOID ParseContext OPTIONAL, IN ULONG ObjectSize, IN ULONG PagedPoolCharge OPTIONAL, IN ULONG NonPagedPoolCharge OPTIONAL, OUT PVOID *Object)
Definition: oblife.c:1039
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
FLT_MUTEX_LIST_HEAD ConnectionList
Definition: fltmgrint.h:121
LIST_ENTRY mList
Definition: fltmgrint.h:56
FAST_MUTEX mLock
Definition: fltmgrint.h:55
PFLT_DISCONNECT_NOTIFY DisconnectNotify
Definition: fltmgrint.h:192
PFLT_MESSAGE_NOTIFY MessageNotify
Definition: fltmgrint.h:193
PFLT_CONNECT_NOTIFY ConnectNotify
Definition: fltmgrint.h:191
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135

◆ _Out_writes_bytes_opt_() [1/2]

_In_ SECURITY_INFORMATION _Out_writes_bytes_opt_ ( Length  )

◆ _Out_writes_bytes_opt_() [2/2]

◆ NtClose()

NTSYSCALLAPI NTSTATUS NTAPI NtClose ( _In_ HANDLE  Handle)

◆ NtCloseObjectAuditAlarm()

__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtCloseObjectAuditAlarm ( _In_ PUNICODE_STRING  SubsystemName,
_In_opt_ PVOID  HandleId,
_In_ BOOLEAN  GenerateOnClose 
)

◆ NtCreateDirectoryObject()

NTSYSCALLAPI NTSTATUS NTAPI NtCreateDirectoryObject ( _Out_ PHANDLE  DirectoryHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ POBJECT_ATTRIBUTES  ObjectAttributes 
)

◆ NtCreateSymbolicLinkObject()

NTSYSCALLAPI NTSTATUS NTAPI NtCreateSymbolicLinkObject ( _Out_ PHANDLE  SymbolicLinkHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ POBJECT_ATTRIBUTES  ObjectAttributes,
_In_ PUNICODE_STRING  Name 
)

◆ NtDeleteObjectAuditAlarm()

__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtDeleteObjectAuditAlarm ( _In_ PUNICODE_STRING  SubsystemName,
_In_opt_ PVOID  HandleId,
_In_ BOOLEAN  GenerateOnClose 
)

◆ NtDuplicateObject()

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 
)

◆ NtMakePermanentObject()

NTSYSCALLAPI NTSTATUS NTAPI NtMakePermanentObject ( _In_ HANDLE  Object)

◆ NtMakeTemporaryObject()

NTSYSCALLAPI NTSTATUS NTAPI NtMakeTemporaryObject ( _In_ HANDLE  Handle)

◆ NtOpenDirectoryObject()

NTSYSCALLAPI NTSTATUS NTAPI NtOpenDirectoryObject ( _Out_ PHANDLE  FileHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ POBJECT_ATTRIBUTES  ObjectAttributes 
)

◆ NtOpenJobObject()

NTSYSCALLAPI NTSTATUS NTAPI NtOpenJobObject ( _Out_ PHANDLE  JobHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ POBJECT_ATTRIBUTES  ObjectAttributes 
)

◆ NtOpenSymbolicLinkObject()

NTSYSCALLAPI NTSTATUS NTAPI NtOpenSymbolicLinkObject ( _Out_ PHANDLE  SymbolicLinkHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ POBJECT_ATTRIBUTES  ObjectAttributes 
)

◆ NtQueryDirectoryObject()

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 
)

◆ NtQuerySymbolicLinkObject()

NTSYSCALLAPI NTSTATUS NTAPI NtQuerySymbolicLinkObject ( _In_ HANDLE  SymLinkObjHandle,
_Out_ PUNICODE_STRING  LinkTarget,
_Out_opt_ PULONG  DataWritten 
)

◆ NtSetInformationObject()

NTSYSCALLAPI NTSTATUS NTAPI NtSetInformationObject ( _In_ HANDLE  ObjectHandle,
_In_ OBJECT_INFORMATION_CLASS  ObjectInformationClass,
_In_reads_bytes_(Length) PVOID  ObjectInformation,
_In_ ULONG  Length 
)

Sets information for an object or for a handle to an object.

Parameters
[in]ObjectHandleHandle to the target object. For the ObjectHandleFlagInformation class, this is the handle whose attributes are to be modified. For the ObjectSessionInformation class, this must be a handle to a directory object.
[in]ObjectInformationClassSpecifies the type of information to set. The only supported classes are: ObjectHandleFlagInformation and ObjectSessionInformation. (Windows 10 RS2 added support for ObjectSessionObjectInformation. Windows 11 25H2 added support for ObjectSetRefTraceInformation.)
[in]ObjectInformationPointer to a caller-supplied buffer containing the information to set. For the ObjectHandleFlagInformation class, this buffer must point to an OBJECT_HANDLE_ATTRIBUTE_INFORMATION structure describing the desired handle attributes (inherit and protect-from-close). For the ObjectSessionInformation class, this parameter is ignored.
[in]LengthThe size in bytes, of the buffer pointed to by ObjectInformation. For the ObjectHandleFlagInformation class, this must be sizeof(OBJECT_HANDLE_ATTRIBUTE_INFORMATION). For the ObjectSessionInformation class, this parameter is ignored.
Returns
STATUS_SUCCESS or an appropriate error value.
Remarks
This routine only supports the following classes:
  • ObjectHandleFlagInformation, to set the OBJ_INHERIT and OBJ_PROTECT_CLOSE attributes of a handle.
  • ObjectSessionInformation, to associate a directory object with the caller's current session identifier; this requires the SeTcbPrivilege.

ObjectHandleFlagInformation operates on per-handle state rather than on the underlying object itself.

Definition at line 1844 of file oblife.c.

1849{
1852
1853 PAGED_CODE();
1854
1855 /* Validate the information class */
1856 switch (ObjectInformationClass)
1857 {
1859 {
1861
1862 /* Validate the length */
1863 if (Length != sizeof(HandleFlags))
1865
1866 /* Save the previous mode */
1868
1869 /* If we were called from user mode, probe and capture the
1870 * attribute buffer, otherwise just copy it directly. */
1871 if (PreviousMode != KernelMode)
1872 {
1873 _SEH2_TRY
1874 {
1875 ProbeForRead(ObjectInformation, sizeof(HandleFlags), sizeof(BOOLEAN));
1877 }
1879 {
1880 /* Return the exception code */
1882 }
1883 _SEH2_END;
1884 }
1885 else
1886 {
1888 }
1889
1890 Status = ObSetHandleAttributes(ObjectHandle, &HandleFlags, PreviousMode);
1891 break;
1892 }
1893
1895 {
1897
1900
1901 /* Only a system process can do this */
1904 {
1905 DPRINT1("Privilege not held\n");
1907 }
1908
1909 /* Get the object directory */
1910 Status = ObReferenceObjectByHandle(ObjectHandle,
1911 0,
1914 (PVOID*)&Directory,
1915 NULL);
1916 if (NT_SUCCESS(Status))
1917 {
1918 /* Setup a lookup context */
1919 OBP_LOOKUP_CONTEXT LookupContext;
1920 ObpInitializeLookupContext(&LookupContext);
1921
1922 /* Set the directory session ID */
1925 ObpReleaseDirectoryLock(Directory, &LookupContext);
1926
1927 /* We're done, release the context and dereference the directory */
1928 ObpReleaseLookupContext(&LookupContext);
1930 }
1931 break;
1932 }
1933
1934 default:
1935 /* Unsupported class */
1937 break;
1938 }
1939
1940 return Status;
1941}
#define PAGED_CODE()
#define STATUS_PRIVILEGE_NOT_HELD
Definition: DriverTester.h:9
_In_ PVOID _In_ ULONG _Out_ PVOID _In_ ULONG _Inout_ PULONG _In_ KPROCESSOR_MODE PreviousMode
#define ObpDirectoryObjectType
Definition: ObTypes.c:118
unsigned char BOOLEAN
Definition: actypes.h:127
#define DPRINT1
Definition: precomp.h:8
IN CINT ObjectInformationClass
Definition: conport.c:47
IN CINT OUT PVOID ObjectInformation
Definition: conport.c:48
#define ExGetPreviousMode
Definition: ex.h:143
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:102
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
struct _OBJECT_HANDLE_ATTRIBUTE_INFORMATION * POBJECT_HANDLE_ATTRIBUTE_INFORMATION
_In_ BOOLEAN _In_ USHORT Directory
Definition: rtlfuncs.h:3942
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
const LUID SeTcbPrivilege
Definition: priv.c:26
ULONG NTAPI PsGetCurrentProcessSessionId(VOID)
Definition: process.c:1133
BOOLEAN NTAPI SeSinglePrivilegeCheck(_In_ LUID PrivilegeValue, _In_ KPROCESSOR_MODE PreviousMode)
Checks if a single privilege is present in the context of the calling thread.
Definition: priv.c:744
#define STATUS_INVALID_INFO_CLASS
Definition: ntstatus.h:333
FORCEINLINE VOID ObpAcquireDirectoryLockExclusive(IN POBJECT_DIRECTORY Directory, IN POBP_LOOKUP_CONTEXT Context)
Locks a directory for exclusive access. Used for writing/reading members of the directory object.
Definition: ob_x.h:212
FORCEINLINE VOID ObpInitializeLookupContext(IN POBP_LOOKUP_CONTEXT Context)
Initializes a new object directory lookup context. Used for lookup operations (insertions/deletions) ...
Definition: ob_x.h:258
FORCEINLINE VOID ObpReleaseDirectoryLock(IN POBJECT_DIRECTORY Directory, IN POBP_LOOKUP_CONTEXT Context)
Unlocks a previously shared or exclusively locked directory.
Definition: ob_x.h:238
FORCEINLINE VOID ObpReleaseLookupContext(IN POBP_LOOKUP_CONTEXT Context)
Releases an initialized object directory lookup context. Unlocks it if necessary, and dereferences th...
Definition: ob_x.h:323
NTSTATUS NTAPI ObSetHandleAttributes(_In_ HANDLE Handle, _In_ POBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleFlags, _In_ KPROCESSOR_MODE PreviousMode)
Sets the attributes (inheritable and protect-from-close) of an existing object handle.
Definition: obhandle.c:3318
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
Definition: obref.c:493
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:204
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:104
#define _SEH2_END
Definition: pseh2_64.h:194
#define _SEH2_TRY
Definition: pseh2_64.h:93
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:207
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
@ ObjectSessionInformation
Definition: winternl.h:1877
@ ObjectHandleFlagInformation
Definition: winternl.h:1876
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
#define ObDereferenceObject
Definition: obfuncs.h:203

Referenced by BaseInitializeStaticServerData(), ProtectHandle(), SetHandleInformation(), SockCreateOrReferenceAsyncThread(), SockGetAsyncSelectHelperAfdHandle(), and UnProtectHandle().

◆ NtSetSecurityObject()

NTSYSCALLAPI NTSTATUS NTAPI NtSetSecurityObject ( _In_ HANDLE  Handle,
_In_ SECURITY_INFORMATION  SecurityInformation,
_In_ PSECURITY_DESCRIPTOR  SecurityDescriptor 
)

◆ NtSignalAndWaitForSingleObject()

NTSYSCALLAPI NTSTATUS NTAPI NtSignalAndWaitForSingleObject ( _In_ HANDLE  SignalObject,
_In_ HANDLE  WaitObject,
_In_ BOOLEAN  Alertable,
_In_ PLARGE_INTEGER  Time 
)

◆ NtWaitForMultipleObjects()

NTSYSCALLAPI NTSTATUS NTAPI NtWaitForMultipleObjects ( _In_ ULONG  Count,
_In_ HANDLE  Object[],
_In_ WAIT_TYPE  WaitType,
_In_ BOOLEAN  Alertable,
_In_ PLARGE_INTEGER  Time 
)

◆ NtWaitForMultipleObjects32()

NTSTATUS NTAPI NtWaitForMultipleObjects32 ( _In_ ULONG  ObjectCount,
_In_ PLONG  Handles,
_In_ WAIT_TYPE  WaitType,
_In_ BOOLEAN  Alertable,
_In_opt_ PLARGE_INTEGER  TimeOut 
)

◆ NtWaitForSingleObject()

NTSYSCALLAPI NTSTATUS NTAPI NtWaitForSingleObject ( _In_ HANDLE  Object,
_In_ BOOLEAN  Alertable,
_In_opt_ PLARGE_INTEGER  Timeout 
)

◆ ObAssignSecurity()

NTKERNELAPI NTSTATUS NTAPI ObAssignSecurity ( _In_ PACCESS_STATE  AccessState,
_In_ PSECURITY_DESCRIPTOR  SecurityDescriptor,
_In_ PVOID  Object,
_In_ POBJECT_TYPE  Type 
)

◆ ObCloseHandle()

NTKERNELAPI NTSTATUS NTAPI ObCloseHandle ( _In_ HANDLE  Handle,
_In_ KPROCESSOR_MODE  AccessMode 
)

◆ ObCreateObject()

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 
)

◆ ObCreateObjectType()

NTKERNELAPI NTSTATUS NTAPI ObCreateObjectType ( _In_ PUNICODE_STRING  TypeName,
_In_ POBJECT_TYPE_INITIALIZER  ObjectTypeInitializer,
_Reserved_ PVOID  Reserved,
_Out_ POBJECT_TYPE ObjectType 
)

◆ ObDereferenceObjectDeferDelete()

NTKERNELAPI VOID NTAPI ObDereferenceObjectDeferDelete ( _In_ PVOID  Object)

◆ ObDereferenceSecurityDescriptor()

NTKERNELAPI VOID NTAPI ObDereferenceSecurityDescriptor ( _Inout_ PSECURITY_DESCRIPTOR  SecurityDescriptor,
_In_ ULONG  Count 
)

◆ ObFindHandleForObject()

NTKERNELAPI BOOLEAN NTAPI ObFindHandleForObject ( _In_ PEPROCESS  Process,
_In_ PVOID  Object,
_In_ POBJECT_TYPE  ObjectType,
_In_opt_ POBJECT_HANDLE_INFORMATION  HandleInformation,
_Out_opt_ PHANDLE  Handle 
)

◆ ObGetObjectPointerCount()

NTKERNELAPI ULONG NTAPI ObGetObjectPointerCount ( _In_ PVOID  Object)

◆ ObLogSecurityDescriptor()

NTKERNELAPI NTSTATUS NTAPI ObLogSecurityDescriptor ( _In_ PSECURITY_DESCRIPTOR  InputSecurityDescriptor,
_Out_ PSECURITY_DESCRIPTOR OutputSecurityDescriptor,
_In_ ULONG  RefBias 
)

◆ ObOpenObjectByName()

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 
)

◆ ObReferenceObjectByName()

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 
)

◆ ObReferenceSecurityDescriptor()

NTKERNELAPI VOID NTAPI ObReferenceSecurityDescriptor ( _In_ PSECURITY_DESCRIPTOR  SecurityDescriptor,
_In_ ULONG  Count 
)

◆ ObSetHandleAttributes()

NTKERNELAPI NTSTATUS NTAPI ObSetHandleAttributes ( _In_ HANDLE  Handle,
_In_ POBJECT_HANDLE_ATTRIBUTE_INFORMATION  HandleFlags,
_In_ KPROCESSOR_MODE  PreviousMode 
)

Sets the attributes (inheritable and protect-from-close) of an existing object handle.

Parameters
[in]HandleHandle whose attributes are to be modified.
[in]HandleFlagsPointer to an OBJECT_HANDLE_ATTRIBUTE_INFORMATION structure specifying the new values for the handle's inherit and protect-from-close attributes.
[in]PreviousModeProcessor mode of the original caller. This is used to determine whether Handle may refer to a kernel handle.
Returns
STATUS_SUCCESS on success, or STATUS_ACCESS_DENIED if the handle could not be located or its attributes could not be changed.
Remarks
This routine operates on per-handle state rather than on the underlying object itself. Requests to make a handle inheritable fail if the target object type does not permit the OBJ_INHERIT attribute.

Definition at line 3318 of file obhandle.c.

3322{
3323 OBP_SET_HANDLE_ATTRIBUTES_CONTEXT SetHandleAttributesContext;
3324 BOOLEAN Result, AttachedToProcess = FALSE;
3327
3328 PAGED_CODE();
3329
3330 /* Check if this is a kernel handle */
3332 {
3333 /* Use the kernel table and convert the handle */
3336
3337 /* Check if we're not in the system process */
3339 {
3340 /* Attach to the system process */
3342 AttachedToProcess = TRUE;
3343 }
3344 }
3345 else
3346 {
3347 /* Get the current process' handle table */
3348 HandleTable = PsGetCurrentProcess()->ObjectTable;
3349 }
3350
3351 /* Initialize the handle attribute context */
3352 SetHandleAttributesContext.PreviousMode = PreviousMode;
3353 SetHandleAttributesContext.Information = *HandleFlags;
3354
3355 /* Invoke the ObpSetHandleAttributes callback */
3357 Handle,
3359 (ULONG_PTR)&SetHandleAttributesContext);
3360
3361 /* Detach from the system process if needed */
3362 if (AttachedToProcess)
3364
3365 /* Return the result as an NTSTATUS value */
3367}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
ULONG Handle
Definition: gdb_input.c:15
static XMS_HANDLE HandleTable[XMS_MAX_HANDLES]
Definition: himem.c:83
BOOLEAN NTAPI ExChangeHandle(IN PHANDLE_TABLE HandleTable, IN HANDLE Handle, IN PEX_CHANGE_HANDLE_CALLBACK ChangeRoutine, IN ULONG_PTR Context)
Definition: handle.c:1189
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1769
#define ObpIsKernelHandle(Handle, ProcessorMode)
Definition: ob.h:74
#define ObKernelHandleToHandle(Handle)
Definition: ob.h:83
static BOOLEAN NTAPI ObpSetHandleAttributes(_Inout_ PHANDLE_TABLE_ENTRY HandleTableEntry, _In_ ULONG_PTR Context)
Internal callback used by ObSetHandleAttributes(). Updates the attributes of a handle given by its ha...
Definition: obhandle.c:1872
PHANDLE_TABLE ObpKernelHandleTable
Definition: obhandle.c:20
VOID NTAPI KeStackAttachProcess(IN PKPROCESS Process, OUT PRKAPC_STATE ApcState)
Definition: procobj.c:704
VOID NTAPI KeUnstackDetachProcess(IN PRKAPC_STATE ApcState)
Definition: procobj.c:756
PEPROCESS PsInitialSystemProcess
Definition: psmgr.c:50
#define STATUS_SUCCESS
Definition: shellext.h:65
KPROCESS Pcb
Definition: pstypes.h:1350
OBJECT_HANDLE_ATTRIBUTE_INFORMATION Information
Definition: ob.h:112
KPROCESSOR_MODE PreviousMode
Definition: ob.h:111
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
KAPC_STATE
Definition: ketypes.h:1727
#define PsGetCurrentProcess
Definition: psfuncs.h:17

Referenced by NtSetInformationObject().

◆ ObSetSecurityObjectByPointer()

NTKERNELAPI NTSTATUS NTAPI ObSetSecurityObjectByPointer ( _In_ PVOID  Object,
_In_ SECURITY_INFORMATION  SecurityInformation,
_In_ PSECURITY_DESCRIPTOR  SecurityDescriptor 
)

◆ ZwClose()

NTSYSAPI NTSTATUS NTAPI ZwClose ( _In_ HANDLE  Handle)

Referenced by __drv_maxIRQL(), _Function_class_(), _IRQL_requires_max_(), _Success_(), acpi_create_registry_table(), acpi_create_volatile_registry_tables(), ACPIDispatchDeviceControl(), AcpiOsExecute(), AdvancedErrorChecks(), AfdCloseSocket(), allow_degraded_mount(), ApphelpCacheRead(), ApphelpCacheWrite(), AtaCreateIdeDirectory(), AtaFdoCreatePortThread(), AtaGetRegistryKey(), AtaInPEMode(), AtaLegacyShouldDetectChannels(), AtaSetPortRegistryKey(), AtaSetRegistryKey(), BasicBehaviorChecks(), BehaviorChecks(), BroadcastOpen(), BuildWindowStationNameList(), CheckForDeviceDesc(), CheckSection_(), ClasspIsMediaChangeDisabledDueToHardwareLimitation(), ClasspIsMediaChangeDisabledForClass(), ClasspMediaChangeDeviceInstanceOverride(), ClassPnp(), ClasspScanForSpecialInRegistry(), Close(), CloseKey(), ClosePin(), CloseRemoteDatabase(), CmBattAddDevice(), CmBattCreateFdo(), CmLoadKey(), CmpCloseHiveFiles(), CmpCreateEvent(), CmpInitHiveFromFile(), CmpInitializeHiveList(), CmpInitializeMachineDependentConfiguration(), CmpLinkHiveToMaster(), CmpLinkKeyToHive(), CmpOpenHiveFiles(), CompBattGetDeviceObjectPointer(), CreateClientPort(), CreateDeviceFromRegistry(), CreateGreenFdo(), CreateMixerPinAndSetFormat(), CreatePinCallback(), CreateRemoteDatabaseWorker(), FxSystemThread::CreateThread(), DiskAddDevice(), DiskCreateFdo(), DiskRemoveDevice(), DriverEntry(), EngLoadModuleEx(), EngpGetDisplayDriverAccelerationLevel(), EngpGetDisplayDriverParameters(), EngpGetRegistryHandleFromDeviceMap(), EngpHasVgaDriver(), EngpUpdateGraphicsDeviceList(), EngpUpdateMonitorDevices(), EnumDeviceKeys(), EnumerateDevices(), EnumerateSoundDevices(), EnumerateSubkey(), ExCreateCallback(), ExpGetCurrentUserUILanguage(), ExpSetCurrentUserUILanguage(), ExpUuidLoadSequenceNumber(), ExpUuidSaveSequenceNumber(), ExpValidateNlsLocaleId(), Ext2StartReaper(), FatGetCompatibilityModeValue(), FatIsFujitsuFMR(), FdoCreateRawParallelPdo(), FdoRemoveAdapter(), FileSectionViewPermissionCheck(), FindDeviceDescForAdapter(), FindProductName(), FinishThread(), FontLink_LoadDefaultCharset(), FontLink_LoadDefaultFonts(), FontLink_LoadSettings(), FontLink_PopulateEntries(), FreeGlobalData(), fs_ignored(), FsRecRegisterFs(), FsRtlDeregisterUncProvider(), FsRtlGetTunnelParameterValue(), FsRtlInitializeWorkerThread(), FsRtlpIsDfsEnabled(), FsRtlRegisterUncProvider(), FsRtlTest_StartTest(), get_registry_value(), GetClassRegistryHandle(), GetClassServicePath(), GetFilterAltitude(), GetImageName(), GetObjectType(), GetProcessorInformation(), GetRegistryValueBuffer(), GetVersionRegistryHandle(), GetVersionServicePath(), HalpDmaAllocateChildAdapter(), HalpGetChipHacks(), HalpGetNMICrashFlag(), HalpMarkAcpiHal(), HalpMarkChipsetDecode(), HalpQueryPciRegistryInfo(), HalpRegisterPciDebuggingDeviceInfo(), HalpReportSerialNumber(), i8042StoreSMBiosTables(), InitDisplayDriver(), InitializeProvider(), InitMetrics(), InitUserImpl(), InitVideo(), IntDeleteRegFontEntries(), IntGdiAddFontResourceSingle(), IntGetFullFileName(), IntLoadFontsInRegistry(), IntLoadFontSubstList(), IntLoadRegistryParameters(), IntLoadSystemFonts(), IntQueryUserSecurityIdentification(), IntVideoPortChildQueryId(), IntVideoPortMapPhysicalMemory(), IoCreateDriver(), IoCreateSymbolicLink(), IoCreateUnprotectedSymbolicLink(), IoDeleteSymbolicLink(), IoGetDeviceInterfaceAlias(), IoGetDeviceInterfaces(), IoOpenDeviceInterfaceRegistryKey(), IoOpenDeviceRegistryKey(), IopBootLog(), IopCreateDeviceKeyPath(), IopCreateEvent(), IopCreateFile(), IopCreateLogFile(), IopCreateRegistryKeyEx(), IopEnumerateDetectedDevices(), IopGetDeviceObjectPointer(), IopGetParentIdPrefix(), IopInitializeBuiltinDriver(), IopInitializeDriverModule(), IopInitializePlugPlayServices(), IopInstallCriticalDevice(), IopIsFirmwareMapperDisabled(), IopLoadUnloadDriverWorker(), IopLogWorker(), IopOpenInterfaceKey(), IopOpenOrCreateSymbolicLinkSubKeys(), IopQueryBusDescription(), IopQueryDeviceCapabilities(), IopQueryDeviceDescription(), IopSaveBootLogToFile(), IopSetDeviceInstanceData(), IopSetServiceEnumData(), IopShouldProcessDevice(), IopStartRamdisk(), IopUpdateControlKeyWithResources(), IopUpdateResourceMap(), IopUpdateRootKey(), IopWriteLogFile(), IoQueryDeviceDescription(), IoRegisterDeviceInterface(), IoReportDetectedDevice(), IoReportHalResourceUsage(), IoSetDeviceInterfaceState(), IoSetSystemPartition(), KdbpCliInit(), KdpDebugLogInit(), KeI386VdmInitialize(), KsCacheMedium(), KsFilterFactoryUpdateCacheData(), KsMapModuleName(), KspEnumerateBusRegistryKeys(), KspInstallInterface(), KspReadMediaCategory(), KspScanBus(), KsRegisterFilterWithNoKSPins(), LogMessage(), LsaDeregisterLogonProcess(), LsaRegisterLogonProcess(), main(), MiCreateMemoryEvent(), MiShutdownSystem(), MmCheckSystemImage(), MmInitBsmThread(), MmLoadSystemImage(), MountMgrMountedDeviceArrival(), MountMgrQuerySymbolicLink(), MountMgrValidateBackPointer(), MupCloseUncProvider(), MupGetProviderInformation(), MuppIsDfsEnabled(), Mx::MxClose(), ndisBindMiniportsToProtocol(), NdisCloseConfiguration(), NdisIPnPStartDevice(), NdisOpenConfiguration(), NdisOpenConfigurationKeyByIndex(), NdisOpenConfigurationKeyByName(), NdisOpenFile(), NdisOpenProtocolConfiguration(), nfs41_CreateConnection(), nfs41_DeleteConnection(), NtCreatePagingFile(), NtUserLoadKeyboardLayoutEx(), ObjectBasicInformationTests(), ObjectNameInformationTests(), ObtClose(), ObtCreateObjectTypes(), OnlineMountedVolumes(), OpenDevice(), OpenRegistryHandlesFromSymbolicLink(), OpenSubkey(), PageFileBehaviorChecks(), PciAcpiFindRsdt(), PciAddDevice(), PciGetBiosConfig(), PciGetIrqRoutingTableFromRegistry(), PciGetRegistryValue(), PciIdeXCreateIdeDirectory(), PciSaveBiosConfig(), PcNewRegistryKey(), Phase1InitializationDiscard(), PiAttachFilterDriversCallback(), PiCallDriverAddDevice(), PiControlInitializeDevice(), PiGetDeviceRegistryProperty(), PiInitCacheGroupInformation(), PiInitializeDevNode(), Pin_fnClose(), PiStartDeviceFinal(), PnpDeviceObjectToDeviceInstance(), PopAddRemoveSysCapsCallback(), PopFlushVolumes(), PopFlushVolumeWorker(), PopQueryBatteryState(), PopReadShutdownPolicy(), ProcessorSetFriendlyName(), PsLocateSystemDll(), QueryVolumeName(), read_group_mappings(), read_mappings(), read_registry(), ReadIpConfiguration(), ReconcileThisDatabaseWithMasterWorker(), RegGetSectionDWORD(), registry_load_volume_options(), registry_mark_volume_mounted(), registry_mark_volume_unmounted_path(), RegistryInitAdapterKey(), RegistryInitLunKey(), RtlAcquirePrivilege(), RtlAdjustPrivilege(), RtlCheckRegistryKey(), RtlCreateBootStatusDataFile(), RtlCreateSystemVolumeInformationFolder(), RtlCreateUserProcess(), RtlFormatCurrentUserKeyPath(), RtlGetNtProductType(), RtlImpersonateSelf(), RtlpCloseRegistryHandle(), RtlpMapFile(), RtlpSysVolTakeOwnership(), RtlQueryRegistryValues(), RtlReleasePrivilege(), RtlUnlockBootStatusData(), RxGetRegistryParameters(), RxInitializeDispatcher(), RxReadRegistryParameters(), RxSpinUpWorkerThread(), ScsiPortInitialize(), SearchForLegacyDrivers(), SeGetLogonIdDeviceMap(), SepCleanupLUIDDeviceMapDirectory(), SepInitializationPhase1(), SepRegQueryHelper(), SerenumDetectLegacyDevice(), SerenumDetectPnpDevice(), SerialPnpStartDevice(), SermouseDetectLegacyDevice(), ServiceCheckBootStart(), SetRegistryValue(), SharedMemoryFree(), SimpleErrorChecks(), SocketDestroy(), SocketShutdown(), SpiCreatePortConfig(), SpiInitOpenKeys(), START_TEST(), sys_shutdown(), SysAudio_Shutdown(), SystemProcessTest(), SystemProcessWorker(), TdiCloseDevice(), TdiOpenDevice(), Test_IoOpenDeviceInterfaceRegistryKey(), TestAllInformation(), TestCreateEvent(), TestEventConcurrent(), TestPhysicalMemorySection(), TestSymlinks(), TestTcpConnect(), UDFDismountDevice(), uninit(), USBAudioInitComponentId(), USBAudioRegCreateMediaCategoriesKey(), USBD_GetPdoRegistryParameter(), USBH_SetPdoRegistryParameter(), USBH_WriteFailReasonID(), USBPORT_GetRegistryKeyValueFullInfo(), USBPORT_SetRegistryKeyValue(), UserChangeDisplaySettings(), UserEnumDisplayDevices(), UserEnumRegistryDisplaySettings(), UserGetLanguageID(), UserLoadImage(), UserLoadKbdFile(), UserProcessDestroy(), VdmpInitialize(), VfatSetRenameInformation(), VfdCloseImage(), VfdCreateDevice(), VfdDeleteDevice(), VfdOpenImage(), ViCreateDriveLetter(), ViMountImage(), WdfDeleteKmdfVersionFromRegistry(), WdfLdrDiagnosticsValueByNameAsULONG(), WdfWriteKmdfVersionToRegistry(), WdmAudCleanup(), WdmAudIoctlClose(), WdmAudOpenSysAudioDevices(), WorkerThread(), WskSocket(), xHalIoAssignDriveLetters(), and CRegistryKey::~CRegistryKey().

◆ ZwCloseObjectAuditAlarm()

NTSYSAPI NTSTATUS NTAPI ZwCloseObjectAuditAlarm ( _In_ PUNICODE_STRING  SubsystemName,
_In_ PVOID  HandleId,
_In_ BOOLEAN  GenerateOnClose 
)

◆ ZwCreateDirectoryObject()

◆ ZwCreateSymbolicLinkObject()

NTSYSAPI NTSTATUS NTAPI ZwCreateSymbolicLinkObject ( _Out_ PHANDLE  SymbolicLinkHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ POBJECT_ATTRIBUTES  ObjectAttributes,
_In_ PUNICODE_STRING  Name 
)

◆ ZwDeleteObjectAuditAlarm()

NTSYSAPI NTSTATUS NTAPI ZwDeleteObjectAuditAlarm ( _In_ PUNICODE_STRING  SubsystemName,
_In_ PVOID  HandleId,
_In_ BOOLEAN  GenerateOnClose 
)

◆ ZwMakePermanentObject()

NTSYSAPI NTSTATUS NTAPI ZwMakePermanentObject ( _In_ HANDLE  Object)

◆ ZwMakeTemporaryObject()

◆ ZwOpenDirectoryObject()

◆ ZwOpenJobObject()

NTSYSAPI NTSTATUS NTAPI ZwOpenJobObject ( _Out_ PHANDLE  JobHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ POBJECT_ATTRIBUTES  ObjectAttributes 
)

◆ ZwOpenSymbolicLinkObject()

◆ ZwSetInformationObject()

NTSYSAPI NTSTATUS NTAPI ZwSetInformationObject ( _In_ HANDLE  ObjectHandle,
_In_ OBJECT_INFORMATION_CLASS  ObjectInformationClass,
_In_ PVOID  ObjectInformation,
_In_ ULONG  Length 
)

◆ ZwSignalAndWaitForSingleObject()

NTSYSAPI NTSTATUS NTAPI ZwSignalAndWaitForSingleObject ( _In_ HANDLE  SignalObject,
_In_ HANDLE  WaitObject,
_In_ BOOLEAN  Alertable,
_In_opt_ PLARGE_INTEGER  Time 
)

◆ ZwWaitForMultipleObjects()

NTSYSAPI NTSTATUS NTAPI ZwWaitForMultipleObjects ( _In_ ULONG  Count,
_In_ HANDLE  Object[],
_In_ WAIT_TYPE  WaitType,
_In_ BOOLEAN  Alertable,
_In_ PLARGE_INTEGER  Time 
)

Referenced by KernelModeTest().

Variable Documentation

◆ Buffer

Definition at line 493 of file obfuncs.h.

◆ BufferLength

Definition at line 494 of file obfuncs.h.

◆ Context

◆ DesiredAccess

◆ HandleAttributes

◆ Length

Definition at line 316 of file obfuncs.h.

◆ LengthNeeded

Definition at line 317 of file obfuncs.h.

◆ ObjectInformationClass

_In_ OBJECT_INFORMATION_CLASS ObjectInformationClass

Definition at line 301 of file obfuncs.h.

◆ ObjectInformationLength

_In_ OBJECT_INFORMATION_CLASS _In_ ULONG ObjectInformationLength

Definition at line 303 of file obfuncs.h.

◆ Options

◆ RestartScan

Definition at line 496 of file obfuncs.h.

◆ ReturnLength

Definition at line 304 of file obfuncs.h.

◆ ReturnSingleEntry

_Out_ PVOID _In_ ULONG _In_ BOOLEAN ReturnSingleEntry

Definition at line 495 of file obfuncs.h.

◆ SecurityInformation

_In_ SECURITY_INFORMATION SecurityInformation

Definition at line 314 of file obfuncs.h.

◆ SourceHandle

◆ TargetHandle

◆ TargetProcessHandle

_In_ HANDLE _In_opt_ HANDLE TargetProcessHandle

Definition at line 439 of file obfuncs.h.

Referenced by NtDuplicateObject().