Commit 6bbd65d0 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

msctf: Implement ITfCategoryMgr::UnregisterCategory.

parent 545b40ad
...@@ -144,9 +144,37 @@ static HRESULT WINAPI CategoryMgr_RegisterCategory ( ITfCategoryMgr *iface, ...@@ -144,9 +144,37 @@ static HRESULT WINAPI CategoryMgr_RegisterCategory ( ITfCategoryMgr *iface,
static HRESULT WINAPI CategoryMgr_UnregisterCategory ( ITfCategoryMgr *iface, static HRESULT WINAPI CategoryMgr_UnregisterCategory ( ITfCategoryMgr *iface,
REFCLSID rclsid, REFGUID rcatid, REFGUID rguid) REFCLSID rclsid, REFGUID rcatid, REFGUID rguid)
{ {
WCHAR fullkey[110];
WCHAR buf[39];
WCHAR buf2[39];
HKEY tipkey;
CategoryMgr *This = (CategoryMgr*)iface; 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, static HRESULT WINAPI CategoryMgr_EnumCategoriesInItem ( ITfCategoryMgr *iface,
......
...@@ -177,9 +177,9 @@ static void test_UnregisterCategory(void) ...@@ -177,9 +177,9 @@ static void test_UnregisterCategory(void)
{ {
HRESULT hr; HRESULT hr;
hr = ITfCategoryMgr_UnregisterCategory(g_cm, &CLSID_FakeService, &GUID_TFCAT_TIP_KEYBOARD, &CLSID_FakeService); 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); 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) static void test_FindClosestCategory(void)
......
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