https://git.reactos.org/?p=reactos.git;a=commitdiff;h=53028dd240f5722591504…
commit 53028dd240f572259150465573433e82785ab181
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Tue Jan 29 13:05:39 2019 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Tue Jan 29 13:05:39 2019 +0100
[MSCTF_WINETEST] Sync with Wine Staging 4.0. CORE-15682
---
boot/bootdata/hivesft.inf | 4 ++++
modules/rostests/winetests/msctf/CMakeLists.txt | 4 ++--
modules/rostests/winetests/msctf/inputprocessor.c | 16 ++++++++++++++--
modules/rostests/winetests/msctf/msctf.manifest | 16 ++++++++++++++++
modules/rostests/winetests/msctf/msctf.rc | 22 ++++++++++++++++++++++
5 files changed, 58 insertions(+), 4 deletions(-)
diff --git a/boot/bootdata/hivesft.inf b/boot/bootdata/hivesft.inf
index a5c8654b1d..5f78d8f1df 100644
--- a/boot/bootdata/hivesft.inf
+++ b/boot/bootdata/hivesft.inf
@@ -138,6 +138,10 @@
HKLM,"SOFTWARE\Clients\StartMenuInternet\IEXPLORE.EXE","",0x00000000,"Internet
E
HKLM,"SOFTWARE\Clients\StartMenuInternet\IEXPLORE.EXE\DefaultIcon","",0x00000000,"%programfiles%\Internet
Explorer\iexplore.exe,-7"
HKLM,"SOFTWARE\Clients\StartMenuInternet\IEXPLORE.EXE\shell\open\command","",0x00000000,"%programfiles%\Internet
Explorer\iexplore.exe"
+; CTF
+HKLM,"SOFTWARE\Microsoft\CTF\SystemShared",,0x00000012
+HKLM,"SOFTWARE\Microsoft\CTF\TIP",,0x00000012
+
; DirectX
HKLM,"SOFTWARE\Microsoft\DirectX","InstalledVersion",0x00000001,
0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x00
HKLM,"SOFTWARE\Microsoft\DirectX","Version",0x00000000,"4.09.00.0904"
diff --git a/modules/rostests/winetests/msctf/CMakeLists.txt
b/modules/rostests/winetests/msctf/CMakeLists.txt
index 7853736422..f55675844c 100644
--- a/modules/rostests/winetests/msctf/CMakeLists.txt
+++ b/modules/rostests/winetests/msctf/CMakeLists.txt
@@ -1,5 +1,5 @@
-add_executable(msctf_winetest inputprocessor.c testlist.c)
+add_executable(msctf_winetest inputprocessor.c testlist.c msctf.rc)
set_module_type(msctf_winetest win32cui)
-add_importlibs(msctf_winetest ole32 user32 msvcrt kernel32)
+add_importlibs(msctf_winetest ole32 user32 advapi32 msvcrt kernel32)
add_rostests_file(TARGET msctf_winetest)
diff --git a/modules/rostests/winetests/msctf/inputprocessor.c
b/modules/rostests/winetests/msctf/inputprocessor.c
index 8a02f95117..0d03ce3a8a 100644
--- a/modules/rostests/winetests/msctf/inputprocessor.c
+++ b/modules/rostests/winetests/msctf/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))
@@ -981,7 +992,8 @@ static void test_Register(void)
ok(SUCCEEDED(hr),"Unable to register COM for TextService\n");
hr = ITfInputProcessorProfiles_Register(g_ipp, &CLSID_FakeService);
ok(SUCCEEDED(hr),"Unable to register text service(%x)\n",hr);
- hr = ITfInputProcessorProfiles_AddLanguageProfile(g_ipp, &CLSID_FakeService,
gLangid, &CLSID_FakeService, szDesc, sizeof(szDesc)/sizeof(WCHAR), szFile,
sizeof(szFile)/sizeof(WCHAR), 1);
+ hr = ITfInputProcessorProfiles_AddLanguageProfile(g_ipp, &CLSID_FakeService,
gLangid,
+ &CLSID_FakeService, szDesc, ARRAY_SIZE(szDesc), szFile,
ARRAY_SIZE(szFile), 1);
ok(SUCCEEDED(hr),"Unable to add Language Profile (%x)\n",hr);
}
@@ -2088,7 +2100,7 @@ static void enum_compartments(ITfCompartmentMgr *cmpmgr, REFGUID
present, REFGUI
{
WCHAR str[50];
CHAR strA[50];
- StringFromGUID2(&g,str,sizeof(str)/sizeof(str[0]));
+ StringFromGUID2(&g,str,ARRAY_SIZE(str));
WideCharToMultiByte(CP_ACP,0,str,-1,strA,sizeof(strA),0,0);
trace("found %s\n",strA);
if (present && IsEqualGUID(present,&g))
diff --git a/modules/rostests/winetests/msctf/msctf.manifest
b/modules/rostests/winetests/msctf/msctf.manifest
new file mode 100644
index 0000000000..fc23c29b97
--- /dev/null
+++ b/modules/rostests/winetests/msctf/msctf.manifest
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
+ <assemblyIdentity
+ type="win32"
+ name="Wine.msctf.Test"
+ version="1.0.0.0"
+ processorArchitecture="*"
+ />
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level="asInvoker" />
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+</assembly>
diff --git a/modules/rostests/winetests/msctf/msctf.rc
b/modules/rostests/winetests/msctf/msctf.rc
new file mode 100644
index 0000000000..fcf9f23bab
--- /dev/null
+++ b/modules/rostests/winetests/msctf/msctf.rc
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2018 Zebediah Figura
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "winuser.h"
+
+/* @makedep: msctf.manifest */
+1 RT_MANIFEST msctf.manifest