Aric Stewart : msctf: Implement ITfInputProcessorProfiles::Register.
Alexandre Julliard
julliard at winehq.org
Wed Feb 4 09:15:39 CST 2009
Module: wine
Branch: master
Commit: 649d12b1702a5bf17d169d83ef221468b49453e5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=649d12b1702a5bf17d169d83ef221468b49453e5
Author: Aric Stewart <aric at codeweavers.com>
Date: Tue Feb 3 13:17:41 2009 -0600
msctf: Implement ITfInputProcessorProfiles::Register.
---
dlls/msctf/inputprocessor.c | 19 +++++++++++++++++--
dlls/msctf/msctf.c | 2 ++
dlls/msctf/msctf_internal.h | 1 +
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/dlls/msctf/inputprocessor.c b/dlls/msctf/inputprocessor.c
index b501b47..7ece851 100644
--- a/dlls/msctf/inputprocessor.c
+++ b/dlls/msctf/inputprocessor.c
@@ -97,8 +97,23 @@ static HRESULT WINAPI InputProcessorProfiles_Register(
ITfInputProcessorProfiles *iface, REFCLSID rclsid)
{
InputProcessorProfiles *This = (InputProcessorProfiles*)iface;
- FIXME("STUB:(%p)\n",This);
- return E_NOTIMPL;
+ HKEY tipkey;
+ WCHAR buf[39];
+ static const WCHAR fmt[] = {'%','s','\\','%','s',0};
+ WCHAR fullkey[68];
+
+ TRACE("(%p) %s\n",This,debugstr_guid(rclsid));
+
+ StringFromGUID2(rclsid, buf, 39);
+ sprintfW(fullkey,fmt,szwSystemTIPKey,buf);
+
+ if (RegCreateKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, NULL, 0,
+ KEY_READ | KEY_WRITE, NULL, &tipkey, NULL) != ERROR_SUCCESS)
+ return E_FAIL;
+
+ RegCloseKey(tipkey);
+
+ return S_OK;
}
static HRESULT WINAPI InputProcessorProfiles_Unregister(
diff --git a/dlls/msctf/msctf.c b/dlls/msctf/msctf.c
index 224ce99..e34a9c8 100644
--- a/dlls/msctf/msctf.c
+++ b/dlls/msctf/msctf.c
@@ -45,6 +45,8 @@ static HINSTANCE MSCTF_hinstance;
DWORD tlsIndex = 0;
+const WCHAR szwSystemTIPKey[] = {'S','O','F','T','W','A','R','E','\\','M','i','c','r','o','s','o','f','t','\\','C','T','F','\\','T','I','P',0};
+
typedef HRESULT (*LPFNCONSTRUCTOR)(IUnknown *pUnkOuter, IUnknown **ppvOut);
static const struct {
diff --git a/dlls/msctf/msctf_internal.h b/dlls/msctf/msctf_internal.h
index 1cb4924..cea1723 100644
--- a/dlls/msctf/msctf_internal.h
+++ b/dlls/msctf/msctf_internal.h
@@ -27,4 +27,5 @@ extern HRESULT DocumentMgr_Constructor(ITfDocumentMgr **ppOut);
extern HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **ppOut, TfEditCookie *pecTextStore);
extern HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut);
+extern const WCHAR szwSystemTIPKey[];
#endif /* __WINE_MSCTF_I_H */
More information about the wine-cvs
mailing list