mlang: Register codepages info in registry.
Outlook 2016 requires Codepage key to exist (it doesn't seem to require it to be filled). Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fe6d35f3cb
commit
23c0047c81
|
@ -3928,12 +3928,65 @@ HRESULT WINAPI DllCanUnloadNow(void)
|
||||||
return dll_count == 0 ? S_OK : S_FALSE;
|
return dll_count == 0 ? S_OK : S_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOL register_codepages(void)
|
||||||
|
{
|
||||||
|
const struct mlang_data *family;
|
||||||
|
const MIME_CP_INFO *info;
|
||||||
|
HKEY db_key, key;
|
||||||
|
WCHAR buf[32];
|
||||||
|
LSTATUS status;
|
||||||
|
|
||||||
|
static const WCHAR db_key_nameW[] = {
|
||||||
|
'M','I','M','E',
|
||||||
|
'\\','D','a','t','a','b','a','s','e',
|
||||||
|
'\\','C','o','d','e','p','a','g','e',0};
|
||||||
|
static const WCHAR familyW[] = {'F','a','m','i','l','y',0};
|
||||||
|
static const WCHAR formatW[] = {'%','u',0};
|
||||||
|
|
||||||
|
status = RegCreateKeyW(HKEY_CLASSES_ROOT, db_key_nameW, &db_key);
|
||||||
|
if (status != ERROR_SUCCESS)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
for (family = mlang_data; family < mlang_data + ARRAY_SIZE(mlang_data); family++)
|
||||||
|
{
|
||||||
|
for (info = family->mime_cp_info; info < family->mime_cp_info + family->number_of_cp; info++)
|
||||||
|
{
|
||||||
|
sprintfW(buf, formatW, info->cp);
|
||||||
|
status = RegCreateKeyW(db_key, buf, &key);
|
||||||
|
if (status != ERROR_SUCCESS)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
RegSetValueExA(key, "BodyCharset", 0, REG_SZ, (BYTE*)info->body_charset,
|
||||||
|
strlen(info->body_charset) + 1);
|
||||||
|
|
||||||
|
if (info->cp == family->family_codepage)
|
||||||
|
{
|
||||||
|
RegSetValueExA(key, "FixedWidthFont", 0, REG_SZ, (BYTE*)family->fixed_font,
|
||||||
|
strlen(family->fixed_font) + 1);
|
||||||
|
RegSetValueExA(key, "ProportionalFont", 0, REG_SZ, (BYTE*)family->proportional_font,
|
||||||
|
strlen(family->proportional_font) + 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RegSetValueExW(key, familyW, 0, REG_DWORD, (BYTE*)&family->family_codepage,
|
||||||
|
sizeof(family->family_codepage));
|
||||||
|
}
|
||||||
|
|
||||||
|
RegCloseKey(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RegCloseKey(db_key);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* DllRegisterServer (MLANG.@)
|
* DllRegisterServer (MLANG.@)
|
||||||
*/
|
*/
|
||||||
HRESULT WINAPI DllRegisterServer(void)
|
HRESULT WINAPI DllRegisterServer(void)
|
||||||
{
|
{
|
||||||
|
if(!register_codepages())
|
||||||
|
return E_FAIL;
|
||||||
return __wine_register_resources( instance );
|
return __wine_register_resources( instance );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2508,6 +2508,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
|
||||||
11,,cryptdlg.dll,1
|
11,,cryptdlg.dll,1
|
||||||
11,,cryptnet.dll,1
|
11,,cryptnet.dll,1
|
||||||
11,,devenum.dll,1
|
11,,devenum.dll,1
|
||||||
|
11,,mlang.dll,1
|
||||||
11,,mp3dmod.dll,1
|
11,,mp3dmod.dll,1
|
||||||
11,,mscoree.dll,1
|
11,,mscoree.dll,1
|
||||||
11,,mshtml.dll,1
|
11,,mshtml.dll,1
|
||||||
|
|
Loading…
Reference in New Issue