1 #ifndef _INCLUDE_DDK_OBTYPES_H
2 #define _INCLUDE_DDK_OBTYPES_H
4 struct _DIRECTORY_OBJECT;
5 struct _OBJECT_ATTRIBUTES;
9 typedef ULONG ACCESS_STATE, *PACCESS_STATE;
11 typedef struct _OBJECT_NAME_INFORMATION
14 } OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
16 typedef struct _OBJECT_HANDLE_INFORMATION
18 ULONG HandleAttributes;
19 ACCESS_MASK GrantedAccess;
20 } OBJECT_HANDLE_INFORMATION, *POBJECT_HANDLE_INFORMATION;
22 #endif /* __USE_W32API */
24 typedef struct _OBJECT_TYPE
27 * PURPOSE: Tag to be used when allocating objects of this type
32 * PURPOSE: Name of the type
34 UNICODE_STRING TypeName;
37 * PURPOSE: Total number of objects of this type
42 * PURPOSE: Total number of handles of this type
47 * PURPOSE: Maximum objects of this type
52 * PURPOSE: Maximum handles of this type
57 * PURPOSE: Paged pool charge
59 ULONG PagedPoolCharge;
62 * PURPOSE: Nonpaged pool charge
64 ULONG NonpagedPoolCharge;
67 * PURPOSE: Mapping of generic access rights
69 PGENERIC_MAPPING Mapping;
72 * PURPOSE: Dumps the object
75 VOID STDCALL_FUNC (*Dump)(VOID);
78 * PURPOSE: Opens the object
81 VOID STDCALL_FUNC (*Open)(VOID);
84 * PURPOSE: Called to close an object if OkayToClose returns true
86 VOID STDCALL_FUNC (*Close)(PVOID ObjectBody,
90 * PURPOSE: Called to delete an object when the last reference is removed
92 VOID STDCALL_FUNC (*Delete)(PVOID ObjectBody);
95 * PURPOSE: Called when an open attempts to open a file apparently
96 * residing within the object
98 * STATUS_SUCCESS NextObject was found
99 * STATUS_UNSUCCESSFUL NextObject not found
100 * STATUS_REPARSE Path changed, restart parsing the path
102 NTSTATUS STDCALL_FUNC (*Parse)(PVOID ParsedObject,
104 PUNICODE_STRING FullPath,
109 * PURPOSE: Called to set, query, delete or assign a security-descriptor
112 * STATUS_SUCCESS NextObject was found
114 NTSTATUS STDCALL_FUNC (*Security)(PVOID ObjectBody,
115 SECURITY_OPERATION_CODE OperationCode,
116 SECURITY_INFORMATION SecurityInformation,
117 PSECURITY_DESCRIPTOR SecurityDescriptor,
118 PULONG BufferLength);
121 * PURPOSE: Called to query the name of the object
123 * STATUS_SUCCESS NextObject was found
125 NTSTATUS STDCALL_FUNC (*QueryName)(PVOID ObjectBody,
126 POBJECT_NAME_INFORMATION ObjectNameInfo,
128 PULONG ReturnLength);
131 * PURPOSE: Called when a process asks to close the object
133 VOID STDCALL_FUNC (*OkayToClose)(VOID);
135 NTSTATUS STDCALL_FUNC (*Create)(PVOID ObjectBody,
138 struct _OBJECT_ATTRIBUTES* ObjectAttributes);
140 VOID STDCALL_FUNC (*DuplicationNotify)(PEPROCESS DuplicateTo,
141 PEPROCESS DuplicateFrom,
147 typedef struct _OBJECT_TYPE *POBJECT_TYPE;
149 #endif /* __USE_W32API */
152 typedef struct _OBJECT_HEADER
154 * PURPOSE: Header for every object managed by the object manager
161 BOOLEAN CloseInProcess;
163 struct _DIRECTORY_OBJECT* Parent;
164 POBJECT_TYPE ObjectType;
167 * PURPOSE: Object type
168 * NOTE: This overlaps the first member of the object body
173 * PURPOSE: Object size
174 * NOTE: This overlaps the second member of the object body
179 } OBJECT_HEADER, *POBJECT_HEADER;
183 typedef struct _OBJECT_ATTRIBUTES
186 HANDLE RootDirectory;
187 PUNICODE_STRING ObjectName;
189 SECURITY_DESCRIPTOR *SecurityDescriptor;
190 SECURITY_QUALITY_OF_SERVICE *SecurityQualityOfService;
191 } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
193 #endif /* __USE_W32API */
195 typedef struct _HANDLE_TABLE
203 typedef struct _HANDLE_TABLE *PHANDLE_TABLE;
205 #endif /* __USE_W32API */
207 extern POBJECT_TYPE ObDirectoryType;
209 #endif /* ndef _INCLUDE_DDK_OBTYPES_H */