Commit 2d9a7cd3 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

advapi32: Remove useless RegLoadMUIStringA implementation.

This commit avoids brokeness in advance. Otherwise, it will be broken when we support ERROR_MORE_DATA in RegLoadMUIStringW. Signed-off-by: 's avatarAkihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent bfdfe852
......@@ -3280,40 +3280,12 @@ cleanup:
/******************************************************************************
* RegLoadMUIStringA [ADVAPI32.@]
*
* See RegLoadMUIStringW
* Not implemented on native.
*/
LSTATUS WINAPI RegLoadMUIStringA(HKEY hKey, LPCSTR pszValue, LPSTR pszBuffer, DWORD cbBuffer,
LPDWORD pcbData, DWORD dwFlags, LPCSTR pszBaseDir)
{
UNICODE_STRING valueW, baseDirW;
WCHAR *pwszBuffer;
DWORD cbData = cbBuffer * sizeof(WCHAR);
LONG result;
valueW.Buffer = baseDirW.Buffer = pwszBuffer = NULL;
if (!RtlCreateUnicodeStringFromAsciiz(&valueW, pszValue) ||
!RtlCreateUnicodeStringFromAsciiz(&baseDirW, pszBaseDir) ||
!(pwszBuffer = heap_alloc(cbData)))
{
result = ERROR_NOT_ENOUGH_MEMORY;
goto cleanup;
}
result = RegLoadMUIStringW(hKey, valueW.Buffer, pwszBuffer, cbData, NULL, dwFlags,
baseDirW.Buffer);
if (result == ERROR_SUCCESS) {
cbData = WideCharToMultiByte(CP_ACP, 0, pwszBuffer, -1, pszBuffer, cbBuffer, NULL, NULL);
if (pcbData)
*pcbData = cbData;
}
cleanup:
heap_free(pwszBuffer);
RtlFreeUnicodeString(&baseDirW);
RtlFreeUnicodeString(&valueW);
return result;
return ERROR_CALL_NOT_IMPLEMENTED;
}
/******************************************************************************
......
......@@ -3917,7 +3917,7 @@ static void test_RegLoadMUIString(void)
wine_dbgstr_wn(bufW, size / sizeof(WCHAR)), wine_dbgstr_wn(textW, text_size / sizeof(WCHAR)));
ret = pRegLoadMUIStringA(hkey, tz_value, buf, ARRAY_SIZE(buf), &size, 0, NULL);
todo_wine ok(ret == ERROR_CALL_NOT_IMPLEMENTED, "got %d, expected ERROR_CALL_NOT_IMPLEMENTED\n", ret);
ok(ret == ERROR_CALL_NOT_IMPLEMENTED, "got %d, expected ERROR_CALL_NOT_IMPLEMENTED\n", ret);
/* change the current direcoty to other than system32 directory */
SetCurrentDirectoryA("\\");
......@@ -3932,13 +3932,13 @@ static void test_RegLoadMUIString(void)
wine_dbgstr_wn(bufW, size / sizeof(WCHAR)), wine_dbgstr_wn(textW, text_size / sizeof(WCHAR)));
ret = pRegLoadMUIStringA(hkey, tz_value, buf, ARRAY_SIZE(buf), &size, 0, sysdir);
todo_wine ok(ret == ERROR_CALL_NOT_IMPLEMENTED, "got %d, expected ERROR_CALL_NOT_IMPLEMENTED\n", ret);
ok(ret == ERROR_CALL_NOT_IMPLEMENTED, "got %d, expected ERROR_CALL_NOT_IMPLEMENTED\n", ret);
ret = pRegLoadMUIStringW(hkey, tz_valueW, bufW, ARRAY_SIZE(bufW), &size, 0, NULL);
ok(ret == ERROR_FILE_NOT_FOUND, "got %d, expected ERROR_FILE_NOT_FOUND\n", ret);
ret = pRegLoadMUIStringA(hkey, tz_value, buf, ARRAY_SIZE(buf), &size, 0, NULL);
todo_wine ok(ret == ERROR_CALL_NOT_IMPLEMENTED, "got %d, expected ERROR_CALL_NOT_IMPLEMENTED\n", ret);
ok(ret == ERROR_CALL_NOT_IMPLEMENTED, "got %d, expected ERROR_CALL_NOT_IMPLEMENTED\n", ret);
RegCloseKey(hkey);
SetCurrentDirectoryW(curdirW);
......
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