PKEY_VALUE_PARTIAL_INFORMATION ValueInfo;
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName =
- RTL_CONSTANT_STRING(L"Control Panel\\International");
+ RTL_CONSTANT_STRING(L"Control Panel\\Desktop");
UNICODE_STRING ValueName;
UNICODE_STRING ValueString;
ULONG ValueLength;
/* Initialize the attributes and open the key */
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
- OBJ_CASE_INSENSITIVE,
+ OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
UserKey,
NULL);
Status = ZwOpenKey(&KeyHandle, KEY_QUERY_VALUE,&ObjectAttributes);
/* Fail */
Status = STATUS_UNSUCCESSFUL;
}
-
- /* Close the key */
- ZwClose(KeyHandle);
}
+
+ /* Close the key */
+ ZwClose(KeyHandle);
}
/* Close the user key and return */
{
/* Open the user's key */
Status = RtlOpenCurrentUser(KEY_WRITE, &UserKey);
- if (!NT_SUCCESS(Status)) return(Status);
+ if (!NT_SUCCESS(Status)) return Status;
/* Initialize the registry location */
RtlInitUnicodeString(&KeyName, L"Control Panel\\International");
UserKey = NULL;
}
- /* Initailize the object attributes */
+ /* Initialize the object attributes */
InitializeObjectAttributes(&ObjectAttributes,
- &KeyName,
- OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
- UserKey,
- NULL);
+ &KeyName,
+ OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
+ UserKey,
+ NULL);
/* Check if we don't have a default locale yet */
if (!DefaultLocaleId)
_SEH2_EXCEPT(ExSystemExceptionFilter())
{
/* Return exception code */
- return _SEH2_GetExceptionCode();
+ _SEH2_YIELD(return _SEH2_GetExceptionCode());
}
_SEH2_END;