diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index 794f188a8d8..a3a8cc158ec 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -84,12 +84,18 @@ NTSTATUS WINAPI NtCreateKey( PHANDLE retkey, ACCESS_MASK access, const OBJECT_AT * * 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); } diff --git a/include/winternl.h b/include/winternl.h index 1c3d62177de..8285f856fc2 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2064,6 +2064,7 @@ NTSTATUS WINAPI RtlVerifyVersionInfo(const RTL_OSVERSIONINFOEXW*,DWORD,DWORDLON 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 *);