Author: ion Date: Fri May 26 00:14:09 2006 New Revision: 22045
URL: http://svn.reactos.ru/svn/reactos?rev=22045&view=rev Log: - Remove ROS-internal object macros and use the public ones in obtypes.h instead.
Modified: trunk/reactos/ntoskrnl/cm/regobj.c trunk/reactos/ntoskrnl/include/internal/ob.h trunk/reactos/ntoskrnl/io/file.c trunk/reactos/ntoskrnl/ob/obdir.c trunk/reactos/ntoskrnl/ob/obhandle.c trunk/reactos/ntoskrnl/ob/obinit.c trunk/reactos/ntoskrnl/ob/oblife.c trunk/reactos/ntoskrnl/ob/obname.c trunk/reactos/ntoskrnl/ob/obref.c trunk/reactos/ntoskrnl/ob/security.c trunk/reactos/ntoskrnl/ob/wait.c trunk/reactos/ntoskrnl/se/semgr.c
Modified: trunk/reactos/ntoskrnl/cm/regobj.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/cm/regobj.c?rev=220... ============================================================================== --- trunk/reactos/ntoskrnl/cm/regobj.c (original) +++ trunk/reactos/ntoskrnl/cm/regobj.c Fri May 26 00:14:09 2006 @@ -515,7 +515,7 @@ else { /* KeyObject is the root key */ - Status = ObQueryNameString (HEADER_TO_OBJECT_NAME(BODY_TO_HEADER(KeyObject))->Directory, + Status = ObQueryNameString (OBJECT_HEADER_TO_NAME_INFO(OBJECT_TO_OBJECT_HEADER(KeyObject))->Directory, ObjectNameInfo, Length, ReturnLength);
Modified: trunk/reactos/ntoskrnl/include/internal/ob.h URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/include/internal/ob... ============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ob.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ob.h Fri May 26 00:14:09 2006 @@ -13,20 +13,6 @@ GENERIC_WRITE | \ GENERIC_EXECUTE | \ GENERIC_ALL) - -#define BODY_TO_HEADER(objbdy) \ - CONTAINING_RECORD((objbdy), OBJECT_HEADER, Body) - -#define HEADER_TO_OBJECT_NAME(objhdr) ((POBJECT_HEADER_NAME_INFO) \ - (!(objhdr)->NameInfoOffset ? NULL: ((PCHAR)(objhdr) - (objhdr)->NameInfoOffset))) - -#define HEADER_TO_HANDLE_INFO(objhdr) ((POBJECT_HEADER_HANDLE_INFO) \ - (!(objhdr)->HandleInfoOffset ? NULL: ((PCHAR)(objhdr) - (objhdr)->HandleInfoOffset))) - -#define HEADER_TO_CREATOR_INFO(objhdr) ((POBJECT_HEADER_CREATOR_INFO) \ - (!((objhdr)->Flags & OB_FLAG_CREATOR_INFO) ? NULL: ((PCHAR)(objhdr) - sizeof(OBJECT_HEADER_CREATOR_INFO)))) - -#define OBJECT_ALLOC_SIZE(ObjectSize) ((ObjectSize)+sizeof(OBJECT_HEADER))
#define KERNEL_HANDLE_FLAG (1 << ((sizeof(HANDLE) * 8) - 1)) #define ObIsKernelHandle(Handle, ProcessorMode) \ @@ -44,14 +30,6 @@ extern POBJECT_DIRECTORY NameSpaceRoot; extern POBJECT_DIRECTORY ObpTypeDirectoryObject; extern PHANDLE_TABLE ObpKernelHandleTable; - -typedef NTSTATUS -(NTAPI *OB_ROS_CREATE_METHOD)( - PVOID ObjectBody, - PVOID Parent, - PWSTR RemainingPath, - struct _OBJECT_ATTRIBUTES* ObjectAttributes -);
BOOLEAN NTAPI
Modified: trunk/reactos/ntoskrnl/io/file.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/io/file.c?rev=22045... ============================================================================== --- trunk/reactos/ntoskrnl/io/file.c (original) +++ trunk/reactos/ntoskrnl/io/file.c Fri May 26 00:14:09 2006 @@ -63,14 +63,14 @@ return(STATUS_SUCCESS); }
- ParentObjectType = BODY_TO_HEADER(Parent)->Type; + ParentObjectType = OBJECT_TO_OBJECT_HEADER(Parent)->Type;
if (ParentObjectType != IoDeviceObjectType && ParentObjectType != IoFileObjectType) { DPRINT("Parent [%wZ] is a %S which is neither a file type nor a device type ; remaining path = %S\n", - &HEADER_TO_OBJECT_NAME(BODY_TO_HEADER(Parent))->Name, - BODY_TO_HEADER(Parent)->Type->Name.Buffer, + &OBJECT_HEADER_TO_NAME_INFO(OBJECT_TO_OBJECT_HEADER(Parent))->Name, + OBJECT_TO_OBJECT_HEADER(Parent)->Type->Name.Buffer, RemainingPath); return(STATUS_UNSUCCESSFUL); } @@ -954,7 +954,7 @@ { return Status; } - if (BODY_TO_HEADER(DeviceObject)->Type != IoDeviceObjectType) + if (OBJECT_TO_OBJECT_HEADER(DeviceObject)->Type != IoDeviceObjectType) { ObDereferenceObject (DeviceObject); return STATUS_OBJECT_NAME_COLLISION; @@ -1022,7 +1022,7 @@ } } RtlMapGenericMask(&DesiredAccess, - &BODY_TO_HEADER(FileObject)->Type->TypeInfo.GenericMapping); + &OBJECT_TO_OBJECT_HEADER(FileObject)->Type->TypeInfo.GenericMapping);
Status = ObInsertObject ((PVOID)FileObject, NULL,
Modified: trunk/reactos/ntoskrnl/ob/obdir.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/obdir.c?rev=2204... ============================================================================== --- trunk/reactos/ntoskrnl/ob/obdir.c (original) +++ trunk/reactos/ntoskrnl/ob/obdir.c Fri May 26 00:14:09 2006 @@ -64,7 +64,7 @@ NewEntry->HashValue = Context->HashValue;
/* Get the Object Name Information */ - HeaderNameInfo = HEADER_TO_OBJECT_NAME(ObjectHeader); + HeaderNameInfo = OBJECT_HEADER_TO_NAME_INFO(ObjectHeader);
/* Get the Allocated entry */ AllocatedEntry = &Parent->HashBuckets[Context->HashIndex]; @@ -184,10 +184,10 @@ if (CurrentEntry->HashValue == HashValue) { /* Make sure that it has a name */ - ASSERT(BODY_TO_HEADER(CurrentEntry->Object)->NameInfoOffset != 0); + ASSERT(OBJECT_TO_OBJECT_HEADER(CurrentEntry->Object)->NameInfoOffset != 0);
/* Get the name information */ - HeaderNameInfo = HEADER_TO_OBJECT_NAME(BODY_TO_HEADER(CurrentEntry->Object)); + HeaderNameInfo = OBJECT_HEADER_TO_NAME_INFO(OBJECT_TO_OBJECT_HEADER(CurrentEntry->Object));
/* Do the names match? */ if ((Name->Length == HeaderNameInfo->Name.Length) &&
Modified: trunk/reactos/ntoskrnl/ob/obhandle.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/obhandle.c?rev=2... ============================================================================== --- trunk/reactos/ntoskrnl/ob/obhandle.c (original) +++ trunk/reactos/ntoskrnl/ob/obhandle.c Fri May 26 00:14:09 2006 @@ -45,7 +45,7 @@ POBJECT_HEADER ObjectHeader; OBP_LOOKUP_CONTEXT Context;
- ObjectHeader = BODY_TO_HEADER(ObjectBody); + ObjectHeader = OBJECT_TO_OBJECT_HEADER(ObjectBody); ASSERT (ObjectHeader->PointerCount > 0); if (Permanent) { @@ -55,13 +55,13 @@ { ObjectHeader->Flags &= ~OB_FLAG_PERMANENT; if (ObjectHeader->HandleCount == 0 && - HEADER_TO_OBJECT_NAME(ObjectHeader)->Directory) + OBJECT_HEADER_TO_NAME_INFO(ObjectHeader)->Directory) { /* Make sure it's still inserted */ - Context.Directory = HEADER_TO_OBJECT_NAME(ObjectHeader)->Directory; + Context.Directory = OBJECT_HEADER_TO_NAME_INFO(ObjectHeader)->Directory; Context.DirectoryLocked = TRUE; - if (ObpLookupEntryDirectory(HEADER_TO_OBJECT_NAME(ObjectHeader)->Directory, - &HEADER_TO_OBJECT_NAME(ObjectHeader)->Name, + if (ObpLookupEntryDirectory(OBJECT_HEADER_TO_NAME_INFO(ObjectHeader)->Directory, + &OBJECT_HEADER_TO_NAME_INFO(ObjectHeader)->Name, 0, FALSE, &Context)) @@ -111,12 +111,12 @@ static VOID ObpDecrementHandleCount(PVOID ObjectBody) { - POBJECT_HEADER ObjectHeader = BODY_TO_HEADER(ObjectBody); + POBJECT_HEADER ObjectHeader = OBJECT_TO_OBJECT_HEADER(ObjectBody); LONG NewHandleCount = InterlockedDecrement(&ObjectHeader->HandleCount); OBP_LOOKUP_CONTEXT Context; DPRINT("Header: %x\n", ObjectHeader); DPRINT("NewHandleCount: %x\n", NewHandleCount); - DPRINT("HEADER_TO_OBJECT_NAME: %x\n", HEADER_TO_OBJECT_NAME(ObjectHeader)); + DPRINT("OBJECT_HEADER_TO_NAME_INFO: %x\n", OBJECT_HEADER_TO_NAME_INFO(ObjectHeader));
if ((ObjectHeader->Type != NULL) && (ObjectHeader->Type->TypeInfo.CloseProcedure != NULL)) @@ -128,8 +128,8 @@
if(NewHandleCount == 0) { - if(HEADER_TO_OBJECT_NAME(ObjectHeader) && - HEADER_TO_OBJECT_NAME(ObjectHeader)->Directory != NULL && + if(OBJECT_HEADER_TO_NAME_INFO(ObjectHeader) && + OBJECT_HEADER_TO_NAME_INFO(ObjectHeader)->Directory != NULL && !(ObjectHeader->Flags & OB_FLAG_PERMANENT)) { /* delete the object from the namespace when the last handle got closed. @@ -137,10 +137,10 @@ if it's not a permanent object. */
/* Make sure it's still inserted */ - Context.Directory = HEADER_TO_OBJECT_NAME(ObjectHeader)->Directory; + Context.Directory = OBJECT_HEADER_TO_NAME_INFO(ObjectHeader)->Directory; Context.DirectoryLocked = TRUE; - if (ObpLookupEntryDirectory(HEADER_TO_OBJECT_NAME(ObjectHeader)->Directory, - &HEADER_TO_OBJECT_NAME(ObjectHeader)->Name, + if (ObpLookupEntryDirectory(OBJECT_HEADER_TO_NAME_INFO(ObjectHeader)->Directory, + &OBJECT_HEADER_TO_NAME_INFO(ObjectHeader)->Name, 0, FALSE, &Context)) @@ -599,7 +599,7 @@
CurrentProcess = PsGetCurrentProcess();
- ObjectHeader = BODY_TO_HEADER(ObjectBody); + ObjectHeader = OBJECT_TO_OBJECT_HEADER(ObjectBody);
/* check that this is a valid kernel pointer */ ASSERT((ULONG_PTR)ObjectHeader & EX_HANDLE_ENTRY_LOCKED); @@ -739,7 +739,7 @@ PAGED_CODE();
ASSERT(Object); - Header = BODY_TO_HEADER(Object); + Header = OBJECT_TO_OBJECT_HEADER(Object);
return Header->HandleCount; } @@ -935,9 +935,9 @@ PAGED_CODE();
/* Get the Header and Create Info */ - Header = BODY_TO_HEADER(Object); + Header = OBJECT_TO_OBJECT_HEADER(Object); ObjectCreateInfo = Header->ObjectCreateInfo; - ObjectNameInfo = HEADER_TO_OBJECT_NAME(Header); + ObjectNameInfo = OBJECT_HEADER_TO_NAME_INFO(Header);
/* First try to find the Object */ if (ObjectNameInfo && ObjectNameInfo->Name.Buffer) @@ -961,7 +961,7 @@ if (FoundObject) { DPRINT("Getting header: %x\n", FoundObject); - FoundHeader = BODY_TO_HEADER(FoundObject); + FoundHeader = OBJECT_TO_OBJECT_HEADER(FoundObject); }
if (FoundHeader && RemainingPath.Buffer == NULL) @@ -986,7 +986,7 @@ PWSTR BufferPos = RemainingPath.Buffer; ULONG Delta = 0;
- ObjectNameInfo = HEADER_TO_OBJECT_NAME(Header); + ObjectNameInfo = OBJECT_HEADER_TO_NAME_INFO(Header);
if (BufferPos[0] == L'\') {
Modified: trunk/reactos/ntoskrnl/ob/obinit.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/obinit.c?rev=220... ============================================================================== --- trunk/reactos/ntoskrnl/ob/obinit.c (original) +++ trunk/reactos/ntoskrnl/ob/obinit.c Fri May 26 00:14:09 2006 @@ -147,20 +147,20 @@ Context.Directory = ObpTypeDirectoryObject; Context.DirectoryLocked = TRUE; if (!ObpLookupEntryDirectory(ObpTypeDirectoryObject, - &HEADER_TO_OBJECT_NAME(BODY_TO_HEADER(ObTypeObjectType))->Name, + &OBJECT_HEADER_TO_NAME_INFO(OBJECT_TO_OBJECT_HEADER(ObTypeObjectType))->Name, OBJ_CASE_INSENSITIVE, FALSE, &Context)) { - ObpInsertEntryDirectory(ObpTypeDirectoryObject, &Context, BODY_TO_HEADER(ObTypeObjectType)); + ObpInsertEntryDirectory(ObpTypeDirectoryObject, &Context, OBJECT_TO_OBJECT_HEADER(ObTypeObjectType)); } if (!ObpLookupEntryDirectory(ObpTypeDirectoryObject, - &HEADER_TO_OBJECT_NAME(BODY_TO_HEADER(ObDirectoryType))->Name, + &OBJECT_HEADER_TO_NAME_INFO(OBJECT_TO_OBJECT_HEADER(ObDirectoryType))->Name, OBJ_CASE_INSENSITIVE, FALSE, &Context)) { - ObpInsertEntryDirectory(ObpTypeDirectoryObject, &Context, BODY_TO_HEADER(ObDirectoryType)); + ObpInsertEntryDirectory(ObpTypeDirectoryObject, &Context, OBJECT_TO_OBJECT_HEADER(ObDirectoryType)); }
/* Create 'symbolic link' object type */
Modified: trunk/reactos/ntoskrnl/ob/oblife.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?rev=220... ============================================================================== --- trunk/reactos/ntoskrnl/ob/oblife.c (original) +++ trunk/reactos/ntoskrnl/ob/oblife.c Fri May 26 00:14:09 2006 @@ -56,11 +56,11 @@ ObpRemoveSecurityDescriptor(Header->SecurityDescriptor); }
- if (HEADER_TO_OBJECT_NAME(Header)) - { - if(HEADER_TO_OBJECT_NAME(Header)->Name.Buffer) - { - ExFreePool(HEADER_TO_OBJECT_NAME(Header)->Name.Buffer); + if (OBJECT_HEADER_TO_NAME_INFO(Header)) + { + if(OBJECT_HEADER_TO_NAME_INFO(Header)->Name.Buffer) + { + ExFreePool(OBJECT_HEADER_TO_NAME_INFO(Header)->Name.Buffer); } } if (Header->ObjectCreateInfo) @@ -70,15 +70,15 @@ }
/* To find the header, walk backwards from how we allocated */ - if ((CreatorInfo = HEADER_TO_CREATOR_INFO(Header))) + if ((CreatorInfo = OBJECT_HEADER_TO_CREATOR_INFO(Header))) { HeaderLocation = CreatorInfo; } - if ((NameInfo = HEADER_TO_OBJECT_NAME(Header))) + if ((NameInfo = OBJECT_HEADER_TO_NAME_INFO(Header))) { HeaderLocation = NameInfo; } - if ((HandleInfo = HEADER_TO_HANDLE_INFO(Header))) + if ((HandleInfo = OBJECT_HEADER_TO_HANDLE_INFO(Header))) { HeaderLocation = HandleInfo; } @@ -557,7 +557,7 @@ Status = ObpAllocateObject(NULL, TypeName, ObTypeObjectType, - OBJECT_ALLOC_SIZE(sizeof(OBJECT_TYPE)), + sizeof(OBJECT_TYPE) + sizeof(OBJECT_HEADER), (POBJECT_HEADER*)&Header); if (!NT_SUCCESS(Status)) { @@ -686,10 +686,10 @@ POBJECT_CREATE_INFORMATION ObjectCreateInfo; UNICODE_STRING ObjectName; POBJECT_HEADER Header; - + DPRINT("ObCreateObject(Type %p ObjectAttributes %p, Object %p)\n", Type, ObjectAttributes, Object); - + /* Allocate a Buffer for the Object Create Info */ DPRINT("Allocating Create Buffer\n"); ObjectCreateInfo = ExAllocatePoolWithTag(NonPagedPool, @@ -703,17 +703,16 @@ Type, ObjectCreateInfo, &ObjectName); - + if (NT_SUCCESS(Status)) { /* Allocate the Object */ DPRINT("Allocating: %wZ\n", &ObjectName); Status = ObpAllocateObject(ObjectCreateInfo, &ObjectName, - Type, - OBJECT_ALLOC_SIZE(ObjectSize), + Type, + ObjectSize + sizeof(OBJECT_HEADER), &Header); - if (NT_SUCCESS(Status)) { /* Return the Object */ @@ -723,13 +722,13 @@ /* Return to caller, leave the Capture Info Alive for ObInsert */ return Status; } - + /* Release the Capture Info, we don't need it */ DPRINT1("Allocation failed\n"); ObpReleaseCapturedAttributes(ObjectCreateInfo); if (ObjectName.Buffer) ExFreePool(ObjectName.Buffer); } - + /* We failed, so release the Buffer */ DPRINT1("Capture failed\n"); ExFreePool(ObjectCreateInfo); @@ -785,7 +784,7 @@ &HandleInfo); if (!NT_SUCCESS (Status)) return Status;
- ObjectHeader = BODY_TO_HEADER(Object); + ObjectHeader = OBJECT_TO_OBJECT_HEADER(Object);
switch (ObjectInformationClass) {
Modified: trunk/reactos/ntoskrnl/ob/obname.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/obname.c?rev=220... ============================================================================== --- trunk/reactos/ntoskrnl/ob/obname.c (original) +++ trunk/reactos/ntoskrnl/ob/obname.c Fri May 26 00:14:09 2006 @@ -110,7 +110,7 @@
while (TRUE) { - CurrentHeader = BODY_TO_HEADER(CurrentObject); + CurrentHeader = OBJECT_TO_OBJECT_HEADER(CurrentObject);
/* Loop as long as we're dealing with a directory */ while (CurrentHeader->Type == ObDirectoryType) @@ -164,7 +164,7 @@ } ObDereferenceObject(CurrentObject); CurrentObject = NextObject; - CurrentHeader = BODY_TO_HEADER(CurrentObject); + CurrentHeader = OBJECT_TO_OBJECT_HEADER(CurrentObject); }
if (CurrentHeader->Type->TypeInfo.ParseProcedure == NULL) @@ -236,8 +236,8 @@ DPRINT("ObQueryNameString: %x, %x\n", Object, ObjectNameInfo);
/* Get the Kernel Meta-Structures */ - ObjectHeader = BODY_TO_HEADER(Object); - LocalInfo = HEADER_TO_OBJECT_NAME(ObjectHeader); + ObjectHeader = OBJECT_TO_OBJECT_HEADER(Object); + LocalInfo = OBJECT_HEADER_TO_NAME_INFO(ObjectHeader);
/* Check if a Query Name Procedure is available */ if (ObjectHeader->Type->TypeInfo.QueryNameProcedure) @@ -299,7 +299,7 @@ while ((ParentDirectory != NameSpaceRoot) && (ParentDirectory)) { /* Get the Name Information */ - LocalInfo = HEADER_TO_OBJECT_NAME(BODY_TO_HEADER(ParentDirectory)); + LocalInfo = OBJECT_HEADER_TO_NAME_INFO(OBJECT_TO_OBJECT_HEADER(ParentDirectory));
/* Add the size of the Directory Name */ if (LocalInfo && LocalInfo->Directory) @@ -336,7 +336,7 @@ * it's easier to start off from the Name we have and walk up the * parent directories. We use the same logic as Name Length calculation. */ - LocalInfo = HEADER_TO_OBJECT_NAME(ObjectHeader); + LocalInfo = OBJECT_HEADER_TO_NAME_INFO(ObjectHeader); ObjectName = (PWCH)((ULONG_PTR)ObjectNameInfo + *ReturnLength); *--ObjectName = UNICODE_NULL;
@@ -362,7 +362,7 @@ while ((ParentDirectory != NameSpaceRoot) && (ParentDirectory)) { /* Get the name information */ - LocalInfo = HEADER_TO_OBJECT_NAME(BODY_TO_HEADER(ParentDirectory)); + LocalInfo = OBJECT_HEADER_TO_NAME_INFO(OBJECT_TO_OBJECT_HEADER(ParentDirectory));
/* Add the "" */ *(--ObjectName) = OBJ_NAME_PATH_SEPARATOR;
Modified: trunk/reactos/ntoskrnl/ob/obref.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/obref.c?rev=2204... ============================================================================== --- trunk/reactos/ntoskrnl/ob/obref.c (original) +++ trunk/reactos/ntoskrnl/ob/obref.c Fri May 26 00:14:09 2006 @@ -77,7 +77,7 @@ PAGED_CODE();
ASSERT(Object); - Header = BODY_TO_HEADER(Object); + Header = OBJECT_TO_OBJECT_HEADER(Object);
return Header->PointerCount; } @@ -89,7 +89,7 @@
ASSERT(Object);
- Header = BODY_TO_HEADER(Object); + Header = OBJECT_TO_OBJECT_HEADER(Object);
/* No one should be referencing an object once we are deleting it. */ if (InterlockedIncrement(&Header->PointerCount) == 1 && !(Header->Flags & OB_FLAG_PERMANENT)) @@ -110,7 +110,7 @@ ASSERT(Object);
/* Extract the object header. */ - Header = BODY_TO_HEADER(Object); + Header = OBJECT_TO_OBJECT_HEADER(Object); Permanent = Header->Flags & OB_FLAG_PERMANENT;
/* @@ -142,16 +142,16 @@ DPRINT("ObReferenceObjectByPointer(Object %x, ObjectType %x)\n", Object,ObjectType);
- Header = BODY_TO_HEADER(Object); + Header = OBJECT_TO_OBJECT_HEADER(Object);
if (ObjectType != NULL && Header->Type != ObjectType) { DPRINT("Failed %p (type was %x %wZ) should be %x %wZ\n", Header, Header->Type, - &HEADER_TO_OBJECT_NAME(BODY_TO_HEADER(Header->Type))->Name, + &OBJECT_HEADER_TO_NAME_INFO(OBJECT_TO_OBJECT_HEADER(Header->Type))->Name, ObjectType, - &HEADER_TO_OBJECT_NAME(BODY_TO_HEADER(ObjectType))->Name); + &OBJECT_HEADER_TO_NAME_INFO(OBJECT_TO_OBJECT_HEADER(ObjectType))->Name); return(STATUS_UNSUCCESSFUL); } if (Header->Type == PsProcessType) @@ -409,7 +409,7 @@ if (DesiredAccess & GENERIC_ACCESS) { RtlMapGenericMask(&DesiredAccess, - &BODY_TO_HEADER(ObjectBody)->Type->TypeInfo.GenericMapping); + &OBJECT_TO_OBJECT_HEADER(ObjectBody)->Type->TypeInfo.GenericMapping); }
GrantedAccess = HandleEntry->GrantedAccess;
Modified: trunk/reactos/ntoskrnl/ob/security.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/security.c?rev=2... ============================================================================== --- trunk/reactos/ntoskrnl/ob/security.c (original) +++ trunk/reactos/ntoskrnl/ob/security.c Fri May 26 00:14:09 2006 @@ -105,7 +105,7 @@ NTSTATUS Status; PAGED_CODE();
- Header = BODY_TO_HEADER(Object); + Header = OBJECT_TO_OBJECT_HEADER(Object); if (Header->Type == NULL) return STATUS_UNSUCCESSFUL;
if (Header->Type->TypeInfo.SecurityProcedure == NULL) @@ -267,7 +267,7 @@
if (NT_SUCCESS(Status)) { - Header = BODY_TO_HEADER(Object); + Header = OBJECT_TO_OBJECT_HEADER(Object); ASSERT(Header->Type != NULL);
Status = Header->Type->TypeInfo.SecurityProcedure( @@ -376,7 +376,7 @@
if (NT_SUCCESS(Status)) { - Header = BODY_TO_HEADER(Object); + Header = OBJECT_TO_OBJECT_HEADER(Object); ASSERT(Header->Type != NULL);
Status = Header->Type->TypeInfo.SecurityProcedure(
Modified: trunk/reactos/ntoskrnl/ob/wait.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/wait.c?rev=22045... ============================================================================== --- trunk/reactos/ntoskrnl/ob/wait.c (original) +++ trunk/reactos/ntoskrnl/ob/wait.c Fri May 26 00:14:09 2006 @@ -335,7 +335,7 @@ if (NT_SUCCESS(Status)) { /* Get the Waitable Object */ - WaitableObject = BODY_TO_HEADER(Object)->Type->DefaultObject; + WaitableObject = OBJECT_TO_OBJECT_HEADER(Object)->Type->DefaultObject;
/* Is it an offset for internal objects? */ if (IsPointerOffset(WaitableObject)) @@ -452,7 +452,7 @@ }
/* Get the real waitable object */ - WaitableObject = BODY_TO_HEADER(WaitObj)->Type->DefaultObject; + WaitableObject = OBJECT_TO_OBJECT_HEADER(WaitObj)->Type->DefaultObject;
/* Handle internal offset */ if (IsPointerOffset(WaitableObject)) @@ -463,7 +463,7 @@ }
/* Check Signal Object Type */ - Type = BODY_TO_HEADER(WaitObj)->Type; + Type = OBJECT_TO_OBJECT_HEADER(WaitObj)->Type; if (Type == ExEventObjectType) { /* Set the Event */
Modified: trunk/reactos/ntoskrnl/se/semgr.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/se/semgr.c?rev=2204... ============================================================================== --- trunk/reactos/ntoskrnl/se/semgr.c (original) +++ trunk/reactos/ntoskrnl/se/semgr.c Fri May 26 00:14:09 2006 @@ -212,7 +212,7 @@ PISECURITY_DESCRIPTOR ObjectSd; PISECURITY_DESCRIPTOR NewSd; PISECURITY_DESCRIPTOR SecurityDescriptor = _SecurityDescriptor; - POBJECT_HEADER Header = BODY_TO_HEADER(Object); + POBJECT_HEADER Header = OBJECT_TO_OBJECT_HEADER(Object); PSID Owner = 0; PSID Group = 0; PACL Dacl = 0;