Author: ion
Date: Thu May 25 05:18:31 2006
New Revision: 22036
URL:
http://svn.reactos.ru/svn/reactos?rev=22036&view=rev
Log:
- Get rid of OB_ROS_PARSE_METHOD and use OB_PARSE_METHOD instead. Hacked the current parse
methods to keep using a PWSTR, however they should be modified to use the UNICODE_STRING
instead...
Modified:
trunk/reactos/include/reactos/win32k/callout.h
trunk/reactos/ntoskrnl/cm/cm.h
trunk/reactos/ntoskrnl/cm/registry.c
trunk/reactos/ntoskrnl/cm/regobj.c
trunk/reactos/ntoskrnl/ex/win32k.c
trunk/reactos/ntoskrnl/include/internal/ob.h
trunk/reactos/ntoskrnl/ob/obname.c
trunk/reactos/ntoskrnl/ob/symlink.c
trunk/reactos/ntoskrnl/ps/win32.c
trunk/reactos/subsystems/win32/win32k/include/winsta.h
trunk/reactos/subsystems/win32/win32k/main/dllmain.c
trunk/reactos/subsystems/win32/win32k/ntuser/winsta.c
Modified: trunk/reactos/include/reactos/win32k/callout.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/reactos/win32k/call…
==============================================================================
--- trunk/reactos/include/reactos/win32k/callout.h (original)
+++ trunk/reactos/include/reactos/win32k/callout.h Thu May 25 05:18:31 2006
@@ -10,7 +10,7 @@
OB_OPEN_METHOD DesktopOpen;
OB_DELETE_METHOD DesktopDelete;
OB_DELETE_METHOD WinStaDelete;
- OB_ROS_PARSE_METHOD WinStaParse;
+ OB_PARSE_METHOD WinStaParse;
OB_OPEN_METHOD WinStaOpen;
OB_ROS_FIND_METHOD WinStaFind;
OB_ROS_CREATE_METHOD DesktopCreate;
Modified: trunk/reactos/ntoskrnl/cm/cm.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/cm/cm.h?rev=22036&…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/cm.h (original)
+++ trunk/reactos/ntoskrnl/cm/cm.h Thu May 25 05:18:31 2006
@@ -439,10 +439,15 @@
NTSTATUS STDCALL
CmiObjectParse(IN PVOID ParsedObject,
- OUT PVOID *NextObject,
- IN PUNICODE_STRING FullPath,
- IN OUT PWSTR *Path,
- IN ULONG Attribute);
+ IN PVOID ObjectType,
+ IN OUT PACCESS_STATE AccessState,
+ IN KPROCESSOR_MODE AccessMode,
+ IN ULONG Attributes,
+ IN OUT PUNICODE_STRING FullPath,
+ IN OUT PUNICODE_STRING RemainingName,
+ IN OUT PVOID Context OPTIONAL,
+ IN PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL,
+ OUT PVOID *NextObject);
VOID STDCALL
CmiObjectDelete(PVOID DeletedObject);
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 Thu May 25 05:18:31 2006
@@ -369,7 +369,7 @@
ObjectTypeInitializer.ValidAccessMask = KEY_ALL_ACCESS;
ObjectTypeInitializer.UseDefaultObject = TRUE;
ObjectTypeInitializer.DeleteProcedure = CmiObjectDelete;
- ObjectTypeInitializer.ParseProcedure = (PVOID)CmiObjectParse;
+ ObjectTypeInitializer.ParseProcedure = CmiObjectParse;
ObjectTypeInitializer.SecurityProcedure = CmiObjectSecurity;
ObjectTypeInitializer.QueryNameProcedure = CmiObjectQueryName;
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 Thu May 25 05:18:31 2006
@@ -24,12 +24,18 @@
/* FUNCTONS *****************************************************************/
+
NTSTATUS STDCALL
-CmiObjectParse(PVOID ParsedObject,
- PVOID *NextObject,
- PUNICODE_STRING FullPath,
- PWSTR *Path,
- ULONG Attributes)
+CmiObjectParse(IN PVOID ParsedObject,
+ IN PVOID ObjectType,
+ IN OUT PACCESS_STATE AccessState,
+ IN KPROCESSOR_MODE AccessMode,
+ IN ULONG Attributes,
+ IN OUT PUNICODE_STRING FullPath,
+ IN OUT PUNICODE_STRING RemainingName,
+ IN OUT PVOID Context OPTIONAL,
+ IN PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL,
+ OUT PVOID *NextObject)
{
BLOCK_OFFSET BlockOffset;
PKEY_OBJECT FoundObject;
@@ -42,6 +48,7 @@
UNICODE_STRING LinkPath;
UNICODE_STRING TargetPath;
UNICODE_STRING KeyName;
+ PWSTR *Path = &RemainingName->Buffer;
ParsedKey = ParsedObject;
Modified: trunk/reactos/ntoskrnl/ex/win32k.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ex/win32k.c?rev=22…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/win32k.c (original)
+++ trunk/reactos/ntoskrnl/ex/win32k.c Thu May 25 05:18:31 2006
@@ -36,7 +36,7 @@
};
OB_OPEN_METHOD ExpWindowStationObjectOpen = NULL;
-OB_ROS_PARSE_METHOD ExpWindowStationObjectParse = NULL;
+OB_PARSE_METHOD ExpWindowStationObjectParse = NULL;
OB_DELETE_METHOD ExpWindowStationObjectDelete = NULL;
OB_ROS_FIND_METHOD ExpWindowStationObjectFind = NULL;
OB_ROS_CREATE_METHOD ExpDesktopObjectCreate = NULL;
@@ -82,20 +82,28 @@
NTSTATUS
STDCALL
-ExpWinStaObjectParse(PVOID Object,
- PVOID *NextObject,
- PUNICODE_STRING FullPath,
- PWSTR *Path,
- ULONG Attributes,
- POBP_LOOKUP_CONTEXT Context)
+ExpWinStaObjectParse(IN PVOID ParseObject,
+ IN PVOID ObjectType,
+ IN OUT PACCESS_STATE AccessState,
+ IN KPROCESSOR_MODE AccessMode,
+ IN ULONG Attributes,
+ IN OUT PUNICODE_STRING CompleteName,
+ IN OUT PUNICODE_STRING RemainingName,
+ IN OUT PVOID Context OPTIONAL,
+ IN PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL,
+ OUT PVOID *Object)
{
/* Call the Registered Callback */
- return ExpWindowStationObjectParse(Object,
- NextObject,
- FullPath,
- Path,
+ return ExpWindowStationObjectParse(ParseObject,
+ ObjectType,
+ AccessState,
+ AccessMode,
Attributes,
- Context);
+ CompleteName,
+ RemainingName,
+ Context,
+ SecurityQos,
+ Object);
}
NTSTATUS
Modified: trunk/reactos/ntoskrnl/include/internal/ob.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/include/internal/o…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ob.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/ob.h Thu May 25 05:18:31 2006
@@ -60,16 +60,6 @@
ULONG Attributes
);
-typedef NTSTATUS
-(NTAPI *OB_ROS_PARSE_METHOD)(
- PVOID Object,
- PVOID *NextObject,
- PUNICODE_STRING FullPath,
- PWSTR *Path,
- ULONG Attributes,
- POBP_LOOKUP_CONTEXT Context
-);
-
BOOLEAN
NTAPI
ObpDeleteEntryDirectory(POBP_LOOKUP_CONTEXT Context);
Modified: trunk/reactos/ntoskrnl/ob/obname.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/obname.c?rev=22…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obname.c (original)
+++ trunk/reactos/ntoskrnl/ob/obname.c Thu May 25 05:18:31 2006
@@ -37,6 +37,7 @@
PWSTR current;
UNICODE_STRING PathString;
ULONG Attributes;
+ UNICODE_STRING CurrentUs;
PAGED_CODE();
@@ -169,12 +170,19 @@
DPRINT("Current object can't parse\n");
break;
}
- Status =
((OB_ROS_PARSE_METHOD)CurrentHeader->Type->TypeInfo.ParseProcedure)(CurrentObject,
- &NextObject,
+
+ RtlInitUnicodeString(&CurrentUs, current);
+ Status = CurrentHeader->Type->TypeInfo.ParseProcedure(CurrentObject,
+ CurrentHeader->Type,
+ NULL,
+ ExGetPreviousMode(),
+ Attributes,
&PathString,
- ¤t,
- Attributes,
- Context);
+ &CurrentUs,
+ NULL,
+ NULL,
+ &NextObject);
+ current = CurrentUs.Buffer;
if (Status == STATUS_REPARSE)
{
/* reparse the object path */
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 Thu May 25 05:18:31 2006
@@ -86,16 +86,22 @@
*--*/
NTSTATUS
NTAPI
-ObpParseSymbolicLink(PVOID Object,
- PVOID * NextObject,
- PUNICODE_STRING FullPath,
- PWSTR * RemainingPath,
- ULONG Attributes)
-{
- POBJECT_SYMBOLIC_LINK SymlinkObject = (POBJECT_SYMBOLIC_LINK)Object;
+ObpParseSymbolicLink(IN PVOID ParsedObject,
+ IN PVOID ObjectType,
+ IN OUT PACCESS_STATE AccessState,
+ IN KPROCESSOR_MODE AccessMode,
+ IN ULONG Attributes,
+ IN OUT PUNICODE_STRING FullPath,
+ IN OUT PUNICODE_STRING RemainingName,
+ IN OUT PVOID Context OPTIONAL,
+ IN PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL,
+ OUT PVOID *NextObject)
+{
+ POBJECT_SYMBOLIC_LINK SymlinkObject = (POBJECT_SYMBOLIC_LINK)ParsedObject;
PUNICODE_STRING TargetPath;
PWSTR NewTargetPath;
ULONG LengthUsed, MaximumLength, RemainLength;
+ PWSTR *RemainingPath = &RemainingName->Buffer;
/*
* Stop parsing if the entire path has been parsed and
@@ -186,7 +192,7 @@
ObjectTypeInitializer.PoolType = NonPagedPool;
ObjectTypeInitializer.ValidAccessMask = SYMBOLIC_LINK_ALL_ACCESS;
ObjectTypeInitializer.UseDefaultObject = TRUE;
- ObjectTypeInitializer.ParseProcedure = (OB_PARSE_METHOD)ObpParseSymbolicLink;
+ ObjectTypeInitializer.ParseProcedure = ObpParseSymbolicLink;
ObjectTypeInitializer.DeleteProcedure = ObpDeleteSymbolicLink;
ObpCreateTypeObject(&ObjectTypeInitializer, &Name, &ObSymbolicLinkType);
}
Modified: trunk/reactos/ntoskrnl/ps/win32.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ps/win32.c?rev=220…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/win32.c (original)
+++ trunk/reactos/ntoskrnl/ps/win32.c Thu May 25 05:18:31 2006
@@ -21,7 +21,7 @@
static PKWIN32_THREAD_CALLOUT PspWin32ThreadCallback = NULL;
extern OB_OPEN_METHOD ExpWindowStationObjectOpen;
-extern OB_ROS_PARSE_METHOD ExpWindowStationObjectParse;
+extern OB_PARSE_METHOD ExpWindowStationObjectParse;
extern OB_DELETE_METHOD ExpWindowStationObjectDelete;
extern OB_ROS_FIND_METHOD ExpWindowStationObjectFind;
extern OB_ROS_CREATE_METHOD ExpDesktopObjectCreate;
Modified: trunk/reactos/subsystems/win32/win32k/include/winsta.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/winsta.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/winsta.h Thu May 25 05:18:31 2006
@@ -70,12 +70,16 @@
NTSTATUS
STDCALL
-IntWinStaObjectParse(PVOID Object,
- PVOID *NextObject,
- PUNICODE_STRING FullPath,
- PWSTR *Path,
- ULONG Attributes,
- PVOID Context);
+IntWinStaObjectParse(IN PVOID ParseObject,
+ IN PVOID ObjectType,
+ IN OUT PACCESS_STATE AccessState,
+ IN KPROCESSOR_MODE AccessMode,
+ IN ULONG Attributes,
+ IN OUT PUNICODE_STRING CompleteName,
+ IN OUT PUNICODE_STRING RemainingName,
+ IN OUT PVOID Context OPTIONAL,
+ IN PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL,
+ OUT PVOID *Object);
NTSTATUS FASTCALL
IntValidateWindowStationHandle(
Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/subsystems/win32/win32k/mai…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/main/dllmain.c (original)
+++ trunk/reactos/subsystems/win32/win32k/main/dllmain.c Thu May 25 05:18:31 2006
@@ -382,7 +382,7 @@
* Register Object Manager Callbacks
*/
CalloutData.WinStaOpen = IntWinStaObjectOpen;
- CalloutData.WinStaParse = (OB_ROS_PARSE_METHOD)IntWinStaObjectParse;
+ CalloutData.WinStaParse = IntWinStaObjectParse;
CalloutData.WinStaDelete = IntWinStaObjectDelete;
CalloutData.WinStaFind = IntWinStaObjectFind;
CalloutData.DesktopCreate = IntDesktopObjectCreate;
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 Thu May 25 05:18:31 2006
@@ -186,13 +186,18 @@
NTSTATUS
STDCALL
-IntWinStaObjectParse(PVOID Object,
- PVOID *NextObject,
- PUNICODE_STRING FullPath,
- PWSTR *Path,
- ULONG Attributes,
- PVOID Context)
-{
+IntWinStaObjectParse(IN PVOID Object,
+ IN PVOID ObjectType,
+ IN OUT PACCESS_STATE AccessState,
+ IN KPROCESSOR_MODE AccessMode,
+ IN ULONG Attributes,
+ IN OUT PUNICODE_STRING FullPath,
+ IN OUT PUNICODE_STRING RemainingName,
+ IN OUT PVOID Context OPTIONAL,
+ IN PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL,
+ OUT PVOID *NextObject)
+{
+ PWSTR *Path = &RemainingName->Buffer;
PVOID FoundObject;
NTSTATUS Status;
PWSTR End;