Module: wine Branch: master Commit: 4ca01b3475608246a1d71b4194988f4d8099e5cf URL: http://source.winehq.org/git/wine.git/?a=commit;h=4ca01b3475608246a1d71b4194...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sat Jan 29 13:55:47 2011 +0300
shell32/tests: Fix a dependency on unimplemented function call (Valgrind).
---
dlls/shell32/tests/progman_dde.c | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/dlls/shell32/tests/progman_dde.c b/dlls/shell32/tests/progman_dde.c index d7bf432..1e3239d 100644 --- a/dlls/shell32/tests/progman_dde.c +++ b/dlls/shell32/tests/progman_dde.c @@ -200,14 +200,22 @@ static void init_strings(void) WCHAR module[MAX_PATH]; WCHAR module_expanded[MAX_PATH]; WCHAR localized[MAX_PATH]; + HRESULT hr; int id;
MultiByteToWideChar(CP_ACP, 0, startup, -1, startupW, sizeof(startupW)/sizeof(WCHAR)); - pSHGetLocalizedName(startupW, module, MAX_PATH, &id); - ExpandEnvironmentStringsW(module, module_expanded, MAX_PATH); - LoadStringW(GetModuleHandleW(module_expanded), id, localized, MAX_PATH); + hr = pSHGetLocalizedName(startupW, module, MAX_PATH, &id); + todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + /* check to be removed when SHGetLocalizedName is implemented */ + if (hr == S_OK) + { + ExpandEnvironmentStringsW(module, module_expanded, MAX_PATH); + LoadStringW(GetModuleHandleW(module_expanded), id, localized, MAX_PATH);
- WideCharToMultiByte(CP_ACP, 0, localized, -1, StartupTitle, sizeof(StartupTitle), NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, localized, -1, StartupTitle, sizeof(StartupTitle), NULL, NULL); + } + else + lstrcpyA(StartupTitle, (strrchr(startup, '\') + 1)); } else {