- Remove KeAttachProcess and KeDetachProcess prototypes from winddk.h.
- Remove non-public object manager stuff from W32API and ROS headers.
Modified: trunk/reactos/hal/halx86/generic/adapter.c
Modified: trunk/reactos/hal/halx86/generic/irql.c
Modified: trunk/reactos/hal/halx86/generic/pci.c
Modified: trunk/reactos/hal/halx86/generic/spinlock.c
Modified: trunk/reactos/hal/halx86/generic/timer.c
Modified: trunk/reactos/hal/halx86/xbox/part_xbox.c
Modified: trunk/reactos/include/ddk/obfuncs.h
Modified: trunk/reactos/ntoskrnl/include/internal/ob.h
Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h
Modified: trunk/reactos/ntoskrnl/rtl/i386/exception.c
Modified: trunk/reactos/subsys/win32k/misc/error.c
Modified: trunk/reactos/subsys/win32k/ntuser/csr.c
Modified: trunk/reactos/subsys/win32k/ntuser/desktop.c
Modified: trunk/reactos/subsys/win32k/ntuser/menu.c
Modified: trunk/reactos/subsys/win32k/objects/gdiobj.c
Modified: trunk/reactos/w32api/include/ddk/winddk.h
_____
Modified: trunk/reactos/hal/halx86/generic/adapter.c
--- trunk/reactos/hal/halx86/generic/adapter.c 2005-06-14 20:24:02 UTC
(rev 15915)
+++ trunk/reactos/hal/halx86/generic/adapter.c 2005-06-14 20:41:49 UTC
(rev 15916)
@@ -15,6 +15,7 @@
#include <ddk/ntddk.h>
#include <ddk/iotypes.h>
+#include <internal/ob.h>
#include <internal/ps.h>
#define NDEBUG
#include <internal/debug.h>
_____
Modified: trunk/reactos/hal/halx86/generic/irql.c
--- trunk/reactos/hal/halx86/generic/irql.c 2005-06-14 20:24:02 UTC
(rev 15915)
+++ trunk/reactos/hal/halx86/generic/irql.c 2005-06-14 20:41:49 UTC
(rev 15916)
@@ -10,6 +10,7 @@
/* INCLUDES
*****************************************************************/
#include <ddk/ntddk.h>
+#include <internal/ob.h>
#include <internal/ps.h>
#include <ntos/minmax.h>
#include <hal.h>
_____
Modified: trunk/reactos/hal/halx86/generic/pci.c
--- trunk/reactos/hal/halx86/generic/pci.c 2005-06-14 20:24:02 UTC
(rev 15915)
+++ trunk/reactos/hal/halx86/generic/pci.c 2005-06-14 20:41:49 UTC
(rev 15916)
@@ -22,6 +22,7 @@
#include <bus.h>
#include <halirq.h>
#include <hal.h>
+#include <internal/ob.h>
#include <internal/ps.h>
#define NDEBUG
_____
Modified: trunk/reactos/hal/halx86/generic/spinlock.c
--- trunk/reactos/hal/halx86/generic/spinlock.c 2005-06-14 20:24:02 UTC
(rev 15915)
+++ trunk/reactos/hal/halx86/generic/spinlock.c 2005-06-14 20:41:49 UTC
(rev 15916)
@@ -18,6 +18,7 @@
/* INCLUDES
****************************************************************/
#include <ddk/ntddk.h>
+#include <internal/ob.h>
#include <internal/ps.h>
#include <internal/debug.h>
_____
Modified: trunk/reactos/hal/halx86/generic/timer.c
--- trunk/reactos/hal/halx86/generic/timer.c 2005-06-14 20:24:02 UTC
(rev 15915)
+++ trunk/reactos/hal/halx86/generic/timer.c 2005-06-14 20:41:49 UTC
(rev 15916)
@@ -33,6 +33,7 @@
/* INCLUDES
***************************************************************/
#include <ddk/ntddk.h>
+#include <internal/ob.h>
#include <internal/ps.h>
#include <hal.h>
_____
Modified: trunk/reactos/hal/halx86/xbox/part_xbox.c
--- trunk/reactos/hal/halx86/xbox/part_xbox.c 2005-06-14 20:24:02 UTC
(rev 15915)
+++ trunk/reactos/hal/halx86/xbox/part_xbox.c 2005-06-14 20:41:49 UTC
(rev 15916)
@@ -14,6 +14,7 @@
#include <ddk/ntddk.h>
#include <hal.h>
#include "halxbox.h"
+#include <internal/ob.h>
#include <internal/ps.h>
#define NDEBUG
_____
Modified: trunk/reactos/include/ddk/obfuncs.h
--- trunk/reactos/include/ddk/obfuncs.h 2005-06-14 20:24:02 UTC (rev
15915)
+++ trunk/reactos/include/ddk/obfuncs.h 2005-06-14 20:41:49 UTC (rev
15916)
@@ -2,158 +2,6 @@
#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_HANDLE_COUNT_ENTRY
-{
- struct _EPROCESS *Process;
- ULONG HandleCount;
-} OBJECT_HANDLE_COUNT_ENTRY, *POBJECT_HANDLE_COUNT_ENTRY;
-
-typedef struct _OBJECT_HANDLE_COUNT_DATABASE
-{
- ULONG CountEntries;
- POBJECT_HANDLE_COUNT_ENTRY HandleCountEntries[1];
-} OBJECT_HANDLE_COUNT_DATABASE, *POBJECT_HANDLE_COUNT_DATABASE;
-
-typedef struct _OBJECT_HEADER_HANDLE_INFO
-{
- union {
- POBJECT_HANDLE_COUNT_DATABASE HandleCountDatabase;
- OBJECT_HANDLE_COUNT_ENTRY SingleEntry;
- };
-} OBJECT_HEADER_HANDLE_INFO, *POBJECT_HEADER_HANDLE_INFO;
-
-typedef struct _OBJECT_HEADER_CREATOR_INFO
-{
- LIST_ENTRY TypeList;
- PVOID CreatorUniqueProcess;
- USHORT CreatorBackTraceIndex;
- USHORT Reserved;
-} OBJECT_HEADER_CREATOR_INFO, *POBJECT_HEADER_CREATOR_INFO;
-
-typedef struct _OBJECT_HEADER_NAME_INFO
-{
- struct _DIRECTORY_OBJECT *Directory;
- UNICODE_STRING Name;
- ULONG QueryReferences;
- ULONG Reserved2;
- ULONG DbgReferenceCount;
-} OBJECT_HEADER_NAME_INFO, *POBJECT_HEADER_NAME_INFO;
-
-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/ntoskrnl/include/internal/ob.h
--- trunk/reactos/ntoskrnl/include/internal/ob.h 2005-06-14
20:24:02 UTC (rev 15915)
+++ trunk/reactos/ntoskrnl/include/internal/ob.h 2005-06-14
20:41:49 UTC (rev 15916)
@@ -16,6 +16,169 @@
struct _EPROCESS;
+typedef enum _OB_OPEN_REASON
+{
+ ObCreateHandle,
+ ObOpenHandle,
+ ObDuplicateHandle,
+ ObInheritHandle,
+ ObMaxOpenReason
+} OB_OPEN_REASON;
+
+/* TEMPORARY HACK */
+typedef NTSTATUS
+(STDCALL *OB_CREATE_METHOD)(
+ PVOID ObjectBody,
+ PVOID Parent,
+ PWSTR RemainingPath,
+ struct _OBJECT_ATTRIBUTES* ObjectAttributes);
+
+/* Object Callbacks */
+typedef NTSTATUS
+(STDCALL *OB_OPEN_METHOD)(
+ OB_OPEN_REASON Reason,
+ PVOID ObjectBody,
+ PEPROCESS Process,
+ ULONG HandleCount,
+ ACCESS_MASK GrantedAccess);
+
+typedef NTSTATUS
+(STDCALL *OB_PARSE_METHOD)(
+ PVOID Object,
+ PVOID *NextObject,
+ PUNICODE_STRING FullPath,
+ PWSTR *Path,
+ ULONG Attributes);
+
+typedef VOID
+(STDCALL *OB_DELETE_METHOD)(
+ PVOID DeletedObject);
+
+typedef VOID
+(STDCALL *OB_CLOSE_METHOD)(
+ PVOID ClosedObject,
+ ULONG HandleCount);
+
+typedef VOID
+(STDCALL *OB_DUMP_METHOD)(
+ VOID);
+
+typedef NTSTATUS
+(STDCALL *OB_OKAYTOCLOSE_METHOD)(
+ VOID);
+
+typedef NTSTATUS
+(STDCALL *OB_QUERYNAME_METHOD)(
+ PVOID ObjectBody,
+ POBJECT_NAME_INFORMATION ObjectNameInfo,
+ ULONG Length,
+ PULONG ReturnLength);
+
+typedef PVOID
+(STDCALL *OB_FIND_METHOD)(
+ PVOID WinStaObject,
+ PWSTR Name,
+ ULONG Attributes);
+
+typedef NTSTATUS
+(STDCALL *OB_SECURITY_METHOD)(
+ PVOID ObjectBody,
+ SECURITY_OPERATION_CODE OperationCode,
+ SECURITY_INFORMATION SecurityInformation,
+ PSECURITY_DESCRIPTOR SecurityDescriptor,
+ PULONG BufferLength);
+
+typedef struct _OBJECT_HEADER_NAME_INFO
+{
+ struct _DIRECTORY_OBJECT *Directory;
+ UNICODE_STRING Name;
+ ULONG QueryReferences;
+ ULONG Reserved2;
+ ULONG DbgReferenceCount;
+} OBJECT_HEADER_NAME_INFO, *POBJECT_HEADER_NAME_INFO;
+
+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;
+
+typedef struct _OBJECT_HANDLE_COUNT_ENTRY
+{
+ struct _EPROCESS *Process;
+ ULONG HandleCount;
+} OBJECT_HANDLE_COUNT_ENTRY, *POBJECT_HANDLE_COUNT_ENTRY;
+
+typedef struct _OBJECT_HANDLE_COUNT_DATABASE
+{
+ ULONG CountEntries;
+ POBJECT_HANDLE_COUNT_ENTRY HandleCountEntries[1];
+} OBJECT_HANDLE_COUNT_DATABASE, *POBJECT_HANDLE_COUNT_DATABASE;
+
+typedef struct _OBJECT_HEADER_HANDLE_INFO
+{
+ union {
+ POBJECT_HANDLE_COUNT_DATABASE HandleCountDatabase;
+ OBJECT_HANDLE_COUNT_ENTRY SingleEntry;
+ };
+} OBJECT_HEADER_HANDLE_INFO, *POBJECT_HEADER_HANDLE_INFO;
+
+typedef struct _OBJECT_HEADER_CREATOR_INFO
+{
+ LIST_ENTRY TypeList;
+ PVOID CreatorUniqueProcess;
+ USHORT CreatorBackTraceIndex;
+ USHORT Reserved;
+} OBJECT_HEADER_CREATOR_INFO, *POBJECT_HEADER_CREATOR_INFO;
+
typedef PVOID POBJECT;
typedef struct _QUAD
_____
Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h
--- trunk/reactos/ntoskrnl/include/ntoskrnl.h 2005-06-14 20:24:02 UTC
(rev 15915)
+++ trunk/reactos/ntoskrnl/include/ntoskrnl.h 2005-06-14 20:41:49 UTC
(rev 15916)
@@ -40,6 +40,7 @@
#include <internal/module.h>
#include <internal/handle.h>
#include <internal/pool.h>
+#include <internal/ob.h>
#include <internal/ps.h>
#include <internal/mm.h>
#include <internal/cc.h>
@@ -50,7 +51,6 @@
#include <internal/ldr.h>
#include <internal/kd.h>
#include <internal/ex.h>
-#include <internal/ob.h>
#include "internal/xhal.h"
#include <internal/v86m.h>
#include <internal/ifs.h>
_____
Modified: trunk/reactos/ntoskrnl/rtl/i386/exception.c
--- trunk/reactos/ntoskrnl/rtl/i386/exception.c 2005-06-14 20:24:02 UTC
(rev 15915)
+++ trunk/reactos/ntoskrnl/rtl/i386/exception.c 2005-06-14 20:41:49 UTC
(rev 15916)
@@ -12,6 +12,7 @@
#include <ntos.h>
#include <internal/ke.h>
+#include <internal/ob.h>
#include <internal/ps.h>
#define NDEBUG
_____
Modified: trunk/reactos/subsys/win32k/misc/error.c
--- trunk/reactos/subsys/win32k/misc/error.c 2005-06-14 20:24:02 UTC
(rev 15915)
+++ trunk/reactos/subsys/win32k/misc/error.c 2005-06-14 20:41:49 UTC
(rev 15916)
@@ -26,12 +26,8 @@
* REVISION HISTORY:
* 06-06-2001 CSH Created
*/
-#include <ddk/ntddk.h>
-#include <ddk/ntpoapi.h>
-#include <internal/ps.h>
-#include <include/error.h>
+#include <w32k.h>
-
VOID FASTCALL
SetLastNtError(NTSTATUS Status)
{
_____
Modified: trunk/reactos/subsys/win32k/ntuser/csr.c
--- trunk/reactos/subsys/win32k/ntuser/csr.c 2005-06-14 20:24:02 UTC
(rev 15915)
+++ trunk/reactos/subsys/win32k/ntuser/csr.c 2005-06-14 20:41:49 UTC
(rev 15916)
@@ -58,7 +58,7 @@
OldProcess = PsGetCurrentProcess();
if (CsrProcess != OldProcess)
{
- KeAttachProcess(CsrProcess);
+ KeAttachProcess(EPROCESS_TO_KPROCESS(CsrProcess));
}
Status = ZwRequestWaitReplyPort(WindowsApiPort,
&Request->Header,
@@ -132,7 +132,7 @@
OldProcess = PsGetCurrentProcess();
if (CsrProcess != OldProcess)
{
- KeAttachProcess(CsrProcess);
+ KeAttachProcess(EPROCESS_TO_KPROCESS(CsrProcess));
}
Status = ZwClose(Handle);
_____
Modified: trunk/reactos/subsys/win32k/ntuser/desktop.c
--- trunk/reactos/subsys/win32k/ntuser/desktop.c 2005-06-14
20:24:02 UTC (rev 15915)
+++ trunk/reactos/subsys/win32k/ntuser/desktop.c 2005-06-14
20:41:49 UTC (rev 15916)
@@ -1361,7 +1361,7 @@
may be a bit safer (e.g. when the desktop is being destroyed */
/* switch into the context of the thread we're trying to get the
desktop from,
so we can use the handle */
- KeAttachProcess(Thread->ThreadsProcess);
+ KeAttachProcess(EPROCESS_TO_KPROCESS(Thread->ThreadsProcess));
Status = ObReferenceObjectByHandle(hThreadDesktop,
GENERIC_ALL,
ExDesktopObjectType,
_____
Modified: trunk/reactos/subsys/win32k/ntuser/menu.c
--- trunk/reactos/subsys/win32k/ntuser/menu.c 2005-06-14 20:24:02 UTC
(rev 15915)
+++ trunk/reactos/subsys/win32k/ntuser/menu.c 2005-06-14 20:41:49 UTC
(rev 15916)
@@ -1250,7 +1250,7 @@
CurrentProcess = PsGetCurrentProcess();
if (CurrentProcess != Process)
{
- KeAttachProcess(Process);
+ KeAttachProcess(EPROCESS_TO_KPROCESS(Process));
}
IntLockProcessMenus(Win32Process);
_____
Modified: trunk/reactos/subsys/win32k/objects/gdiobj.c
--- trunk/reactos/subsys/win32k/objects/gdiobj.c 2005-06-14
20:24:02 UTC (rev 15915)
+++ trunk/reactos/subsys/win32k/objects/gdiobj.c 2005-06-14
20:41:49 UTC (rev 15916)
@@ -656,7 +656,7 @@
CurrentProcess = PsGetCurrentProcess();
if (CurrentProcess != Process)
{
- KeAttachProcess(Process);
+ KeAttachProcess(EPROCESS_TO_KPROCESS(Process));
}
W32Process = (PW32PROCESS)Process->Win32Process;
ASSERT(W32Process);
_____
Modified: trunk/reactos/w32api/include/ddk/winddk.h
--- trunk/reactos/w32api/include/ddk/winddk.h 2005-06-14 20:24:02 UTC
(rev 15915)
+++ trunk/reactos/w32api/include/ddk/winddk.h 2005-06-14 20:41:49 UTC
(rev 15916)
@@ -7121,6 +7121,8 @@
_InvokeOnCancel) \
{ \
PIO_STACK_LOCATION _IrpSp; \
+ ASSERT(_InvokeOnSuccess || _InvokeOnError || _InvokeOnCancel ? \
+ _CompletionRoutine != NULL : TRUE); \
_IrpSp = IoGetNextIrpStackLocation(_Irp); \
_IrpSp->CompletionRoutine =
(PIO_COMPLETION_ROUTINE)(_CompletionRoutine); \
_IrpSp->Context = (_Context); \
@@ -7505,12 +7507,6 @@
NTOSAPI
VOID
DDKAPI
-KeAttachProcess(
- IN PKPROCESS Process);
-
-NTOSAPI
-VOID
-DDKAPI
KeBugCheck(
IN ULONG BugCheckCode);
@@ -7553,12 +7549,6 @@
NTOSAPI
VOID
DDKAPI
-KeDetachProcess(
- VOID);
-
-NTOSAPI
-VOID
-DDKAPI
KeEnterCriticalRegion(
VOID);
@@ -8459,143 +8449,8 @@
-/** Object manager **/
+/** Object manager routines **/
-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_HEADER_NAME_INFO
-{
- struct _DIRECTORY_OBJECT *Directory;
- UNICODE_STRING Name;
- ULONG QueryReferences;
- ULONG Reserved2;
- ULONG DbgReferenceCount;
-} OBJECT_HEADER_NAME_INFO, *POBJECT_HEADER_NAME_INFO;
-
-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