mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 07:56:59 +00:00
- Kill a bunch of deprecated hacks, because removing hacks is always cool!
svn path=/trunk/; revision=22286
This commit is contained in:
parent
1891e7787c
commit
1c378756d0
7 changed files with 30 additions and 122 deletions
|
@ -839,11 +839,6 @@ QSI_DEF(SystemNonPagedPoolInformation)
|
|||
}
|
||||
|
||||
|
||||
VOID
|
||||
ObpGetNextHandleByProcessCount(PSYSTEM_HANDLE_TABLE_ENTRY_INFO pshi,
|
||||
PEPROCESS Process,
|
||||
int Count);
|
||||
|
||||
/* Class 16 - Handle Information */
|
||||
QSI_DEF(SystemHandleInformation)
|
||||
{
|
||||
|
@ -910,7 +905,7 @@ QSI_DEF(SystemHandleInformation)
|
|||
|
||||
for (Count = 0; HandleCount > 0 ; HandleCount--)
|
||||
{
|
||||
ObpGetNextHandleByProcessCount( &Shi->Handles[i], pr, Count);
|
||||
Shi->Handles[i].UniqueProcessId = (ULONG)pr->UniqueProcessId;
|
||||
Count++;
|
||||
i++;
|
||||
}
|
||||
|
|
|
@ -35,34 +35,12 @@ GENERIC_MAPPING ExpDesktopMapping =
|
|||
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
|
||||
ExpWinStaObjectDelete(PVOID DeletedObject)
|
||||
|
@ -134,7 +112,6 @@ ExpWin32kInit(VOID)
|
|||
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 @@ ExpWin32kInit(VOID)
|
|||
/* Create desktop object type */
|
||||
RtlInitUnicodeString(&Name, L"Desktop");
|
||||
ObjectTypeInitializer.GenericMapping = ExpDesktopMapping;
|
||||
ObjectTypeInitializer.OpenProcedure = NULL;
|
||||
ObjectTypeInitializer.DeleteProcedure = ExpDesktopDelete;
|
||||
ObjectTypeInitializer.ParseProcedure = NULL;
|
||||
ObCreateObjectType(&Name,
|
||||
|
|
|
@ -316,14 +316,12 @@ ObpIncrementHandleCount(IN PVOID Object,
|
|||
/* 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 @@ ObInsertObject(IN PVOID Object,
|
|||
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)
|
||||
|
|
|
@ -350,48 +350,33 @@ Next:
|
|||
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);
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
else if (Header->Type->TypeInfo.OpenProcedure != NULL)
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT("Create Failed\n");
|
||||
if (ObjectAttached == TRUE)
|
||||
{
|
||||
DPRINT("Calling %x\n", Header->Type->TypeInfo.OpenProcedure);
|
||||
Status = Header->Type->TypeInfo.OpenProcedure(ObCreateHandle,
|
||||
NULL,
|
||||
&Header->Body,
|
||||
0,
|
||||
0);
|
||||
ObpDeleteEntryDirectory(Context);
|
||||
}
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
if (FoundObject)
|
||||
{
|
||||
DPRINT("Create Failed\n");
|
||||
if (ObjectAttached == TRUE)
|
||||
{
|
||||
ObpDeleteEntryDirectory(Context);
|
||||
}
|
||||
if (FoundObject)
|
||||
{
|
||||
ObDereferenceObject(FoundObject);
|
||||
}
|
||||
RtlFreeUnicodeString(RemainingPath);
|
||||
return Status;
|
||||
ObDereferenceObject(FoundObject);
|
||||
}
|
||||
RtlFreeUnicodeString(RemainingPath);
|
||||
return Status;
|
||||
}
|
||||
RtlFreeUnicodeString(RemainingPath);
|
||||
*ReturnedObject = Insert;
|
||||
*ReturnedObject = Insert;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -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 @@ PsEstablishWin32Callouts(PWIN32_CALLOUTS_FPNS CalloutData)
|
|||
{
|
||||
PspWin32ProcessCallback = CalloutData->ProcessCallout;
|
||||
PspWin32ThreadCallback = CalloutData->ThreadCallout;
|
||||
ExpWindowStationObjectOpen = CalloutData->WindowStationOpenProcedure;
|
||||
ExpWindowStationObjectParse = CalloutData->WindowStationParseProcedure;
|
||||
ExpWindowStationObjectDelete = CalloutData->WindowStationDeleteProcedure;
|
||||
ExpDesktopObjectDelete = CalloutData->DesktopDeleteProcedure;
|
||||
|
|
|
@ -359,7 +359,7 @@ DriverEntry (
|
|||
{
|
||||
NTSTATUS Status;
|
||||
BOOLEAN Result;
|
||||
WIN32_CALLOUTS_FPNS CalloutData;
|
||||
WIN32_CALLOUTS_FPNS CalloutData = {0};
|
||||
PVOID GlobalUserHeapBase = NULL;
|
||||
|
||||
/*
|
||||
|
@ -380,7 +380,6 @@ DriverEntry (
|
|||
/*
|
||||
* Register Object Manager Callbacks
|
||||
*/
|
||||
CalloutData.WindowStationOpenProcedure = IntWinStaObjectOpen;
|
||||
CalloutData.WindowStationParseProcedure = IntWinStaObjectParse;
|
||||
CalloutData.WindowStationDeleteProcedure = IntWinStaObjectDelete;
|
||||
CalloutData.DesktopDeleteProcedure = IntDesktopObjectDelete;
|
||||
|
|
|
@ -94,32 +94,6 @@ CleanupWindowStationImpl(VOID)
|
|||
|
||||
/* 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)
|
||||
{
|
||||
|
@ -485,6 +459,14 @@ NtUserCreateWindowStation(
|
|||
return 0;
|
||||
}
|
||||
|
||||
KeInitializeSpinLock(&WindowStationObject->Lock);
|
||||
|
||||
InitializeListHead(&WindowStationObject->DesktopListHead);
|
||||
|
||||
WindowStationObject->AtomTable = NULL;
|
||||
Status = RtlCreateAtomTable(37, &WindowStationObject->AtomTable);
|
||||
WindowStationObject->SystemMenuTemplate = (HANDLE)0;
|
||||
|
||||
WindowStationObject->Name = WindowStationName;
|
||||
|
||||
Status = ObInsertObject(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue