2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>

Changes for compiling with w32api

	* include/ddk/obfuncs.h (ObCreateObject): Remove.
	* include/ntos/zwtypes.h (ObRosCreateObject):
	* ntoskrnl/ntoskrnl.def, ntoskrnl/ntoskrnl.edf: Export ObCreateObject@36
	and ObRosCreateObject@20.
	* ntoskrnl/cm/ntfunc.c, ntoskrnl/cm/registry.c, ntoskrnl/cm/regobj.c,
	ntoskrnl/io/create.c, ntoskrnl/io/device.c, ntoskrnl/io/iocomp.c,
	ntoskrnl/lpc/connect.c, ntoskrnl/lpc/create.c, ntoskrnl/mm/section.c,
	ntoskrnl/nt/evtpair.c, ntoskrnl/nt/mutant.c, ntoskrnl/nt/ntevent.c,
	ntoskrnl/nt/ntsem.c, ntoskrnl/nt/nttimer.c, ntoskrnl/nt/profile.c,
	ntoskrnl/ob/dirobj.c, ntoskrnl/ob/namespc.c, ntoskrnl/ob/symlink.c,
	ntoskrnl/ps/create.c, ntoskrnl/ps/process.c, ntoskrnl/se/token.c,
	subsys/win32k/ntuser/winsta.c: Use ObRosCreateObject, not ObCreateObject.
	* ntoskrnl/ob/object.c (ObRosCreateObject): Rename from ObCreateObject.
	(ObCreateObject): Add stub.

svn path=/trunk/; revision=4866
This commit is contained in:
Casper Hornstrup 2003-06-07 12:17:20 +00:00
parent 922b9fdf46
commit 1e6c809d07
11 changed files with 61 additions and 79 deletions

View file

@ -1,3 +1,22 @@
2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api
* include/ddk/obfuncs.h (ObCreateObject): Remove.
* include/ntos/zwtypes.h (ObRosCreateObject):
* ntoskrnl/ntoskrnl.def, ntoskrnl/ntoskrnl.edf: Export ObCreateObject@36
and ObRosCreateObject@20.
* ntoskrnl/cm/ntfunc.c, ntoskrnl/cm/registry.c, ntoskrnl/cm/regobj.c,
ntoskrnl/io/create.c, ntoskrnl/io/device.c, ntoskrnl/io/iocomp.c,
ntoskrnl/lpc/connect.c, ntoskrnl/lpc/create.c, ntoskrnl/mm/section.c,
ntoskrnl/nt/evtpair.c, ntoskrnl/nt/mutant.c, ntoskrnl/nt/ntevent.c,
ntoskrnl/nt/ntsem.c, ntoskrnl/nt/nttimer.c, ntoskrnl/nt/profile.c,
ntoskrnl/ob/dirobj.c, ntoskrnl/ob/namespc.c, ntoskrnl/ob/symlink.c,
ntoskrnl/ps/create.c, ntoskrnl/ps/process.c, ntoskrnl/se/token.c,
subsys/win32k/ntuser/winsta.c: Use ObRosCreateObject, not ObCreateObject.
* ntoskrnl/ob/object.c (ObRosCreateObject): Rename from ObCreateObject.
(ObCreateObject): Add stub.
2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api

View file

@ -8,47 +8,6 @@ ObAssignSecurity(IN PACCESS_STATE AccessState,
IN PVOID Object,
IN POBJECT_TYPE Type);
/*
BOOLEAN STDCALL
ObCheckCreateObjectAccess(IN PVOID Object,
IN ACCESS_MASK DesiredAccess,
ULONG Param3,
ULONG Param4,
ULONG Param5,
IN KPROCESSOR_MODE AccessMode,
OUT PNTSTATUS AccessStatus);
*/
/*
BOOLEAN STDCALL
ObCheckObjectAccess(IN PVOID Object,
ULONG Param2,
ULONG Param3,
IN KPROCESSOR_MODE AccessMode,
OUT PACCESS_MODE GrantedAccess);
*/
NTSTATUS STDCALL
ObCreateObject(OUT PHANDLE Handle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN POBJECT_TYPE Type,
OUT PVOID *Object);
#if 0
/* original implementation */
NTSTATUS STDCALL
ObCreateObject(IN KPROCESSOR_MODE ObjectAttributesAccessMode OPTIONAL,
IN POBJECT_TYPE Type,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN KPROCESSOR_MODE AccessMode,
IN OUT PVOID ParseContext OPTIONAL,
IN ULONG ObjectSize,
IN ULONG PagedPoolCharge OPTIONAL,
IN ULONG NonPagedPoolCharge OPTIONAL,
OUT PVOID *Object);
#endif
VOID FASTCALL
ObfDereferenceObject(IN PVOID Object);
@ -61,14 +20,6 @@ ObfReferenceObject(IN PVOID Object);
#define ObReferenceObject(Object) \
ObfReferenceObject(Object)
/*
BOOLEAN STDCALL
ObFindHandleForObject(ULONG Param1,
ULONG Param2,
ULONG Param3,
ULONG Param4);
*/
ULONG STDCALL
ObGetObjectPointerCount(IN PVOID Object);

