-/* $Id: registry.c,v 1.18 2002/09/08 10:23:06 chorns Exp $
+/* $Id: registry.c,v 1.19 2002/10/28 15:50:25 robd Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
RtlFormatCurrentUserKeyPath(PUNICODE_STRING KeyPath)
{
/* FIXME: !!! */
- RtlCreateUnicodeString(KeyPath,
+#if 0
+ RtlCreateUnicodeString(KeyPath,
L"\\Registry\\User\\.Default");
+#endif
return(STATUS_SUCCESS);
}
OUT PHANDLE KeyHandle)
{
OBJECT_ATTRIBUTES ObjectAttributes;
- UNICODE_STRING KeyPath = UNICODE_STRING_INITIALIZER(L"\\Registry\\User\\.Default");
NTSTATUS Status;
+ UNICODE_STRING KeyPath = UNICODE_STRING_INITIALIZER(L"\\Registry\\User\\.Default");
Status = RtlFormatCurrentUserKeyPath(&KeyPath);
if (NT_SUCCESS(Status))
Status = NtOpenKey(KeyHandle,
DesiredAccess,
&ObjectAttributes);
- RtlFreeUnicodeString(&KeyPath);
- if (NT_SUCCESS(Status))
- return(STATUS_SUCCESS);
+ if (NT_SUCCESS(Status)) {
+ RtlFreeUnicodeString(&KeyPath);
+ return(STATUS_SUCCESS);
+ }
}
-
InitializeObjectAttributes(&ObjectAttributes,
&KeyPath,
OBJ_CASE_INSENSITIVE,
Status = NtOpenKey(KeyHandle,
DesiredAccess,
&ObjectAttributes);
+ RtlFreeUnicodeString(&KeyPath);
return(Status);
}