Aric Stewart : msctf: Implement ITfInputProcessorProfiles:: EnableLanguageProfile.

Alexandre Julliard julliard at winehq.org
Wed Feb 18 10:15:21 CST 2009


Module: wine
Branch: master
Commit: f970d0006b0616f1c32e6280f88f720535a21082
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f970d0006b0616f1c32e6280f88f720535a21082

Author: Aric Stewart <aric at codeweavers.com>
Date:   Tue Feb 17 10:25:28 2009 -0600

msctf: Implement ITfInputProcessorProfiles::EnableLanguageProfile.

---

 dlls/msctf/inputprocessor.c |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/dlls/msctf/inputprocessor.c b/dlls/msctf/inputprocessor.c
index 3ffa4bd..83ec51e 100644
--- a/dlls/msctf/inputprocessor.c
+++ b/dlls/msctf/inputprocessor.c
@@ -318,9 +318,30 @@ static HRESULT WINAPI InputProcessorProfiles_EnableLanguageProfile(
         ITfInputProcessorProfiles *iface, REFCLSID rclsid, LANGID langid,
         REFGUID guidProfile, BOOL fEnable)
 {
+    HKEY key;
+    WCHAR buf[39];
+    WCHAR buf2[39];
+    WCHAR fullkey[168];
+    ULONG res;
+
     InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
-    FIXME("STUB:(%p)\n",This);
-    return E_NOTIMPL;
+    TRACE("(%p) %s %x %s %i\n",This, debugstr_guid(rclsid), langid, debugstr_guid(guidProfile), fEnable);
+
+    StringFromGUID2(rclsid, buf, 39);
+    StringFromGUID2(guidProfile, buf2, 39);
+    sprintfW(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2);
+
+    res = RegOpenKeyExW(HKEY_CURRENT_USER, fullkey, 0, KEY_READ | KEY_WRITE, &key);
+
+    if (!res)
+    {
+        RegSetValueExW(key, szwEnabled, 0, REG_DWORD, (LPBYTE)&fEnable, sizeof(DWORD));
+        RegCloseKey(key);
+    }
+    else
+        return E_FAIL;
+
+    return S_OK;
 }
 
 static HRESULT WINAPI InputProcessorProfiles_IsEnabledLanguageProfile(




More information about the wine-cvs mailing list