msctf: Implement ITfCategoryMgr::UnregisterCategory.
This commit is contained in:
parent
545b40adf7
commit
6bbd65d07a
|
@ -144,9 +144,37 @@ static HRESULT WINAPI CategoryMgr_RegisterCategory ( ITfCategoryMgr *iface,
|
|||
static HRESULT WINAPI CategoryMgr_UnregisterCategory ( ITfCategoryMgr *iface,
|
||||
REFCLSID rclsid, REFGUID rcatid, REFGUID rguid)
|
||||
{
|
||||
WCHAR fullkey[110];
|
||||
WCHAR buf[39];
|
||||
WCHAR buf2[39];
|
||||
HKEY tipkey;
|
||||
CategoryMgr *This = (CategoryMgr*)iface;
|
||||
FIXME("STUB:(%p)\n",This);
|
||||
return E_NOTIMPL;
|
||||
|
||||
static const WCHAR ctg[] = {'C','a','t','e','g','o','r','y',0};
|
||||
static const WCHAR itm[] = {'I','t','e','m',0};
|
||||
static const WCHAR fmt[] = {'%','s','\\','%','s',0};
|
||||
static const WCHAR fmt2[] = {'%','s','\\','%','s','\\','%','s','\\','%','s',0};
|
||||
|
||||
TRACE("(%p) %s %s %s\n",This,debugstr_guid(rclsid), debugstr_guid(rcatid), debugstr_guid(rguid));
|
||||
|
||||
StringFromGUID2(rclsid, buf, 39);
|
||||
sprintfW(fullkey,fmt,szwSystemTIPKey,buf);
|
||||
|
||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ | KEY_WRITE,
|
||||
&tipkey ) != ERROR_SUCCESS)
|
||||
return E_FAIL;
|
||||
|
||||
StringFromGUID2(rcatid, buf, 39);
|
||||
StringFromGUID2(rguid, buf2, 39);
|
||||
sprintfW(fullkey,fmt2,ctg,ctg,buf,buf2);
|
||||
|
||||
sprintfW(fullkey,fmt2,ctg,itm,buf2,buf);
|
||||
RegDeleteTreeW(tipkey, fullkey);
|
||||
sprintfW(fullkey,fmt2,ctg,itm,buf2,buf);
|
||||
RegDeleteTreeW(tipkey, fullkey);
|
||||
|
||||
RegCloseKey(tipkey);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI CategoryMgr_EnumCategoriesInItem ( ITfCategoryMgr *iface,
|
||||
|
|
|
@ -177,9 +177,9 @@ static void test_UnregisterCategory(void)
|
|||
{
|
||||
HRESULT hr;
|
||||
hr = ITfCategoryMgr_UnregisterCategory(g_cm, &CLSID_FakeService, &GUID_TFCAT_TIP_KEYBOARD, &CLSID_FakeService);
|
||||
todo_wine ok(SUCCEEDED(hr),"ITfCategoryMgr_UnregisterCategory failed\n");
|
||||
ok(SUCCEEDED(hr),"ITfCategoryMgr_UnregisterCategory failed\n");
|
||||
hr = ITfCategoryMgr_UnregisterCategory(g_cm, &CLSID_FakeService, &GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER, &CLSID_FakeService);
|
||||
todo_wine ok(SUCCEEDED(hr),"ITfCategoryMgr_UnregisterCategory failed\n");
|
||||
ok(SUCCEEDED(hr),"ITfCategoryMgr_UnregisterCategory failed\n");
|
||||
}
|
||||
|
||||
static void test_FindClosestCategory(void)
|
||||
|
|
Loading…
Reference in New Issue