Nt -> Zw fixes

svn path=/trunk/; revision=13230
This commit is contained in:
Gé van Geldorp 2005-01-23 21:19:24 +00:00
parent 7b20e4cdbf
commit acb0d0d67d

View file

@ -65,7 +65,7 @@ PiInitDefaultLocale(VOID)
OBJ_CASE_INSENSITIVE, OBJ_CASE_INSENSITIVE,
NULL, NULL,
NULL); NULL);
Status = NtOpenKey(&KeyHandle, Status = ZwOpenKey(&KeyHandle,
KEY_QUERY_VALUE, KEY_QUERY_VALUE,
&ObjectAttributes); &ObjectAttributes);
if (NT_SUCCESS(Status)) if (NT_SUCCESS(Status))
@ -73,7 +73,7 @@ PiInitDefaultLocale(VOID)
/* Read system locale */ /* Read system locale */
RtlRosInitUnicodeStringFromLiteral(&ValueName, RtlRosInitUnicodeStringFromLiteral(&ValueName,
L"Default"); L"Default");
Status = NtQueryValueKey(KeyHandle, Status = ZwQueryValueKey(KeyHandle,
&ValueName, &ValueName,
KeyValuePartialInformation, KeyValuePartialInformation,
ValueBuffer, ValueBuffer,
@ -98,7 +98,7 @@ PiInitDefaultLocale(VOID)
/* Read install language id */ /* Read install language id */
RtlRosInitUnicodeStringFromLiteral(&ValueName, RtlRosInitUnicodeStringFromLiteral(&ValueName,
L"InstallLanguage"); L"InstallLanguage");
Status = NtQueryValueKey(KeyHandle, Status = ZwQueryValueKey(KeyHandle,
&ValueName, &ValueName,
KeyValuePartialInformation, KeyValuePartialInformation,
ValueBuffer, ValueBuffer,
@ -120,7 +120,7 @@ PiInitDefaultLocale(VOID)
} }
} }
NtClose(KeyHandle); ZwClose(KeyHandle);
} }
} }
@ -161,12 +161,12 @@ PiInitThreadLocale(VOID)
OBJ_CASE_INSENSITIVE, OBJ_CASE_INSENSITIVE,
NULL, NULL,
NULL); NULL);
Status = NtOpenKey(&KeyHandle, Status = ZwOpenKey(&KeyHandle,
KEY_QUERY_VALUE, KEY_QUERY_VALUE,
&ObjectAttributes); &ObjectAttributes);
if (NT_SUCCESS(Status)) if (NT_SUCCESS(Status))
{ {
Status = NtQueryValueKey(KeyHandle, Status = ZwQueryValueKey(KeyHandle,
&ValueName, &ValueName,
KeyValuePartialInformation, KeyValuePartialInformation,
ValueBuffer, ValueBuffer,
@ -187,7 +187,7 @@ PiInitThreadLocale(VOID)
PsDefaultThreadLocaleId = (LCID)LocaleValue; PsDefaultThreadLocaleId = (LCID)LocaleValue;
} }
} }
NtClose(KeyHandle); ZwClose(KeyHandle);
} }
PsDefaultThreadLocaleInitialized = TRUE; PsDefaultThreadLocaleInitialized = TRUE;
@ -280,14 +280,14 @@ NtSetDefaultLocale(IN BOOLEAN UserProfile,
OBJ_CASE_INSENSITIVE, OBJ_CASE_INSENSITIVE,
UserKey, UserKey,
NULL); NULL);
Status = NtOpenKey(&KeyHandle, Status = ZwOpenKey(&KeyHandle,
KEY_SET_VALUE, KEY_SET_VALUE,
&ObjectAttributes); &ObjectAttributes);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
if (UserKey != NULL) if (UserKey != NULL)
{ {
NtClose(UserKey); ZwClose(UserKey);
} }
return(Status); return(Status);
} }
@ -306,17 +306,17 @@ NtSetDefaultLocale(IN BOOLEAN UserProfile,
} }
ValueLength = (ValueLength + 1) * sizeof(WCHAR); ValueLength = (ValueLength + 1) * sizeof(WCHAR);
Status = NtSetValueKey(KeyHandle, Status = ZwSetValueKey(KeyHandle,
&ValueName, &ValueName,
0, 0,
REG_SZ, REG_SZ,
ValueBuffer, ValueBuffer,
ValueLength); ValueLength);
NtClose(KeyHandle); ZwClose(KeyHandle);
if (UserKey != NULL) if (UserKey != NULL)
{ {
NtClose(UserKey); ZwClose(UserKey);
} }
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
@ -378,7 +378,7 @@ NtQueryDefaultUILanguage(OUT PLANGID LanguageId)
OBJ_CASE_INSENSITIVE, OBJ_CASE_INSENSITIVE,
UserKey, UserKey,
NULL); NULL);
Status = NtOpenKey(&KeyHandle, Status = ZwOpenKey(&KeyHandle,
KEY_QUERY_VALUE, KEY_QUERY_VALUE,
&ObjectAttributes); &ObjectAttributes);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
@ -389,15 +389,15 @@ NtQueryDefaultUILanguage(OUT PLANGID LanguageId)
ValueInfo = (PKEY_VALUE_PARTIAL_INFORMATION)ValueBuffer; ValueInfo = (PKEY_VALUE_PARTIAL_INFORMATION)ValueBuffer;
Status = NtQueryValueKey(KeyHandle, Status = ZwQueryValueKey(KeyHandle,
&ValueName, &ValueName,
KeyValuePartialInformation, KeyValuePartialInformation,
ValueBuffer, ValueBuffer,
VALUE_BUFFER_SIZE, VALUE_BUFFER_SIZE,
&ValueLength); &ValueLength);
NtClose(KeyHandle); ZwClose(KeyHandle);
NtClose(UserKey); ZwClose(UserKey);
if (!NT_SUCCESS(Status) || ValueInfo->Type != REG_SZ) if (!NT_SUCCESS(Status) || ValueInfo->Type != REG_SZ)
{ {
@ -471,12 +471,12 @@ NtSetDefaultUILanguage(IN LANGID LanguageId)
UserHandle, UserHandle,
NULL); NULL);
Status = NtOpenKey(&KeyHandle, Status = ZwOpenKey(&KeyHandle,
KEY_SET_VALUE, KEY_SET_VALUE,
&ObjectAttributes); &ObjectAttributes);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
NtClose(UserHandle); ZwClose(UserHandle);
return Status; return Status;
} }
@ -485,15 +485,15 @@ NtSetDefaultUILanguage(IN LANGID LanguageId)
(ULONG)LanguageId); (ULONG)LanguageId);
ValueLength = (ValueLength + 1) * sizeof(WCHAR); ValueLength = (ValueLength + 1) * sizeof(WCHAR);
Status = NtSetValueKey(KeyHandle, Status = ZwSetValueKey(KeyHandle,
&ValueName, &ValueName,
0, 0,
REG_SZ, REG_SZ,
ValueBuffer, ValueBuffer,
ValueLength); ValueLength);
NtClose(KeyHandle); ZwClose(KeyHandle);
NtClose(UserHandle); ZwClose(UserHandle);
return Status; return Status;
} }