Commit 0603559d authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Check for failure to get the user path in RtlOpenCurrentUser.

Fixed the return value type.
parent b586f6fa
......@@ -843,7 +843,7 @@ NTSTATUS WINAPI RtlFormatCurrentUserKeyPath( IN OUT PUNICODE_STRING KeyPath)
* If we return just HKEY_CURRENT_USER the advapi tries to find a remote
* registry (odd handle) and fails.
*/
DWORD WINAPI RtlOpenCurrentUser(
NTSTATUS WINAPI RtlOpenCurrentUser(
IN ACCESS_MASK DesiredAccess, /* [in] */
OUT PHANDLE KeyHandle) /* [out] handle of HKEY_CURRENT_USER */
{
......@@ -853,7 +853,7 @@ DWORD WINAPI RtlOpenCurrentUser(
TRACE("(0x%08lx, %p)\n",DesiredAccess, KeyHandle);
RtlFormatCurrentUserKeyPath(&ObjectName);
if ((ret = RtlFormatCurrentUserKeyPath(&ObjectName))) return ret;
InitializeObjectAttributes(&ObjectAttributes,&ObjectName,OBJ_CASE_INSENSITIVE,0, NULL);
ret = NtCreateKey(KeyHandle, DesiredAccess, &ObjectAttributes, 0, NULL, 0, NULL);
RtlFreeUnicodeString(&ObjectName);
......
......@@ -2120,7 +2120,7 @@ ULONG WINAPI RtlNumberOfClearBits(PCRTL_BITMAP);
UINT WINAPI RtlOemStringToUnicodeSize(const STRING*);
NTSTATUS WINAPI RtlOemStringToUnicodeString(UNICODE_STRING*,const STRING*,BOOLEAN);
NTSTATUS WINAPI RtlOemToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
DWORD WINAPI RtlOpenCurrentUser(ACCESS_MASK,PHANDLE);
NTSTATUS WINAPI RtlOpenCurrentUser(ACCESS_MASK,PHANDLE);
NTSTATUS WINAPI RtlPinAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM);
BOOLEAN WINAPI RtlPrefixString(const STRING*,const STRING*,BOOLEAN);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment