From: Eric Kohl Date: Wed, 6 Mar 2002 12:40:47 +0000 (+0000) Subject: Handles are no longer used to create type objects. X-Git-Tag: backups/mpw@12443~267 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=dfbd52f882457c217a6f77f15d64f8ea70f4ec0b Handles are no longer used to create type objects. svn path=/trunk/; revision=2675 --- diff --git a/reactos/ntoskrnl/ob/namespc.c b/reactos/ntoskrnl/ob/namespc.c index 04aa69e19c5..1abe482bc01 100644 --- a/reactos/ntoskrnl/ob/namespc.c +++ b/reactos/ntoskrnl/ob/namespc.c @@ -1,4 +1,4 @@ -/* $Id: namespc.c,v 1.29 2002/03/01 00:47:40 ekohl Exp $ +/* $Id: namespc.c,v 1.30 2002/03/06 12:40:47 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -413,28 +413,13 @@ NTSTATUS ObpCreateTypeObject(POBJECT_TYPE ObjectType) { OBJECT_ATTRIBUTES ObjectAttributes; - WCHAR NameString[80]; + WCHAR NameString[120]; PTYPE_OBJECT TypeObject = NULL; UNICODE_STRING Name; - HANDLE TypesDir; NTSTATUS Status; - RtlInitUnicodeString(&Name, - L"\\ObjectTypes"); - InitializeObjectAttributes(&ObjectAttributes, - &Name, - 0, - NULL, - NULL); - - Status = NtOpenDirectoryObject(&TypesDir, - STANDARD_RIGHTS_REQUIRED, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - return(Status); - DPRINT("ObjectType: %wZ\n", &ObjectType->TypeName); - wcscpy(NameString, L"\\"); + wcscpy(NameString, L"\\ObjectTypes\\"); wcscat(NameString, ObjectType->TypeName.Buffer); RtlInitUnicodeString(&Name, NameString); @@ -442,7 +427,7 @@ ObpCreateTypeObject(POBJECT_TYPE ObjectType) InitializeObjectAttributes(&ObjectAttributes, &Name, OBJ_PERMANENT, - TypesDir, + NULL, NULL); Status = ObCreateObject(NULL, STANDARD_RIGHTS_REQUIRED, @@ -454,8 +439,6 @@ ObpCreateTypeObject(POBJECT_TYPE ObjectType) TypeObject->ObjectType = ObjectType; } - NtClose(TypesDir); - return(STATUS_SUCCESS); }