Commit dc176ded authored by Alexandre Julliard's avatar Alexandre Julliard

msctf: Build with msvcrt.

parent c9ea1257
MODULE = msctf.dll MODULE = msctf.dll
IMPORTS = uuid ole32 oleaut32 user32 advapi32 IMPORTS = uuid ole32 oleaut32 user32 advapi32
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ C_SRCS = \
categorymgr.c \ categorymgr.c \
compartmentmgr.c \ compartmentmgr.c \
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#define COBJMACROS #define COBJMACROS
...@@ -33,7 +31,6 @@ ...@@ -33,7 +31,6 @@
#include "winerror.h" #include "winerror.h"
#include "objbase.h" #include "objbase.h"
#include "wine/unicode.h"
#include "msctf.h" #include "msctf.h"
#include "msctf_internal.h" #include "msctf_internal.h"
...@@ -115,7 +112,7 @@ static HRESULT WINAPI CategoryMgr_RegisterCategory ( ITfCategoryMgr *iface, ...@@ -115,7 +112,7 @@ static HRESULT WINAPI CategoryMgr_RegisterCategory ( ITfCategoryMgr *iface,
TRACE("(%p) %s %s %s\n",This,debugstr_guid(rclsid), debugstr_guid(rcatid), debugstr_guid(rguid)); TRACE("(%p) %s %s %s\n",This,debugstr_guid(rclsid), debugstr_guid(rcatid), debugstr_guid(rguid));
StringFromGUID2(rclsid, buf, 39); StringFromGUID2(rclsid, buf, 39);
sprintfW(fullkey,fmt,szwSystemTIPKey,buf); swprintf(fullkey,ARRAY_SIZE(fullkey),fmt,szwSystemTIPKey,buf);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ | KEY_WRITE, if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ | KEY_WRITE,
&tipkey ) != ERROR_SUCCESS) &tipkey ) != ERROR_SUCCESS)
...@@ -123,7 +120,7 @@ static HRESULT WINAPI CategoryMgr_RegisterCategory ( ITfCategoryMgr *iface, ...@@ -123,7 +120,7 @@ static HRESULT WINAPI CategoryMgr_RegisterCategory ( ITfCategoryMgr *iface,
StringFromGUID2(rcatid, buf, 39); StringFromGUID2(rcatid, buf, 39);
StringFromGUID2(rguid, buf2, 39); StringFromGUID2(rguid, buf2, 39);
sprintfW(fullkey,fmt2,ctg,ctg,buf,buf2); swprintf(fullkey,ARRAY_SIZE(fullkey),fmt2,ctg,ctg,buf,buf2);
res = RegCreateKeyExW(tipkey, fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE, res = RegCreateKeyExW(tipkey, fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE,
NULL, &catkey, NULL); NULL, &catkey, NULL);
...@@ -131,7 +128,7 @@ static HRESULT WINAPI CategoryMgr_RegisterCategory ( ITfCategoryMgr *iface, ...@@ -131,7 +128,7 @@ static HRESULT WINAPI CategoryMgr_RegisterCategory ( ITfCategoryMgr *iface,
if (!res) if (!res)
{ {
sprintfW(fullkey,fmt2,ctg,itm,buf2,buf); swprintf(fullkey,ARRAY_SIZE(fullkey),fmt2,ctg,itm,buf2,buf);
res = RegCreateKeyExW(tipkey, fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE, res = RegCreateKeyExW(tipkey, fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE,
NULL, &itmkey, NULL); NULL, &itmkey, NULL);
...@@ -163,7 +160,7 @@ static HRESULT WINAPI CategoryMgr_UnregisterCategory ( ITfCategoryMgr *iface, ...@@ -163,7 +160,7 @@ static HRESULT WINAPI CategoryMgr_UnregisterCategory ( ITfCategoryMgr *iface,
TRACE("(%p) %s %s %s\n",This,debugstr_guid(rclsid), debugstr_guid(rcatid), debugstr_guid(rguid)); TRACE("(%p) %s %s %s\n",This,debugstr_guid(rclsid), debugstr_guid(rcatid), debugstr_guid(rguid));
StringFromGUID2(rclsid, buf, 39); StringFromGUID2(rclsid, buf, 39);
sprintfW(fullkey,fmt,szwSystemTIPKey,buf); swprintf(fullkey,ARRAY_SIZE(fullkey),fmt,szwSystemTIPKey,buf);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ | KEY_WRITE, if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ | KEY_WRITE,
&tipkey ) != ERROR_SUCCESS) &tipkey ) != ERROR_SUCCESS)
...@@ -171,11 +168,9 @@ static HRESULT WINAPI CategoryMgr_UnregisterCategory ( ITfCategoryMgr *iface, ...@@ -171,11 +168,9 @@ static HRESULT WINAPI CategoryMgr_UnregisterCategory ( ITfCategoryMgr *iface,
StringFromGUID2(rcatid, buf, 39); StringFromGUID2(rcatid, buf, 39);
StringFromGUID2(rguid, buf2, 39); StringFromGUID2(rguid, buf2, 39);
sprintfW(fullkey,fmt2,ctg,ctg,buf,buf2); swprintf(fullkey,ARRAY_SIZE(fullkey),fmt2,ctg,ctg,buf,buf2);
sprintfW(fullkey,fmt2,ctg,itm,buf2,buf);
RegDeleteTreeW(tipkey, fullkey); RegDeleteTreeW(tipkey, fullkey);
sprintfW(fullkey,fmt2,ctg,itm,buf2,buf); swprintf(fullkey,ARRAY_SIZE(fullkey),fmt2,ctg,itm,buf2,buf);
RegDeleteTreeW(tipkey, fullkey); RegDeleteTreeW(tipkey, fullkey);
RegCloseKey(tipkey); RegCloseKey(tipkey);
...@@ -216,7 +211,7 @@ static HRESULT WINAPI CategoryMgr_FindClosestCategory ( ITfCategoryMgr *iface, ...@@ -216,7 +211,7 @@ static HRESULT WINAPI CategoryMgr_FindClosestCategory ( ITfCategoryMgr *iface,
return E_INVALIDARG; return E_INVALIDARG;
StringFromGUID2(rguid, buf, 39); StringFromGUID2(rguid, buf, 39);
sprintfW(fullkey,fmt,szwSystemTIPKey,buf,buf); swprintf(fullkey,ARRAY_SIZE(fullkey),fmt,szwSystemTIPKey,buf,buf);
*pcatid = GUID_NULL; *pcatid = GUID_NULL;
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ, &key ) != if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ, &key ) !=
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#define COBJMACROS #define COBJMACROS
...@@ -35,8 +33,6 @@ ...@@ -35,8 +33,6 @@
#include "oleauto.h" #include "oleauto.h"
#include "olectl.h" #include "olectl.h"
#include "wine/unicode.h"
#include "msctf.h" #include "msctf.h"
#include "msctf_internal.h" #include "msctf_internal.h"
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#define COBJMACROS #define COBJMACROS
...@@ -34,8 +32,6 @@ ...@@ -34,8 +32,6 @@
#include "objbase.h" #include "objbase.h"
#include "olectl.h" #include "olectl.h"
#include "wine/unicode.h"
#include "msctf.h" #include "msctf.h"
#include "msctf_internal.h" #include "msctf_internal.h"
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#define COBJMACROS #define COBJMACROS
...@@ -33,8 +31,6 @@ ...@@ -33,8 +31,6 @@
#include "winerror.h" #include "winerror.h"
#include "objbase.h" #include "objbase.h"
#include "wine/unicode.h"
#include "msctf.h" #include "msctf.h"
#include "msctf_internal.h" #include "msctf_internal.h"
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#define COBJMACROS #define COBJMACROS
...@@ -34,8 +32,6 @@ ...@@ -34,8 +32,6 @@
#include "objbase.h" #include "objbase.h"
#include "olectl.h" #include "olectl.h"
#include "wine/unicode.h"
#include "msctf.h" #include "msctf.h"
#include "msctf_internal.h" #include "msctf_internal.h"
...@@ -230,7 +226,7 @@ static void add_userkey( REFCLSID rclsid, LANGID langid, ...@@ -230,7 +226,7 @@ static void add_userkey( REFCLSID rclsid, LANGID langid,
StringFromGUID2(rclsid, buf, 39); StringFromGUID2(rclsid, buf, 39);
StringFromGUID2(guidProfile, buf2, 39); StringFromGUID2(guidProfile, buf2, 39);
sprintfW(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2); swprintf(fullkey,ARRAY_SIZE(fullkey),szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2);
res = RegCreateKeyExW(HKEY_CURRENT_USER,fullkey, 0, NULL, 0, res = RegCreateKeyExW(HKEY_CURRENT_USER,fullkey, 0, NULL, 0,
KEY_READ | KEY_WRITE, NULL, &key, &disposition); KEY_READ | KEY_WRITE, NULL, &key, &disposition);
...@@ -303,7 +299,7 @@ static HRESULT WINAPI InputProcessorProfiles_Register( ...@@ -303,7 +299,7 @@ static HRESULT WINAPI InputProcessorProfiles_Register(
TRACE("(%p) %s\n",This,debugstr_guid(rclsid)); TRACE("(%p) %s\n",This,debugstr_guid(rclsid));
StringFromGUID2(rclsid, buf, 39); StringFromGUID2(rclsid, buf, 39);
sprintfW(fullkey,szwTipfmt,szwSystemTIPKey,buf); swprintf(fullkey,ARRAY_SIZE(fullkey),szwTipfmt,szwSystemTIPKey,buf);
if (RegCreateKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, NULL, 0, if (RegCreateKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, NULL, 0,
KEY_READ | KEY_WRITE, NULL, &tipkey, NULL) != ERROR_SUCCESS) KEY_READ | KEY_WRITE, NULL, &tipkey, NULL) != ERROR_SUCCESS)
...@@ -324,7 +320,7 @@ static HRESULT WINAPI InputProcessorProfiles_Unregister( ...@@ -324,7 +320,7 @@ static HRESULT WINAPI InputProcessorProfiles_Unregister(
TRACE("(%p) %s\n",This,debugstr_guid(rclsid)); TRACE("(%p) %s\n",This,debugstr_guid(rclsid));
StringFromGUID2(rclsid, buf, 39); StringFromGUID2(rclsid, buf, 39);
sprintfW(fullkey,szwTipfmt,szwSystemTIPKey,buf); swprintf(fullkey,ARRAY_SIZE(fullkey),szwTipfmt,szwSystemTIPKey,buf);
RegDeleteTreeW(HKEY_LOCAL_MACHINE, fullkey); RegDeleteTreeW(HKEY_LOCAL_MACHINE, fullkey);
RegDeleteTreeW(HKEY_CURRENT_USER, fullkey); RegDeleteTreeW(HKEY_CURRENT_USER, fullkey);
...@@ -355,14 +351,14 @@ static HRESULT WINAPI InputProcessorProfiles_AddLanguageProfile( ...@@ -355,14 +351,14 @@ static HRESULT WINAPI InputProcessorProfiles_AddLanguageProfile(
debugstr_wn(pchIconFile,cchFile),uIconIndex); debugstr_wn(pchIconFile,cchFile),uIconIndex);
StringFromGUID2(rclsid, buf, 39); StringFromGUID2(rclsid, buf, 39);
sprintfW(fullkey,szwTipfmt,szwSystemTIPKey,buf); swprintf(fullkey,ARRAY_SIZE(fullkey),szwTipfmt,szwSystemTIPKey,buf);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ | KEY_WRITE, if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ | KEY_WRITE,
&tipkey ) != ERROR_SUCCESS) &tipkey ) != ERROR_SUCCESS)
return E_FAIL; return E_FAIL;
StringFromGUID2(guidProfile, buf, 39); StringFromGUID2(guidProfile, buf, 39);
sprintfW(fullkey,fmt2,szwLngp,langid,buf); swprintf(fullkey,ARRAY_SIZE(fullkey),fmt2,szwLngp,langid,buf);
res = RegCreateKeyExW(tipkey,fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE, res = RegCreateKeyExW(tipkey,fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE,
NULL, &fmtkey, &disposition); NULL, &fmtkey, &disposition);
...@@ -421,7 +417,7 @@ static HRESULT WINAPI InputProcessorProfiles_GetDefaultLanguageProfile( ...@@ -421,7 +417,7 @@ static HRESULT WINAPI InputProcessorProfiles_GetDefaultLanguageProfile(
return E_INVALIDARG; return E_INVALIDARG;
StringFromGUID2(catid, buf, 39); StringFromGUID2(catid, buf, 39);
sprintfW(fullkey, szwDefaultFmt, szwSystemCTFKey, szwAssemblies, langid, buf); swprintf(fullkey, ARRAY_SIZE(fullkey), szwDefaultFmt, szwSystemCTFKey, szwAssemblies, langid, buf);
if (RegOpenKeyExW(HKEY_CURRENT_USER, fullkey, 0, KEY_READ | KEY_WRITE, if (RegOpenKeyExW(HKEY_CURRENT_USER, fullkey, 0, KEY_READ | KEY_WRITE,
&hkey ) != ERROR_SUCCESS) &hkey ) != ERROR_SUCCESS)
...@@ -480,7 +476,7 @@ static HRESULT WINAPI InputProcessorProfiles_SetDefaultLanguageProfile( ...@@ -480,7 +476,7 @@ static HRESULT WINAPI InputProcessorProfiles_SetDefaultLanguageProfile(
return E_FAIL; return E_FAIL;
StringFromGUID2(&catid, buf, 39); StringFromGUID2(&catid, buf, 39);
sprintfW(fullkey, szwDefaultFmt, szwSystemCTFKey, szwAssemblies, langid, buf); swprintf(fullkey, ARRAY_SIZE(fullkey), szwDefaultFmt, szwSystemCTFKey, szwAssemblies, langid, buf);
if (RegCreateKeyExW(HKEY_CURRENT_USER, fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE, if (RegCreateKeyExW(HKEY_CURRENT_USER, fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE,
NULL, &hkey, NULL ) != ERROR_SUCCESS) NULL, &hkey, NULL ) != ERROR_SUCCESS)
...@@ -644,7 +640,7 @@ static HRESULT WINAPI InputProcessorProfiles_EnableLanguageProfile( ...@@ -644,7 +640,7 @@ static HRESULT WINAPI InputProcessorProfiles_EnableLanguageProfile(
StringFromGUID2(rclsid, buf, 39); StringFromGUID2(rclsid, buf, 39);
StringFromGUID2(guidProfile, buf2, 39); StringFromGUID2(guidProfile, buf2, 39);
sprintfW(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2); swprintf(fullkey,ARRAY_SIZE(fullkey),szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2);
res = RegOpenKeyExW(HKEY_CURRENT_USER, fullkey, 0, KEY_READ | KEY_WRITE, &key); res = RegOpenKeyExW(HKEY_CURRENT_USER, fullkey, 0, KEY_READ | KEY_WRITE, &key);
...@@ -677,7 +673,7 @@ static HRESULT WINAPI InputProcessorProfiles_IsEnabledLanguageProfile( ...@@ -677,7 +673,7 @@ static HRESULT WINAPI InputProcessorProfiles_IsEnabledLanguageProfile(
StringFromGUID2(rclsid, buf, 39); StringFromGUID2(rclsid, buf, 39);
StringFromGUID2(guidProfile, buf2, 39); StringFromGUID2(guidProfile, buf2, 39);
sprintfW(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2); swprintf(fullkey,ARRAY_SIZE(fullkey),szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2);
res = RegOpenKeyExW(HKEY_CURRENT_USER, fullkey, 0, KEY_READ | KEY_WRITE, &key); res = RegOpenKeyExW(HKEY_CURRENT_USER, fullkey, 0, KEY_READ | KEY_WRITE, &key);
...@@ -721,7 +717,7 @@ static HRESULT WINAPI InputProcessorProfiles_EnableLanguageProfileByDefault( ...@@ -721,7 +717,7 @@ static HRESULT WINAPI InputProcessorProfiles_EnableLanguageProfileByDefault(
StringFromGUID2(rclsid, buf, 39); StringFromGUID2(rclsid, buf, 39);
StringFromGUID2(guidProfile, buf2, 39); StringFromGUID2(guidProfile, buf2, 39);
sprintfW(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2); swprintf(fullkey,ARRAY_SIZE(fullkey),szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2);
res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, fullkey, 0, KEY_READ | KEY_WRITE, &key); res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, fullkey, 0, KEY_READ | KEY_WRITE, &key);
...@@ -1191,7 +1187,7 @@ static INT next_LanguageProfile(EnumTfLanguageProfiles *This, CLSID clsid, TF_LA ...@@ -1191,7 +1187,7 @@ static INT next_LanguageProfile(EnumTfLanguageProfiles *This, CLSID clsid, TF_LA
if (This->langkey == NULL) if (This->langkey == NULL)
{ {
sprintfW(fullkey,fmt,This->szwCurrentClsid,szwLngp,This->langid); swprintf(fullkey,ARRAY_SIZE(fullkey),fmt,This->szwCurrentClsid,szwLngp,This->langid);
res = RegOpenKeyExW(This->tipkey, fullkey, 0, KEY_READ | KEY_WRITE, &This->langkey); res = RegOpenKeyExW(This->tipkey, fullkey, 0, KEY_READ | KEY_WRITE, &This->langkey);
if (res) if (res)
{ {
...@@ -1315,7 +1311,7 @@ static HRESULT WINAPI EnumTfLanguageProfiles_Clone( IEnumTfLanguageProfiles *ifa ...@@ -1315,7 +1311,7 @@ static HRESULT WINAPI EnumTfLanguageProfiles_Clone( IEnumTfLanguageProfiles *ifa
WCHAR fullkey[168]; WCHAR fullkey[168];
static const WCHAR fmt[] = {'%','s','\\','%','s','\\','0','x','%','0','8','x',0}; static const WCHAR fmt[] = {'%','s','\\','%','s','\\','0','x','%','0','8','x',0};
sprintfW(fullkey,fmt,This->szwCurrentClsid,szwLngp,This->langid); swprintf(fullkey,ARRAY_SIZE(fullkey),fmt,This->szwCurrentClsid,szwLngp,This->langid);
res = RegOpenKeyExW(new_This->tipkey, fullkey, 0, KEY_READ | KEY_WRITE, &This->langkey); res = RegOpenKeyExW(new_This->tipkey, fullkey, 0, KEY_READ | KEY_WRITE, &This->langkey);
new_This->lang_index = This->lang_index; new_This->lang_index = This->lang_index;
} }
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#define COBJMACROS #define COBJMACROS
...@@ -33,8 +31,6 @@ ...@@ -33,8 +31,6 @@
#include "winerror.h" #include "winerror.h"
#include "objbase.h" #include "objbase.h"
#include "wine/unicode.h"
#include "msctf.h" #include "msctf.h"
#include "msctf_internal.h" #include "msctf_internal.h"
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#define COBJMACROS #define COBJMACROS
...@@ -34,8 +32,6 @@ ...@@ -34,8 +32,6 @@
#include "objbase.h" #include "objbase.h"
#include "olectl.h" #include "olectl.h"
#include "wine/unicode.h"
#include "msctf.h" #include "msctf.h"
#include "msctf_internal.h" #include "msctf_internal.h"
......
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