From c872f735ba188927d72cf1dd47fd683ac652a655 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Thu, 8 Jun 2006 06:31:16 +0000 Subject: [PATCH] - [FORMATTING] Add function comment headers. svn path=/trunk/; revision=22281 --- reactos/ntoskrnl/ob/obhandle.c | 248 +++++++++++++++++++++++++++++++-- 1 file changed, 235 insertions(+), 13 deletions(-) diff --git a/reactos/ntoskrnl/ob/obhandle.c b/reactos/ntoskrnl/ob/obhandle.c index c4be069e13b..2690b146013 100644 --- a/reactos/ntoskrnl/ob/obhandle.c +++ b/reactos/ntoskrnl/ob/obhandle.c @@ -351,6 +351,34 @@ ObpDeleteHandle(HANDLE Handle) return Status; } +/*++ +* @name ObpIncrementHandleCount +* +* The ObpIncrementHandleCount routine +* +* @param Object +* . +* +* @param AccessState +* . +* +* @param AccessMode +* . +* +* @param HandleAttributes +* . +* +* @param Process +* . +* +* @param OpenReason +* . +* +* @return . +* +* @remarks None. +* +*--*/ NTSTATUS NTAPI ObpIncrementHandleCount(IN PVOID Object, @@ -453,14 +481,51 @@ ObpIncrementHandleCount(IN PVOID Object, return STATUS_SUCCESS; } +/*++ +* @name ObpCreateHandle +* +* The ObpCreateHandle routine +* +* @param OpenReason +* . +* +* @param Object +* . +* +* @param Type +* . +* +* @param AccessState +* . +* +* @param AdditionalReferences +* . +* +* @param HandleAttributes +* . +* +* @param AccessMode +* . +* +* @param ReturnedObject +* . +* +* @param ReturnedHandle +* . +* +* @return . +* +* @remarks Gloomy says OpenReason is "enables Security" if == 1. +* since this function *has* to call ObpIncrementHandleCount, +* which needs to somehow know the OpenReason, and since +* ObOpenHandle == 1, I'm guessing this is actually the +* OpenReason. Also makes sense since this function is shared +* by Duplication, Creation and Opening.. +* +*--*/ NTSTATUS NTAPI -ObpCreateHandle(IN OB_OPEN_REASON OpenReason, // Gloomy says this is "enables Security" if == 1. - // since this function *has* to call ObpIncrementHandleCount, - // which needs to somehow know the OpenReason, and since - // ObOpenHandle == 1, I'm guessing this is actually the - // OpenReason. Also makes sense since this function is shared - // by Duplication, Creation and Opening. +ObpCreateHandle(IN OB_OPEN_REASON OpenReason, IN PVOID Object, IN POBJECT_TYPE Type OPTIONAL, IN PACCESS_STATE AccessState, @@ -663,6 +728,28 @@ ObpSetHandleAttributes(IN PHANDLE_TABLE HandleTable, return TRUE; } +/*++ +* @name ObpCloseHandleCallback +* +* The ObpCloseHandleCallback routine +* +* @param HandleTable +* . +* +* @param Object +* . +* +* @param GrantedAccess +* . +* +* @param Context +* . +* +* @return . +* +* @remarks None. +* +*--*/ VOID NTAPI ObpCloseHandleCallback(IN PHANDLE_TABLE HandleTable, @@ -678,6 +765,25 @@ ObpCloseHandleCallback(IN PHANDLE_TABLE HandleTable, GrantedAccess); } +/*++ +* @name ObpDuplicateHandleCallback +* +* The ObpDuplicateHandleCallback routine +* +* @param HandleTable +* . +* +* @param HandleTableEntry +* . +* +* @param Context +* . +* +* @return . +* +* @remarks None. +* +*--*/ BOOLEAN NTAPI ObpDuplicateHandleCallback(IN PHANDLE_TABLE HandleTable, @@ -723,6 +829,22 @@ ObpDuplicateHandleCallback(IN PHANDLE_TABLE HandleTable, return Ret; } +/*++ +* @name ObpCreateHandleTable +* +* The ObpCreateHandleTable routine +* +* @param Parent +* . +* +* @param Process +* . +* +* @return . +* +* @remarks None. +* +*--*/ NTSTATUS NTAPI ObpCreateHandleTable(IN PEPROCESS Parent, @@ -754,6 +876,19 @@ ObpCreateHandleTable(IN PEPROCESS Parent, return STATUS_SUCCESS; } +/*++ +* @name ObKillProcess +* +* The ObKillProcess routine +* +* @param Process +* . +* +* @return None. +* +* @remarks None. +* +*--*/ VOID NTAPI ObKillProcess(IN PEPROCESS Process) @@ -935,6 +1070,38 @@ ObDuplicateObject(PEPROCESS SourceProcess, /* PUBLIC FUNCTIONS *********************************************************/ +/*++ +* @name ObOpenObjectByName +* @implemented NT4 +* +* The ObOpenObjectByName routine +* +* @param ObjectAttributes +* . +* +* @param ObjectType +* . +* +* @param AccessMode +* . +* +* @param PassedAccessState +* . +* +* @param DesiredAccess +* . +* +* @param ParseContext +* . +* +* @param Handle +* . +* +* @return . +* +* @remarks None. +* +*--*/ NTSTATUS NTAPI ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes, @@ -1047,9 +1214,38 @@ Quickie: return Status; } -/* -* @implemented -*/ +/*++ +* @name ObOpenObjectByPointer +* @implemented NT4 +* +* The ObOpenObjectByPointer routine +* +* @param Object +* . +* +* @param HandleAttributes +* . +* +* @param PassedAccessState +* . +* +* @param DesiredAccess +* . +* +* @param ObjectType +* . +* +* @param AccessMode +* . +* +* @param Handle +* . +* +* @return . +* +* @remarks None. +* +*--*/ NTSTATUS NTAPI ObOpenObjectByPointer(IN PVOID Object, @@ -1149,16 +1345,42 @@ ObMakeTemporaryObject(IN PVOID ObjectBody) ObpSetPermanentObject (ObjectBody, FALSE); } -/* -* @implemented -*/ +/*++ +* @name ObInsertObject +* @implemented NT4 +* +* The ObInsertObject routine +* +* @param Object +* . +* +* @param PassedAccessState +* . +* +* @param DesiredAccess +* . +* +* @param AdditionalReferences +* . +* +* @param ReferencedObject +* . +* +* @param Handle +* . +* +* @return . +* +* @remarks None. +* +*--*/ NTSTATUS NTAPI ObInsertObject(IN PVOID Object, IN PACCESS_STATE PassedAccessState OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG AdditionalReferences, - OUT PVOID* ReferencedObject OPTIONAL, + OUT PVOID *ReferencedObject OPTIONAL, OUT PHANDLE Handle) { POBJECT_CREATE_INFORMATION ObjectCreateInfo;