Commit 70131341 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

mlang: Implementation of base functionality of IMultiLanguage2::ValidateCodePage…

mlang: Implementation of base functionality of IMultiLanguage2::ValidateCodePage and IMultiLanguage2::ValidateCodePageEx. Does not handle automatically installing language packs. With help from Dmitry Timoshkov.
parent ce20f6c6
......@@ -2910,8 +2910,7 @@ static HRESULT WINAPI fnIMultiLanguage2_ValidateCodePage(
UINT uiCodePage,
HWND hwnd)
{
FIXME("%u, %p\n", uiCodePage, hwnd);
return E_NOTIMPL;
return IMultiLanguage2_ValidateCodePageEx(iface,uiCodePage,hwnd,0);
}
static HRESULT WINAPI fnIMultiLanguage2_GetCodePageDescription(
......@@ -2989,8 +2988,28 @@ static HRESULT WINAPI fnIMultiLanguage2_ValidateCodePageEx(
HWND hwnd,
DWORD dwfIODControl)
{
int i;
ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage3, iface);
FIXME("%p %u %p %08x: stub!\n", This, uiCodePage, hwnd, dwfIODControl);
TRACE("%p %u %p %08x\n", This, uiCodePage, hwnd, dwfIODControl);
/* quick check for kernel32 supported code pages */
if (IsValidCodePage(uiCodePage))
return S_OK;
/* check for mlang supported code pages */
for (i = 0; i < sizeof(mlang_data)/sizeof(mlang_data[0]); i++)
{
int n;
for (n = 0; n < mlang_data[i].number_of_cp; n++)
{
if (mlang_data[i].mime_cp_info[n].cp == uiCodePage)
return S_OK;
}
}
if (dwfIODControl != CPIOD_PEEK)
FIXME("Request to install codepage language pack not handled\n");
return S_FALSE;
}
......
......@@ -27,6 +27,9 @@ cpp_quote("#ifndef _WINNT_")
typedef WORD LANGID;
cpp_quote("#endif")
cpp_quote("#define CPIOD_PEEK 0x40000000")
cpp_quote("#define CPIOD_FORCE_PROMPT 0x80000000")
[
object,
uuid(359f3443-bd4a-11d0-b188-00aa0038c969),
......
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