update for HEAD-2003091401
[reactos.git] / include / ntos / obtypes.h
old mode 100644 (file)
new mode 100755 (executable)
similarity index 79%
rename from include/ddk/obtypes.h
rename to include/ntos/obtypes.h
index 623b4f7..216a245
@@ -4,13 +4,23 @@
 struct _DIRECTORY_OBJECT;
 struct _OBJECT_ATTRIBUTES;
 
+#ifndef __USE_W32API
+
 typedef ULONG ACCESS_STATE, *PACCESS_STATE;
 
-typedef struct _OBJECT_HANDLE_INFORMATION {
-    ULONG HandleAttributes;
-    ACCESS_MASK GrantedAccess;
+typedef struct _OBJECT_NAME_INFORMATION
+{
+  UNICODE_STRING Name;
+} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
+
+typedef struct _OBJECT_HANDLE_INFORMATION
+{
+  ULONG HandleAttributes;
+  ACCESS_MASK GrantedAccess;
 } OBJECT_HANDLE_INFORMATION, *POBJECT_HANDLE_INFORMATION;
 
+#endif /* __USE_W32API */
+
 typedef struct _OBJECT_TYPE
 {
   /*
@@ -106,16 +116,22 @@ typedef struct _OBJECT_TYPE
                                    SECURITY_INFORMATION SecurityInformation,
                                    PSECURITY_DESCRIPTOR SecurityDescriptor,
                                    PULONG BufferLength);
-  
+
   /*
+   * PURPOSE: Called to query the name of the object
+   * RETURNS
+   *     STATUS_SUCCESS       NextObject was found
    */
-  VOID STDCALL_FUNC (*QueryName)(VOID);
-   
+  NTSTATUS STDCALL_FUNC (*QueryName)(PVOID ObjectBody,
+                                    POBJECT_NAME_INFORMATION ObjectNameInfo,
+                                    ULONG Length,
+                                    PULONG ReturnLength);
+
   /*
    * PURPOSE: Called when a process asks to close the object
    */
   VOID STDCALL_FUNC (*OkayToClose)(VOID);
-  
+
   NTSTATUS STDCALL_FUNC (*Create)(PVOID ObjectBody,
                             PVOID Parent,
                             PWSTR RemainingPath,
@@ -124,7 +140,13 @@ typedef struct _OBJECT_TYPE
   VOID STDCALL_FUNC (*DuplicationNotify)(PEPROCESS DuplicateTo,
                                    PEPROCESS DuplicateFrom,
                                    PVOID Object);
-} OBJECT_TYPE, *POBJECT_TYPE;
+} OBJECT_TYPE;
+
+#ifndef __USE_W32API
+
+typedef struct _OBJECT_TYPE *POBJECT_TYPE;
+
+#endif /* __USE_W32API */
 
 
 typedef struct _OBJECT_HEADER
@@ -156,6 +178,8 @@ typedef struct _OBJECT_HEADER
    
 } OBJECT_HEADER, *POBJECT_HEADER;
 
+#ifndef __USE_W32API
+
 typedef struct _OBJECT_ATTRIBUTES
 {
    ULONG Length;
@@ -166,39 +190,20 @@ typedef struct _OBJECT_ATTRIBUTES
    SECURITY_QUALITY_OF_SERVICE *SecurityQualityOfService;
 } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
 
+#endif /* __USE_W32API */
+
 typedef struct _HANDLE_TABLE
 {
    LIST_ENTRY ListHead;
    KSPIN_LOCK ListLock;
-} HANDLE_TABLE, *PHANDLE_TABLE;
+} HANDLE_TABLE;
 
-extern POBJECT_TYPE ObDirectoryType;
+#ifndef __USE_W32API
+
+typedef struct _HANDLE_TABLE *PHANDLE_TABLE;
 
-#if 0 
-#define OBJECT_TYPE_0                  0
-#define OBJECT_TYPE_1                  1
-#define OBJECT_TYPE_DIRECTORY          2
-#define OBJECT_TYPE_SYMBOLICLINK       3
-#define OBJECT_TYPE_TOKEN              4
-#define OBJECT_TYPE_PROCESS            5
-#define OBJECT_TYPE_THREAD             6
-#define OBJECT_TYPE_EVENT              7
-#define OBJECT_TYPE_8                  8
-#define OBJECT_TYPE_MUTANT             9
-#define OBJECT_TYPE_SEMAPHORE          10
-#define OBJECT_TYPE_TIMER              11
-#define OBJECT_TYPE_12                 12
-#define OBJECT_TYPE_WINDOWSTATION      13
-#define OBJECT_TYPE_DESKTOP            14
-#define OBJECT_TYPE_SECTION            15
-#define OBJECT_TYPE_KEY                        16
-#define OBJECT_TYPE_PORT               17
-#define OBJECT_TYPE_18                 18
-#define OBJECT_TYPE_19                 19
-#define OBJECT_TYPE_20                 20
-#define OBJECT_TYPE_21                 21
-#define OBJECT_TYPE_IOCOMPLETION       22
-#define OBJECT_TYPE_FILE               23
-#endif
+#endif /* __USE_W32API */
+
+extern POBJECT_TYPE ObDirectoryType;
 
 #endif /* ndef _INCLUDE_DDK_OBTYPES_H */