Author: ion
Date: Fri May 26 00:50:58 2006
New Revision: 22047
URL:
http://svn.reactos.ru/svn/reactos?rev=22047&view=rev
Log:
- Get rid of the intriguing idea that exported/public APIs should have prototypes with
inversed parameters (fix ObOpenObjectByName and all its callers).
- Isolate ObFindObject into CmFindObject for the registry routines. Because of their
well-known abuse of Ob, it's better to give them their internal routine so that
when/if Ob ever gets fixed to parse properly, it won't force a re-write of Cm's
object routines.
Modified:
trunk/reactos/include/ddk/winddk.h
trunk/reactos/ntoskrnl/cm/cm.h
trunk/reactos/ntoskrnl/cm/ntfunc.c
trunk/reactos/ntoskrnl/cm/registry.c
trunk/reactos/ntoskrnl/cm/regobj.c
trunk/reactos/ntoskrnl/ex/callback.c
trunk/reactos/ntoskrnl/ex/event.c
trunk/reactos/ntoskrnl/ex/evtpair.c
trunk/reactos/ntoskrnl/ex/mutant.c
trunk/reactos/ntoskrnl/ex/sem.c
trunk/reactos/ntoskrnl/ex/timer.c
trunk/reactos/ntoskrnl/io/file.c
trunk/reactos/ntoskrnl/io/iocomp.c
trunk/reactos/ntoskrnl/mm/section.c
trunk/reactos/ntoskrnl/ob/obdir.c
trunk/reactos/ntoskrnl/ob/obhandle.c
trunk/reactos/ntoskrnl/ob/symlink.c
trunk/reactos/ntoskrnl/ps/job.c
trunk/reactos/ntoskrnl/ps/process.c
trunk/reactos/ntoskrnl/ps/thread.c
trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c
Modified: trunk/reactos/include/ddk/winddk.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=22…
==============================================================================
--- trunk/reactos/include/ddk/winddk.h (original)
+++ trunk/reactos/include/ddk/winddk.h Fri May 26 00:50:58 2006
@@ -9535,10 +9535,10 @@
ObOpenObjectByName(
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN POBJECT_TYPE ObjectType,
+ IN KPROCESSOR_MODE AccessMode,
+ IN PACCESS_STATE PassedAccessState,
+ IN ACCESS_MASK DesiredAccess,
IN OUT PVOID ParseContext OPTIONAL,
- IN KPROCESSOR_MODE AccessMode,
- IN ACCESS_MASK DesiredAccess,
- IN PACCESS_STATE PassedAccessState,
OUT PHANDLE Handle);
NTOSAPI
Modified: trunk/reactos/ntoskrnl/cm/cm.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/cm/cm.h?rev=22047&…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/cm.h (original)
+++ trunk/reactos/ntoskrnl/cm/cm.h Fri May 26 00:50:58 2006
@@ -708,4 +708,15 @@
CmiSaveTempHive (PREGISTRY_HIVE Hive,
HANDLE FileHandle);
+NTSTATUS
+NTAPI
+CmFindObject(
+ POBJECT_CREATE_INFORMATION ObjectCreateInfo,
+ PUNICODE_STRING ObjectName,
+ PVOID* ReturnedObject,
+ PUNICODE_STRING RemainingPath,
+ POBJECT_TYPE ObjectType,
+ IN PACCESS_STATE AccessState,
+ IN PVOID ParseContext
+);
#endif /*__INCLUDE_CM_H*/
Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/cm/ntfunc.c?rev=22…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/ntfunc.c (original)
+++ trunk/reactos/ntoskrnl/cm/ntfunc.c Fri May 26 00:50:58 2006
@@ -199,7 +199,6 @@
KPROCESSOR_MODE PreviousMode;
UNICODE_STRING CapturedClass = {0};
HANDLE hKey;
- OBP_LOOKUP_CONTEXT Context;
PAGED_CODE();
@@ -259,12 +258,11 @@
goto Cleanup;
}
- Status = ObFindObject(&ObjectCreateInfo,
+ Status = CmFindObject(&ObjectCreateInfo,
&ObjectName,
(PVOID*)&Object,
&RemainingPath,
CmiKeyType,
- &Context,
NULL,
NULL);
if (!NT_SUCCESS(Status))
@@ -1266,7 +1264,6 @@
OBJECT_CREATE_INFORMATION ObjectCreateInfo;
REG_PRE_OPEN_KEY_INFORMATION PreOpenKeyInfo;
REG_POST_OPEN_KEY_INFORMATION PostOpenKeyInfo;
- OBP_LOOKUP_CONTEXT Context;
PAGED_CODE();
@@ -1330,12 +1327,11 @@
RemainingPath.Buffer = NULL;
- Status = ObFindObject(&ObjectCreateInfo,
+ Status = CmFindObject(&ObjectCreateInfo,
&ObjectName,
(PVOID*)&Object,
&RemainingPath,
CmiKeyType,
- &Context,
NULL,
NULL);
if (!NT_SUCCESS(Status))
Modified: trunk/reactos/ntoskrnl/cm/registry.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/cm/registry.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/registry.c (original)
+++ trunk/reactos/ntoskrnl/cm/registry.c Fri May 26 00:50:58 2006
@@ -704,7 +704,6 @@
PWSTR SubName;
UNICODE_STRING ObjectName;
OBJECT_CREATE_INFORMATION ObjectCreateInfo;
- OBP_LOOKUP_CONTEXT Context;
DPRINT("CmiConnectHive(%p, %p) called.\n",
KeyObjectAttributes, RegistryHive);
@@ -722,12 +721,11 @@
return Status;
}
- Status = ObFindObject(&ObjectCreateInfo,
+ Status = CmFindObject(&ObjectCreateInfo,
&ObjectName,
(PVOID*)&ParentKey,
&RemainingPath,
CmiKeyType,
- &Context,
NULL,
NULL);
ObpReleaseCapturedAttributes(&ObjectCreateInfo);
@@ -857,8 +855,8 @@
Status = ObOpenObjectByName (KeyObjectAttributes,
CmiKeyType,
+ KernelMode,
NULL,
- KernelMode,
STANDARD_RIGHTS_REQUIRED,
NULL,
&KeyHandle);
Modified: trunk/reactos/ntoskrnl/cm/regobj.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/cm/regobj.c?rev=22…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/regobj.c (original)
+++ trunk/reactos/ntoskrnl/cm/regobj.c Fri May 26 00:50:58 2006
@@ -23,7 +23,202 @@
PUNICODE_STRING TargetPath);
/* FUNCTONS *****************************************************************/
-
+NTSTATUS
+NTAPI
+CmFindObject(POBJECT_CREATE_INFORMATION ObjectCreateInfo,
+ PUNICODE_STRING ObjectName,
+ PVOID* ReturnedObject,
+ PUNICODE_STRING RemainingPath,
+ POBJECT_TYPE ObjectType,
+ IN PACCESS_STATE AccessState,
+ IN PVOID ParseContext)
+{
+ PVOID NextObject;
+ PVOID CurrentObject;
+ PVOID RootObject;
+ POBJECT_HEADER CurrentHeader;
+ NTSTATUS Status;
+ PWSTR current;
+ UNICODE_STRING PathString;
+ ULONG Attributes;
+ UNICODE_STRING CurrentUs;
+ OBP_LOOKUP_CONTEXT Context;
+
+ PAGED_CODE();
+
+ DPRINT("CmindObject(ObjectCreateInfo %x, ReturnedObject %x, "
+ "RemainingPath %x)\n",ObjectCreateInfo,ReturnedObject,RemainingPath);
+
+ RtlInitUnicodeString (RemainingPath, NULL);
+
+ if (ObjectCreateInfo->RootDirectory == NULL)
+ {
+ ObReferenceObjectByPointer(NameSpaceRoot,
+ DIRECTORY_TRAVERSE,
+ NULL,
+ ObjectCreateInfo->ProbeMode);
+ CurrentObject = NameSpaceRoot;
+ }
+ else
+ {
+ Status = ObReferenceObjectByHandle(ObjectCreateInfo->RootDirectory,
+ 0,
+ NULL,
+ ObjectCreateInfo->ProbeMode,
+ &CurrentObject,
+ NULL);
+ if (!NT_SUCCESS(Status))
+ {
+ return Status;
+ }
+ }
+
+ if (ObjectName->Length == 0 ||
+ ObjectName->Buffer[0] == UNICODE_NULL)
+ {
+ *ReturnedObject = CurrentObject;
+ return STATUS_SUCCESS;
+ }
+
+ if (ObjectCreateInfo->RootDirectory == NULL &&
+ ObjectName->Buffer[0] != L'\\')
+ {
+ ObDereferenceObject (CurrentObject);
+ DPRINT1("failed\n");
+ return STATUS_UNSUCCESSFUL;
+ }
+
+ /* Create a zero-terminated copy of the object name */
+ PathString.Length = ObjectName->Length;
+ PathString.MaximumLength = ObjectName->Length + sizeof(WCHAR);
+ PathString.Buffer = ExAllocatePool (NonPagedPool,
+ PathString.MaximumLength);
+ if (PathString.Buffer == NULL)
+ {
+ ObDereferenceObject (CurrentObject);
+ return STATUS_INSUFFICIENT_RESOURCES;
+ }
+
+ RtlCopyMemory (PathString.Buffer,
+ ObjectName->Buffer,
+ ObjectName->Length);
+ PathString.Buffer[PathString.Length / sizeof(WCHAR)] = UNICODE_NULL;
+
+ current = PathString.Buffer;
+
+ RootObject = CurrentObject;
+ Attributes = ObjectCreateInfo->Attributes;
+ if (ObjectType == ObSymbolicLinkType)
+ Attributes |= OBJ_OPENLINK;
+
+ while (TRUE)
+ {
+ CurrentHeader = OBJECT_TO_OBJECT_HEADER(CurrentObject);
+
+ /* Loop as long as we're dealing with a directory */
+ while (CurrentHeader->Type == ObDirectoryType)
+ {
+ PWSTR Start, End;
+ PVOID FoundObject;
+ UNICODE_STRING StartUs;
+ NextObject = NULL;
+
+ if (!current) goto Next;
+
+ Start = current;
+ if (*Start == L'\\') Start++;
+
+ End = wcschr(Start, L'\\');
+ if (End != NULL) *End = 0;
+
+ RtlInitUnicodeString(&StartUs, Start);
+ Context.DirectoryLocked = TRUE;
+ Context.Directory = CurrentObject;
+ FoundObject = ObpLookupEntryDirectory(CurrentObject, &StartUs,
Attributes, FALSE, &Context);
+ if (FoundObject == NULL)
+ {
+ if (End != NULL)
+ {
+ *End = L'\\';
+ }
+ goto Next;
+ }
+
+ ObReferenceObjectByPointer(FoundObject,
+ STANDARD_RIGHTS_REQUIRED,
+ NULL,
+ UserMode);
+ if (End != NULL)
+ {
+ *End = L'\\';
+ current = End;
+ }
+ else
+ {
+ current = NULL;
+ }
+
+ NextObject = FoundObject;
+
+Next:
+ if (NextObject == NULL)
+ {
+ break;
+ }
+ ObDereferenceObject(CurrentObject);
+ CurrentObject = NextObject;
+ CurrentHeader = OBJECT_TO_OBJECT_HEADER(CurrentObject);
+ }
+
+ if (CurrentHeader->Type->TypeInfo.ParseProcedure == NULL)
+ {
+ DPRINT("Current object can't parse\n");
+ break;
+ }
+
+ RtlInitUnicodeString(&CurrentUs, current);
+ Status = CurrentHeader->Type->TypeInfo.ParseProcedure(CurrentObject,
+ CurrentHeader->Type,
+ AccessState,
+ ExGetPreviousMode(), // fixme: should be a parameter, since caller decides.
+ Attributes,
+ &PathString,
+ &CurrentUs,
+ ParseContext,
+ NULL, // fixme: where do we get this from? captured OBP?
+ &NextObject);
+ current = CurrentUs.Buffer;
+ if (Status == STATUS_REPARSE)
+ {
+ /* reparse the object path */
+ NextObject = NameSpaceRoot;
+ current = PathString.Buffer;
+
+ ObReferenceObjectByPointer(NextObject,
+ DIRECTORY_TRAVERSE,
+ NULL,
+ ObjectCreateInfo->ProbeMode);
+ }
+
+
+ if (NextObject == NULL)
+ {
+ break;
+ }
+ ObDereferenceObject(CurrentObject);
+ CurrentObject = NextObject;
+ }
+
+ if (current)
+ {
+ RtlpCreateUnicodeString (RemainingPath, current, NonPagedPool);
+ }
+
+ RtlFreeUnicodeString (&PathString);
+ *ReturnedObject = CurrentObject;
+
+ return STATUS_SUCCESS;
+}
NTSTATUS STDCALL
CmiObjectParse(IN PVOID ParsedObject,
Modified: trunk/reactos/ntoskrnl/ex/callback.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ex/callback.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/callback.c (original)
+++ trunk/reactos/ntoskrnl/ex/callback.c Fri May 26 00:50:58 2006
@@ -205,8 +205,8 @@
{
Status = ObOpenObjectByName(ObjectAttributes,
ExCallbackObjectType,
+ KernelMode,
NULL,
- KernelMode,
0,
NULL,
&Handle);
Modified: trunk/reactos/ntoskrnl/ex/event.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ex/event.c?rev=220…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/event.c (original)
+++ trunk/reactos/ntoskrnl/ex/event.c Fri May 26 00:50:58 2006
@@ -212,8 +212,8 @@
/* Open the Object */
Status = ObOpenObjectByName(ObjectAttributes,
ExEventObjectType,
+ PreviousMode,
NULL,
- PreviousMode,
DesiredAccess,
NULL,
&hEvent);
Modified: trunk/reactos/ntoskrnl/ex/evtpair.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ex/evtpair.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/evtpair.c (original)
+++ trunk/reactos/ntoskrnl/ex/evtpair.c Fri May 26 00:50:58 2006
@@ -164,8 +164,8 @@
/* Open the Object */
Status = ObOpenObjectByName(ObjectAttributes,
ExEventPairObjectType,
+ PreviousMode,
NULL,
- PreviousMode,
DesiredAccess,
NULL,
&hEventPair);
Modified: trunk/reactos/ntoskrnl/ex/mutant.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ex/mutant.c?rev=22…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/mutant.c (original)
+++ trunk/reactos/ntoskrnl/ex/mutant.c Fri May 26 00:50:58 2006
@@ -194,8 +194,8 @@
/* Open the Object */
Status = ObOpenObjectByName(ObjectAttributes,
ExMutantObjectType,
+ PreviousMode,
NULL,
- PreviousMode,
DesiredAccess,
NULL,
&hMutant);
Modified: trunk/reactos/ntoskrnl/ex/sem.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ex/sem.c?rev=22047…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/sem.c (original)
+++ trunk/reactos/ntoskrnl/ex/sem.c Fri May 26 00:50:58 2006
@@ -188,8 +188,8 @@
/* Open the Object */
Status = ObOpenObjectByName(ObjectAttributes,
ExSemaphoreObjectType,
+ PreviousMode,
NULL,
- PreviousMode,
DesiredAccess,
NULL,
&hSemaphore);
Modified: trunk/reactos/ntoskrnl/ex/timer.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ex/timer.c?rev=220…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/timer.c (original)
+++ trunk/reactos/ntoskrnl/ex/timer.c Fri May 26 00:50:58 2006
@@ -508,8 +508,8 @@
/* Open the Timer */
Status = ObOpenObjectByName(ObjectAttributes,
ExTimerType,
+ PreviousMode,
NULL,
- PreviousMode,
DesiredAccess,
NULL,
&hTimer);
Modified: trunk/reactos/ntoskrnl/io/file.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/io/file.c?rev=2204…
==============================================================================
--- trunk/reactos/ntoskrnl/io/file.c (original)
+++ trunk/reactos/ntoskrnl/io/file.c Fri May 26 00:50:58 2006
@@ -931,8 +931,8 @@
/* First try to open an existing named object */
Status = ObOpenObjectByName(ObjectAttributes,
NULL,
+ AccessMode,
NULL,
- AccessMode,
DesiredAccess,
NULL,
&LocalHandle);
Modified: trunk/reactos/ntoskrnl/io/iocomp.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/io/iocomp.c?rev=22…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iocomp.c (original)
+++ trunk/reactos/ntoskrnl/io/iocomp.c Fri May 26 00:50:58 2006
@@ -322,8 +322,8 @@
/* Open the Object */
Status = ObOpenObjectByName(ObjectAttributes,
IoCompletionType,
+ PreviousMode,
NULL,
- PreviousMode,
DesiredAccess,
NULL,
&hIoCompletionHandle);
Modified: trunk/reactos/ntoskrnl/mm/section.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c (original)
+++ trunk/reactos/ntoskrnl/mm/section.c Fri May 26 00:50:58 2006
@@ -3463,8 +3463,8 @@
Status = ObOpenObjectByName(ObjectAttributes,
MmSectionObjectType,
+ PreviousMode,
NULL,
- PreviousMode,
DesiredAccess,
NULL,
&hSection);
Modified: trunk/reactos/ntoskrnl/ob/obdir.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/obdir.c?rev=220…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obdir.c (original)
+++ trunk/reactos/ntoskrnl/ob/obdir.c Fri May 26 00:50:58 2006
@@ -334,8 +334,8 @@
/* Open the directory object */
Status = ObOpenObjectByName(ObjectAttributes,
ObDirectoryType,
+ PreviousMode,
NULL,
- PreviousMode,
DesiredAccess,
NULL,
&hDirectory);
Modified: trunk/reactos/ntoskrnl/ob/obhandle.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/obhandle.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obhandle.c (original)
+++ trunk/reactos/ntoskrnl/ob/obhandle.c Fri May 26 00:50:58 2006
@@ -748,10 +748,10 @@
NTAPI
ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes,
IN POBJECT_TYPE ObjectType,
+ IN KPROCESSOR_MODE AccessMode,
+ IN PACCESS_STATE PassedAccessState,
+ IN ACCESS_MASK DesiredAccess,
IN OUT PVOID ParseContext,
- IN KPROCESSOR_MODE AccessMode,
- IN ACCESS_MASK DesiredAccess,
- IN PACCESS_STATE PassedAccessState,
OUT PHANDLE Handle)
{
UNICODE_STRING RemainingPath;
Modified: trunk/reactos/ntoskrnl/ob/symlink.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/symlink.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/symlink.c (original)
+++ trunk/reactos/ntoskrnl/ob/symlink.c Fri May 26 00:50:58 2006
@@ -403,8 +403,8 @@
/* Open the object */
Status = ObOpenObjectByName(ObjectAttributes,
ObSymbolicLinkType,
+ PreviousMode,
NULL,
- PreviousMode,
DesiredAccess,
NULL,
&hLink);
Modified: trunk/reactos/ntoskrnl/ps/job.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ps/job.c?rev=22047…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/job.c (original)
+++ trunk/reactos/ntoskrnl/ps/job.c Fri May 26 00:50:58 2006
@@ -413,8 +413,8 @@
{
Status = ObOpenObjectByName(ObjectAttributes,
PsJobType,
+ PreviousMode,
NULL,
- PreviousMode,
DesiredAccess,
NULL,
&hJob);
Modified: trunk/reactos/ntoskrnl/ps/process.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ps/process.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/process.c (original)
+++ trunk/reactos/ntoskrnl/ps/process.c Fri May 26 00:50:58 2006
@@ -1004,8 +1004,8 @@
DPRINT("Opening by name\n");
Status = ObOpenObjectByName(ObjectAttributes,
PsProcessType,
+ PreviousMode,
NULL,
- PreviousMode,
DesiredAccess,
NULL,
&hProcess);
Modified: trunk/reactos/ntoskrnl/ps/thread.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ps/thread.c?rev=22…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/thread.c (original)
+++ trunk/reactos/ntoskrnl/ps/thread.c Fri May 26 00:50:58 2006
@@ -720,8 +720,8 @@
/* Open it */
Status = ObOpenObjectByName(ObjectAttributes,
PsThreadType,
+ PreviousMode,
NULL,
- PreviousMode,
DesiredAccess,
NULL,
&hThread);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c Fri May 26 00:50:58 2006
@@ -345,8 +345,8 @@
Status = ObOpenObjectByName(&ObjectAttributes,
ExWindowStationObjectType,
+ KernelMode,
NULL,
- KernelMode,
0,
NULL,
(HANDLE*)hWinSta);
@@ -379,8 +379,8 @@
Status = ObOpenObjectByName(&ObjectAttributes,
ExDesktopObjectType,
+ KernelMode,
NULL,
- KernelMode,
0,
NULL,
(HANDLE*)hDesktop);
@@ -926,10 +926,10 @@
Status = ObOpenObjectByName(
&ObjectAttributes,
ExDesktopObjectType,
+ KernelMode,
+ NULL,
+ dwDesiredAccess,
(PVOID)&DummyContext,
- KernelMode,
- dwDesiredAccess,
- NULL,
(HANDLE*)&Desktop);
if (!NT_SUCCESS(Status)) RETURN(NULL);
if (Status == STATUS_OBJECT_NAME_EXISTS)
@@ -1129,8 +1129,8 @@
Status = ObOpenObjectByName(
&ObjectAttributes,
ExDesktopObjectType,
+ KernelMode,
NULL,
- KernelMode,
dwDesiredAccess,
NULL,
(HANDLE*)&Desktop);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c Fri May 26 00:50:58 2006
@@ -444,8 +444,8 @@
Status = ObOpenObjectByName(
&ObjectAttributes,
ExWindowStationObjectType,
+ KernelMode,
NULL,
- KernelMode,
dwDesiredAccess,
NULL,
(PVOID*)&WindowStation);
@@ -603,8 +603,8 @@
Status = ObOpenObjectByName(
&ObjectAttributes,
ExWindowStationObjectType,
+ UserMode,
NULL,
- UserMode,
dwDesiredAccess,
NULL,
(PVOID*)&WindowStation);