diff --git a/reactos/dll/win32/msctf/CMakeLists.txt b/reactos/dll/win32/msctf/CMakeLists.txt index f2c49f66bca..e934bf6ddf0 100644 --- a/reactos/dll/win32/msctf/CMakeLists.txt +++ b/reactos/dll/win32/msctf/CMakeLists.txt @@ -1,11 +1,9 @@ -add_definitions(-D__WINESRC__) - remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) +add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - spec2def(msctf.dll msctf.spec) list(APPEND SOURCE @@ -19,12 +17,10 @@ list(APPEND SOURCE msctf.c range.c threadmgr.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/msctf_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/msctf.def) -add_library(msctf SHARED ${SOURCE}) - +add_library(msctf SHARED ${SOURCE} version.rc) set_module_type(msctf win32dll) target_link_libraries(msctf uuid wine) add_importlibs(msctf ole32 oleaut32 user32 advapi32 msvcrt kernel32 ntdll) diff --git a/reactos/dll/win32/msctf/categorymgr.c b/reactos/dll/win32/msctf/categorymgr.c index 101c112503c..5cce446929c 100644 --- a/reactos/dll/win32/msctf/categorymgr.c +++ b/reactos/dll/win32/msctf/categorymgr.c @@ -72,7 +72,7 @@ static HRESULT WINAPI CategoryMgr_QueryInterface(ITfCategoryMgr *iface, REFIID i if (*ppvOut) { - IUnknown_AddRef(iface); + ITfCategoryMgr_AddRef(iface); return S_OK; } @@ -245,7 +245,7 @@ static HRESULT WINAPI CategoryMgr_FindClosestCategory ( ITfCategoryMgr *iface, if (ulCount) { - int j; + ULONG j; BOOL found = FALSE; for (j = 0; j < ulCount; j++) if (IsEqualGUID(&guid, ppcatidList[j])) diff --git a/reactos/dll/win32/msctf/compartmentmgr.c b/reactos/dll/win32/msctf/compartmentmgr.c index 76a9a94ae49..ee5d687511e 100644 --- a/reactos/dll/win32/msctf/compartmentmgr.c +++ b/reactos/dll/win32/msctf/compartmentmgr.c @@ -135,7 +135,7 @@ static HRESULT WINAPI CompartmentMgr_QueryInterface(ITfCompartmentMgr *iface, RE if (*ppvOut) { - IUnknown_AddRef(iface); + ITfCompartmentMgr_AddRef(iface); return S_OK; } @@ -308,7 +308,7 @@ static HRESULT WINAPI CompartmentEnumGuid_QueryInterface(IEnumGUID *iface, REFII if (*ppvOut) { - IUnknown_AddRef(iface); + IEnumGUID_AddRef(iface); return S_OK; } @@ -468,7 +468,7 @@ static HRESULT WINAPI Compartment_QueryInterface(ITfCompartment *iface, REFIID i if (*ppvOut) { - IUnknown_AddRef(iface); + ITfCompartment_AddRef(iface); return S_OK; } @@ -621,7 +621,7 @@ static HRESULT WINAPI CompartmentSource_UnadviseSink(ITfSource *iface, DWORD pdw if (get_Cookie_magic(pdwCookie)!=COOKIE_MAGIC_COMPARTMENTSINK) return E_INVALIDARG; - sink = (CompartmentSink*)remove_Cookie(pdwCookie); + sink = remove_Cookie(pdwCookie); if (!sink) return CONNECT_E_NOCONNECTION; diff --git a/reactos/dll/win32/msctf/context.c b/reactos/dll/win32/msctf/context.c index 91c01f652aa..9266d81fe5d 100644 --- a/reactos/dll/win32/msctf/context.c +++ b/reactos/dll/win32/msctf/context.c @@ -145,10 +145,10 @@ static void Context_Destructor(Context *This) } if (This->pITextStoreACP) - ITextStoreACPSink_Release(This->pITextStoreACP); + ITextStoreACP_Release(This->pITextStoreACP); if (This->pITfContextOwnerCompositionSink) - ITextStoreACPSink_Release(This->pITfContextOwnerCompositionSink); + ITfContextOwnerCompositionSink_Release(This->pITfContextOwnerCompositionSink); if (This->defaultCookie) { @@ -220,7 +220,7 @@ static HRESULT WINAPI Context_QueryInterface(ITfContext *iface, REFIID iid, LPVO if (*ppvOut) { - IUnknown_AddRef(iface); + ITfContext_AddRef(iface); return S_OK; } @@ -373,7 +373,7 @@ static HRESULT WINAPI Context_SetSelection (ITfContext *iface, { TS_SELECTION_ACP *acp; Context *This = (Context *)iface; - INT i; + ULONG i; HRESULT hr; TRACE("(%p) %i %i %p\n",This,ec,ulCount,pSelection); @@ -646,7 +646,7 @@ static HRESULT WINAPI ContextSource_UnadviseSink(ITfSource *iface, DWORD pdwCook if (get_Cookie_magic(pdwCookie)!=COOKIE_MAGIC_CONTEXTSINK) return E_INVALIDARG; - sink = (ContextSink*)remove_Cookie(pdwCookie); + sink = remove_Cookie(pdwCookie); if (!sink) return CONNECT_E_NOCONNECTION; @@ -900,7 +900,7 @@ static HRESULT WINAPI TextStoreACPSink_QueryInterface(ITextStoreACPSink *iface, if (*ppvOut) { - IUnknown_AddRef(iface); + ITextStoreACPSink_AddRef(iface); return S_OK; } diff --git a/reactos/dll/win32/msctf/displayattributemgr.c b/reactos/dll/win32/msctf/displayattributemgr.c index d9daadd2388..614e004aaf1 100644 --- a/reactos/dll/win32/msctf/displayattributemgr.c +++ b/reactos/dll/win32/msctf/displayattributemgr.c @@ -65,7 +65,7 @@ static HRESULT WINAPI DisplayAttributeMgr_QueryInterface(ITfDisplayAttributeMgr if (*ppvOut) { - IUnknown_AddRef(iface); + ITfDisplayAttributeMgr_AddRef(iface); return S_OK; } diff --git a/reactos/dll/win32/msctf/documentmgr.c b/reactos/dll/win32/msctf/documentmgr.c index 865e6152c49..db97a417429 100644 --- a/reactos/dll/win32/msctf/documentmgr.c +++ b/reactos/dll/win32/msctf/documentmgr.c @@ -76,7 +76,7 @@ static inline DocumentMgr *impl_from_ITfSource(ITfSource *iface) return CONTAINING_RECORD(iface, DocumentMgr, ITfSource_iface); } -static inline EnumTfContext *impl_from_IEnumTfContexts(IEnumTfContexts *iface)\ +static inline EnumTfContext *impl_from_IEnumTfContexts(IEnumTfContexts *iface) { return CONTAINING_RECORD(iface, EnumTfContext, IEnumTfContexts_iface); } @@ -117,7 +117,7 @@ static HRESULT WINAPI DocumentMgr_QueryInterface(ITfDocumentMgr *iface, REFIID i if (*ppvOut) { - IUnknown_AddRef(iface); + ITfDocumentMgr_AddRef(iface); return S_OK; } @@ -165,7 +165,7 @@ static HRESULT WINAPI DocumentMgr_Push(ITfDocumentMgr *iface, ITfContext *pic) if (This->contextStack[1]) /* FUll */ return TF_E_STACKFULL; - if (!pic || FAILED(IUnknown_QueryInterface(pic,&IID_ITfContext,(LPVOID*) &check))) + if (!pic || FAILED(ITfContext_QueryInterface(pic,&IID_ITfContext,(LPVOID*) &check))) return E_INVALIDARG; if (This->contextStack[0] == NULL) @@ -190,14 +190,14 @@ static HRESULT WINAPI DocumentMgr_Pop(ITfDocumentMgr *iface, DWORD dwFlags) if (This->contextStack[0]) { ITfThreadMgrEventSink_OnPopContext(This->ThreadMgrSink,This->contextStack[0]); - ITfContext_Release(This->contextStack[0]); Context_Uninitialize(This->contextStack[0]); + ITfContext_Release(This->contextStack[0]); } if (This->contextStack[1]) { ITfThreadMgrEventSink_OnPopContext(This->ThreadMgrSink,This->contextStack[1]); - ITfContext_Release(This->contextStack[1]); Context_Uninitialize(This->contextStack[1]); + ITfContext_Release(This->contextStack[1]); } This->contextStack[0] = This->contextStack[1] = NULL; ITfThreadMgrEventSink_OnUninitDocumentMgr(This->ThreadMgrSink, iface); @@ -211,8 +211,8 @@ static HRESULT WINAPI DocumentMgr_Pop(ITfDocumentMgr *iface, DWORD dwFlags) return E_FAIL; ITfThreadMgrEventSink_OnPopContext(This->ThreadMgrSink,This->contextStack[0]); - ITfContext_Release(This->contextStack[0]); Context_Uninitialize(This->contextStack[0]); + ITfContext_Release(This->contextStack[0]); This->contextStack[0] = This->contextStack[1]; This->contextStack[1] = NULL; @@ -368,7 +368,7 @@ static HRESULT WINAPI EnumTfContext_QueryInterface(IEnumTfContexts *iface, REFII if (*ppvOut) { - IUnknown_AddRef(iface); + IEnumTfContexts_AddRef(iface); return S_OK; } diff --git a/reactos/dll/win32/msctf/inputprocessor.c b/reactos/dll/win32/msctf/inputprocessor.c index 849a4e96a52..fd0260cdb4e 100644 --- a/reactos/dll/win32/msctf/inputprocessor.c +++ b/reactos/dll/win32/msctf/inputprocessor.c @@ -176,7 +176,7 @@ static HRESULT WINAPI InputProcessorProfiles_QueryInterface(ITfInputProcessorPro if (*ppvOut) { - IUnknown_AddRef(iface); + ITfInputProcessorProfiles_AddRef(iface); return S_OK; } @@ -743,7 +743,7 @@ static HRESULT WINAPI IPPSource_UnadviseSink(ITfSource *iface, DWORD pdwCookie) if (get_Cookie_magic(pdwCookie)!=COOKIE_MAGIC_IPPSINK) return E_INVALIDARG; - sink = (InputProcessorProfilesSink*)remove_Cookie(pdwCookie); + sink = remove_Cookie(pdwCookie); if (!sink) return CONNECT_E_NOCONNECTION; @@ -807,7 +807,7 @@ static HRESULT WINAPI ProfilesEnumGuid_QueryInterface(IEnumGUID *iface, REFIID i if (*ppvOut) { - IUnknown_AddRef(iface); + IEnumGUID_AddRef(iface); return S_OK; } @@ -963,7 +963,7 @@ static HRESULT WINAPI EnumTfLanguageProfiles_QueryInterface(IEnumTfLanguageProfi if (*ppvOut) { - IUnknown_AddRef(iface); + IEnumTfLanguageProfiles_AddRef(iface); return S_OK; } diff --git a/reactos/dll/win32/msctf/langbarmgr.c b/reactos/dll/win32/msctf/langbarmgr.c index 285f22becc7..b73ff120d0d 100644 --- a/reactos/dll/win32/msctf/langbarmgr.c +++ b/reactos/dll/win32/msctf/langbarmgr.c @@ -65,7 +65,7 @@ static HRESULT WINAPI LangBarMgr_QueryInterface(ITfLangBarMgr *iface, REFIID iid if (*ppvOut) { - IUnknown_AddRef(iface); + ITfLangBarMgr_AddRef(iface); return S_OK; } diff --git a/reactos/dll/win32/msctf/msctf.c b/reactos/dll/win32/msctf/msctf.c index 4927b011e0c..e7acabdcec1 100644 --- a/reactos/dll/win32/msctf/msctf.c +++ b/reactos/dll/win32/msctf/msctf.c @@ -39,6 +39,7 @@ //#include "comcat.h" #include #include +#include #include "msctf_internal.h" @@ -202,7 +203,7 @@ static HRESULT ClassFactory_Constructor(LPFNCONSTRUCTOR ctor, LPVOID *ppvOut) */ DWORD generate_Cookie(DWORD magic, LPVOID data) { - int i; + UINT i; /* try to reuse IDs if possible */ for (i = 0; i < id_last; i++) @@ -286,7 +287,7 @@ LPVOID remove_Cookie(DWORD id) DWORD enumerate_Cookie(DWORD magic, DWORD *index) { - int i; + unsigned int i; for (i = *index; i < id_last; i++) if (cookies[i].id != 0 && cookies[i].magic == magic) { @@ -530,6 +531,7 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID fImpLoad) tlsIndex = TlsAlloc(); break; case DLL_PROCESS_DETACH: + if (fImpLoad) break; TlsFree(tlsIndex); break; } @@ -605,7 +607,7 @@ HRESULT WINAPI TF_GetThreadMgr(ITfThreadMgr **pptim) /*********************************************************************** * SetInputScope(MSCTF.@) */ -HRESULT WINAPI SetInputScope(HWND hwnd, INT inputscope) +HRESULT WINAPI SetInputScope(HWND hwnd, InputScope inputscope) { FIXME("STUB: %p %i\n",hwnd,inputscope); return S_OK; @@ -614,16 +616,16 @@ HRESULT WINAPI SetInputScope(HWND hwnd, INT inputscope) /*********************************************************************** * SetInputScopes(MSCTF.@) */ -HRESULT WINAPI SetInputScopes(HWND hwnd, const INT *pInputScopes, +HRESULT WINAPI SetInputScopes(HWND hwnd, const InputScope *pInputScopes, UINT cInputScopes, WCHAR **ppszPhraseList, UINT cPhrases, WCHAR *pszRegExp, WCHAR *pszSRGS) { - int i; + UINT i; FIXME("STUB: %p ... %s %s\n",hwnd, debugstr_w(pszRegExp), debugstr_w(pszSRGS)); for (i = 0; i < cInputScopes; i++) - TRACE("\tScope[%i] = %i\n",i,pInputScopes[i]); + TRACE("\tScope[%u] = %i\n",i,pInputScopes[i]); for (i = 0; i < cPhrases; i++) - TRACE("\tPhrase[%i] = %s\n",i,debugstr_w(ppszPhraseList[i])); + TRACE("\tPhrase[%u] = %s\n",i,debugstr_w(ppszPhraseList[i])); return S_OK; } @@ -654,3 +656,11 @@ HRESULT WINAPI TF_CreateLangBarMgr(ITfLangBarMgr **pppbm) TRACE("\n"); return LangBarMgr_Constructor(NULL,(IUnknown**)pppbm); } + +HRESULT WINAPI TF_CreateLangBarItemMgr(ITfLangBarItemMgr **pplbim) +{ + FIXME("stub %p\n", pplbim); + *pplbim = NULL; + + return E_NOTIMPL; +} diff --git a/reactos/dll/win32/msctf/msctf.spec b/reactos/dll/win32/msctf/msctf.spec index 387af570021..4dbfb92541d 100644 --- a/reactos/dll/win32/msctf/msctf.spec +++ b/reactos/dll/win32/msctf/msctf.spec @@ -12,7 +12,7 @@ @ stub TF_CreateCicLoadMutex @ stub TF_CreateDisplayAttributeMgr @ stdcall TF_CreateInputProcessorProfiles(ptr) -@ stub TF_CreateLangBarItemMgr +@ stdcall TF_CreateLangBarItemMgr(ptr) @ stdcall TF_CreateLangBarMgr(ptr) @ stdcall TF_CreateThreadMgr(ptr) @ stub TF_DllDetachInOther diff --git a/reactos/dll/win32/msctf/range.c b/reactos/dll/win32/msctf/range.c index c92f314fdbb..9e0ac1cb1c0 100644 --- a/reactos/dll/win32/msctf/range.c +++ b/reactos/dll/win32/msctf/range.c @@ -81,7 +81,7 @@ static HRESULT WINAPI Range_QueryInterface(ITfRange *iface, REFIID iid, LPVOID * if (*ppvOut) { - IUnknown_AddRef(iface); + ITfRange_AddRef(iface); return S_OK; } diff --git a/reactos/dll/win32/msctf/threadmgr.c b/reactos/dll/win32/msctf/threadmgr.c index ac27dcba87c..9993c9cc739 100644 --- a/reactos/dll/win32/msctf/threadmgr.c +++ b/reactos/dll/win32/msctf/threadmgr.c @@ -283,7 +283,7 @@ static HRESULT WINAPI ThreadMgr_QueryInterface(ITfThreadMgr *iface, REFIID iid, if (*ppvOut) { - IUnknown_AddRef(iface); + ITfThreadMgr_AddRef(iface); return S_OK; } @@ -426,7 +426,7 @@ static HRESULT WINAPI ThreadMgr_SetFocus( ITfThreadMgr* iface, ITfDocumentMgr *p if (!pdimFocus) check = NULL; - else if (FAILED(IUnknown_QueryInterface(pdimFocus,&IID_ITfDocumentMgr,(LPVOID*) &check))) + else if (FAILED(ITfDocumentMgr_QueryInterface(pdimFocus,&IID_ITfDocumentMgr,(LPVOID*) &check))) return E_INVALIDARG; ITfThreadMgrEventSink_OnSetFocus((ITfThreadMgrEventSink*)&This->ThreadMgrEventSinkVtbl, check, This->focus); @@ -666,7 +666,7 @@ static HRESULT WINAPI ThreadMgrSource_UnadviseSink(ITfSource *iface, DWORD pdwCo if (get_Cookie_magic(pdwCookie)!=COOKIE_MAGIC_TMSINK) return E_INVALIDARG; - sink = (ThreadMgrSink*)remove_Cookie(pdwCookie); + sink = remove_Cookie(pdwCookie); if (!sink) return CONNECT_E_NOCONNECTION; @@ -728,7 +728,7 @@ static HRESULT WINAPI KeystrokeMgr_AdviseKeyEventSink(ITfKeystrokeMgr *iface, if (check != NULL) return CONNECT_E_ADVISELIMIT; - if (FAILED(IUnknown_QueryInterface(pSink,&IID_ITfKeyEventSink,(LPVOID*) &check))) + if (FAILED(ITfKeyEventSink_QueryInterface(pSink,&IID_ITfKeyEventSink,(LPVOID*) &check))) return E_INVALIDARG; set_textservice_sink(tid, &IID_ITfKeyEventSink, (IUnknown*)check); @@ -1337,7 +1337,7 @@ static HRESULT WINAPI EnumTfDocumentMgr_QueryInterface(IEnumTfDocumentMgrs *ifac if (*ppvOut) { - IUnknown_AddRef(iface); + IEnumTfDocumentMgrs_AddRef(iface); return S_OK; } @@ -1396,7 +1396,7 @@ static HRESULT WINAPI EnumTfDocumentMgr_Next(IEnumTfDocumentMgrs *iface, static HRESULT WINAPI EnumTfDocumentMgr_Skip( IEnumTfDocumentMgrs* iface, ULONG celt) { - INT i; + ULONG i; EnumTfDocumentMgr *This = (EnumTfDocumentMgr *)iface; TRACE("(%p)\n",This); for(i = 0; i < celt && This->index != NULL; i++) diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 4f8cff42832..e80de6e1773 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -110,7 +110,7 @@ reactos/dll/win32/msadp32.acm # Synced to Wine-1.7.1 reactos/dll/win32/mscat32 # Synced to Wine-1.7.1 reactos/dll/win32/mscms # Synced to Wine-1.7.1 reactos/dll/win32/mscoree # Synced to Wine-1.5.4 -reactos/dll/win32/msctf # Synced to Wine-1.5.4 +reactos/dll/win32/msctf # Synced to Wine-1.7.1 reactos/dll/win32/msftedit # Synced to Wine-1.5.19 reactos/dll/win32/msg711.acm # Synced to Wine-1.5.19 reactos/dll/win32/msgsm32.acm # Synced to Wine-1.5.4