Commit 572e8036 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

shlwapi: Duplicate shell32.ShellMessageBoxW implementation in shlwapi.ShellMessageBoxWrapW.

parent 6614028c
......@@ -170,8 +170,8 @@
179 stdcall -noname SHGetNewLinkInfoA(str str ptr long long)
180 stdcall -noname SHGetNewLinkInfoW(wstr wstr ptr long long)
181 stdcall -noname RegisterShellHook(long long)
182 varargs -noname ShellMessageBoxW(long long long str long)
183 varargs -noname ShellMessageBoxA(long long long str long)
182 varargs -noname ShellMessageBoxW(long long wstr wstr long)
183 varargs -noname ShellMessageBoxA(long long str str long)
184 stdcall -noname ArrangeWindows(long long long long long)
185 stub SHHandleDiskFull
186 stdcall -noname ILGetDisplayNameEx(ptr ptr ptr long)
......
......@@ -338,6 +338,12 @@ BOOL WINAPI RegisterShellHook(
* ShellMessageBoxW [SHELL32.182]
*
* See ShellMessageBoxA.
*
* NOTE:
* shlwapi.ShellMessageBoxWrapW is a duplicate of shell32.ShellMessageBoxW
* because we can't forward to it in the .spec file since it's exported by
* ordinal. If you change the implementation here please update the code in
* shlwapi as well.
*/
int WINAPIV ShellMessageBoxW(
HINSTANCE hInstance,
......
......@@ -4297,26 +4297,45 @@ DWORD WINAPI GetUIVersion(void)
/***********************************************************************
* ShellMessageBoxWrapW [SHLWAPI.388]
*
* loads a string resource for a module, displays the string in a
* message box and writes it into the logfile
* See shell32.ShellMessageBoxW
*
* PARAMS
* mod [I] the module containing the string resource
* unknown1 [I] FIXME
* uId [I] the id of the string resource
* title [I] the title of the message box
* unknown2 [I] FIXME
* filename [I] name of the logfile
*
* RETURNS
* FIXME
* NOTE:
* shlwapi.ShellMessageBoxWrapW is a duplicate of shell32.ShellMessageBoxW
* because we can't forward to it in the .spec file since it's exported by
* ordinal. If you change the implementation here please update the code in
* shell32 as well.
*/
BOOL WINAPI ShellMessageBoxWrapW(HMODULE mod, DWORD unknown1, UINT uId,
LPCWSTR title, DWORD unknown2, LPCWSTR filename)
INT WINAPIV ShellMessageBoxWrapW(HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText,
LPCWSTR lpCaption, UINT uType, ...)
{
FIXME("%p %x %d %s %x %s\n",
mod, unknown1, uId, debugstr_w(title), unknown2, debugstr_w(filename));
return TRUE;
WCHAR szText[100], szTitle[100];
LPCWSTR pszText = szText, pszTitle = szTitle;
LPWSTR pszTemp;
va_list args;
int ret;
va_start(args, uType);
TRACE("(%p,%p,%p,%p,%08x)\n", hInstance, hWnd, lpText, lpCaption, uType);
if (IS_INTRESOURCE(lpCaption))
LoadStringW(hInstance, LOWORD(lpCaption), szTitle, sizeof(szTitle)/sizeof(szTitle[0]));
else
pszTitle = lpCaption;
if (IS_INTRESOURCE(lpText))
LoadStringW(hInstance, LOWORD(lpText), szText, sizeof(szText)/sizeof(szText[0]));
else
pszText = lpText;
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING,
pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args);
va_end(args);
ret = MessageBoxW(hWnd, pszTemp, pszTitle, uType);
LocalFree((HLOCAL)pszTemp);
return ret;
}
HRESULT WINAPI IUnknown_QueryServiceExec(IUnknown *unk, REFIID service, REFIID clsid,
......
......@@ -385,7 +385,7 @@
385 stub -noname SHLoadRawAccelerators
386 stub -noname SHQueryRawAccelerator
387 stub -noname SHQueryRawAcceleratorMsg
388 stdcall -noname ShellMessageBoxWrapW(ptr long long wstr long wstr)
388 varargs -noname ShellMessageBoxWrapW(long long wstr wstr long)
389 stdcall -noname GetSaveFileNameWrapW(ptr)
390 stdcall -noname WNetRestoreConnectionWrapW(long wstr)
391 stdcall -noname WNetGetLastErrorWrapW(ptr ptr long ptr long)
......
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