Author: ion Date: Thu Jun 8 23:00:22 2006 New Revision: 22286
URL: http://svn.reactos.ru/svn/reactos?rev=22286&view=rev Log: - Kill a bunch of deprecated hacks, because removing hacks is always cool!
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c trunk/reactos/ntoskrnl/ex/win32k.c trunk/reactos/ntoskrnl/ob/obhandle.c trunk/reactos/ntoskrnl/ob/obname.c trunk/reactos/ntoskrnl/ps/win32.c trunk/reactos/subsystems/win32/win32k/main/dllmain.c trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=22... ============================================================================== --- trunk/reactos/ntoskrnl/ex/sysinfo.c (original) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c Thu Jun 8 23:00:22 2006 @@ -839,11 +839,6 @@ }
-VOID -ObpGetNextHandleByProcessCount(PSYSTEM_HANDLE_TABLE_ENTRY_INFO pshi, - PEPROCESS Process, - int Count); - /* Class 16 - Handle Information */ QSI_DEF(SystemHandleInformation) { @@ -910,7 +905,7 @@
for (Count = 0; HandleCount > 0 ; HandleCount--) { - ObpGetNextHandleByProcessCount( &Shi->Handles[i], pr, Count); + Shi->Handles[i].UniqueProcessId = (ULONG)pr->UniqueProcessId; Count++; i++; }
Modified: trunk/reactos/ntoskrnl/ex/win32k.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ex/win32k.c?rev=222... ============================================================================== --- trunk/reactos/ntoskrnl/ex/win32k.c (original) +++ trunk/reactos/ntoskrnl/ex/win32k.c Thu Jun 8 23:00:22 2006 @@ -35,33 +35,11 @@ STANDARD_RIGHTS_REQUIRED };
-PKWIN32_OPENMETHOD_CALLOUT ExpWindowStationObjectOpen = NULL; PKWIN32_PARSEMETHOD_CALLOUT ExpWindowStationObjectParse = NULL; PKWIN32_DELETEMETHOD_CALLOUT ExpWindowStationObjectDelete = NULL; PKWIN32_DELETEMETHOD_CALLOUT ExpDesktopObjectDelete = NULL;
/* FUNCTIONS ****************************************************************/ - -NTSTATUS -STDCALL -ExpWinStaObjectOpen(OB_OPEN_REASON Reason, - PEPROCESS Process, - PVOID ObjectBody, - ACCESS_MASK GrantedAccess, - ULONG HandleCount) -{ - WIN32_OPENMETHOD_PARAMETERS Parameters; - - /* Fill out the callback structure */ - Parameters.OpenReason = Reason; - Parameters.Process = Process; - Parameters.Object = ObjectBody; - Parameters.GrantedAccess = GrantedAccess; - Parameters.HandleCount = HandleCount; - - /* Call the Registered Callback */ - return ExpWindowStationObjectOpen(&Parameters); -}
VOID STDCALL @@ -134,7 +112,6 @@ ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer); ObjectTypeInitializer.GenericMapping = ExpWindowStationMapping; ObjectTypeInitializer.PoolType = NonPagedPool; - ObjectTypeInitializer.OpenProcedure = ExpWinStaObjectOpen; ObjectTypeInitializer.DeleteProcedure = ExpWinStaObjectDelete; ObjectTypeInitializer.ParseProcedure = ExpWinStaObjectParse; ObCreateObjectType(&Name, @@ -145,7 +122,6 @@ /* Create desktop object type */ RtlInitUnicodeString(&Name, L"Desktop"); ObjectTypeInitializer.GenericMapping = ExpDesktopMapping; - ObjectTypeInitializer.OpenProcedure = NULL; ObjectTypeInitializer.DeleteProcedure = ExpDesktopDelete; ObjectTypeInitializer.ParseProcedure = NULL; ObCreateObjectType(&Name,
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 Thu Jun 8 23:00:22 2006 @@ -316,14 +316,12 @@ /* Check if we have an open procedure */ if (ObjectType->TypeInfo.OpenProcedure) { -#if 0 /* Call it */ ObjectType->TypeInfo.OpenProcedure(OpenReason, Process, Object, AccessState->PreviouslyGrantedAccess, ProcessHandleCount); -#endif }
/* Increase total number of handles */ @@ -1459,31 +1457,6 @@ return Status; } } - else - { - /* - * OK, if we got here then that means we don't have a name, - * so RemainingPath.Buffer/RemainingPath would've been NULL - * under the old implemetantation, so just use NULL. - * If remaining path wouldn't have been NULL, then we would've - * called ObFindObject which already has this code. - * We basically kill 3-4 hacks and add 2 new ones. - */ - if (Header->Type == IoFileObjectType) - { - DPRINT("About to call Open Routine\n"); - if (Header->Type == IoFileObjectType) - { - /* TEMPORARY HACK. DO NOT TOUCH -- Alex */ - DPRINT("Calling IopCreateFile: %x\n", FoundObject); - Status = IopCreateFile(&Header->Body, - FoundObject, - NULL, - NULL); - DPRINT("Called IopCreateFile: %x\n", Status); - } - } - }
/* Now check if this object is being created */ if (FoundObject == Object)
Modified: trunk/reactos/ntoskrnl/ob/obname.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/obname.c?rev=222... ============================================================================== --- trunk/reactos/ntoskrnl/ob/obname.c (original) +++ trunk/reactos/ntoskrnl/ob/obname.c Thu Jun 8 23:00:22 2006 @@ -350,48 +350,33 @@ ObjectAttached = TRUE; }
- if ((Header->Type == IoFileObjectType) || - (Header->Type->TypeInfo.OpenProcedure != NULL)) - { - DPRINT("About to call Open Routine\n"); - if (Header->Type == IoFileObjectType) - { - /* TEMPORARY HACK. DO NOT TOUCH -- Alex */ - DPRINT("Calling IopCreateFile: %x\n", FoundObject); - Status = IopCreateFile(&Header->Body, - FoundObject, - RemainingPath->Buffer, - NULL); - DPRINT("Called IopCreateFile: %x\n", Status); - - } - else if (Header->Type->TypeInfo.OpenProcedure != NULL) - { - DPRINT("Calling %x\n", Header->Type->TypeInfo.OpenProcedure); - Status = Header->Type->TypeInfo.OpenProcedure(ObCreateHandle, - NULL, - &Header->Body, - 0, - 0); - } - - if (!NT_SUCCESS(Status)) - { - DPRINT("Create Failed\n"); - if (ObjectAttached == TRUE) - { - ObpDeleteEntryDirectory(Context); - } - if (FoundObject) - { - ObDereferenceObject(FoundObject); - } - RtlFreeUnicodeString(RemainingPath); - return Status; - } + if (Header->Type == IoFileObjectType) + { + /* TEMPORARY HACK. DO NOT TOUCH -- Alex */ + DPRINT("Calling IopCreateFile: %p %p %wZ\n", &Header->Body, FoundObject, RemainingPath); + Status = IopCreateFile(&Header->Body, + FoundObject, + RemainingPath->Buffer, + NULL); + DPRINT("Called IopCreateFile: %x\n", Status); + } + + if (!NT_SUCCESS(Status)) + { + DPRINT("Create Failed\n"); + if (ObjectAttached == TRUE) + { + ObpDeleteEntryDirectory(Context); + } + if (FoundObject) + { + ObDereferenceObject(FoundObject); + } + RtlFreeUnicodeString(RemainingPath); + return Status; } RtlFreeUnicodeString(RemainingPath); - *ReturnedObject = Insert; + *ReturnedObject = Insert; } else {
Modified: trunk/reactos/ntoskrnl/ps/win32.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ps/win32.c?rev=2228... ============================================================================== --- trunk/reactos/ntoskrnl/ps/win32.c (original) +++ trunk/reactos/ntoskrnl/ps/win32.c Thu Jun 8 23:00:22 2006 @@ -18,7 +18,6 @@
static PKWIN32_PROCESS_CALLOUT PspWin32ProcessCallback = NULL; static PKWIN32_THREAD_CALLOUT PspWin32ThreadCallback = NULL; -extern PKWIN32_OPENMETHOD_CALLOUT ExpWindowStationObjectOpen; extern PKWIN32_PARSEMETHOD_CALLOUT ExpWindowStationObjectParse; extern PKWIN32_DELETEMETHOD_CALLOUT ExpWindowStationObjectDelete; extern PKWIN32_DELETEMETHOD_CALLOUT ExpDesktopObjectDelete; @@ -56,7 +55,6 @@ { PspWin32ProcessCallback = CalloutData->ProcessCallout; PspWin32ThreadCallback = CalloutData->ThreadCallout; - ExpWindowStationObjectOpen = CalloutData->WindowStationOpenProcedure; ExpWindowStationObjectParse = CalloutData->WindowStationParseProcedure; ExpWindowStationObjectDelete = CalloutData->WindowStationDeleteProcedure; ExpDesktopObjectDelete = CalloutData->DesktopDeleteProcedure;
Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/subsystems/win32/win32k/main... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/main/dllmain.c (original) +++ trunk/reactos/subsystems/win32/win32k/main/dllmain.c Thu Jun 8 23:00:22 2006 @@ -359,7 +359,7 @@ { NTSTATUS Status; BOOLEAN Result; - WIN32_CALLOUTS_FPNS CalloutData; + WIN32_CALLOUTS_FPNS CalloutData = {0}; PVOID GlobalUserHeapBase = NULL;
/* @@ -380,7 +380,6 @@ /* * Register Object Manager Callbacks */ - CalloutData.WindowStationOpenProcedure = IntWinStaObjectOpen; CalloutData.WindowStationParseProcedure = IntWinStaObjectParse; CalloutData.WindowStationDeleteProcedure = IntWinStaObjectDelete; CalloutData.DesktopDeleteProcedure = IntDesktopObjectDelete;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntus... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c Thu Jun 8 23:00:22 2006 @@ -93,32 +93,6 @@ }
/* OBJECT CALLBACKS **********************************************************/ - -NTSTATUS -STDCALL -IntWinStaObjectOpen(PWIN32_OPENMETHOD_PARAMETERS Parameters) -{ - PWINSTATION_OBJECT WinSta = (PWINSTATION_OBJECT)Parameters->Object; - OB_OPEN_REASON Reason = Parameters->OpenReason; - NTSTATUS Status; - - if (Reason == ObCreateHandle) - { - DPRINT("Creating window station (0x%X)\n", WinSta); - - KeInitializeSpinLock(&WinSta->Lock); - - InitializeListHead(&WinSta->DesktopListHead); - - WinSta->AtomTable = NULL; - Status = RtlCreateAtomTable(37, &WinSta->AtomTable); - WinSta->SystemMenuTemplate = (HANDLE)0; - - DPRINT("Window station successfully created.\n"); - } - - return STATUS_SUCCESS; -}
VOID STDCALL IntWinStaObjectDelete(PWIN32_DELETEMETHOD_PARAMETERS Parameters) @@ -484,6 +458,14 @@ SetLastNtError(STATUS_INSUFFICIENT_RESOURCES); return 0; } + + KeInitializeSpinLock(&WindowStationObject->Lock); + + InitializeListHead(&WindowStationObject->DesktopListHead); + + WindowStationObject->AtomTable = NULL; + Status = RtlCreateAtomTable(37, &WindowStationObject->AtomTable); + WindowStationObject->SystemMenuTemplate = (HANDLE)0;
WindowStationObject->Name = WindowStationName;