NTDLL: add prototype and fix RtlpNtCreateKey
Mike McCormack
mike at codeweavers.com
Thu Jun 23 22:00:26 CDT 2005
ChangeLog:
* add prototype
* don't modify the attributes passed in
-------------- next part --------------
Index: dlls/ntdll/reg.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/reg.c,v
retrieving revision 1.62
diff -u -p -r1.62 reg.c
--- dlls/ntdll/reg.c 21 Jun 2005 09:52:41 -0000 1.62
+++ dlls/ntdll/reg.c 24 Jun 2005 03:00:55 -0000
@@ -84,12 +84,18 @@ NTSTATUS WINAPI NtCreateKey( PHANDLE ret
*
* See NtCreateKey.
*/
-NTSTATUS WINAPI RtlpNtCreateKey( PHANDLE retkey, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr,
+NTSTATUS WINAPI RtlpNtCreateKey( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr,
ULONG TitleIndex, const UNICODE_STRING *class, ULONG options,
PULONG dispos )
{
+ OBJECT_ATTRIBUTES oa;
+
if (attr)
- attr->Attributes &= ~(OBJ_PERMANENT|OBJ_EXCLUSIVE);
+ {
+ memcpy( &oa, attr, sizeof oa );
+ oa.Attributes &= ~(OBJ_PERMANENT|OBJ_EXCLUSIVE);
+ attr = &oa;
+ }
return NtCreateKey(retkey, access, attr, 0, NULL, 0, dispos);
}
Index: include/winternl.h
===================================================================
RCS file: /home/wine/wine/include/winternl.h,v
retrieving revision 1.147
diff -u -p -r1.147 winternl.h
--- include/winternl.h 23 Jun 2005 11:03:30 -0000 1.147
+++ include/winternl.h 24 Jun 2005 03:00:56 -0000
@@ -2064,6 +2064,7 @@ NTSTATUS WINAPI RtlVerifyVersionInfo(co
NTSTATUS WINAPI RtlWalkHeap(HANDLE,PVOID);
+NTSTATUS WINAPI RtlpNtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
NTSTATUS WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *);
NTSTATUS WINAPI RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION *);
More information about the wine-patches
mailing list