View file

@ -1666,4 +1666,11 @@ typedef struct _KINTERRUPT *PKINTERRUPT;
#endif /* __USE_W32API */
NTSTATUS STDCALL
ObRosCreateObject(OUT PHANDLE Handle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN POBJECT_TYPE Type,
OUT PVOID *Object);
#endif

View file

@ -8,12 +8,12 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <roscfg.h>
#include <internal/ob.h>
#include <limits.h>
#include <string.h>
//#include <internal/pool.h>
#include <internal/se.h>
#include <internal/registry.h>
@ -103,7 +103,7 @@ NtCreateKey(OUT PHANDLE KeyHandle,
DPRINT("RemainingPath %S ParentObject %x\n", RemainingPath.Buffer, Object);
Status = ObCreateObject(KeyHandle,
Status = ObRosCreateObject(KeyHandle,
DesiredAccess,
NULL,
CmiKeyType,

View file

@ -1,4 +1,4 @@
/* $Id: registry.c,v 1.103 2003/06/03 07:28:01 ekohl Exp $
/* $Id: registry.c,v 1.104 2003/06/07 12:17:19 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -11,7 +11,8 @@
* Created 22/05/98
*/
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <roscfg.h>
#include <limits.h>
#include <string.h>
@ -289,7 +290,7 @@ CmInitializeRegistry(VOID)
/* Create '\Registry' key. */
RtlInitUnicodeString(&KeyName, REG_ROOT_KEY_NAME);
InitializeObjectAttributes(&ObjectAttributes, &KeyName, 0, NULL, NULL);
Status = ObCreateObject(&RootKeyHandle,
Status = ObRosCreateObject(&RootKeyHandle,
STANDARD_RIGHTS_REQUIRED,
&ObjectAttributes,
CmiKeyType,
@ -542,7 +543,7 @@ CmiConnectHive(IN POBJECT_ATTRIBUTES KeyObjectAttributes,
DPRINT("RemainingPath %S ParentObject %x\n", RemainingPath.Buffer, Object);
Status = ObCreateObject(NULL,
Status = ObRosCreateObject(NULL,
STANDARD_RIGHTS_REQUIRED,
NULL,
CmiKeyType,
@ -554,7 +555,7 @@ CmiConnectHive(IN POBJECT_ATTRIBUTES KeyObjectAttributes,
if (!NT_SUCCESS(Status))
{
DPRINT1 ("ObCreateObject() failed (Status %lx)\n", Status);
DPRINT1 ("ObRosCreateObject() failed (Status %lx)\n", Status);
ObDereferenceObject (ParentKey);
return Status;
}

View file

@ -6,7 +6,8 @@
* UPDATE HISTORY:
*/
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <roscfg.h>
#include <internal/ob.h>
#include <limits.h>
@ -146,7 +147,7 @@ CmiObjectParse(PVOID ParsedObject,
/* Create new key object and put into linked list */
DPRINT("CmiObjectParse: %s\n", cPath);
Status = ObCreateObject(NULL,
Status = ObRosCreateObject(NULL,
STANDARD_RIGHTS_REQUIRED,
NULL,
CmiKeyType,

View file

@ -1,4 +1,4 @@
/* $Id: create.c,v 1.64 2003/05/22 00:47:04 gdalsnes Exp $
/* $Id: create.c,v 1.65 2003/06/07 12:17:19 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -11,7 +11,8 @@
/* INCLUDES ***************************************************************/
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <internal/ob.h>
#include <internal/io.h>
#include <internal/id.h>
@ -218,7 +219,7 @@ IoCreateStreamFileObject(PFILE_OBJECT FileObject,
assert_irql(PASSIVE_LEVEL);
Status = ObCreateObject(&FileHandle,
Status = ObRosCreateObject(&FileHandle,
STANDARD_RIGHTS_REQUIRED,
NULL,
IoFileObjectType,
@ -351,14 +352,14 @@ IoCreateFile(OUT PHANDLE FileHandle,
*FileHandle = 0;
Status = ObCreateObject(FileHandle,
Status = ObRosCreateObject(FileHandle,
DesiredAccess,
ObjectAttributes,
IoFileObjectType,
(PVOID*)&FileObject);
if (!NT_SUCCESS(Status))
{
DPRINT("ObCreateObject() failed! (Status %lx)\n", Status);
DPRINT("ObRosCreateObject() failed! (Status %lx)\n", Status);
return(Status);
}
if (CreateOptions & FILE_SYNCHRONOUS_IO_ALERT)

View file

@ -1,4 +1,4 @@
/* $Id: device.c,v 1.53 2003/06/04 21:35:37 gdalsnes Exp $
/* $Id: device.c,v 1.54 2003/06/07 12:17:20 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -11,7 +11,8 @@
/* INCLUDES ****************************************************************/
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <internal/io.h>
#include <internal/po.h>
#include <internal/ldr.h>
@ -284,7 +285,7 @@ IopCreateDriverObject(PDRIVER_OBJECT *DriverObject,
NULL);
/* Create module object */
Status = ObCreateObject(&DriverHandle,
Status = ObRosCreateObject(&DriverHandle,
STANDARD_RIGHTS_REQUIRED,
&ObjectAttributes,
IoDriverObjectType,
@ -659,7 +660,7 @@ IoCreateDevice(PDRIVER_OBJECT DriverObject,
if (DeviceName != NULL)
{
InitializeObjectAttributes(&ObjectAttributes,DeviceName,0,NULL,NULL);
Status = ObCreateObject(NULL,
Status = ObRosCreateObject(NULL,
0,
&ObjectAttributes,
IoDeviceObjectType,
@ -667,7 +668,7 @@ IoCreateDevice(PDRIVER_OBJECT DriverObject,
}
else
{
Status = ObCreateObject(NULL,
Status = ObRosCreateObject(NULL,
0,
NULL,
IoDeviceObjectType,
@ -678,7 +679,7 @@ IoCreateDevice(PDRIVER_OBJECT DriverObject,
if (!NT_SUCCESS(Status))
{
DPRINT("IoCreateDevice() ObCreateObject failed, status: 0x%08X\n", Status);
DPRINT("IoCreateDevice() ObRosCreateObject failed, status: 0x%08X\n", Status);
return(Status);
}

View file

@ -12,8 +12,9 @@
/* INCLUDES *****************************************************************/
#include <limits.h>
#include <ddk/ntddk.h>
#include <ntos/synch.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
//#include <ntos/synch.h>
#define NDEBUG
#include <internal/debug.h>
@ -113,7 +114,7 @@ NtCreateIoCompletion(
PKQUEUE Queue;
NTSTATUS Status;
Status = ObCreateObject(IoCompletionHandle,
Status = ObRosCreateObject(IoCompletionHandle,
DesiredAccess,
ObjectAttributes,
ExIoCompletionType,

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.def,v 1.154 2003/06/07 11:31:06 ekohl Exp $
; $Id: ntoskrnl.def,v 1.155 2003/06/07 12:17:19 chorns Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -595,8 +595,8 @@ NtWriteFile@36
ObAssignSecurity@16
;ObCheckCreateObjectAccess@28
;ObCheckObjectAccess@20
;ObCreateObject@36
ObCreateObject@20
ObCreateObject@36
ObRosCreateObject@20
;ObFindHandleForObject@20
ObGetObjectPointerCount@4
ObGetObjectSecurity@12

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.edf,v 1.140 2003/06/07 11:31:06 ekohl Exp $
; $Id: ntoskrnl.edf,v 1.141 2003/06/07 12:17:19 chorns Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -594,8 +594,8 @@ NtWriteFile=NtWriteFile@36
ObAssignSecurity=ObAssignSecurity@16
;ObCheckCreateObjectAccess=ObCheckCreateObjectAccess@28
;ObCheckObjectAccess=ObCheckObjectAccess@20
;ObCreateObject=ObCreateObject@36
ObCreateObject=ObCreateObject@20
ObCreateObject=ObCreateObject@36
ObRosCreateObject=ObRosCreateObject@20
;ObFindHandleForObject=ObFindHandleForObject@20
ObGetObjectPointerCount=ObGetObjectPointerCount@4
ObGetObjectSecurity=ObGetObjectSecurity@12