Fixes https://bugs.winehq.org/show_bug.cgi?id=39238
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msctf/tests/Makefile.in | 2 +- dlls/msctf/tests/inputprocessor.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/msctf/tests/Makefile.in b/dlls/msctf/tests/Makefile.in index 2cb119a..4f699af 100644 --- a/dlls/msctf/tests/Makefile.in +++ b/dlls/msctf/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = msctf.dll -IMPORTS = ole32 user32 +IMPORTS = ole32 user32 advapi32
C_SRCS = \ inputprocessor.c diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c index 4a52432..0d03ce3 100644 --- a/dlls/msctf/tests/inputprocessor.c +++ b/dlls/msctf/tests/inputprocessor.c @@ -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))