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