ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2023
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
20 participants
274 discussions
Start a n
N
ew thread
[reactos] 01/01: [SDK] Add cicRealCoCreateInstance into <cicero/cicbase.h>
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f2d34ab4c9532af5b22b0…
commit f2d34ab4c9532af5b22b0c56dc5eb882f1ae234e Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Dec 23 11:02:40 2023 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Sat Dec 23 11:02:40 2023 +0900 [SDK] Add cicRealCoCreateInstance into <cicero/cicbase.h> It looks like Cicero wants to hook CoCreateInstance. CORE-19363 --- sdk/include/reactos/cicero/cicbase.h | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/sdk/include/reactos/cicero/cicbase.h b/sdk/include/reactos/cicero/cicbase.h index 805a8187d7b..6bf6a491e80 100644 --- a/sdk/include/reactos/cicero/cicbase.h +++ b/sdk/include/reactos/cicero/cicbase.h @@ -241,29 +241,20 @@ _cicGetSetUserCoCreateInstance(FN_CoCreateInstance fnUserCoCreateInstance) return s_fn; } -/** - * @implemented - */ static inline HRESULT -cicCoCreateInstance( +cicRealCoCreateInstance( REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv) { - FN_CoCreateInstance fnUserCoCreateInstance = _cicGetSetUserCoCreateInstance(NULL); - if (fnUserCoCreateInstance) - return fnUserCoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, ppv); - static HINSTANCE s_hOle32 = NULL; static FN_CoCreateInstance s_fnCoCreateInstance = NULL; if (!s_fnCoCreateInstance) { if (!s_hOle32) s_hOle32 = cicLoadSystemLibrary(L"ole32.dll", FALSE); - if (!s_hOle32) - return E_NOTIMPL; s_fnCoCreateInstance = (FN_CoCreateInstance)GetProcAddress(s_hOle32, "CoCreateInstance"); if (!s_fnCoCreateInstance) return E_NOTIMPL; @@ -272,6 +263,25 @@ cicCoCreateInstance( return s_fnCoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, ppv); } +/** + * @implemented + */ +static inline HRESULT +cicCoCreateInstance( + REFCLSID rclsid, + LPUNKNOWN pUnkOuter, + DWORD dwClsContext, + REFIID iid, + LPVOID *ppv) +{ + // NOTE: It looks like Cicero wants to hook CoCreateInstance + FN_CoCreateInstance fnUserCoCreateInstance = _cicGetSetUserCoCreateInstance(NULL); + if (fnUserCoCreateInstance) + return fnUserCoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, ppv); + + return cicRealCoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, ppv); +} + /** * @implemented */
1 year
1
0
0
0
[reactos] 01/01: [CTFMON][MSCTFIME][SDK] Refactoring on Cicero design
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eb72347672f6f5750c06a…
commit eb72347672f6f5750c06aa74bba559f69e637ad7 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Dec 23 09:34:41 2023 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Sat Dec 23 09:34:41 2023 +0900 [CTFMON][MSCTFIME][SDK] Refactoring on Cicero design CORE-19362 --- base/applications/ctfmon/ctfmon.cpp | 6 +++ dll/ime/msctfime/msctfime.cpp | 62 +++++++++++------------ sdk/include/reactos/cicero/cicbase.h | 96 ++++++++++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+), 31 deletions(-) diff --git a/base/applications/ctfmon/ctfmon.cpp b/base/applications/ctfmon/ctfmon.cpp index c0da53c4cf4..71e7aeae2af 100644 --- a/base/applications/ctfmon/ctfmon.cpp +++ b/base/applications/ctfmon/ctfmon.cpp @@ -180,6 +180,9 @@ InitApp( g_bOnWow64 = cicIsWow64(); // Is the current process on WoW64? cicGetOSInfo(&g_uACP, &g_dwOsInfo); // Get OS info + // Initialize Cicero + TFInitLib(); + // Create a mutex for Cicero g_hCicMutex = TF_CreateCicLoadMutex(&g_fWinLogon); if (!g_hCicMutex) @@ -234,6 +237,9 @@ UninitApp(VOID) // Close TIP Bar Popup ClosePopupTipbar(); + // Release Cicero + TFUninitLib(); + // Close the mutex ::CloseHandle(g_hCicMutex); g_hCicMutex = NULL; diff --git a/dll/ime/msctfime/msctfime.cpp b/dll/ime/msctfime/msctfime.cpp index cfb29f4db17..6aa33c76490 100644 --- a/dll/ime/msctfime/msctfime.cpp +++ b/dll/ime/msctfime/msctfime.cpp @@ -120,13 +120,7 @@ IsInteractiveUserLogon(VOID) return bOK && IsMember; } -typedef struct LIBTHREAD -{ - IUnknown *m_pUnknown1; - ITfDisplayAttributeMgr *m_pDisplayAttrMgr; -} LIBTHREAD, *PLIBTHREAD; - -HRESULT InitDisplayAttrbuteLib(PLIBTHREAD pLibThread) +HRESULT InitDisplayAttrbuteLib(PCIC_LIBTHREAD pLibThread) { if (!pLibThread) return E_FAIL; @@ -141,7 +135,7 @@ HRESULT InitDisplayAttrbuteLib(PLIBTHREAD pLibThread) return E_NOTIMPL; } -HRESULT UninitDisplayAttrbuteLib(PLIBTHREAD pLibThread) +HRESULT UninitDisplayAttrbuteLib(PCIC_LIBTHREAD pLibThread) { if (!pLibThread) return E_FAIL; @@ -155,23 +149,6 @@ HRESULT UninitDisplayAttrbuteLib(PLIBTHREAD pLibThread) return S_OK; } -void TFUninitLib_Thread(PLIBTHREAD pLibThread) -{ - if (!pLibThread) - return; - - if (pLibThread->m_pUnknown1) - { - pLibThread->m_pUnknown1->Release(); - pLibThread->m_pUnknown1 = NULL; - } - if (pLibThread->m_pDisplayAttrMgr) - { - pLibThread->m_pDisplayAttrMgr->Release(); - pLibThread->m_pDisplayAttrMgr = NULL; - } -} - /*********************************************************************** * Compartment */ @@ -542,7 +519,7 @@ public: DWORD m_dw3[19]; public: - CicInputContext(TfClientId cliendId, LIBTHREAD *pLibThread, HIMC hIMC); + CicInputContext(TfClientId cliendId, PCIC_LIBTHREAD pLibThread, HIMC hIMC); virtual ~CicInputContext() { } @@ -576,7 +553,7 @@ public: /** * @unimplemented */ -CicInputContext::CicInputContext(TfClientId cliendId, LIBTHREAD *pLibThread, HIMC hIMC) +CicInputContext::CicInputContext(TfClientId cliendId, PCIC_LIBTHREAD pLibThread, HIMC hIMC) { m_hIMC = hIMC; m_guid = GUID_NULL; @@ -1040,7 +1017,7 @@ protected: ITfDocumentMgr *m_pDocMgr; CThreadMgrEventSink *m_pThreadMgrEventSink; TfClientId m_cliendId; - LIBTHREAD m_LibThread; + CIC_LIBTHREAD m_LibThread; DWORD m_dw21; static BOOL CALLBACK EnumCreateInputContextCallback(HIMC hIMC, LPARAM lParam); @@ -2833,6 +2810,22 @@ VOID DetachIME(VOID) /** * @unimplemented */ +VOID InitUIFLib(VOID) +{ + //FIXME +} + +/** + * @unimplemented + */ +VOID DoneUIFLib(VOID) +{ + //FIXME +} + +/** + * @implemented + */ BOOL ProcessAttach(HINSTANCE hinstDLL) { g_hInst = hinstDLL; @@ -2844,7 +2837,10 @@ BOOL ProcessAttach(HINSTANCE hinstDLL) cicGetOSInfo(&g_uACP, &g_dwOSInfo); - // FIXME + InitUIFLib(); + + if (!TFInitLib()) + return FALSE; gfTFInitLib = TRUE; return AttachIME(); @@ -2857,14 +2853,18 @@ VOID ProcessDetach(HINSTANCE hinstDLL) { // FIXME + TF_DllDetachInOther(); + if (gfTFInitLib) + { DetachIME(); + TFUninitLib(); + } DeleteCriticalSection(&g_csLock); TLS::InternalDestroyTLS(); TLS::Uninitialize(); - - // FIXME + DoneUIFLib(); } /** diff --git a/sdk/include/reactos/cicero/cicbase.h b/sdk/include/reactos/cicero/cicbase.h index 9b934991e2d..805a8187d7b 100644 --- a/sdk/include/reactos/cicero/cicbase.h +++ b/sdk/include/reactos/cicero/cicbase.h @@ -49,6 +49,12 @@ inline void __cdecl operator delete(void* ptr, size_t size) noexcept cicMemFree(ptr); } +typedef struct CIC_LIBTHREAD +{ + IUnknown *m_pUnknown1; + ITfDisplayAttributeMgr *m_pDisplayAttrMgr; +} CIC_LIBTHREAD, *PCIC_LIBTHREAD; + /* The flags of cicGetOSInfo() */ #define CIC_OSINFO_NT 0x01 #define CIC_OSINFO_2KPLUS 0x02 @@ -217,3 +223,93 @@ Failure: m_cchPath = 0; return FALSE; } + +// ole32!CoCreateInstance +typedef HRESULT (WINAPI *FN_CoCreateInstance)( + REFCLSID rclsid, + LPUNKNOWN pUnkOuter, + DWORD dwClsContext, + REFIID iid, + LPVOID *ppv); + +static inline FN_CoCreateInstance +_cicGetSetUserCoCreateInstance(FN_CoCreateInstance fnUserCoCreateInstance) +{ + static FN_CoCreateInstance s_fn = NULL; + if (fnUserCoCreateInstance) + s_fn = fnUserCoCreateInstance; + return s_fn; +} + +/** + * @implemented + */ +static inline HRESULT +cicCoCreateInstance( + REFCLSID rclsid, + LPUNKNOWN pUnkOuter, + DWORD dwClsContext, + REFIID iid, + LPVOID *ppv) +{ + FN_CoCreateInstance fnUserCoCreateInstance = _cicGetSetUserCoCreateInstance(NULL); + if (fnUserCoCreateInstance) + return fnUserCoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, ppv); + + static HINSTANCE s_hOle32 = NULL; + static FN_CoCreateInstance s_fnCoCreateInstance = NULL; + if (!s_fnCoCreateInstance) + { + if (!s_hOle32) + s_hOle32 = cicLoadSystemLibrary(L"ole32.dll", FALSE); + if (!s_hOle32) + return E_NOTIMPL; + s_fnCoCreateInstance = (FN_CoCreateInstance)GetProcAddress(s_hOle32, "CoCreateInstance"); + if (!s_fnCoCreateInstance) + return E_NOTIMPL; + } + + return s_fnCoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, ppv); +} + +/** + * @implemented + */ +static inline BOOL +TFInitLib(FN_CoCreateInstance fnCoCreateInstance = NULL) +{ + if (fnCoCreateInstance) + _cicGetSetUserCoCreateInstance(fnCoCreateInstance); + return TRUE; +} + +/** + * @unimplemented + */ +static inline VOID +TFUninitLib(VOID) +{ + //FIXME +} + +/** + * @implemented + */ +static inline VOID +TFUninitLib_Thread(PCIC_LIBTHREAD pLibThread) +{ + if (!pLibThread) + return; + + if (pLibThread->m_pUnknown1) + { + pLibThread->m_pUnknown1->Release(); + pLibThread->m_pUnknown1 = NULL; + } + + if (pLibThread->m_pDisplayAttrMgr) + { + pLibThread->m_pDisplayAttrMgr->Release(); + pLibThread->m_pDisplayAttrMgr = NULL; + } +}
1 year
1
0
0
0
[reactos] 01/01: [CTFMON][SDK] Move ClosePopupTipbar and GetPopupTipbar
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=50755684cfaa5135db8b0…
commit 50755684cfaa5135db8b0fc8fc48d032ecd36929 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Dec 23 08:27:47 2023 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Sat Dec 23 08:27:47 2023 +0900 [CTFMON][SDK] Move ClosePopupTipbar and GetPopupTipbar Refactoring. CORE-19362 --- base/applications/ctfmon/precomp.h | 10 ++++++++++ sdk/include/reactos/cicero/cicbase.h | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/base/applications/ctfmon/precomp.h b/base/applications/ctfmon/precomp.h index 541e1d6833a..4a8a5d121d5 100644 --- a/base/applications/ctfmon/precomp.h +++ b/base/applications/ctfmon/precomp.h @@ -43,3 +43,13 @@ typedef enum WATCH_INDEX WI_ASSEMBLIES = 11, WI_DESKTOP_SWITCH = 12, } WATCH_INDEX; + +// FIXME: Use msutb.dll and header +static inline void ClosePopupTipbar(void) +{ +} + +// FIXME: Use msutb.dll and header +static inline void GetPopupTipbar(HWND hwnd, BOOL fWinLogon) +{ +} diff --git a/sdk/include/reactos/cicero/cicbase.h b/sdk/include/reactos/cicero/cicbase.h index c3eff7f720c..9b934991e2d 100644 --- a/sdk/include/reactos/cicero/cicbase.h +++ b/sdk/include/reactos/cicero/cicbase.h @@ -49,16 +49,6 @@ inline void __cdecl operator delete(void* ptr, size_t size) noexcept cicMemFree(ptr); } -// FIXME: Use msutb.dll and header -static inline void ClosePopupTipbar(void) -{ -} - -// FIXME: Use msutb.dll and header -static inline void GetPopupTipbar(HWND hwnd, BOOL fWinLogon) -{ -} - /* The flags of cicGetOSInfo() */ #define CIC_OSINFO_NT 0x01 #define CIC_OSINFO_2KPLUS 0x02
1 year
1
0
0
0
[reactos] 01/01: [BROWSEUI] Clear pidlLastParsed on CAddressEditBox::Execute (#6183)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ac1a96477ba45d37c8448…
commit ac1a96477ba45d37c8448fc3cf858f7cca6c426f Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Dec 23 08:16:01 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Dec 23 08:16:01 2023 +0900 [BROWSEUI] Clear pidlLastParsed on CAddressEditBox::Execute (#6183) Based on KRosUser's gopidlparsed.patch. Clear pidlLastParsed if necessary. CORE-19019 --- dll/win32/browseui/addresseditbox.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dll/win32/browseui/addresseditbox.cpp b/dll/win32/browseui/addresseditbox.cpp index cec978c191e..7eb6581f731 100644 --- a/dll/win32/browseui/addresseditbox.cpp +++ b/dll/win32/browseui/addresseditbox.cpp @@ -318,8 +318,16 @@ HRESULT STDMETHODCALLTYPE CAddressEditBox::Execute(long paramC) hr = psf->CompareIDs(0, pidl, pidlLastParsed); SHFree(pidl); + if (hr == 0) + { + if (pidlLastParsed) + { + ILFree(pidlLastParsed); + pidlLastParsed = NULL; + } return S_OK; + } /* * Attempt to browse to the parsed pidl
1 year
1
0
0
0
[reactos] 01/01: [MSCTFIME] Delay-import msctf, oleaut32, and imm32 (#6220)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=19f3d6bd8d736ad15e789…
commit 19f3d6bd8d736ad15e78923be339261098d2484e Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Dec 22 20:21:25 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Dec 22 20:21:25 2023 +0900 [MSCTFIME] Delay-import msctf, oleaut32, and imm32 (#6220) Reduce DLL initialization cost. - Delay-import msctf.dll, oleaut32.dll, and imm32.dll. - Unlink comctl32.dll. CORE-19360 --- dll/ime/msctfime/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dll/ime/msctfime/CMakeLists.txt b/dll/ime/msctfime/CMakeLists.txt index 72e89de4e9c..b2ec562e673 100644 --- a/dll/ime/msctfime/CMakeLists.txt +++ b/dll/ime/msctfime/CMakeLists.txt @@ -17,5 +17,6 @@ add_library(msctfime MODULE set_module_type(msctfime win32dll UNICODE) set_target_properties(msctfime PROPERTIES SUFFIX ".ime") target_link_libraries(msctfime wine uuid) -add_importlibs(msctfime msctf oleaut32 imm32 user32 gdi32 advapi32 comctl32 msvcrt kernel32 ntdll) +add_importlibs(msctfime user32 gdi32 advapi32 msvcrt kernel32 ntdll) +add_delay_importlibs(msctfime msctf oleaut32 imm32) add_cd_file(TARGET msctfime DESTINATION reactos/system32 FOR all)
1 year
1
0
0
0
[reactos] 01/01: [MSCTFIME][SDK] s/IMCCLock/CicIMCCLock/ and s/IMCLock/CicIMCLock/
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1726ee83e7b673c3bd415…
commit 1726ee83e7b673c3bd415476aec0ee24de80a586 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Dec 22 14:52:49 2023 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Dec 22 14:52:49 2023 +0900 [MSCTFIME][SDK] s/IMCCLock/CicIMCCLock/ and s/IMCLock/CicIMCLock/ Refactoring. CORE-19360 --- dll/ime/msctfime/msctfime.cpp | 28 ++++++++++++++-------------- sdk/include/reactos/cicero/cicimc.h | 30 +++++++++++++++--------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/dll/ime/msctfime/msctfime.cpp b/dll/ime/msctfime/msctfime.cpp index 1164df5c733..cfb29f4db17 100644 --- a/dll/ime/msctfime/msctfime.cpp +++ b/dll/ime/msctfime/msctfime.cpp @@ -565,11 +565,11 @@ public: HRESULT GetGuidAtom( - _Inout_ IMCLock& imcLock, + _Inout_ CicIMCLock& imcLock, _In_ BYTE iAtom, _Out_opt_ LPDWORD pdwGuidAtom); - HRESULT CreateInputContext(ITfThreadMgr *pThreadMgr, IMCLock& imcLock); + HRESULT CreateInputContext(ITfThreadMgr *pThreadMgr, CicIMCLock& imcLock); HRESULT DestroyInputContext(); }; @@ -665,11 +665,11 @@ CicInputContext::OnEndComposition( */ HRESULT CicInputContext::GetGuidAtom( - _Inout_ IMCLock& imcLock, + _Inout_ CicIMCLock& imcLock, _In_ BYTE iAtom, _Out_opt_ LPDWORD pdwGuidAtom) { - IMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCompStr); + CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCompStr); HRESULT hr = imeContext.m_hr; if (!imeContext) hr = E_FAIL; @@ -690,7 +690,7 @@ CicInputContext::GetGuidAtom( * @unimplemented */ HRESULT -CicInputContext::CreateInputContext(ITfThreadMgr *pThreadMgr, IMCLock& imcLock) +CicInputContext::CreateInputContext(ITfThreadMgr *pThreadMgr, CicIMCLock& imcLock) { //FIXME return E_NOTIMPL; @@ -1069,7 +1069,7 @@ public: HRESULT DestroyInputContext(TLS *pTLS, HIMC hIMC); void PostTransMsg(HWND hWnd, INT cTransMsgs, LPTRANSMSG pTransMsgs); - void GetDocumentManager(IMCCLock<CTFIMECONTEXT>& imeContext); + void GetDocumentManager(CicIMCCLock<CTFIMECONTEXT>& imeContext); HRESULT ConfigureGeneral(TLS* pTLS, ITfThreadMgr *pThreadMgr, HKL hKL, HWND hWnd); HRESULT ConfigureRegisterWord(TLS* pTLS, ITfThreadMgr *pThreadMgr, HKL hKL, HWND hWnd, LPVOID lpData); @@ -1675,7 +1675,7 @@ CicBridge::~CicBridge() UnInitIMMX(pTLS); } -void CicBridge::GetDocumentManager(IMCCLock<CTFIMECONTEXT>& imeContext) +void CicBridge::GetDocumentManager(CicIMCCLock<CTFIMECONTEXT>& imeContext) { CicInputContext *pCicIC = imeContext.get().m_pCicIC; if (pCicIC) @@ -1695,7 +1695,7 @@ void CicBridge::GetDocumentManager(IMCCLock<CTFIMECONTEXT>& imeContext) */ HRESULT CicBridge::CreateInputContext(TLS *pTLS, HIMC hIMC) { - IMCLock imcLock(hIMC); + CicIMCLock imcLock(hIMC); HRESULT hr = imcLock.m_hr; if (!imcLock) hr = E_FAIL; @@ -1710,7 +1710,7 @@ HRESULT CicBridge::CreateInputContext(TLS *pTLS, HIMC hIMC) imcLock.get().hCtfImeContext = hCtfImeContext; } - IMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext); + CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext); CicInputContext *pCicIC = imeContext.get().m_pCicIC; if (!pCicIC) { @@ -1758,7 +1758,7 @@ HRESULT CicBridge::CreateInputContext(TLS *pTLS, HIMC hIMC) */ HRESULT CicBridge::DestroyInputContext(TLS *pTLS, HIMC hIMC) { - IMCLock imcLock(hIMC); + CicIMCLock imcLock(hIMC); HRESULT hr = imcLock.m_hr; if (!imcLock) hr = E_FAIL; @@ -1766,7 +1766,7 @@ HRESULT CicBridge::DestroyInputContext(TLS *pTLS, HIMC hIMC) return hr; hr = E_FAIL; - IMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext); + CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext); if (imeContext) hr = imeContext.m_hr; @@ -2515,7 +2515,7 @@ CtfImeGetGuidAtom( { TRACE("(%p, 0x%lX, %p)\n", hIMC, dwUnknown, pdwGuidAtom); - IMCLock imcLock(hIMC); + CicIMCLock imcLock(hIMC); HRESULT hr = imcLock.m_hr; if (!imcLock) @@ -2523,7 +2523,7 @@ CtfImeGetGuidAtom( if (FAILED(hr)) return hr; - IMCCLock<CTFIMECONTEXT> imccLock(imcLock.get().hCtfImeContext); + CicIMCCLock<CTFIMECONTEXT> imccLock(imcLock.get().hCtfImeContext); hr = imccLock.m_hr; if (!imccLock) hr = E_FAIL; @@ -2550,7 +2550,7 @@ CtfImeIsGuidMapEnable( BOOL ret = FALSE; HRESULT hr; - IMCLock imcLock(hIMC); + CicIMCLock imcLock(hIMC); hr = imcLock.m_hr; if (!imcLock) diff --git a/sdk/include/reactos/cicero/cicimc.h b/sdk/include/reactos/cicero/cicimc.h index 81a642ec067..18b25bdb191 100644 --- a/sdk/include/reactos/cicero/cicimc.h +++ b/sdk/include/reactos/cicero/cicimc.h @@ -7,13 +7,13 @@ #pragma once -// class IMCCLOCK<T_DATA>; -// class IMCCLock<T_DATA>; -// class _IMCLock; -// class IMCLock; +// class CIC_IMCC_LOCK<T_DATA>; +// class CicIMCCLock<T_DATA>; +// class CIC_IMC_LOCK; +// class CicIMCLock; template <typename T_DATA> -class IMCCLOCK +class CIC_IMCC_LOCK { protected: T_DATA *m_pIMCC; @@ -22,7 +22,7 @@ public: HIMCC m_hIMCC; HRESULT m_hr; - IMCCLOCK(HIMCC hIMCC) + CIC_IMCC_LOCK(HIMCC hIMCC) { m_pIMCC = NULL; m_hr = S_OK; @@ -31,15 +31,15 @@ public: }; template <typename T_DATA> -class IMCCLock : public IMCCLOCK<T_DATA> +class CicIMCCLock : public CIC_IMCC_LOCK<T_DATA> { public: - IMCCLock(HIMCC hIMCC) : IMCCLOCK<T_DATA>(hIMCC) + CicIMCCLock(HIMCC hIMCC) : CIC_IMCC_LOCK<T_DATA>(hIMCC) { if (hIMCC) _LockIMCC(this->m_hIMCC, &this->m_pIMCC); } - ~IMCCLock() + ~CicIMCCLock() { unlock(); } @@ -78,7 +78,7 @@ protected: } }; -class IMCLOCK +class CIC_IMC_LOCK { protected: LPINPUTCONTEXTDX m_pIC; @@ -88,7 +88,7 @@ public: HRESULT m_hr; DWORD m_dw3; - IMCLOCK(HIMC hIMC) + CIC_IMC_LOCK(HIMC hIMC) { m_pIC = NULL; m_hIMC = hIMC; @@ -102,14 +102,14 @@ public: } }; -class IMCLock : public IMCLOCK +class CicIMCLock : public CIC_IMC_LOCK { public: - IMCLock(HIMC hIMC) : IMCLOCK(hIMC) + CicIMCLock(HIMC hIMC) : CIC_IMC_LOCK(hIMC) { m_hr = _LockIMC(hIMC, &m_pIC); } - ~IMCLock() + ~CicIMCLock() { unlock(); } @@ -136,7 +136,7 @@ public: if (ImmGetIMCCSize(m_pIC->hCompStr) < sizeof(COMPOSITIONSTRING)) return FALSE; - IMCCLock<COMPOSITIONSTRING> imccLock(m_pIC->hCompStr); + CicIMCCLock<COMPOSITIONSTRING> imccLock(m_pIC->hCompStr); if (!imccLock) return FALSE;
1 year
1
0
0
0
[reactos] 01/01: [SDK] Add <cicero/cicevent.h>
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=91b740f9001e2ad7edb36…
commit 91b740f9001e2ad7edb36db8d57e976849922094 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Dec 22 12:26:43 2023 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Dec 22 12:26:43 2023 +0900 [SDK] Add <cicero/cicevent.h> CORE-19361 --- sdk/include/reactos/cicero/cicevent.h | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/sdk/include/reactos/cicero/cicevent.h b/sdk/include/reactos/cicero/cicevent.h new file mode 100644 index 00000000000..a783872b2c2 --- /dev/null +++ b/sdk/include/reactos/cicero/cicevent.h @@ -0,0 +1,55 @@ +/* + * PROJECT: ReactOS Cicero + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: Cicero event object handling + * COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> + */ + +#pragma once + +#include "cicbase.h" + +class CicEvent +{ + HANDLE m_hEvent; + LPCWSTR m_pszName; + +public: + CicEvent() : m_hEvent(NULL), m_pszName(NULL) + { + } + ~CicEvent() + { + Close(); + } + + BOOL Create(LPSECURITY_ATTRIBUTES lpSA, LPCWSTR pszName) + { + if (pszName) + m_pszName = pszName; + if (!m_pszName) + return FALSE; + m_hEvent = ::CreateEventW(lpSA, FALSE, FALSE, m_pszName); + return (m_hEvent != NULL); + } + BOOL Open(LPCWSTR pszName) + { + if (pszName) + m_pszName = pszName; + m_hEvent = ::OpenEventW(EVENT_ALL_ACCESS, FALSE, m_pszName); + return (m_hEvent != NULL); + } + void Close() + { + if (m_hEvent) + { + ::CloseHandle(m_hEvent); + m_hEvent = NULL; + } + } + + BOOL Wait(DWORD dwMilliseconds) + { + return (::WaitForSingleObject(m_hEvent, dwMilliseconds) == WAIT_OBJECT_0); + } +};
1 year
1
0
0
0
[reactos] 01/01: [SDK] Add <cicero/cicmutex.h>
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eaa975c54e6bbc467e70f…
commit eaa975c54e6bbc467e70fc5b1de3bef4fafd93d0 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Dec 22 12:13:27 2023 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Dec 22 12:13:27 2023 +0900 [SDK] Add <cicero/cicmutex.h> CORE-19361 --- sdk/include/reactos/cicero/cicmutex.h | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/sdk/include/reactos/cicero/cicmutex.h b/sdk/include/reactos/cicero/cicmutex.h new file mode 100644 index 00000000000..9c98146e8c0 --- /dev/null +++ b/sdk/include/reactos/cicero/cicmutex.h @@ -0,0 +1,50 @@ +/* + * PROJECT: ReactOS Cicero + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: Cicero mutex handling + * COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> + */ + +#pragma once + +#include "cicbase.h" + +class CicMutex +{ + HANDLE m_hMutex; + BOOL m_bInit; + +public: + CicMutex() : m_hMutex(NULL), m_bInit(FALSE) + { + } + ~CicMutex() + { + Uninit(); + } + + void Init(LPSECURITY_ATTRIBUTES lpSA, LPCWSTR pszMutexName) + { + m_hMutex = ::CreateMutexW(lpSA, FALSE, pszMutexName); + m_bInit = TRUE; + } + void Uninit() + { + if (m_hMutex) + { + ::CloseHandle(m_hMutex); + m_hMutex = NULL; + } + m_bInit = FALSE; + } + + BOOL Enter() + { + DWORD dwWait = ::WaitForSingleObject(m_hMutex, 5000); + return (dwWait == WAIT_OBJECT_0) || (dwWait == WAIT_ABANDONED); + } + void Leave() + { + ::ReleaseMutex(m_hMutex); + } +};
1 year
1
0
0
0
[reactos] 01/01: [CTFMON][MSCTFIME][SDK] Improve cicGetOSInfo
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c4308d1e49c27849f5f7c…
commit c4308d1e49c27849f5f7c960cb909d33684b032e Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Dec 22 11:52:06 2023 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Dec 22 11:52:06 2023 +0900 [CTFMON][MSCTFIME][SDK] Improve cicGetOSInfo and s/OSINFO_/CIC_OSINFO/. Adapt ctfmon and msctfime to these changes. CORE-19360 --- base/applications/ctfmon/CLoaderWnd.cpp | 2 +- base/applications/ctfmon/CRegWatcher.cpp | 2 +- base/applications/ctfmon/ctfmon.cpp | 5 ++- dll/ime/msctfime/msctfime.cpp | 3 +- sdk/include/reactos/cicero/cicbase.h | 55 +++++++++++++++++++++----------- 5 files changed, 42 insertions(+), 25 deletions(-) diff --git a/base/applications/ctfmon/CLoaderWnd.cpp b/base/applications/ctfmon/CLoaderWnd.cpp index 400941be008..a95259dd584 100644 --- a/base/applications/ctfmon/CLoaderWnd.cpp +++ b/base/applications/ctfmon/CLoaderWnd.cpp @@ -55,7 +55,7 @@ CLoaderWnd::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_QUERYENDSESSION: // NOTE: We don't support Win95/98/Me #ifdef SUPPORT_WIN9X - if (!(g_dwOsInfo & OSINFO_NT) && (!g_fWinLogon || (lParam & ENDSESSION_LOGOFF))) + if (!(g_dwOsInfo & CIC_OSINFO_NT) && (!g_fWinLogon || (lParam & ENDSESSION_LOGOFF))) { ClosePopupTipbar(); TF_UninitSystem(); diff --git a/base/applications/ctfmon/CRegWatcher.cpp b/base/applications/ctfmon/CRegWatcher.cpp index f27ab57895c..04d3f213622 100644 --- a/base/applications/ctfmon/CRegWatcher.cpp +++ b/base/applications/ctfmon/CRegWatcher.cpp @@ -41,7 +41,7 @@ CRegWatcher::Init() { // NOTE: We don't support Win95/98/Me #ifdef SUPPORT_WIN9X - if (!(g_dwOsInfo & OSINFO_NT)) + if (!(g_dwOsInfo & CIC_OSINFO_NT)) s_WatchEntries[WI_RUN].hRootKey = HKEY_LOCAL_MACHINE; #endif diff --git a/base/applications/ctfmon/ctfmon.cpp b/base/applications/ctfmon/ctfmon.cpp index 676c0657289..c0da53c4cf4 100644 --- a/base/applications/ctfmon/ctfmon.cpp +++ b/base/applications/ctfmon/ctfmon.cpp @@ -177,9 +177,8 @@ InitApp( { g_hInst = hInstance; // Save the instance handle - g_uACP = ::GetACP(); // Save the active codepage g_bOnWow64 = cicIsWow64(); // Is the current process on WoW64? - g_dwOsInfo = cicGetOSInfo(); // Get OS info + cicGetOSInfo(&g_uACP, &g_dwOsInfo); // Get OS info // Create a mutex for Cicero g_hCicMutex = TF_CreateCicLoadMutex(&g_fWinLogon); @@ -190,7 +189,7 @@ InitApp( WriteRegRun(); // Call SetProcessShutdownParameters if possible - if (g_dwOsInfo & OSINFO_NT) + if (g_dwOsInfo & CIC_OSINFO_NT) { g_hKernel32 = cicGetSystemModuleHandle(L"kernel32.dll", FALSE); g_fnSetProcessShutdownParameters = diff --git a/dll/ime/msctfime/msctfime.cpp b/dll/ime/msctfime/msctfime.cpp index 36dcf4b68f3..1164df5c733 100644 --- a/dll/ime/msctfime/msctfime.cpp +++ b/dll/ime/msctfime/msctfime.cpp @@ -11,6 +11,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msctfime); HINSTANCE g_hInst = NULL; /* The instance of this module */ BOOL g_bWinLogon = FALSE; +UINT g_uACP = CP_ACP; DWORD g_dwOSInfo = 0; BOOL gfTFInitLib = FALSE; CRITICAL_SECTION g_csLock; @@ -2841,7 +2842,7 @@ BOOL ProcessAttach(HINSTANCE hinstDLL) if (!TLS::Initialize()) return FALSE; - g_dwOSInfo = cicGetOSInfo(); + cicGetOSInfo(&g_uACP, &g_dwOSInfo); // FIXME diff --git a/sdk/include/reactos/cicero/cicbase.h b/sdk/include/reactos/cicero/cicbase.h index ff18ce94f72..c3eff7f720c 100644 --- a/sdk/include/reactos/cicero/cicbase.h +++ b/sdk/include/reactos/cicero/cicbase.h @@ -60,47 +60,64 @@ static inline void GetPopupTipbar(HWND hwnd, BOOL fWinLogon) } /* The flags of cicGetOSInfo() */ -#define OSINFO_NT 0x01 -#define OSINFO_CJK 0x10 -#define OSINFO_IMM 0x20 -#define OSINFO_DBCS 0x40 - -static inline DWORD -cicGetOSInfo(VOID) +#define CIC_OSINFO_NT 0x01 +#define CIC_OSINFO_2KPLUS 0x02 +#define CIC_OSINFO_95 0x04 +#define CIC_OSINFO_98PLUS 0x08 +#define CIC_OSINFO_CJK 0x10 +#define CIC_OSINFO_IMM 0x20 +#define CIC_OSINFO_DBCS 0x40 +#define CIC_OSINFO_XPPLUS 0x80 + +static inline void +cicGetOSInfo(LPUINT puACP, LPDWORD pdwOSInfo) { - DWORD dwOsInfo = 0; + *pdwOSInfo = 0; /* Check OS version info */ - OSVERSIONINFOW VerInfo = { sizeof(VerInfo) }; + OSVERSIONINFOW VerInfo; + VerInfo.dwOSVersionInfoSize = sizeof(VerInfo); GetVersionExW(&VerInfo); if (VerInfo.dwPlatformId == DLLVER_PLATFORM_NT) - dwOsInfo |= OSINFO_NT; + { + *pdwOSInfo |= CIC_OSINFO_NT; + if (VerInfo.dwMajorVersion >= 5) + { + *pdwOSInfo |= CIC_OSINFO_2KPLUS; + if (VerInfo.dwMinorVersion > 0) + *pdwOSInfo |= CIC_OSINFO_XPPLUS; + } + } + else + { + if (VerInfo.dwMinorVersion >= 10) + *pdwOSInfo |= CIC_OSINFO_98PLUS; + else + *pdwOSInfo |= CIC_OSINFO_95; + } /* Check codepage */ - switch (GetACP()) + *puACP = GetACP(); + switch (*puACP) { case 932: /* Japanese (Japan) */ case 936: /* Chinese (PRC, Singapore) */ case 949: /* Korean (Korea) */ case 950: /* Chinese (Taiwan, Hong Kong) */ - dwOsInfo |= OSINFO_CJK; + *pdwOSInfo |= CIC_OSINFO_CJK; break; } if (GetSystemMetrics(SM_IMMENABLED)) - dwOsInfo |= OSINFO_IMM; + *pdwOSInfo |= CIC_OSINFO_IMM; if (GetSystemMetrics(SM_DBCSENABLED)) - dwOsInfo |= OSINFO_DBCS; - - /* I'm not interested in other flags */ - - return dwOsInfo; + *pdwOSInfo |= CIC_OSINFO_DBCS; } struct CicSystemModulePath { - WCHAR m_szPath[MAX_PATH]; + WCHAR m_szPath[MAX_PATH + 2]; SIZE_T m_cchPath; CicSystemModulePath()
1 year
1
0
0
0
[reactos] 01/01: [BROWSEUI] Load settings on CInternetToolbar::OnContextMenu (#6182)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=96d525959b145bbaa52b4…
commit 96d525959b145bbaa52b4823b6d5cbfc46c0f65e Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Dec 22 06:57:33 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Dec 22 06:57:33 2023 +0900 [BROWSEUI] Load settings on CInternetToolbar::OnContextMenu (#6182) Based on KRosUser's go.patch. CORE-19145 --- dll/win32/browseui/internettoolbar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dll/win32/browseui/internettoolbar.cpp b/dll/win32/browseui/internettoolbar.cpp index 697eb3936a7..80f962d181c 100644 --- a/dll/win32/browseui/internettoolbar.cpp +++ b/dll/win32/browseui/internettoolbar.cpp @@ -1684,6 +1684,8 @@ LRESULT CInternetToolbar::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, SendMessage(fMainReBar, RB_HITTEST, 0, (LPARAM)&hitTestInfo); if (hitTestInfo.iBand == -1) return 0; + + pSettings->Load(); rebarBandInfo.cbSize = sizeof(rebarBandInfo); rebarBandInfo.fMask = RBBIM_ID; SendMessage(fMainReBar, RB_GETBANDINFOW, hitTestInfo.iBand, (LPARAM)&rebarBandInfo);
1 year
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
28
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Results per page:
10
25
50
100
200