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): Add.
	* 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=4867
This commit is contained in:
Casper Hornstrup 2003-06-07 12:23:14 +00:00
parent 1e6c809d07
commit 685119e0cd
18 changed files with 107 additions and 64 deletions

View file

@ -3,7 +3,7 @@
Changes for compiling with w32api
* include/ddk/obfuncs.h (ObCreateObject): Remove.
* include/ntos/zwtypes.h (ObRosCreateObject):
* include/ntos/zwtypes.h (ObRosCreateObject): Add.
* ntoskrnl/ntoskrnl.def, ntoskrnl/ntoskrnl.edf: Export ObCreateObject@36
and ObRosCreateObject@20.
* ntoskrnl/cm/ntfunc.c, ntoskrnl/cm/registry.c, ntoskrnl/cm/regobj.c,

View file

@ -1,4 +1,4 @@
/* $Id: connect.c,v 1.15 2003/01/11 15:33:49 hbirr Exp $
/* $Id: connect.c,v 1.16 2003/06/07 12:23:14 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/port.h>
#include <internal/dbg.h>
@ -62,7 +63,7 @@ EiConnectPort(IN PEPORT* ConnectedPort,
/*
* Create a port to represent our side of the connection
*/
Status = ObCreateObject (NULL,
Status = ObRosCreateObject (NULL,
PORT_ALL_ACCESS,
NULL,
ExPortType,
@ -547,7 +548,7 @@ NtAcceptConnectPort (PHANDLE ServerPortHandle,
*/
if (AcceptIt)
{
Status = ObCreateObject(ServerPortHandle,
Status = ObRosCreateObject(ServerPortHandle,
PORT_ALL_ACCESS,
NULL,
ExPortType,

View file

@ -1,4 +1,4 @@
/* $Id: create.c,v 1.9 2002/09/08 10:23:32 chorns Exp $
/* $Id: create.c,v 1.10 2003/06/07 12:23:14 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/port.h>
#include <internal/dbg.h>
@ -113,7 +114,7 @@ NtCreatePort (PHANDLE PortHandle,
return (Status);
}
/* Ask Ob to create the object */
Status = ObCreateObject (PortHandle,
Status = ObRosCreateObject (PortHandle,
PORT_ALL_ACCESS,
ObjectAttributes,
ExPortType,

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: section.c,v 1.115 2003/06/07 11:34:36 chorns Exp $
/* $Id: section.c,v 1.116 2003/06/07 12:23:14 chorns Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/section.c
@ -29,7 +29,8 @@
/* INCLUDES *****************************************************************/
#include <limits.h>
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <internal/mm.h>
#include <internal/io.h>
#include <internal/ps.h>
@ -2090,7 +2091,7 @@ MmCreatePageFileSection(PHANDLE SectionHandle,
/*
* Create the section
*/
Status = ObCreateObject(SectionHandle,
Status = ObRosCreateObject(SectionHandle,
DesiredAccess,
ObjectAttributes,
MmSectionObjectType,
@ -2186,7 +2187,7 @@ MmCreateDataFileSection(PHANDLE SectionHandle,
/*
* Create the section
*/
Status = ObCreateObject(SectionHandle,
Status = ObRosCreateObject(SectionHandle,
DesiredAccess,
ObjectAttributes,
MmSectionObjectType,
@ -2555,7 +2556,7 @@ MmCreateImageSection(PHANDLE SectionHandle,
/*
* Create the section
*/
Status = ObCreateObject(SectionHandle,
Status = ObRosCreateObject(SectionHandle,
DesiredAccess,
ObjectAttributes,
MmSectionObjectType,

View file

@ -1,4 +1,4 @@
/* $Id: evtpair.c,v 1.13 2002/09/08 10:23:38 chorns Exp $
/* $Id: evtpair.c,v 1.14 2003/06/07 12:23:14 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 <ntos/synch.h>
#include <limits.h>
@ -83,7 +84,7 @@ NtCreateEventPair(OUT PHANDLE EventPairHandle,
NTSTATUS Status;
DPRINT("NtCreateEventPair()\n");
Status = ObCreateObject(EventPairHandle,
Status = ObRosCreateObject(EventPairHandle,
DesiredAccess,
ObjectAttributes,
ExEventPairObjectType,

View file

@ -29,7 +29,8 @@
/* INCLUDES *****************************************************************/
#include <limits.h>
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <ntos/synch.h>
#define NDEBUG
@ -113,7 +114,7 @@ NtCreateMutant(OUT PHANDLE MutantHandle,
PKMUTEX Mutant;
NTSTATUS Status;
Status = ObCreateObject(MutantHandle,
Status = ObRosCreateObject(MutantHandle,
DesiredAccess,
ObjectAttributes,
ExMutantObjectType,

View file

@ -28,7 +28,8 @@
/* INCLUDES *****************************************************************/
#include <limits.h>
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <internal/id.h>
#include <ntos/synch.h>
#include <internal/pool.h>
@ -146,7 +147,7 @@ NtCreateEvent(OUT PHANDLE UnsafeEventHandle,
ObjectAttributes = NULL;
}
Status = ObCreateObject(&EventHandle,
Status = ObRosCreateObject(&EventHandle,
DesiredAccess,
ObjectAttributes,
ExEventObjectType,

View file

@ -1,4 +1,4 @@
/* $Id: ntsem.c,v 1.17 2002/09/08 10:23:38 chorns Exp $
/* $Id: ntsem.c,v 1.18 2003/06/07 12:23:14 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -12,7 +12,8 @@
/* INCLUDES *****************************************************************/
#include <limits.h>
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <ntos/synch.h>
#include <internal/pool.h>
#include <internal/ps.h>
@ -85,7 +86,7 @@ NtCreateSemaphore(OUT PHANDLE SemaphoreHandle,
PKSEMAPHORE Semaphore;
NTSTATUS Status;
Status = ObCreateObject(SemaphoreHandle,
Status = ObRosCreateObject(SemaphoreHandle,
DesiredAccess,
ObjectAttributes,
ExSemaphoreType,

View file

@ -1,4 +1,4 @@
/* $Id: nttimer.c,v 1.18 2003/06/05 23:36:48 gdalsnes Exp $
/* $Id: nttimer.c,v 1.19 2003/06/07 12:23:14 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 <ntos/synch.h>
#include <internal/ke.h>
#include <limits.h>
@ -191,7 +192,7 @@ NtCreateTimer(OUT PHANDLE TimerHandle,
NTSTATUS Status;
DPRINT("NtCreateTimer()\n");
Status = ObCreateObject(TimerHandle,
Status = ObRosCreateObject(TimerHandle,
DesiredAccess,
ObjectAttributes,
ExTimerType,

View file

@ -27,7 +27,8 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <internal/mm.h>
#include <internal/ps.h>
#include <internal/pool.h>
@ -457,7 +458,7 @@ NtCreateProfile(OUT PHANDLE UnsafeProfileHandle,
/*
* Create the object
*/
Status = ObCreateObject(&ProfileHandle,
Status = ObRosCreateObject(&ProfileHandle,
STANDARD_RIGHTS_ALL,
NULL,
ExProfileObjectType,

View file

@ -1,4 +1,4 @@
/* $Id: dirobj.c,v 1.17 2003/06/02 10:03:52 ekohl Exp $
/* $Id: dirobj.c,v 1.18 2003/06/07 12:23:14 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>
@ -339,7 +340,7 @@ NtCreateDirectoryObject (OUT PHANDLE DirectoryHandle,
DirectoryHandle, DesiredAccess, ObjectAttributes,
ObjectAttributes->ObjectName);
return(ObCreateObject(DirectoryHandle,
return(ObRosCreateObject(DirectoryHandle,
DesiredAccess,
ObjectAttributes,
ObDirectoryType,

View file

@ -1,4 +1,4 @@
/* $Id: namespc.c,v 1.37 2003/05/12 13:59:09 ekohl Exp $
/* $Id: namespc.c,v 1.38 2003/06/07 12:23:14 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -12,7 +12,8 @@
/* INCLUDES ***************************************************************/
#include <limits.h>
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <internal/ob.h>
#include <internal/io.h>
#include <internal/pool.h>
@ -393,7 +394,7 @@ ObInit(VOID)
L"ObjectType");
/* create root directory */
ObCreateObject(NULL,
ObRosCreateObject(NULL,
STANDARD_RIGHTS_REQUIRED,
NULL,
ObDirectoryType,
@ -407,7 +408,7 @@ ObInit(VOID)
OBJ_PERMANENT,
NULL,
NULL);
ObCreateObject(NULL,
ObRosCreateObject(NULL,
STANDARD_RIGHTS_REQUIRED,
&ObjectAttributes,
ObDirectoryType,
@ -441,7 +442,7 @@ ObpCreateTypeObject(POBJECT_TYPE ObjectType)
OBJ_PERMANENT,
NULL,
NULL);
Status = ObCreateObject(NULL,
Status = ObRosCreateObject(NULL,
STANDARD_RIGHTS_REQUIRED,
&ObjectAttributes,
ObTypeObjectType,

View file

@ -1,4 +1,4 @@
/* $Id: object.c,v 1.62 2003/06/02 16:49:33 ekohl Exp $
/* $Id: object.c,v 1.63 2003/06/07 12:23:14 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 <roscfg.h>
#include <internal/ob.h>
#include <internal/ps.h>
@ -337,16 +338,18 @@ ObQueryNameString (IN PVOID Object,
/**********************************************************************
* NAME EXPORTED
* ObCreateObject@36
* ObRosCreateObject@20
*
* DESCRIPTION
*
* ARGUMENTS
*
* NOTE
* Internal ReactOS function
* RETURN VALUE
*/
NTSTATUS STDCALL
ObCreateObject (OUT PHANDLE Handle,
ObRosCreateObject (OUT PHANDLE Handle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN POBJECT_TYPE Type,
@ -362,7 +365,7 @@ ObCreateObject (OUT PHANDLE Handle,
assert_irql(APC_LEVEL);
DPRINT("ObCreateObject(Handle %x, ObjectAttributes %x, Type %x)\n",
DPRINT("ObRosCreateObject(Handle %x, ObjectAttributes %x, Type %x)\n",
Handle, ObjectAttributes, Type);
if (ObjectAttributes != NULL &&
@ -459,6 +462,30 @@ ObCreateObject (OUT PHANDLE Handle,
return(STATUS_SUCCESS);
}
/**********************************************************************
* NAME EXPORTED
* ObCreateObject@36
*
* DESCRIPTION
*
* ARGUMENTS
*
* RETURN VALUE
*/
NTSTATUS STDCALL
ObCreateObject (IN KPROCESSOR_MODE ObjectAttributesAccessMode OPTIONAL,
IN POBJECT_TYPE ObjectType,
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)
{
UNIMPLEMENTED
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS STDCALL
ObReferenceObjectByPointer(IN PVOID Object,

View file

@ -1,4 +1,4 @@
/* $Id: symlink.c,v 1.1 2003/02/25 16:49:08 ekohl Exp $
/* $Id: symlink.c,v 1.2 2003/06/07 12:23:14 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -12,7 +12,8 @@
/* INCLUDES *****************************************************************/
#include <limits.h>
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <internal/ob.h>
#define NDEBUG
@ -227,7 +228,7 @@ NtCreateSymbolicLinkObject(OUT PHANDLE SymbolicLinkHandle,
ObjectAttributes,
DeviceName);
Status = ObCreateObject(SymbolicLinkHandle,
Status = ObRosCreateObject(SymbolicLinkHandle,
DesiredAccess,
ObjectAttributes,
ObSymbolicLinkType,

View file

@ -1,4 +1,4 @@
/* $Id: create.c,v 1.60 2003/06/05 23:36:35 gdalsnes Exp $
/* $Id: create.c,v 1.61 2003/06/07 12:23:14 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -20,7 +20,8 @@
/* INCLUDES ****************************************************************/
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <internal/ke.h>
#include <internal/ob.h>
#include <internal/ps.h>
@ -356,7 +357,7 @@ PsInitializeThread(HANDLE ProcessHandle,
/*
* Create and initialize thread
*/
Status = ObCreateObject(ThreadHandle,
Status = ObRosCreateObject(ThreadHandle,
DesiredAccess,
ThreadAttributes,
PsThreadType,

View file

@ -1,4 +1,4 @@
/* $Id: process.c,v 1.106 2003/06/05 22:45:22 gdalsnes Exp $
/* $Id: process.c,v 1.107 2003/06/07 12:23:14 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -12,7 +12,8 @@
/* INCLUDES ******************************************************************/
#include <limits.h>
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <internal/ob.h>
#include <internal/mm.h>
#include <internal/ke.h>
@ -233,7 +234,7 @@ PsInitProcessManagment(VOID)
/*
* Initialize the system process
*/
Status = ObCreateObject(NULL,
Status = ObRosCreateObject(NULL,
PROCESS_ALL_ACCESS,
NULL,
PsProcessType,
@ -500,7 +501,7 @@ NtCreateProcess(OUT PHANDLE ProcessHandle,
return(Status);
}
Status = ObCreateObject(ProcessHandle,
Status = ObRosCreateObject(ProcessHandle,
DesiredAccess,
ObjectAttributes,
PsProcessType,
@ -508,7 +509,7 @@ NtCreateProcess(OUT PHANDLE ProcessHandle,
if (!NT_SUCCESS(Status))
{
ObDereferenceObject(ParentProcess);
DPRINT("ObCreateObject() = %x\n",Status);
DPRINT("ObRosCreateObject() = %x\n",Status);
return(Status);
}

View file

@ -1,4 +1,4 @@
/* $Id: token.c,v 1.23 2003/05/31 11:10:30 ekohl Exp $
/* $Id: token.c,v 1.24 2003/06/07 12:23:14 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -12,7 +12,8 @@
/* INCLUDES *****************************************************************/
#include <limits.h>
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <internal/ps.h>
#include <internal/se.h>
#include <internal/safe.h>
@ -144,14 +145,14 @@ SepDuplicateToken(PACCESS_TOKEN Token,
PACCESS_TOKEN AccessToken;
Status = ObCreateObject(0,
Status = ObRosCreateObject(0,
TOKEN_ALL_ACCESS,
ObjectAttributes,
SepTokenObjectType,
(PVOID*)&AccessToken);
if (!NT_SUCCESS(Status))
{
DPRINT1("ObCreateObject() failed (Status %lx)\n");
DPRINT1("ObRosCreateObject() failed (Status %lx)\n");
return(Status);
}
@ -970,7 +971,7 @@ SepCreateSystemProcessToken(struct _EPROCESS* Process)
/*
* Initialize the token
*/
Status = ObCreateObject(NULL,
Status = ObRosCreateObject(NULL,
TOKEN_ALL_ACCESS,
NULL,
SepTokenObjectType,
@ -1186,14 +1187,14 @@ NtCreateToken(OUT PHANDLE UnsafeTokenHandle,
if (!NT_SUCCESS(Status))
return(Status);
Status = ObCreateObject(&TokenHandle,
Status = ObRosCreateObject(&TokenHandle,
DesiredAccess,
ObjectAttributes,
SepTokenObjectType,
(PVOID*)&AccessToken);
if (!NT_SUCCESS(Status))
{
DPRINT1("ObCreateObject() failed (Status %lx)\n");
DPRINT1("ObRosCreateObject() failed (Status %lx)\n");
return(Status);
}
@ -1218,7 +1219,7 @@ NtCreateToken(OUT PHANDLE UnsafeTokenHandle,
/*
* Normally we would just point these members into the variable information
* area; however, our ObCreateObject() call can't allocate a variable information
* area; however, our ObRosCreateObject() call can't allocate a variable information
* area, so we allocate them seperately and provide a destroy function.
*/

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: winsta.c,v 1.13 2003/05/18 17:16:17 ea Exp $
/* $Id: winsta.c,v 1.14 2003/06/07 12:23:14 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -35,7 +35,8 @@
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
#define NTOS_MODE_KERNEL
#include <ntos.h>
#include <ddk/ntddmou.h>
#include <win32k/win32k.h>
#include <include/winsta.h>
@ -276,7 +277,7 @@ NtUserCreateWindowStation(PUNICODE_STRING lpszWindowStationName,
DPRINT("Creating window station (%wZ)\n", &WindowStationName);
Status = ObCreateObject(&WinSta,
Status = ObRosCreateObject(&WinSta,
STANDARD_RIGHTS_REQUIRED,
&ObjectAttributes,
ExWindowStationObjectType,
@ -593,7 +594,7 @@ NtUserCreateDesktop(PUNICODE_STRING lpszDesktopName,
DPRINT("Status for open operation (0x%X)\n", Status);
Status = ObCreateObject(&Desktop,
Status = ObRosCreateObject(&Desktop,
STANDARD_RIGHTS_REQUIRED,
&ObjectAttributes,
ExDesktopObjectType,