diff --git a/dlls/shdocvw/shdocvw.spec b/dlls/shdocvw/shdocvw.spec index aa5ef512b3c..4a0dd2c678a 100644 --- a/dlls/shdocvw/shdocvw.spec +++ b/dlls/shdocvw/shdocvw.spec @@ -40,7 +40,7 @@ 151 stdcall -noname URLSubRegQueryA(str str long ptr long long) 152 stub -noname CShellUIHelper_CreateInstance2 153 stub -noname IsURLChild -158 stub -noname SHRestricted2A +158 stdcall -noname SHRestricted2A(long str long) 159 stdcall -noname SHRestricted2W(long wstr long) 160 stub -noname SHIsRestricted2W 161 stub @ # CSearchAssistantOC::OnDraw diff --git a/dlls/shdocvw/shdocvw_main.c b/dlls/shdocvw/shdocvw_main.c index 746753f0ab2..5dfd2b99ddf 100644 --- a/dlls/shdocvw/shdocvw_main.c +++ b/dlls/shdocvw/shdocvw_main.c @@ -440,3 +440,24 @@ DWORD WINAPI SHRestricted2W(DWORD res, LPCWSTR url, DWORD reserved) FIXME("(%d %s %d) stub\n", res, debugstr_w(url), reserved); return 0; } + +/****************************************************************** + * SHRestricted2A (SHDOCVW.158) + * + * See SHRestricted2W + */ +DWORD WINAPI SHRestricted2A(DWORD restriction, LPCSTR url, DWORD reserved) +{ + LPWSTR urlW = NULL; + DWORD res; + + TRACE("(%d, %s, %d)\n", restriction, debugstr_a(url), reserved); + if (url) { + DWORD len = MultiByteToWideChar(CP_ACP, 0, url, -1, NULL, 0); + urlW = heap_alloc(len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, url, -1, urlW, len); + } + res = SHRestricted2W(restriction, urlW, reserved); + heap_free(urlW); + return res; +}