[SETUPLIB][USETUP] Use NT RTL String Safe functions instead of Win32-oriented ones (and remove usage of HRESULT too).

Based on:
svn path=/branches/setup_improvements/; revision=75755
svn path=/branches/setup_improvements/; revision=75757
This commit is contained in:
Hermès Bélusca-Maïto 2017-09-03 20:05:11 +00:00
parent 254aa472e8
commit 48aab0fb20
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
10 changed files with 69 additions and 70 deletions

View file

@ -298,10 +298,10 @@ AddKbLayoutsToRegistry(
{
if (uIndex > 19) break;
swprintf(szValueName, L"%u", uIndex + 1);
RtlStringCchPrintfW(szValueName, ARRAYSIZE(szValueName), L"%u", uIndex + 1);
RtlInitUnicodeString(&ValueName, szValueName);
swprintf(szLangID, L"0000%s", MuiLayouts[uIndex].LangID);
RtlStringCchPrintfW(szLangID, ARRAYSIZE(szLangID), L"0000%s", MuiLayouts[uIndex].LangID);
if (_wcsicmp(szLangID, MuiLayouts[uIndex].LayoutID) == 0)
{
@ -321,7 +321,7 @@ AddKbLayoutsToRegistry(
}
else
{
swprintf(szLangID, L"d%03lu%s", uCount, MuiLayouts[uIndex].LangID);
RtlStringCchPrintfW(szLangID, ARRAYSIZE(szLangID), L"d%03lu%s", uCount, MuiLayouts[uIndex].LangID);
Status = NtSetValueKey(KeyHandle,
&ValueName,
0,