Fix build, clean up headers, add public stuff to public headers
Modified: trunk/reactos/include/ddk/obfuncs.h
Modified: trunk/reactos/include/ddk/psfuncs.h
Modified: trunk/reactos/include/ddk/pstypes.h
Modified: trunk/reactos/ntoskrnl/include/internal/ob.h
Modified: trunk/reactos/ntoskrnl/include/internal/ps.h
Modified: trunk/reactos/w32api/include/ddk/winddk.h

Modified: trunk/reactos/include/ddk/obfuncs.h
--- trunk/reactos/include/ddk/obfuncs.h	2005-05-15 22:13:08 UTC (rev 15325)
+++ trunk/reactos/include/ddk/obfuncs.h	2005-05-15 23:24:11 UTC (rev 15326)
@@ -2,6 +2,121 @@
 #define _INCLUDE_DDK_OBFUNCS_H
 /* OBJECT MANAGER ************************************************************/
 
+typedef enum _OB_OPEN_REASON
+{    
+    ObCreateHandle,
+    ObOpenHandle,
+    ObDuplicateHandle,
+    ObInheritHandle,
+    ObMaxOpenReason
+} OB_OPEN_REASON;
+    
+/* TEMPORARY HACK */
+typedef NTSTATUS STDCALL_FUNC
+(*OB_CREATE_METHOD)(PVOID ObjectBody,
+                     PVOID Parent,
+                     PWSTR RemainingPath,
+                     struct _OBJECT_ATTRIBUTES* ObjectAttributes);
+                         
+/* Object Callbacks */
+typedef NTSTATUS STDCALL_FUNC
+(*OB_OPEN_METHOD)(OB_OPEN_REASON Reason,
+                  PVOID ObjectBody,
+                  PEPROCESS Process,
+                  ULONG HandleCount,
+                  ACCESS_MASK GrantedAccess);
+
+typedef NTSTATUS STDCALL_FUNC
+(*OB_PARSE_METHOD)(PVOID Object,
+                    PVOID *NextObject,
+                    PUNICODE_STRING FullPath,
+                    PWSTR *Path,
+                    ULONG Attributes);
+                        
+typedef VOID STDCALL_FUNC
+(*OB_DELETE_METHOD)(PVOID DeletedObject);
+
+typedef VOID STDCALL_FUNC
+(*OB_CLOSE_METHOD)(PVOID ClosedObject, ULONG HandleCount);
+
+typedef VOID STDCALL_FUNC
+(*OB_DUMP_METHOD)(VOID);
+
+typedef NTSTATUS STDCALL_FUNC
+(*OB_OKAYTOCLOSE_METHOD)(VOID);
+
+typedef NTSTATUS STDCALL_FUNC
+(*OB_QUERYNAME_METHOD)(PVOID ObjectBody,
+                        POBJECT_NAME_INFORMATION ObjectNameInfo,
+                        ULONG Length,
+                        PULONG ReturnLength);
+
+typedef PVOID STDCALL_FUNC
+(*OB_FIND_METHOD)(PVOID WinStaObject,
+                   PWSTR Name,
+                   ULONG Attributes);
+
+typedef NTSTATUS STDCALL_FUNC
+(*OB_SECURITY_METHOD)(PVOID ObjectBody,
+                        SECURITY_OPERATION_CODE OperationCode,
+                        SECURITY_INFORMATION SecurityInformation,
+                        PSECURITY_DESCRIPTOR SecurityDescriptor,
+                        PULONG BufferLength);
+
+typedef struct _OBJECT_CREATE_INFORMATION 
+{
+    ULONG Attributes;
+    HANDLE RootDirectory;
+    PVOID ParseContext;
+    KPROCESSOR_MODE ProbeMode;
+    ULONG PagedPoolCharge;
+    ULONG NonPagedPoolCharge;
+    ULONG SecurityDescriptorCharge;
+    PSECURITY_DESCRIPTOR SecurityDescriptor;
+    PSECURITY_QUALITY_OF_SERVICE SecurityQos;
+    SECURITY_QUALITY_OF_SERVICE SecurityQualityOfService;
+} OBJECT_CREATE_INFORMATION, *POBJECT_CREATE_INFORMATION;
+
+typedef struct _OBJECT_TYPE_INITIALIZER
+{
+    WORD Length;
+    UCHAR UseDefaultObject;
+    UCHAR CaseInsensitive;
+    ULONG InvalidAttributes;
+    GENERIC_MAPPING GenericMapping;
+    ULONG ValidAccessMask;
+    UCHAR SecurityRequired;
+    UCHAR MaintainHandleCount;
+    UCHAR MaintainTypeList;
+    POOL_TYPE PoolType;
+    ULONG DefaultPagedPoolCharge;
+    ULONG DefaultNonPagedPoolCharge;
+    OB_DUMP_METHOD DumpProcedure;
+    OB_OPEN_METHOD OpenProcedure;
+    OB_CLOSE_METHOD CloseProcedure;
+    OB_DELETE_METHOD DeleteProcedure;
+    OB_PARSE_METHOD ParseProcedure;
+    OB_SECURITY_METHOD SecurityProcedure;
+    OB_QUERYNAME_METHOD QueryNameProcedure;
+    OB_OKAYTOCLOSE_METHOD OkayToCloseProcedure;
+} OBJECT_TYPE_INITIALIZER, *POBJECT_TYPE_INITIALIZER;
+
+typedef struct _OBJECT_TYPE
+{
+    ERESOURCE Mutex;                    /* Used to lock the Object Type */
+    LIST_ENTRY TypeList;                /* Links all the Types Together for Debugging */
+    UNICODE_STRING Name;                /* Name of the Type */
+    PVOID DefaultObject;                /* What Object to use during a Wait (ie, FileObjects wait on FileObject->Event) */
+    ULONG Index;                        /* Index of this Type in the Object Directory */
+    ULONG TotalNumberOfObjects;         /* Total number of objects of this type */
+    ULONG TotalNumberOfHandles;         /* Total number of handles of this type */
+    ULONG HighWaterNumberOfObjects;     /* Peak number of objects of this type */
+    ULONG HighWaterNumberOfHandles;     /* Peak number of handles of this type */
+    OBJECT_TYPE_INITIALIZER TypeInfo;   /* Information captured during type creation */
+    ULONG Key;                          /* Key to use when allocating objects of this type */
+    ERESOURCE ObjectLocks[4];           /* Locks for locking the Objects */
+} OBJECT_TYPE;
+
 NTSTATUS STDCALL
 ObAssignSecurity(IN PACCESS_STATE AccessState,
 		 IN PSECURITY_DESCRIPTOR SecurityDescriptor,

Modified: trunk/reactos/include/ddk/psfuncs.h
--- trunk/reactos/include/ddk/psfuncs.h	2005-05-15 22:13:08 UTC (rev 15325)
+++ trunk/reactos/include/ddk/psfuncs.h	2005-05-15 23:24:11 UTC (rev 15326)
@@ -356,11 +356,12 @@
     PVOID	Win32Thread
 	);
 
