Commit f0d4fa04 authored by Mike Hearn's avatar Mike Hearn Committed by Alexandre Julliard

Only do unicode conversion in HTML Help control when filename is

specified.
parent 499a887d
......@@ -32,7 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp);
HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD data)
{
FIXME("(%p, %s, %d, %ld): stub\n", caller, debugstr_w(filename), command, data);
FIXME("(%p, %s, command=%d, data=%ld): stub\n", caller, debugstr_w(filename), command, data);
/* if command is HH_DISPLAY_TOPIC just display an informative message for now */
if (command == HH_DISPLAY_TOPIC)
......@@ -45,12 +45,16 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD data)
HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD data)
{
WCHAR *wfile = NULL;
DWORD len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 );
HWND result;
wfile = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR));
MultiByteToWideChar( CP_ACP, 0, filename, -1, wfile, len );
if (filename)
{
DWORD len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 );
wfile = HeapAlloc( GetProcessHeap(), 0, (len+1) * sizeof(WCHAR));
MultiByteToWideChar( CP_ACP, 0, filename, -1, wfile, len );
}
result = HtmlHelpW( caller, wfile, command, data );
HeapFree( GetProcessHeap(), 0, wfile );
......
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