Akihiro Sagawa : advapi32: Remove useless RegLoadMUIStringA implementation.
Alexandre Julliard
julliard at winehq.org
Mon May 13 16:24:17 CDT 2019
Module: wine
Branch: master
Commit: 2d9a7cd39de010e7a11e9e7c919b1dcf7082ccbc
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2d9a7cd39de010e7a11e9e7c919b1dcf7082ccbc
Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date: Thu May 9 22:07:32 2019 +0900
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: Akihiro Sagawa <sagawa.aki at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/advapi32/registry.c | 32 ++------------------------------
dlls/advapi32/tests/registry.c | 6 +++---
2 files changed, 5 insertions(+), 33 deletions(-)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index 328ae39..97561e2 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -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;
}
/******************************************************************************
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index cadb936..a1fcb5e 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -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);
More information about the wine-cvs
mailing list