+struct _W32_OBJECT_CALLBACK;
 
 VOID STDCALL
 STDCALL PsEstablishWin32Callouts (PW32_PROCESS_CALLBACK W32ProcessCallback,
 			  PW32_THREAD_CALLBACK W32ThreadCallback,
-			  PW32_OBJECT_CALLBACK W32ObjectCallback,
+			  struct _W32_OBJECT_CALLBACK *W32ObjectCallback,
 			  PVOID Param4,
 			  ULONG W32ThreadSize,
 			  ULONG W32ProcessSize);

Modified: trunk/reactos/include/ddk/pstypes.h
--- trunk/reactos/include/ddk/pstypes.h	2005-05-15 22:13:08 UTC (rev 15325)
+++ trunk/reactos/include/ddk/pstypes.h	2005-05-15 23:24:11 UTC (rev 15326)
@@ -66,81 +66,7 @@
 typedef NTSTATUS STDCALL_FUNC
 (*PW32_THREAD_CALLBACK)(struct _ETHREAD *Thread,
 			BOOLEAN Create);
-        
-typedef enum _OB_OPEN_REASON
-{    
-    ObCreateHandle,
-    ObOpenHandle,
-    ObDuplicateHandle,
-    ObInheritHandle,
-    ObMaxOpenReason
-} OB_OPEN_REASON;
-    
-/* 
- * Callbacks used for Win32 objects... this define won't be needed after the Object Manager
- * rewrite -- Alex
- */
-  
-/* TEMPORARY HACK */
-typedef NTSTATUS STDCALL_FUNC
-(*OB_CREATE_METHOD)(PVOID ObjectBody,
-                     PVOID Parent,
-                     PWSTR RemainingPath,
-                     struct _OBJECT_ATTRIBUTES* ObjectAttributes);
-                         
-typedef NTSTATUS STDCALL_FUNC
-(*OB_OPEN_METHOD)(OB_OPEN_REASON Reason,
-                  PVOID ObjectBody,
-                  PEPROCESS Process,
-                  ULONG HandleCount,
-                  ACCESS_MASK GrantedAccess);
-
-typedef NTSTATUS STDCALL_FUNC
-(*OB_PARSE_METHOD)(PVOID Object,
-                    PVOID *NextObject,
-                    PUNICODE_STRING FullPath,
-                    PWSTR *Path,
-                    ULONG Attributes);
                         
