[MSCTF_WINETEST] Sync with Wine Staging 4.0. CORE-15682

This commit is contained in:
Amine Khaldi 2019-01-29 13:05:39 +01:00
parent f089261cb9
commit 53028dd240
5 changed files with 58 additions and 4 deletions

View file

@ -943,7 +943,18 @@ DEFINE_GUID(GUID_COMPARTMENT_TIPUISTATUS, 0x148ca3ec,0x0366,0x401c,0x8
static HRESULT initialize(void)
{
HRESULT hr;
HKEY hkey;
CoInitialize(NULL);
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\CTF\\TIP", 0,
KEY_READ|KEY_WRITE, &hkey) != ERROR_SUCCESS)
{
skip("Not enough permission to register input processor\n");
return E_FAIL;
}
RegCloseKey(hkey);
hr = CoCreateInstance (&CLSID_TF_InputProcessorProfiles, NULL,
CLSCTX_INPROC_SERVER, &IID_ITfInputProcessorProfiles, (void**)&g_ipp);
if (SUCCEEDED(hr))
@ -981,7 +992,8 @@ static void test_Register(void)
ok(SUCCEEDED(hr),"Unable to register COM for TextService\n");
hr = ITfInputProcessorProfiles_Register(g_ipp, &CLSID_FakeService);
ok(SUCCEEDED(hr),"Unable to register text service(%x)\n",hr);
hr = ITfInputProcessorProfiles_AddLanguageProfile(g_ipp, &CLSID_FakeService, gLangid, &CLSID_FakeService, szDesc, sizeof(szDesc)/sizeof(WCHAR), szFile, sizeof(szFile)/sizeof(WCHAR), 1);
hr = ITfInputProcessorProfiles_AddLanguageProfile(g_ipp, &CLSID_FakeService, gLangid,
&CLSID_FakeService, szDesc, ARRAY_SIZE(szDesc), szFile, ARRAY_SIZE(szFile), 1);
ok(SUCCEEDED(hr),"Unable to add Language Profile (%x)\n",hr);
}
@ -2088,7 +2100,7 @@ static void enum_compartments(ITfCompartmentMgr *cmpmgr, REFGUID present, REFGUI
{
WCHAR str[50];
CHAR strA[50];
StringFromGUID2(&g,str,sizeof(str)/sizeof(str[0]));
StringFromGUID2(&g,str,ARRAY_SIZE(str));
WideCharToMultiByte(CP_ACP,0,str,-1,strA,sizeof(strA),0,0);
trace("found %s\n",strA);
if (present && IsEqualGUID(present,&g))