-typedef VOID STDCALL_FUNC
-(*OB_DELETE_METHOD)(PVOID DeletedObject);
-
-typedef VOID STDCALL_FUNC
-(*OB_CLOSE_METHOD)(PVOID ClosedObject, ULONG HandleCount);
-
-typedef VOID STDCALL_FUNC
-(*OB_DUMP_METHOD)(VOID);
-
-typedef NTSTATUS STDCALL_FUNC
-(*OB_OKAYTOCLOSE_METHOD)(VOID);
-
-typedef NTSTATUS STDCALL_FUNC
-(*OB_QUERYNAME_METHOD)(PVOID ObjectBody,
-                        POBJECT_NAME_INFORMATION ObjectNameInfo,
-                        ULONG Length,
-                        PULONG ReturnLength);
-
-typedef PVOID STDCALL_FUNC
-(*OB_FIND_METHOD)(PVOID WinStaObject,
-                   PWSTR Name,
-                   ULONG Attributes);
-
-typedef NTSTATUS STDCALL_FUNC
-(*OB_SECURITY_METHOD)(PVOID ObjectBody,
-                        SECURITY_OPERATION_CODE OperationCode,
-                        SECURITY_INFORMATION SecurityInformation,
-                        PSECURITY_DESCRIPTOR SecurityDescriptor,
-                        PULONG BufferLength);
-                       
-typedef struct _W32_OBJECT_CALLBACK {
-    OB_OPEN_METHOD WinStaCreate;
-    OB_PARSE_METHOD WinStaParse;
-    OB_DELETE_METHOD WinStaDelete;
-    OB_FIND_METHOD WinStaFind;
-    OB_CREATE_METHOD DesktopCreate;
-    OB_DELETE_METHOD DesktopDelete;    
-} W32_OBJECT_CALLBACK, *PW32_OBJECT_CALLBACK;
-
 typedef struct _STACK_INFORMATION
 {
   PVOID BaseAddress;

Modified: trunk/reactos/ntoskrnl/include/internal/ob.h
--- trunk/reactos/ntoskrnl/include/internal/ob.h	2005-05-15 22:13:08 UTC (rev 15325)
+++ trunk/reactos/ntoskrnl/include/internal/ob.h	2005-05-15 23:24:11 UTC (rev 15326)
@@ -24,46 +24,6 @@
 
 typedef PVOID POBJECT;
 
-typedef struct _OBJECT_TYPE_INITIALIZER
-{
-    WORD Length;
-    UCHAR UseDefaultObject;
-    UCHAR CaseInsensitive;
-    ULONG InvalidAttributes;
-    GENERIC_MAPPING GenericMapping;
-    ULONG ValidAccessMask;
-    UCHAR SecurityRequired;
-    UCHAR MaintainHandleCount;
-    UCHAR MaintainTypeList;
-    POOL_TYPE PoolType;
-    ULONG DefaultPagedPoolCharge;
-    ULONG DefaultNonPagedPoolCharge;
-    OB_DUMP_METHOD DumpProcedure;
-    OB_OPEN_METHOD OpenProcedure;
-    OB_CLOSE_METHOD CloseProcedure;
-    OB_DELETE_METHOD DeleteProcedure;
-    OB_PARSE_METHOD ParseProcedure;
-    OB_SECURITY_METHOD SecurityProcedure;
-    OB_QUERYNAME_METHOD QueryNameProcedure;
-    OB_OKAYTOCLOSE_METHOD OkayToCloseProcedure;
-} OBJECT_TYPE_INITIALIZER, *POBJECT_TYPE_INITIALIZER;
-
-typedef struct _OBJECT_TYPE
-{
-    ERESOURCE Mutex;                    /* Used to lock the Object Type */
-    LIST_ENTRY TypeList;                /* Links all the Types Together for Debugging */
-    UNICODE_STRING Name;                /* Name of the Type */
-    PVOID DefaultObject;                /* What Object to use during a Wait (ie, FileObjects wait on FileObject->Event) */
-    ULONG Index;                        /* Index of this Type in the Object Directory */
-    ULONG TotalNumberOfObjects;         /* Total number of objects of this type */
-    ULONG TotalNumberOfHandles;         /* Total number of handles of this type */
-    ULONG HighWaterNumberOfObjects;     /* Peak number of objects of this type */
-    ULONG HighWaterNumberOfHandles;     /* Peak number of handles of this type */
-    OBJECT_TYPE_INITIALIZER TypeInfo;   /* Information captured during type creation */
-    ULONG Key;                          /* Key to use when allocating objects of this type */
-    ERESOURCE ObjectLocks[4];           /* Locks for locking the Objects */
-} OBJECT_TYPE;
-
 typedef struct _OBJECT_HEADER
 /*
  * PURPOSE: Header for every object managed by the object manager

Modified: trunk/reactos/ntoskrnl/include/internal/ps.h
--- trunk/reactos/ntoskrnl/include/internal/ps.h	2005-05-15 22:13:08 UTC (rev 15325)
+++ trunk/reactos/ntoskrnl/include/internal/ps.h	2005-05-15 23:24:11 UTC (rev 15326)
@@ -55,6 +55,15 @@
 #define	FSRTL_FAST_IO_TOP_LEVEL_IRP		(0x04)
 #define	FSRTL_MAX_TOP_LEVEL_IRP_FLAG		(0x04)
 
+typedef struct _W32_OBJECT_CALLBACK {
+    OB_OPEN_METHOD WinStaCreate;
+    OB_PARSE_METHOD  WinStaParse;
+    OB_DELETE_METHOD  WinStaDelete;
+    OB_FIND_METHOD  WinStaFind;
+    OB_CREATE_METHOD  DesktopCreate;
+    OB_DELETE_METHOD  DesktopDelete;
+} W32_OBJECT_CALLBACK, *PW32_OBJECT_CALLBACK;
+
 #ifndef __USE_W32API
 typedef struct
 {

Modified: trunk/reactos/w32api/include/ddk/winddk.h
--- trunk/reactos/w32api/include/ddk/winddk.h	2005-05-15 22:13:08 UTC (rev 15325)
+++ trunk/reactos/w32api/include/ddk/winddk.h	2005-05-15 23:24:11 UTC (rev 15326)
@@ -8447,8 +8447,123 @@
 
 
 
-/** Object manager routines **/
+/** Object manager **/
 
+typedef enum _OB_OPEN_REASON
+{    
+    ObCreateHandle,
+    ObOpenHandle,
+    ObDuplicateHandle,
+    ObInheritHandle,
+    ObMaxOpenReason
+} OB_OPEN_REASON;
+    
+/* TEMPORARY HACK */
+typedef NTSTATUS
+(DDKAPI *OB_CREATE_METHOD)(PVOID ObjectBody,
+                     PVOID Parent,
+                     PWSTR RemainingPath,
+                     struct _OBJECT_ATTRIBUTES* ObjectAttributes);
+                         
+/* Object Callbacks */
+typedef NTSTATUS
+(DDKAPI *OB_OPEN_METHOD)(OB_OPEN_REASON Reason,
+                  PVOID ObjectBody,
+                  PEPROCESS Process,
+                  ULONG HandleCount,
+                  ACCESS_MASK GrantedAccess);
+
+typedef NTSTATUS 
+(DDKAPI *OB_PARSE_METHOD)(PVOID Object,
+                    PVOID *NextObject,
+                    PUNICODE_STRING FullPath,
+                    PWSTR *Path,
+                    ULONG Attributes);
+                        
+typedef VOID 
+(DDKAPI *OB_DELETE_METHOD)(PVOID DeletedObject);
+
+typedef VOID 
+(DDKAPI *OB_CLOSE_METHOD)(PVOID ClosedObject, ULONG HandleCount);
+
+typedef VOID
+(DDKAPI *OB_DUMP_METHOD)(VOID);
+
+typedef NTSTATUS 
+(DDKAPI *OB_OKAYTOCLOSE_METHOD)(VOID);
+
+typedef NTSTATUS 
+(DDKAPI *OB_QUERYNAME_METHOD)(PVOID ObjectBody,
+                        POBJECT_NAME_INFORMATION ObjectNameInfo,
+                        ULONG Length,
+                        PULONG ReturnLength);
+
+typedef PVOID 
+(DDKAPI *OB_FIND_METHOD)(PVOID WinStaObject,
+                   PWSTR Name,
+                   ULONG Attributes);
+
+typedef NTSTATUS 
+(DDKAPI *OB_SECURITY_METHOD)(PVOID ObjectBody,
+                        SECURITY_OPERATION_CODE OperationCode,
+                        SECURITY_INFORMATION SecurityInformation,
+                        PSECURITY_DESCRIPTOR SecurityDescriptor,
+                        PULONG BufferLength);
+
+typedef struct _OBJECT_CREATE_INFORMATION 
+{
+    ULONG Attributes;
+    HANDLE RootDirectory;
+    PVOID ParseContext;
+    KPROCESSOR_MODE ProbeMode;
+    ULONG PagedPoolCharge;
+    ULONG NonPagedPoolCharge;
+    ULONG SecurityDescriptorCharge;
+    PSECURITY_DESCRIPTOR SecurityDescriptor;
+    PSECURITY_QUALITY_OF_SERVICE SecurityQos;
+    SECURITY_QUALITY_OF_SERVICE SecurityQualityOfService;
+} OBJECT_CREATE_INFORMATION, *POBJECT_CREATE_INFORMATION;
+
+typedef struct _OBJECT_TYPE_INITIALIZER
+{
+    WORD Length;
+    UCHAR UseDefaultObject;
+    UCHAR CaseInsensitive;
+    ULONG InvalidAttributes;
+    GENERIC_MAPPING GenericMapping;
+    ULONG ValidAccessMask;
+    UCHAR SecurityRequired;
+    UCHAR MaintainHandleCount;
+    UCHAR MaintainTypeList;
+    POOL_TYPE PoolType;
+    ULONG DefaultPagedPoolCharge;
+    ULONG DefaultNonPagedPoolCharge;
+    OB_DUMP_METHOD DumpProcedure;
+    OB_OPEN_METHOD OpenProcedure;
+    OB_CLOSE_METHOD CloseProcedure;
+    OB_DELETE_METHOD DeleteProcedure;
+    OB_PARSE_METHOD ParseProcedure;
+    OB_SECURITY_METHOD SecurityProcedure;
+    OB_QUERYNAME_METHOD QueryNameProcedure;
+    OB_OKAYTOCLOSE_METHOD OkayToCloseProcedure;
+} OBJECT_TYPE_INITIALIZER, *POBJECT_TYPE_INITIALIZER;
+
+typedef struct _OBJECT_TYPE
+{
+    ERESOURCE Mutex;                    /* Used to lock the Object Type */
+    LIST_ENTRY TypeList;                /* Links all the Types Together for Debugging */
+    UNICODE_STRING Name;                /* Name of the Type */
+    PVOID DefaultObject;                /* What Object to use during a Wait (ie, FileObjects wait on FileObject->Event) */
+    ULONG Index;                        /* Index of this Type in the Object Directory */
+    ULONG TotalNumberOfObjects;         /* Total number of objects of this type */
+    ULONG TotalNumberOfHandles;         /* Total number of handles of this type */
+    ULONG HighWaterNumberOfObjects;     /* Peak number of objects of this type */
+    ULONG HighWaterNumberOfHandles;     /* Peak number of handles of this type */
+    OBJECT_TYPE_INITIALIZER TypeInfo;   /* Information captured during type creation */
+    ULONG Key;                          /* Key to use when allocating objects of this type */
+    ERESOURCE ObjectLocks[4];           /* Locks for locking the Objects */
+} OBJECT_TYPE;
+
 NTOSAPI
 NTSTATUS
 DDKAPI