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 2017
----- 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
26 participants
355 discussions
Start a n
N
ew thread
[reactos] 01/02: [NTDLL_APITEST] Add license header for NtFreeVirtualMemory.c
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4aabe88288c70e19d7ed7…
commit 4aabe88288c70e19d7ed73e77743cd0783ba1d37 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Thu Dec 7 12:25:01 2017 +0100 [NTDLL_APITEST] Add license header for NtFreeVirtualMemory.c --- modules/rostests/apitests/ntdll/NtFreeVirtualMemory.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/rostests/apitests/ntdll/NtFreeVirtualMemory.c b/modules/rostests/apitests/ntdll/NtFreeVirtualMemory.c index 7a0b4bc99c..02ebe8dec6 100644 --- a/modules/rostests/apitests/ntdll/NtFreeVirtualMemory.c +++ b/modules/rostests/apitests/ntdll/NtFreeVirtualMemory.c @@ -1,3 +1,9 @@ +/* + * PROJECT: ReactOS API Tests + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Test for NtFreeVirtualMemory + * COPYRIGHT: Copyright 2011 Jérôme Gardou <jerome.gardou(a)reactos.org> + */ #include "precomp.h"
7 years
1
0
0
0
[reactos] 01/01: [User32|IMM32] Fix a recursion crash in IMM. See CORE-14041.
by James Tabor
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c45a6e15bf7c8a4144fde…
commit c45a6e15bf7c8a4144fde71a1a92624d1ad269be Author: James Tabor <james.tabor(a)reactos.org> AuthorDate: Thu Dec 7 21:14:21 2017 -0600 [User32|IMM32] Fix a recursion crash in IMM. See CORE-14041. Required a sync port from wine. This is a hack fix with Win32SS until proper IMM support is added to Win32SS. --- dll/win32/imm32/imm.c | 541 ++++++++++++++++++++++------------ dll/win32/imm32/imm32.spec | 6 + media/doc/README.WINE | 2 +- sdk/include/psdk/winbase.h | 1 + win32ss/user/ntuser/simplecall.c | 4 + win32ss/user/user32/include/user32p.h | 1 + win32ss/user/user32/misc/imm.c | 56 +++- win32ss/user/user32/misc/logon.c | 3 + win32ss/user/user32/windows/defwnd.c | 142 ++++----- 9 files changed, 469 insertions(+), 287 deletions(-) diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c index f3c76d22b8..0c98c58298 100644 --- a/dll/win32/imm32/imm.c +++ b/dll/win32/imm32/imm.c @@ -39,6 +39,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(imm); +#define IMM_INIT_MAGIC 0x19650412 +BOOL WINAPI User32InitializeImmEntryTable(DWORD); + #define MAKE_FUNCPTR(f) typeof(f) * p##f typedef struct _tagImmHkl{ struct list entry; @@ -73,9 +76,11 @@ typedef struct tagInputContextData { DWORD dwLock; INPUTCONTEXT IMC; + DWORD threadID; ImmHkl *immKbd; UINT lastVK; + BOOL threadDefault; DWORD magic; } InputContextData; @@ -88,21 +93,16 @@ typedef struct _tagTRANSMSG { } TRANSMSG, *LPTRANSMSG; typedef struct _tagIMMThreadData { + struct list entry; + DWORD threadID; HIMC defaultContext; HWND hwndDefault; + BOOL disableIME; + DWORD windowRefs; } IMMThreadData; -static DWORD tlsIndex = 0; static struct list ImmHklList = LIST_INIT(ImmHklList); - -/* MSIME messages */ -static UINT WM_MSIME_SERVICE; -static UINT WM_MSIME_RECONVERTOPTIONS; -static UINT WM_MSIME_MOUSE; -static UINT WM_MSIME_RECONVERTREQUEST; -static UINT WM_MSIME_RECONVERT; -static UINT WM_MSIME_QUERYPOSITION; -static UINT WM_MSIME_DOCUMENTFEED; +static struct list ImmThreadDataList = LIST_INIT(ImmThreadDataList); static const WCHAR szwWineIMCProperty[] = {'W','i','n','e','I','m','m','H','I','M','C','P','r','o','p','e','r','t','y',0}; @@ -111,14 +111,23 @@ static const WCHAR szLayoutTextW[] = {'L','a','y','o','u','t',' ','T','e','x','t static const WCHAR szImeRegFmt[] = {'S','y','s','t','e','m','\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\','C','o','n','t','r','o','l','\\','K','e','y','b','o','a','r','d',' ','L','a','y','o','u','t','s','\\','%','0','8','l','x',0}; static const WCHAR szwIME[] = {'I','M','E',0}; +static const WCHAR szwDefaultIME[] = {'D','e','f','a','u','l','t',' ','I','M','E',0}; -static LRESULT WINAPI DefIME_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, - LPARAM lParam); +static CRITICAL_SECTION threaddata_cs; +static CRITICAL_SECTION_DEBUG critsect_debug = +{ + 0, 0, &threaddata_cs, + { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": threaddata_cs") } +}; +static CRITICAL_SECTION threaddata_cs = { &critsect_debug, -1, 0, 0, 0, 0 }; +static BOOL disable_ime; #define is_himc_ime_unicode(p) (p->immKbd->imeInfo.fdwProperty & IME_PROP_UNICODE) #define is_kbd_ime_unicode(p) (p->imeInfo.fdwProperty & IME_PROP_UNICODE) static BOOL IMM_DestroyContext(HIMC hIMC); +static InputContextData* get_imc_data(HIMC hIMC); static inline WCHAR *strdupAtoW( const char *str ) { @@ -222,29 +231,66 @@ static DWORD convert_candidatelist_AtoW( return ret; } -static IMMThreadData* IMM_GetThreadData(void) +static IMMThreadData *IMM_GetThreadData(HWND hwnd, DWORD thread) { - IMMThreadData* data = TlsGetValue(tlsIndex); - if (!data) + IMMThreadData *data; + DWORD process; + + if (hwnd) { - data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof(IMMThreadData)); - TlsSetValue(tlsIndex,data); - TRACE("Thread Data Created\n"); + if (!(thread = GetWindowThreadProcessId(hwnd, &process))) return NULL; + if (process != GetCurrentProcessId()) return NULL; } + else if (thread) + { + HANDLE h = OpenThread(THREAD_QUERY_INFORMATION, FALSE, thread); + if (!h) return NULL; + process = GetProcessIdOfThread(h); + CloseHandle(h); + if (process != GetCurrentProcessId()) return NULL; + } + else + thread = GetCurrentThreadId(); + + EnterCriticalSection(&threaddata_cs); + LIST_FOR_EACH_ENTRY(data, &ImmThreadDataList, IMMThreadData, entry) + if (data->threadID == thread) return data; + + data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*data)); + data->threadID = thread; + list_add_head(&ImmThreadDataList,&data->entry); + TRACE("Thread Data Created (%x)\n",thread); return data; } +static BOOL IMM_IsDefaultContext(HIMC imc) +{ + InputContextData *data = get_imc_data(imc); + + if (!data) + return FALSE; + + return data->threadDefault; +} + static void IMM_FreeThreadData(void) { - IMMThreadData* data = TlsGetValue(tlsIndex); - if (data) + IMMThreadData *data; + + EnterCriticalSection(&threaddata_cs); + LIST_FOR_EACH_ENTRY(data, &ImmThreadDataList, IMMThreadData, entry) { - IMM_DestroyContext(data->defaultContext); - DestroyWindow(data->hwndDefault); - HeapFree(GetProcessHeap(),0,data); - TRACE("Thread Data Destroyed\n"); + if (data->threadID == GetCurrentThreadId()) + { + list_remove(&data->entry); + LeaveCriticalSection(&threaddata_cs); + IMM_DestroyContext(data->defaultContext); + HeapFree(GetProcessHeap(),0,data); + TRACE("Thread Data Destroyed\n"); + return; + } } + LeaveCriticalSection(&threaddata_cs); } static HMODULE load_graphics_driver(void) @@ -349,6 +395,12 @@ static ImmHkl *IMM_GetImmHkl(HKL hkl) } #undef LOAD_FUNCPTR +HWND WINAPI __wine_get_ui_window(HKL hkl) +{ + ImmHkl *immHkl = IMM_GetImmHkl(hkl); + return immHkl->UIWnd; +} + static void IMM_FreeAllImmHkl(void) { ImmHkl *ptr,*cursor2; @@ -367,43 +419,16 @@ static void IMM_FreeAllImmHkl(void) } } -static void IMM_RegisterMessages(void) -{ - WM_MSIME_SERVICE = RegisterWindowMessageA("MSIMEService"); - WM_MSIME_RECONVERTOPTIONS = RegisterWindowMessageA("MSIMEReconvertOptions"); - WM_MSIME_MOUSE = RegisterWindowMessageA("MSIMEMouseOperation"); - WM_MSIME_RECONVERTREQUEST = RegisterWindowMessageA("MSIMEReconvertRequest"); - WM_MSIME_RECONVERT = RegisterWindowMessageA("MSIMEReconvert"); - WM_MSIME_QUERYPOSITION = RegisterWindowMessageA("MSIMEQueryPosition"); - WM_MSIME_DOCUMENTFEED = RegisterWindowMessageA("MSIMEDocumentFeed"); -} - -static void IMM_RegisterIMEClass(void) -{ - WNDCLASSW wndClass; - - ZeroMemory(&wndClass, sizeof(WNDCLASSW)); - - wndClass.style = CS_GLOBALCLASS; - wndClass.lpfnWndProc = (WNDPROC) DefIME_WindowProc; - wndClass.cbWndExtra = 2 * sizeof(LONG_PTR); - wndClass.hCursor = LoadCursorW(NULL, (LPWSTR)IDC_ARROW); - wndClass.lpszClassName = szwIME; - - RegisterClassW(&wndClass); -} - BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved) { TRACE("%p, %x, %p\n",hInstDLL,fdwReason,lpReserved); switch (fdwReason) { case DLL_PROCESS_ATTACH: - IMM_RegisterMessages(); - tlsIndex = TlsAlloc(); - if (tlsIndex == TLS_OUT_OF_INDEXES) + if (!User32InitializeImmEntryTable(IMM_INIT_MAGIC)) + { return FALSE; - IMM_RegisterIMEClass(); + } break; case DLL_THREAD_ATTACH: break; @@ -414,8 +439,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved) if (lpReserved) break; IMM_FreeThreadData(); IMM_FreeAllImmHkl(); - TlsFree(tlsIndex); - UnregisterClassW(szwIME, NULL); break; } return TRUE; @@ -431,6 +454,16 @@ static void ImmInternalPostIMEMessage(InputContextData *data, UINT msg, WPARAM w PostMessageW(target, msg, wParam, lParam); } +/* for sending messages as the IME */ +static void ImmInternalSendIMEMessage(InputContextData *data, UINT msg, WPARAM wParam, LPARAM lParam) +{ + HWND target = GetFocus(); + if (!target) + SendMessageW(data->IMC.hWnd,msg,wParam,lParam); + else + SendMessageW(target, msg, wParam, lParam); +} + static LRESULT ImmInternalSendIMENotify(InputContextData *data, WPARAM notify, LPARAM lParam) { HWND target; @@ -471,6 +504,63 @@ static InputContextData* get_imc_data(HIMC hIMC) return data; } +static HIMC get_default_context( HWND hwnd ) +{ + HIMC ret; + IMMThreadData* thread_data = IMM_GetThreadData( hwnd, 0 ); + + if (!thread_data) return 0; + + if (thread_data->defaultContext) + { + ret = thread_data->defaultContext; + LeaveCriticalSection(&threaddata_cs); + return ret; + } + + /* can't create a default context in another thread */ + if (thread_data->threadID != GetCurrentThreadId()) + { + LeaveCriticalSection(&threaddata_cs); + return 0; + } + + LeaveCriticalSection(&threaddata_cs); + + ret = ImmCreateContext(); + if (!ret) return 0; + ((InputContextData*)ret)->threadDefault = TRUE; + + /* thread_data is in the current thread so we can assume it's still valid */ + EnterCriticalSection(&threaddata_cs); + + if (thread_data->defaultContext) /* someone beat us */ + { + IMM_DestroyContext( ret ); + ret = thread_data->defaultContext; + } + else thread_data->defaultContext = ret; + + LeaveCriticalSection(&threaddata_cs); + return ret; +} + +static BOOL IMM_IsCrossThreadAccess(HWND hWnd, HIMC hIMC) +{ + InputContextData *data; + + if (hWnd) + { + DWORD thread = GetWindowThreadProcessId(hWnd, NULL); + if (thread != GetCurrentThreadId()) return TRUE; + } + data = get_imc_data(hIMC); + if (data && data->threadID != GetCurrentThreadId()) + return TRUE; + + return FALSE; +} + /*********************************************************************** * ImmAssociateContext (IMM32.@) */ @@ -484,25 +574,26 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC) if(hIMC && !data) return NULL; - if (!IMM_GetThreadData()->defaultContext) - IMM_GetThreadData()->defaultContext = ImmCreateContext(); - /* * If already associated just return */ if (hIMC && data->IMC.hWnd == hWnd) return hIMC; + if (hIMC && IMM_IsCrossThreadAccess(hWnd, hIMC)) + return NULL; + if (hWnd) { + HIMC defaultContext = get_default_context( hWnd ); old = RemovePropW(hWnd,szwWineIMCProperty); if (old == NULL) - old = IMM_GetThreadData()->defaultContext; + old = defaultContext; else if (old == (HIMC)-1) old = NULL; - if (hIMC != IMM_GetThreadData()->defaultContext) + if (hIMC != defaultContext) { if (hIMC == NULL) /* Meaning disable imm for that window*/ SetPropW(hWnd,szwWineIMCProperty,(HANDLE)-1); @@ -521,23 +612,9 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC) if (!hIMC) return old; - if (IsWindow(data->IMC.hWnd)) - { - /* - * Post a message that your context is switching - */ - SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, FALSE, ISC_SHOWUIALL); - } - + SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, FALSE, ISC_SHOWUIALL); data->IMC.hWnd = hWnd; - - if (IsWindow(data->IMC.hWnd)) - { - /* - * Post a message that your context is switching - */ - SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, TRUE, ISC_SHOWUIALL); - } + SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, TRUE, ISC_SHOWUIALL); return old; } @@ -560,10 +637,8 @@ BOOL WINAPI ImmAssociateContextEx(HWND hWnd, HIMC hIMC, DWORD dwFlags) { TRACE("(%p, %p, 0x%x):\n", hWnd, hIMC, dwFlags); - if (!IMM_GetThreadData()->defaultContext) - IMM_GetThreadData()->defaultContext = ImmCreateContext(); - - if (!hWnd) return FALSE; + if (!hWnd) + return FALSE; switch (dwFlags) { @@ -571,8 +646,12 @@ BOOL WINAPI ImmAssociateContextEx(HWND hWnd, HIMC hIMC, DWORD dwFlags) ImmAssociateContext(hWnd,hIMC); return TRUE; case IACE_DEFAULT: - ImmAssociateContext(hWnd,IMM_GetThreadData()->defaultContext); + { + HIMC defaultContext = get_default_context( hWnd ); + if (!defaultContext) return FALSE; + ImmAssociateContext(hWnd,defaultContext); return TRUE; + } case IACE_IGNORENOCONTEXT: if (GetPropW(hWnd,szwWineIMCProperty)) ImmAssociateContext(hWnd,hIMC); @@ -707,7 +786,8 @@ HIMC WINAPI ImmCreateContext(void) IMM_DestroyContext(new_context); return 0; } - SendMessageW(GetFocus(), WM_IME_SELECT, TRUE, (LPARAM)GetKeyboardLayout(0)); + new_context->threadID = GetCurrentThreadId(); + SendMessageW(GetFocus(), WM_IME_SELECT, TRUE, (LPARAM)new_context->immKbd); new_context->immKbd->uSelected++; TRACE("Created context %p\n",new_context); @@ -727,7 +807,7 @@ static BOOL IMM_DestroyContext(HIMC hIMC) data->immKbd->uSelected --; data->immKbd->pImeSelect(hIMC, FALSE); - SendMessageW(data->IMC.hWnd, WM_IME_SELECT, FALSE, (LPARAM)GetKeyboardLayout(0)); + SendMessageW(data->IMC.hWnd, WM_IME_SELECT, FALSE, (LPARAM)data->immKbd); ImmDestroyIMCC(data->IMC.hCompStr); ImmDestroyIMCC(data->IMC.hCandInfo); @@ -746,7 +826,7 @@ static BOOL IMM_DestroyContext(HIMC hIMC) */ BOOL WINAPI ImmDestroyContext(HIMC hIMC) { - if (hIMC != IMM_GetThreadData()->defaultContext) + if (!IMM_IsDefaultContext(hIMC) && !IMM_IsCrossThreadAccess(NULL, hIMC)) return IMM_DestroyContext(hIMC); else return FALSE; @@ -757,7 +837,14 @@ BOOL WINAPI ImmDestroyContext(HIMC hIMC) */ BOOL WINAPI ImmDisableIME(DWORD idThread) { - FIXME("(%d): stub\n", idThread); + if (idThread == (DWORD)-1) + disable_ime = TRUE; + else { + IMMThreadData *thread_data = IMM_GetThreadData(NULL, idThread); + if (!thread_data) return FALSE; + thread_data->disableIME = TRUE; + LeaveCriticalSection(&threaddata_cs); + } return TRUE; } @@ -1420,20 +1507,19 @@ HIMC WINAPI ImmGetContext(HWND hWnd) SetLastError(ERROR_INVALID_WINDOW_HANDLE); return NULL; } - if (!IMM_GetThreadData()->defaultContext) - IMM_GetThreadData()->defaultContext = ImmCreateContext(); rc = GetPropW(hWnd,szwWineIMCProperty); if (rc == (HIMC)-1) rc = NULL; else if (rc == NULL) - rc = IMM_GetThreadData()->defaultContext; + rc = get_default_context( hWnd ); if (rc) { InputContextData *data = rc; data->IMC.hWnd = hWnd; } + TRACE("returning %p\n", rc); return rc; @@ -1536,16 +1622,111 @@ BOOL WINAPI ImmGetConversionStatus( return TRUE; } +static BOOL needs_ime_window(HWND hwnd) +{ + WCHAR classW[8]; + + if (GetClassNameW(hwnd, classW, sizeof(classW)/sizeof(classW[0])) && + !strcmpW(classW, szwIME)) + return FALSE; + if (GetClassLongPtrW(hwnd, GCL_STYLE) & CS_IME) return FALSE; + + return TRUE; +} + +/*********************************************************************** + * __wine_register_window (IMM32.@) + */ +BOOL WINAPI __wine_register_window(HWND hwnd) +{ + HWND new = NULL; + IMMThreadData *thread_data; + TRACE("(%p)\n", hwnd); + + if (!needs_ime_window(hwnd)) + return FALSE; + + thread_data = IMM_GetThreadData(hwnd, 0); + if (!thread_data) + return FALSE; + + if (thread_data->disableIME || disable_ime) + { + TRACE("IME for this thread is disabled\n"); + LeaveCriticalSection(&threaddata_cs); + return FALSE; + } + thread_data->windowRefs++; + TRACE("windowRefs=%u, hwndDefault=%p\n", + thread_data->windowRefs, thread_data->hwndDefault); + + /* Create default IME window */ + if (thread_data->windowRefs == 1) + { + /* Do not create the window inside of a critical section */ + LeaveCriticalSection(&threaddata_cs); + new = CreateWindowExW( 0, szwIME, szwDefaultIME, + WS_POPUP | WS_DISABLED | WS_CLIPSIBLINGS, + 0, 0, 1, 1, 0, 0, 0, 0); + /* thread_data is in the current thread so we can assume it's still valid */ + EnterCriticalSection(&threaddata_cs); + /* See if anyone beat us */ + if (thread_data->hwndDefault == NULL) + { + thread_data->hwndDefault = new; + new = NULL; + TRACE("Default is %p\n", thread_data->hwndDefault); + } + } + + LeaveCriticalSection(&threaddata_cs); + + /* Clean up an unused new window outside of the critical section */ + if (new != NULL) + DestroyWindow(new); + return TRUE; +} + +/*********************************************************************** + * __wine_unregister_window (IMM32.@) + */ +void WINAPI __wine_unregister_window(HWND hwnd) +{ + HWND to_destroy = 0; + IMMThreadData *thread_data; + TRACE("(%p)\n", hwnd); + + thread_data = IMM_GetThreadData(hwnd, 0); + if (!thread_data) return; + + thread_data->windowRefs--; + TRACE("windowRefs=%u, hwndDefault=%p\n", + thread_data->windowRefs, thread_data->hwndDefault); + + /* Destroy default IME window */ + if (thread_data->windowRefs == 0 && thread_data->hwndDefault) + { + to_destroy = thread_data->hwndDefault; + thread_data->hwndDefault = NULL; + } + LeaveCriticalSection(&threaddata_cs); + + if (to_destroy) DestroyWindow( to_destroy ); +} + /*********************************************************************** * ImmGetDefaultIMEWnd (IMM32.@) */ HWND WINAPI ImmGetDefaultIMEWnd(HWND hWnd) { - if (IMM_GetThreadData()->hwndDefault == NULL) - IMM_GetThreadData()->hwndDefault = CreateWindowExW( WS_EX_TOOLWINDOW, - szwIME, NULL, WS_POPUP, 0, 0, 1, 1, 0, 0, 0, 0); - TRACE("Default is %p\n",IMM_GetThreadData()->hwndDefault); - return IMM_GetThreadData()->hwndDefault; + HWND ret; + IMMThreadData* thread_data = IMM_GetThreadData(hWnd, 0); + if (!thread_data) + return NULL; + ret = thread_data->hwndDefault; + LeaveCriticalSection(&threaddata_cs); + TRACE("Default is %p\n",ret); + return ret; } /*********************************************************************** @@ -1947,28 +2128,20 @@ BOOL WINAPI ImmIsIME(HKL hKL) BOOL WINAPI ImmIsUIMessageA( HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam) { - BOOL rc = FALSE; - TRACE("(%p, %x, %ld, %ld)\n", hWndIME, msg, wParam, lParam); if ((msg >= WM_IME_STARTCOMPOSITION && msg <= WM_IME_KEYLAST) || (msg == WM_IME_SETCONTEXT) || (msg == WM_IME_NOTIFY) || (msg == WM_IME_COMPOSITIONFULL) || (msg == WM_IME_SELECT) || - (msg == 0x287 /* FIXME: WM_IME_SYSTEM */) || - (msg == WM_MSIME_RECONVERTOPTIONS) || - (msg == WM_MSIME_MOUSE) || - (msg == WM_MSIME_RECONVERTREQUEST) || - (msg == WM_MSIME_RECONVERT) || - (msg == WM_MSIME_QUERYPOSITION) || - (msg == WM_MSIME_DOCUMENTFEED)) + (msg == 0x287 /* FIXME: WM_IME_SYSTEM */)) { if (hWndIME) SendMessageA(hWndIME, msg, wParam, lParam); - rc = TRUE; + return TRUE; } - return rc; + return FALSE; } /*********************************************************************** @@ -1977,28 +2150,20 @@ BOOL WINAPI ImmIsUIMessageA( BOOL WINAPI ImmIsUIMessageW( HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam) { - BOOL rc = FALSE; - TRACE("(%p, %x, %ld, %ld)\n", hWndIME, msg, wParam, lParam); if ((msg >= WM_IME_STARTCOMPOSITION && msg <= WM_IME_KEYLAST) || (msg == WM_IME_SETCONTEXT) || (msg == WM_IME_NOTIFY) || (msg == WM_IME_COMPOSITIONFULL) || (msg == WM_IME_SELECT) || - (msg == 0x287 /* FIXME: WM_IME_SYSTEM */) || - (msg == WM_MSIME_RECONVERTOPTIONS) || - (msg == WM_MSIME_MOUSE) || - (msg == WM_MSIME_RECONVERTREQUEST) || - (msg == WM_MSIME_RECONVERT) || - (msg == WM_MSIME_QUERYPOSITION) || - (msg == WM_MSIME_DOCUMENTFEED)) + (msg == 0x287 /* FIXME: WM_IME_SYSTEM */)) { if (hWndIME) SendMessageW(hWndIME, msg, wParam, lParam); - rc = TRUE; + return TRUE; } - return rc; + return FALSE; } /*********************************************************************** @@ -2108,13 +2273,11 @@ LRESULT WINAPI ImmRequestMessageA(HIMC hIMC, WPARAM wParam, LPARAM lParam) InputContextData *data = get_imc_data(hIMC); TRACE("%p %ld %ld\n", hIMC, wParam, wParam); - if (!data) - SetLastError(ERROR_INVALID_HANDLE); - if (data && IsWindow(data->IMC.hWnd)) - return SendMessageA(data->IMC.hWnd, WM_IME_REQUEST, wParam, lParam); + if (data) return SendMessageA(data->IMC.hWnd, WM_IME_REQUEST, wParam, lParam); - return 0; + SetLastError(ERROR_INVALID_HANDLE); + return 0; } /*********************************************************************** @@ -2126,13 +2289,10 @@ LRESULT WINAPI ImmRequestMessageW(HIMC hIMC, WPARAM wParam, LPARAM lParam) TRACE("%p %ld %ld\n", hIMC, wParam, wParam); - if (!data) - SetLastError(ERROR_INVALID_HANDLE); - - if (data && IsWindow(data->IMC.hWnd)) - return SendMessageW(data->IMC.hWnd, WM_IME_REQUEST, wParam, lParam); + if (data) return SendMessageW(data->IMC.hWnd, WM_IME_REQUEST, wParam, lParam); - return 0; + SetLastError(ERROR_INVALID_HANDLE); + return 0; } /*********************************************************************** @@ -2148,11 +2308,13 @@ BOOL WINAPI ImmSetCandidateWindow( if (!data || !lpCandidate) return FALSE; - TRACE("\t%x, %x, (%i,%i), (%i,%i - %i,%i)\n", - lpCandidate->dwIndex, lpCandidate->dwStyle, - lpCandidate->ptCurrentPos.x, lpCandidate->ptCurrentPos.y, - lpCandidate->rcArea.top, lpCandidate->rcArea.left, - lpCandidate->rcArea.bottom, lpCandidate->rcArea.right); + if (IMM_IsCrossThreadAccess(NULL, hIMC)) + return FALSE; + + TRACE("\t%x, %x, %s, %s\n", + lpCandidate->dwIndex, lpCandidate->dwStyle, + wine_dbgstr_point(&lpCandidate->ptCurrentPos), + wine_dbgstr_rect(&lpCandidate->rcArea)); if ( lpCandidate->dwIndex >= (sizeof(data->IMC.cfCandForm) / sizeof(CANDIDATEFORM)) ) return FALSE; @@ -2178,6 +2340,9 @@ BOOL WINAPI ImmSetCompositionFontA(HIMC hIMC, LPLOGFONTA lplf) return FALSE; } + if (IMM_IsCrossThreadAccess(NULL, hIMC)) + return FALSE; + memcpy(&data->IMC.lfFont.W,lplf,sizeof(LOGFONTA)); MultiByteToWideChar(CP_ACP, 0, lplf->lfFaceName, -1, data->IMC.lfFont.W.lfFaceName, LF_FACESIZE); @@ -2201,6 +2366,9 @@ BOOL WINAPI ImmSetCompositionFontW(HIMC hIMC, LPLOGFONTW lplf) return FALSE; } + if (IMM_IsCrossThreadAccess(NULL, hIMC)) + return FALSE; + data->IMC.lfFont.W = *lplf; ImmNotifyIME(hIMC, NI_CONTEXTUPDATED, 0, IMC_SETCOMPOSITIONFONT); ImmInternalSendIMENotify(data, IMN_SETCOMPOSITIONFONT, 0); @@ -2332,9 +2500,10 @@ BOOL WINAPI ImmSetCompositionWindow( InputContextData *data = get_imc_data(hIMC); TRACE("(%p, %p)\n", hIMC, lpCompForm); - TRACE("\t%x, (%i,%i), (%i,%i - %i,%i)\n",lpCompForm->dwStyle, - lpCompForm->ptCurrentPos.x, lpCompForm->ptCurrentPos.y, lpCompForm->rcArea.top, - lpCompForm->rcArea.left, lpCompForm->rcArea.bottom, lpCompForm->rcArea.right); + if (lpCompForm) + TRACE("\t%x, %s, %s\n", lpCompForm->dwStyle, + wine_dbgstr_point(&lpCompForm->ptCurrentPos), + wine_dbgstr_rect(&lpCompForm->rcArea)); if (!data) { @@ -2342,6 +2511,9 @@ BOOL WINAPI ImmSetCompositionWindow( return FALSE; } + if (IMM_IsCrossThreadAccess(NULL, hIMC)) + return FALSE; + data->IMC.cfCompForm = *lpCompForm; if (IsWindowVisible(data->immKbd->UIWnd)) @@ -2376,6 +2548,9 @@ BOOL WINAPI ImmSetConversionStatus( return FALSE; } + if (IMM_IsCrossThreadAccess(NULL, hIMC)) + return FALSE; + if ( fdwConversion != data->IMC.fdwConversion ) { oldConversion = data->IMC.fdwConversion; @@ -2409,6 +2584,9 @@ BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen) return FALSE; } + if (IMM_IsCrossThreadAccess(NULL, hIMC)) + return FALSE; + if (data->immKbd->UIWnd == NULL) { /* create the ime window */ @@ -2445,7 +2623,10 @@ BOOL WINAPI ImmSetStatusWindowPos(HIMC hIMC, LPPOINT lpptPos) return FALSE; } - TRACE("\t(%i,%i)\n", lpptPos->x, lpptPos->y); + if (IMM_IsCrossThreadAccess(NULL, hIMC)) + return FALSE; + + TRACE("\t%s\n", wine_dbgstr_point(lpptPos)); data->IMC.ptStatusWndPos = *lpptPos; ImmNotifyIME( hIMC, NI_CONTEXTUPDATED, 0, IMC_SETSTATUSWINDOWPOS); @@ -2805,15 +2986,23 @@ BOOL WINAPI ImmGenerateMessage(HIMC hIMC) if (data->IMC.dwNumMsgBuf > 0) { LPTRANSMSG lpTransMsg; - DWORD i; - - lpTransMsg = ImmLockIMCC(data->IMC.hMsgBuf); - for (i = 0; i < data->IMC.dwNumMsgBuf; i++) - ImmInternalPostIMEMessage(data, lpTransMsg[i].message, lpTransMsg[i].wParam, lpTransMsg[i].lParam); + HIMCC hMsgBuf; + DWORD i, dwNumMsgBuf; - ImmUnlockIMCC(data->IMC.hMsgBuf); + /* We are going to detach our hMsgBuff so that if processing messages + generates new messages they go into a new buffer */ + hMsgBuf = data->IMC.hMsgBuf; + dwNumMsgBuf = data->IMC.dwNumMsgBuf; + data->IMC.hMsgBuf = ImmCreateIMCC(0); data->IMC.dwNumMsgBuf = 0; + + lpTransMsg = ImmLockIMCC(hMsgBuf); + for (i = 0; i < dwNumMsgBuf; i++) + ImmInternalSendIMEMessage(data, lpTransMsg[i].message, lpTransMsg[i].wParam, lpTransMsg[i].lParam); + + ImmUnlockIMCC(hMsgBuf); + ImmDestroyIMCC(hMsgBuf); } return TRUE; @@ -2900,6 +3089,22 @@ BOOL WINAPI ImmProcessKey(HWND hwnd, HKL hKL, UINT vKey, LPARAM lKeyData, DWORD else return FALSE; + /* Make sure we are inputting to the correct keyboard */ + if (data->immKbd->hkl != hKL) + { + ImmHkl *new_hkl = IMM_GetImmHkl(hKL); + if (new_hkl) + { + data->immKbd->pImeSelect(imc, FALSE); + data->immKbd->uSelected--; + data->immKbd = new_hkl; + data->immKbd->pImeSelect(imc, TRUE); + data->immKbd->uSelected++; + } + else + return FALSE; + } + if (!data->immKbd->hIME || !data->immKbd->pImeProcessKey) return FALSE; @@ -2942,53 +3147,3 @@ BOOL WINAPI ImmGetHotKey(DWORD hotkey, UINT *modifiers, UINT *key, HKL hkl) FIXME("%x, %p, %p, %p: stub\n", hotkey, modifiers, key, hkl); return FALSE; } - - -/* - * Window Proc for the Default IME window class - */ -static LRESULT WINAPI DefIME_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, - LPARAM lParam) -{ - switch (uMsg) - { - case WM_CREATE: - case WM_NCCREATE: - return TRUE; - case WM_IME_STARTCOMPOSITION: - case WM_IME_ENDCOMPOSITION: - case WM_IME_COMPOSITION: - case WM_IME_SETCONTEXT: - case WM_IME_NOTIFY: - case WM_IME_CONTROL: - case WM_IME_COMPOSITIONFULL: - case WM_IME_SELECT: - case WM_IME_CHAR: - case WM_IME_REQUEST: - case WM_IME_KEYDOWN: - case WM_IME_KEYUP: - { - ImmHkl *immHkl = IMM_GetImmHkl(GetKeyboardLayout(0)); - if (immHkl->UIWnd) - return SendMessageW(immHkl->UIWnd,uMsg,wParam,lParam); - else - return FALSE; - } - default: - if ((uMsg == WM_MSIME_RECONVERTOPTIONS) || - (uMsg == WM_MSIME_SERVICE) || - (uMsg == WM_MSIME_MOUSE) || - (uMsg == WM_MSIME_RECONVERTREQUEST) || - (uMsg == WM_MSIME_RECONVERT) || - (uMsg == WM_MSIME_QUERYPOSITION) || - (uMsg == WM_MSIME_DOCUMENTFEED)) - { - ImmHkl *immHkl = IMM_GetImmHkl(GetKeyboardLayout(0)); - if (immHkl->UIWnd) - return SendMessageW(immHkl->UIWnd,uMsg,wParam,lParam); - else - return FALSE; - } - return DefWindowProcW(hwnd, uMsg, wParam, lParam); - } -} diff --git a/dll/win32/imm32/imm32.spec b/dll/win32/imm32/imm32.spec index 37c46ab345..2be5d92b11 100644 --- a/dll/win32/imm32/imm32.spec +++ b/dll/win32/imm32/imm32.spec @@ -110,3 +110,9 @@ @ stub ImmWINNLSEnableIME @ stub ImmWINNLSGetEnableStatus @ stub ImmWINNLSGetIMEHotkey + +################################################################ +# Wine internal extensions +@ stdcall __wine_get_ui_window(ptr) +@ stdcall __wine_register_window(long) +@ stdcall __wine_unregister_window(long) diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 8dcdd23aa5..3910789a16 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -77,7 +77,7 @@ reactos/dll/win32/iccvid # Synced to WineStaging-2.9 reactos/dll/win32/ieframe # Synced to WineStaging-2.9 reactos/dll/win32/imaadp32.acm # Synced to WineStaging-2.16 reactos/dll/win32/imagehlp # Synced to WineStaging-2.9 -reactos/dll/win32/imm32 # Synced to Wine-1.7.27 +reactos/dll/win32/imm32 # Synced to Wine-2.22 reactos/dll/win32/inetcomm # Synced to WineStaging-2.16 reactos/dll/win32/inetmib1 # Synced to WineStaging-2.9 reactos/dll/win32/initpki # Synced to WineStaging-2.9 diff --git a/sdk/include/psdk/winbase.h b/sdk/include/psdk/winbase.h index ec3615aa3e..e8c14cfddc 100644 --- a/sdk/include/psdk/winbase.h +++ b/sdk/include/psdk/winbase.h @@ -2266,6 +2266,7 @@ HANDLE WINAPI GetProcessHeap(VOID); DWORD WINAPI GetProcessHeaps(DWORD,PHANDLE); #if (_WIN32_WINNT >= 0x0502) DWORD WINAPI GetProcessId(HANDLE); +DWORD WINAPI GetProcessIdOfThread(HANDLE); #endif #if (_WIN32_WINNT >= 0x0500) BOOL WINAPI GetProcessIoCounters(_In_ HANDLE, _Out_ PIO_COUNTERS); diff --git a/win32ss/user/ntuser/simplecall.c b/win32ss/user/ntuser/simplecall.c index a32ed43b1c..4be533a8fb 100644 --- a/win32ss/user/ntuser/simplecall.c +++ b/win32ss/user/ntuser/simplecall.c @@ -113,6 +113,10 @@ NtUserCallNoParam(DWORD Routine) case NOPARAM_ROUTINE_ISCONSOLEMODE: RETURN( ScreenDeviceContext == NULL ); + case NOPARAM_ROUTINE_UPDATEPERUSERIMMENABLING: + gpsi->dwSRVIFlags |= SRVINFO_IMM32; // Always set. + RETURN(1); // Always return TRUE. + default: ERR("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine); EngSetLastError(ERROR_INVALID_PARAMETER); diff --git a/win32ss/user/user32/include/user32p.h b/win32ss/user/user32/include/user32p.h index cdf9378b2b..9bfaeecf83 100644 --- a/win32ss/user/user32/include/user32p.h +++ b/win32ss/user/user32/include/user32p.h @@ -134,5 +134,6 @@ VOID DeleteFrameBrushes(VOID); BOOL WINAPI GdiValidateHandle(HGDIOBJ); HANDLE FASTCALL UserGetProp(HWND hWnd, ATOM Atom, BOOLEAN SystemProp); BOOL WINAPI InitializeImmEntryTable(VOID); +BOOL WINAPI UpdatePerUserImmEnabling(VOID); /* EOF */ diff --git a/win32ss/user/user32/misc/imm.c b/win32ss/user/user32/misc/imm.c index a89dafe271..9c26bcf199 100644 --- a/win32ss/user/user32/misc/imm.c +++ b/win32ss/user/user32/misc/imm.c @@ -25,19 +25,6 @@ HINSTANCE ghImm32 = NULL; BOOL bImmInitializing = FALSE; BOOL ImmApiTableZero = TRUE; -HRESULT WINAPI GetImmFileName(PWSTR lpBuffer, UINT uSize) -{ - UINT length; - STRSAFE_LPWSTR Safe = lpBuffer; - - length = GetSystemDirectoryW(lpBuffer, uSize); - if ( length && length < uSize ) - { - StringCchCatW(Safe, uSize, L"\\"); - return StringCchCatW(Safe, uSize, L"IMM32.DLL"); - } - return StringCchCopyW(Safe, uSize, L"IMM32.DLL"); -} /* * This function should not be implemented, it is used, @@ -59,6 +46,20 @@ BOOL WINAPI IMM_ImmNotifyIME(HIMC himc, DWORD dword1, DWORD dword2, DWORD dword3 BOOL WINAPI IMM_ImmRegisterClient(PVOID ptr, HINSTANCE hMod) { return 0; } UINT WINAPI IMM_ImmProcessKey(HWND hwnd, HKL hkl, UINT Vk, LPARAM lParam, DWORD HotKey) { return 0; } +HRESULT WINAPI GetImmFileName(PWSTR lpBuffer, UINT uSize) +{ + UINT length; + STRSAFE_LPWSTR Safe = lpBuffer; + + length = GetSystemDirectoryW(lpBuffer, uSize); + if ( length && length < uSize ) + { + StringCchCatW(Safe, uSize, L"\\"); + return StringCchCatW(Safe, uSize, L"imm32.dll"); + } + return StringCchCopyW(Safe, uSize, L"imm32.dll"); +} + /* * @unimplemented */ @@ -189,7 +190,7 @@ BOOL WINAPI InitializeImmEntryTable(VOID) BOOL WINAPI User32InitializeImmEntryTable(DWORD magic) { - TRACE("(%x)\n", magic); + TRACE("Imm (%x)\n", magic); if (magic != IMM_INIT_MAGIC) return FALSE; @@ -205,9 +206,7 @@ BOOL WINAPI User32InitializeImmEntryTable(DWORD magic) if (ghImm32 == NULL && !bImmInitializing) { WCHAR ImmFile[MAX_PATH]; - ERR("IMM32 not installed!\n"); GetImmFileName(ImmFile, sizeof(ImmFile)); - ERR("File %ws\n",ImmFile); ghImm32 = LoadLibraryW(ImmFile); if (ghImm32 == NULL) { @@ -285,6 +284,30 @@ LRESULT WINAPI ImeWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) return ImeWndProc_common(hwnd, msg, wParam, lParam, TRUE); } +BOOL +WINAPI +UpdatePerUserImmEnabling(VOID) +{ + BOOL Ret = NtUserCallNoParam(NOPARAM_ROUTINE_UPDATEPERUSERIMMENABLING); + if ( Ret ) + { + if ( gpsi->dwSRVIFlags & SRVINFO_IMM32 ) + { + HMODULE imm32 = GetModuleHandleW(L"imm32.dll"); + if ( !imm32 ) + { + imm32 = LoadLibraryW(L"imm32.dll"); + if (!imm32) + { + ERR("UPUIE: Imm32 not installed!\n"); + Ret = FALSE; + } + } + } + } + return Ret; +} + static const WCHAR imeW[] = {'I','M','E',0}; BOOL @@ -311,6 +334,7 @@ RegisterIMEClass(VOID) if (atom) { RegisterDefaultClasses |= ICLASS_TO_MASK(ICLS_IME); + TRACE("Register IME Class!\n"); return TRUE; } ERR("Failed to register IME Class!\n"); diff --git a/win32ss/user/user32/misc/logon.c b/win32ss/user/user32/misc/logon.c index abc6ee3d1d..3df5a953f0 100644 --- a/win32ss/user/user32/misc/logon.c +++ b/win32ss/user/user32/misc/logon.c @@ -107,5 +107,8 @@ WINAPI UpdatePerUserSystemParameters(DWORD dwReserved, BOOL bEnable) { + // Update Imm support and load Imm32.dll. + UpdatePerUserImmEnabling(); + return NtUserUpdatePerUserSystemParameters(dwReserved, bEnable); } diff --git a/win32ss/user/user32/windows/defwnd.c b/win32ss/user/user32/windows/defwnd.c index 27dcc574c5..9239775029 100644 --- a/win32ss/user/user32/windows/defwnd.c +++ b/win32ss/user/user32/windows/defwnd.c @@ -797,75 +797,6 @@ GoSS: } -/* - * helpers for calling IMM32 (from Wine 10/22/2008) - * - * WM_IME_* messages are generated only by IMM32, - * so I assume imm32 is already LoadLibrary-ed. - */ -static HWND -DefWndImmGetDefaultIMEWnd(HWND hwnd) -{ - HINSTANCE hInstIMM = GetModuleHandleW(L"imm32\0"); - HWND (WINAPI *pFunc)(HWND); - HWND hwndRet = 0; - - if (!hInstIMM) - { - ERR("cannot get IMM32 handle\n"); - return 0; - } - - pFunc = (void*) GetProcAddress(hInstIMM, "ImmGetDefaultIMEWnd"); - if (pFunc != NULL) - hwndRet = (*pFunc)(hwnd); - - return hwndRet; -} - - -static BOOL -DefWndImmIsUIMessageA(HWND hwndIME, UINT msg, WPARAM wParam, LPARAM lParam) -{ - HINSTANCE hInstIMM = GetModuleHandleW(L"imm32\0"); - BOOL (WINAPI *pFunc)(HWND,UINT,WPARAM,LPARAM); - BOOL fRet = FALSE; - - if (!hInstIMM) - { - ERR("cannot get IMM32 handle\n"); - return FALSE; - } - - pFunc = (void*) GetProcAddress(hInstIMM, "ImmIsUIMessageA"); - if (pFunc != NULL) - fRet = (*pFunc)(hwndIME, msg, wParam, lParam); - - return fRet; -} - - -static BOOL -DefWndImmIsUIMessageW(HWND hwndIME, UINT msg, WPARAM wParam, LPARAM lParam) -{ - HINSTANCE hInstIMM = GetModuleHandleW(L"imm32\0"); - BOOL (WINAPI *pFunc)(HWND,UINT,WPARAM,LPARAM); - BOOL fRet = FALSE; - - if (!hInstIMM) - { - ERR("cannot get IMM32 handle\n"); - return FALSE; - } - - pFunc = (void*) GetProcAddress(hInstIMM, "ImmIsUIMessageW"); - if (pFunc != NULL) - fRet = (*pFunc)(hwndIME, msg, wParam, lParam); - - return fRet; -} - - LRESULT WINAPI RealDefWindowProcA(HWND hWnd, UINT Msg, @@ -1003,8 +934,44 @@ RealDefWindowProcA(HWND hWnd, break; } - case WM_IME_STARTCOMPOSITION: case WM_IME_COMPOSITION: + if (lParam & GCS_RESULTSTR) + { + LONG size, i; + unsigned char lead = 0; + char *buf = NULL; + HIMC himc = ImmGetContext( hWnd ); + + if (himc) + { + if ((size = ImmGetCompositionStringA( himc, GCS_RESULTSTR, NULL, 0 ))) + { + if (!(buf = HeapAlloc( GetProcessHeap(), 0, size ))) size = 0; + else size = ImmGetCompositionStringA( himc, GCS_RESULTSTR, buf, size ); + } + ImmReleaseContext( hWnd, himc ); + + for (i = 0; i < size; i++) + { + unsigned char c = buf[i]; + if (!lead) + { + if (IsDBCSLeadByte( c )) + lead = c; + else + SendMessageA( hWnd, WM_IME_CHAR, c, 1 ); + } + else + { + SendMessageA( hWnd, WM_IME_CHAR, MAKEWORD(c, lead), 1 ); + lead = 0; + } + } + HeapFree( GetProcessHeap(), 0, buf ); + } + } + /* fall through */ + case WM_IME_STARTCOMPOSITION: case WM_IME_ENDCOMPOSITION: case WM_IME_SELECT: case WM_IME_NOTIFY: @@ -1012,7 +979,7 @@ RealDefWindowProcA(HWND hWnd, { HWND hwndIME; - hwndIME = DefWndImmGetDefaultIMEWnd(hWnd); + hwndIME = ImmGetDefaultIMEWnd(hWnd); if (hwndIME) Result = SendMessageA(hwndIME, Msg, wParam, lParam); break; @@ -1022,9 +989,9 @@ RealDefWindowProcA(HWND hWnd, { HWND hwndIME; - hwndIME = DefWndImmGetDefaultIMEWnd(hWnd); + hwndIME = ImmGetDefaultIMEWnd(hWnd); if (hwndIME) - Result = DefWndImmIsUIMessageA(hwndIME, Msg, wParam, lParam); + Result = ImmIsUIMessageA(hwndIME, Msg, wParam, lParam); break; } @@ -1165,8 +1132,29 @@ RealDefWindowProcW(HWND hWnd, break; } - case WM_IME_STARTCOMPOSITION: case WM_IME_COMPOSITION: + if (lParam & GCS_RESULTSTR) + { + LONG size, i; + WCHAR *buf = NULL; + HIMC himc = ImmGetContext( hWnd ); + + if (himc) + { + if ((size = ImmGetCompositionStringW( himc, GCS_RESULTSTR, NULL, 0 ))) + { + if (!(buf = HeapAlloc( GetProcessHeap(), 0, size * sizeof(WCHAR) ))) size = 0; + else size = ImmGetCompositionStringW( himc, GCS_RESULTSTR, buf, size * sizeof(WCHAR) ); + } + ImmReleaseContext( hWnd, himc ); + + for (i = 0; i < size / sizeof(WCHAR); i++) + SendMessageW( hWnd, WM_IME_CHAR, buf[i], 1 ); + HeapFree( GetProcessHeap(), 0, buf ); + } + } + /* fall through */ + case WM_IME_STARTCOMPOSITION: case WM_IME_ENDCOMPOSITION: case WM_IME_SELECT: case WM_IME_NOTIFY: @@ -1174,7 +1162,7 @@ RealDefWindowProcW(HWND hWnd, { HWND hwndIME; - hwndIME = DefWndImmGetDefaultIMEWnd(hWnd); + hwndIME = ImmGetDefaultIMEWnd(hWnd); if (hwndIME) Result = SendMessageW(hwndIME, Msg, wParam, lParam); break; @@ -1184,9 +1172,9 @@ RealDefWindowProcW(HWND hWnd, { HWND hwndIME; - hwndIME = DefWndImmGetDefaultIMEWnd(hWnd); + hwndIME = ImmGetDefaultIMEWnd(hWnd); if (hwndIME) - Result = DefWndImmIsUIMessageW(hwndIME, Msg, wParam, lParam); + Result = ImmIsUIMessageW(hwndIME, Msg, wParam, lParam); break; }
7 years
1
0
0
0
[reactos] 01/01: [ADVAPI32_APITEST][NTDLL_APITEST][WINDOWSCODECS] Comment out some unused functions and types. Silences some clang-cl warnings.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9b349f958cd1ee7db7a84…
commit 9b349f958cd1ee7db7a8457cc73c6f0f8057ca4a Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Fri Dec 8 00:22:05 2017 +0100 [ADVAPI32_APITEST][NTDLL_APITEST][WINDOWSCODECS] Comment out some unused functions and types. Silences some clang-cl warnings. --- dll/win32/windowscodecs/bitmap.c | 3 +++ dll/win32/windowscodecs/converter.c | 2 ++ modules/rostests/apitests/advapi32/ServiceArgs.c | 2 ++ modules/rostests/apitests/ntdll/NtLoadUnloadKey.c | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dll/win32/windowscodecs/bitmap.c b/dll/win32/windowscodecs/bitmap.c index 843c7e73b3..3d5a2bb496 100644 --- a/dll/win32/windowscodecs/bitmap.c +++ b/dll/win32/windowscodecs/bitmap.c @@ -63,10 +63,13 @@ static inline BitmapImpl *impl_from_IMILUnknown1(IMILUnknown1 *iface) return CONTAINING_RECORD(iface, BitmapImpl, IMILUnknown1_iface); } +#ifndef __REACTOS__ +/* This is currently unused */ static inline BitmapImpl *impl_from_IMILUnknown2(IMILUnknown2 *iface) { return CONTAINING_RECORD(iface, BitmapImpl, IMILUnknown2_iface); } +#endif static inline BitmapLockImpl *impl_from_IWICBitmapLock(IWICBitmapLock *iface) { diff --git a/dll/win32/windowscodecs/converter.c b/dll/win32/windowscodecs/converter.c index 23098756a8..3fca5b38f6 100644 --- a/dll/win32/windowscodecs/converter.c +++ b/dll/win32/windowscodecs/converter.c @@ -71,11 +71,13 @@ typedef struct FormatConverter { } FormatConverter; /*
https://www.w3.org/Graphics/Color/srgb
*/ +#ifndef __REACTOS__ static inline float from_sRGB_component(float f) { if (f <= 0.04045f) return f / 12.92f; return powf((f + 0.055f) / 1.055f, 2.4f); } +#endif static inline float to_sRGB_component(float f) { diff --git a/modules/rostests/apitests/advapi32/ServiceArgs.c b/modules/rostests/apitests/advapi32/ServiceArgs.c index 38d19aa97e..16d675a297 100644 --- a/modules/rostests/apitests/advapi32/ServiceArgs.c +++ b/modules/rostests/apitests/advapi32/ServiceArgs.c @@ -32,6 +32,7 @@ static void send_msg(const char *type, const char *msg) WriteFile(pipe_handle, buf, strlen(buf)+1, &written, NULL); } +#if 0 static inline void service_trace(const char *msg, ...) { va_list valist; @@ -43,6 +44,7 @@ static inline void service_trace(const char *msg, ...) send_msg("TRACE", buf); } +#endif static void service_ok(int cnd, const char *msg, ...) { diff --git a/modules/rostests/apitests/ntdll/NtLoadUnloadKey.c b/modules/rostests/apitests/ntdll/NtLoadUnloadKey.c index f9bb9c2937..ac4ec3493e 100644 --- a/modules/rostests/apitests/ntdll/NtLoadUnloadKey.c +++ b/modules/rostests/apitests/ntdll/NtLoadUnloadKey.c @@ -397,7 +397,7 @@ START_TEST(NtLoadUnloadKey) { PCWSTR HiveName; PCWSTR RegMountPoint; - } HIVE_LIST_ENTRY, *PHIVE_LIST_ENTRY; + } HIVE_LIST_ENTRY; static const HIVE_LIST_ENTRY RegistryHives[] = {
7 years
1
0
0
0
[reactos] 01/01: [COMCTL32][FLTLIB][NETAPI32][SNDVOL32][STOBJECT][WBEMPROX] Remove unused debug channels and comment out unused variables. Silences some clang-cl warnings.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ccd5377851f2faa3e8d89…
commit ccd5377851f2faa3e8d899c6d928a113cec67a1d Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Fri Dec 8 00:06:13 2017 +0100 [COMCTL32][FLTLIB][NETAPI32][SNDVOL32][STOBJECT][WBEMPROX] Remove unused debug channels and comment out unused variables. Silences some clang-cl warnings. --- base/applications/sndvol32/misc.c | 4 ++-- dll/shellext/stobject/stobject.cpp | 2 -- dll/win32/comctl32/theming.c | 2 ++ dll/win32/fltlib/fltlib.c | 9 ++------- dll/win32/fltlib/message.c | 15 ++++----------- dll/win32/fltlib/stubs.c | 10 ++-------- dll/win32/netapi32/obsolete.c | 3 +-- dll/win32/wbemprox/builtin.c | 27 +++++++++++++++++++++++++++ 8 files changed, 40 insertions(+), 32 deletions(-) diff --git a/base/applications/sndvol32/misc.c b/base/applications/sndvol32/misc.c index dce0c2e6bd..1f0ff8496d 100644 --- a/base/applications/sndvol32/misc.c +++ b/base/applications/sndvol32/misc.c @@ -128,9 +128,9 @@ LoadAndFormatString(IN HINSTANCE hInstance, } static const TCHAR AppRegSettings[] = TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Volume Control"); -static const TCHAR AppOptionsKey[] = TEXT("Options"); +//static const TCHAR AppOptionsKey[] = TEXT("Options"); static const TCHAR LineStatesValue[] = TEXT("LineStates"); -static const TCHAR StyleValue[] = TEXT("Style"); +//static const TCHAR StyleValue[] = TEXT("Style"); HKEY hAppSettingsKey = NULL; diff --git a/dll/shellext/stobject/stobject.cpp b/dll/shellext/stobject/stobject.cpp index f5b31e249e..3b0683bbe1 100644 --- a/dll/shellext/stobject/stobject.cpp +++ b/dll/shellext/stobject/stobject.cpp @@ -12,8 +12,6 @@ #include <olectl.h> #include <atlwin.h> -WINE_DEFAULT_DEBUG_CHANNEL(stobject); - BEGIN_OBJECT_MAP(ObjectMap) OBJECT_ENTRY(CLSID_SysTray, CSysTray) END_OBJECT_MAP() diff --git a/dll/win32/comctl32/theming.c b/dll/win32/comctl32/theming.c index c80b4e46d8..9cfd8e9292 100644 --- a/dll/win32/comctl32/theming.c +++ b/dll/win32/comctl32/theming.c @@ -43,7 +43,9 @@ extern LRESULT CALLBACK THEMING_ListBoxSubclassProc (HWND, UINT, WPARAM, LPARAM, extern LRESULT CALLBACK THEMING_ScrollbarSubclassProc (HWND, UINT, WPARAM, LPARAM, ULONG_PTR) DECLSPEC_HIDDEN; +#ifndef __REACTOS__ static const WCHAR dialogClass[] = {'#','3','2','7','7','0',0}; +#endif static const WCHAR comboLboxClass[] = {'C','o','m','b','o','L','b','o','x',0}; static const struct ThemingSubclass diff --git a/dll/win32/fltlib/fltlib.c b/dll/win32/fltlib/fltlib.c index 5818ca4928..ce99378e15 100644 --- a/dll/win32/fltlib/fltlib.c +++ b/dll/win32/fltlib/fltlib.c @@ -10,8 +10,8 @@ #define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" +#include <windef.h> +#include <winbase.h> #define NTOS_MODE_USER #include <ndk/iofuncs.h> @@ -19,13 +19,8 @@ #include <ndk/rtlfuncs.h> #include <fltmgr_shared.h> -#include "wine/debug.h" - - /* DATA ****************************************************************************/ -WINE_DEFAULT_DEBUG_CHANNEL(fltlib); - static HRESULT FilterLoadUnload(_In_z_ LPCWSTR lpFilterName, diff --git a/dll/win32/fltlib/message.c b/dll/win32/fltlib/message.c index 6c8aaf3a6c..bdbfcb3541 100644 --- a/dll/win32/fltlib/message.c +++ b/dll/win32/fltlib/message.c @@ -6,25 +6,18 @@ * PROGRAMMERS: Ged Murphy (ged.murphy(a)reactos.org) */ -//#include <stdarg.h> - #define WIN32_NO_STATUS - -#include "windef.h" -#include "winbase.h" +#include <windef.h> +#include <winbase.h> #define NTOS_MODE_USER #include <ndk/iofuncs.h> #include <ndk/obfuncs.h> #include <ndk/rtlfuncs.h> - -#include "fltuser.h" -#include "fltlib.h" +#include <fltuser.h> #include <fltmgr_shared.h> -#include "wine/debug.h" -WINE_DEFAULT_DEBUG_CHANNEL(fltlib); - +#include "fltlib.h" _Must_inspect_result_ HRESULT diff --git a/dll/win32/fltlib/stubs.c b/dll/win32/fltlib/stubs.c index 859aeb302e..569c9ed74c 100644 --- a/dll/win32/fltlib/stubs.c +++ b/dll/win32/fltlib/stubs.c @@ -7,16 +7,10 @@ */ #include <stdarg.h> -#include "windef.h" -#include "winbase.h" - +#include <windef.h> +#include <winbase.h> #include <fltuser.h> -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(fltlib); - - _Must_inspect_result_ HRESULT WINAPI diff --git a/dll/win32/netapi32/obsolete.c b/dll/win32/netapi32/obsolete.c index 4bc9e2a836..42b4440ca1 100644 --- a/dll/win32/netapi32/obsolete.c +++ b/dll/win32/netapi32/obsolete.c @@ -9,6 +9,7 @@ /* INCLUDES ******************************************************************/ #include "netapi32.h" + #include <lmalert.h> #include <lmaudit.h> #include <lmconfig.h> @@ -17,8 +18,6 @@ #include <lmrepl.h> #include <lmsvc.h> -WINE_DEFAULT_DEBUG_CHANNEL(netapi32); - /* FUNCTIONS *****************************************************************/ NET_API_STATUS diff --git a/dll/win32/wbemprox/builtin.c b/dll/win32/wbemprox/builtin.c index 595dcc6c31..bf92d3c35e 100644 --- a/dll/win32/wbemprox/builtin.c +++ b/dll/win32/wbemprox/builtin.c @@ -87,8 +87,10 @@ static const WCHAR class_sounddeviceW[] = {'W','i','n','3','2','_','S','o','u','n','d','D','e','v','i','c','e',0}; static const WCHAR class_systemenclosureW[] = {'W','i','n','3','2','_','S','y','s','t','e','m','E','n','c','l','o','s','u','r','e',0}; +#ifndef __REACTOS__ static const WCHAR class_videocontrollerW[] = {'W','i','n','3','2','_','V','i','d','e','o','C','o','n','t','r','o','l','l','e','r',0}; +#endif static const WCHAR prop_accountnameW[] = {'A','c','c','o','u','n','t','N','a','m','e',0}; @@ -98,18 +100,22 @@ static const WCHAR prop_acceptstopW[] = {'A','c','c','e','p','t','S','t','o','p',0}; static const WCHAR prop_accessmaskW[] = {'A','c','c','e','s','s','M','a','s','k',0}; +#ifndef __REACTOS__ static const WCHAR prop_adapterdactypeW[] = {'A','d','a','p','t','e','r','D','A','C','T','y','p','e',0}; static const WCHAR prop_adapterramW[] = {'A','d','a','p','t','e','r','R','A','M',0}; +#endif static const WCHAR prop_adaptertypeW[] = {'A','d','a','p','t','e','r','T','y','p','e',0}; static const WCHAR prop_addresswidthW[] = {'A','d','d','r','e','s','s','W','i','d','t','h',0}; static const WCHAR prop_attributesW[] = {'A','t','t','r','i','b','u','t','e','s',0}; +#ifndef __REACTOS__ static const WCHAR prop_availabilityW[] = {'A','v','a','i','l','a','b','i','l','i','t','y',0}; +#endif static const WCHAR prop_binaryrepresentationW[] = {'B','i','n','a','r','y','R','e','p','r','e','s','e','n','t','a','t','i','o','n',0}; static const WCHAR prop_bootableW[] = @@ -130,18 +136,23 @@ static const WCHAR prop_codesetW[] = {'C','o','d','e','S','e','t',0}; static const WCHAR prop_commandlineW[] = {'C','o','m','m','a','n','d','L','i','n','e',0}; +#ifndef __REACTOS__ static const WCHAR prop_configmanagererrorcodeW[] = {'C','o','n','f','i','g','M','a','n','a','g','e','r','E','r','r','o','r','C','o','d','e',0}; +#endif static const WCHAR prop_countrycodeW[] = {'C','o','u','n','t','r','y','C','o','d','e',0}; static const WCHAR prop_cpustatusW[] = {'C','p','u','S','t','a','t','u','s',0}; static const WCHAR prop_csdversionW[] = {'C','S','D','V','e','r','s','i','o','n',0}; +#ifndef __REACTOS__ static const WCHAR prop_currentbitsperpixelW[] = {'C','u','r','r','e','n','t','B','i','t','s','P','e','r','P','i','x','e','l',0}; +#endif static const WCHAR prop_currentclockspeedW[] = {'C','u','r','r','e','n','t','C','l','o','c','k','S','p','e','e','d',0}; +#ifndef __REACTOS__ static const WCHAR prop_currenthorizontalresW[] = {'C','u','r','r','e','n','t','H','o','r','i','z','o','n','t','a','l','R','e','s','o','l','u','t','i','o','n',0}; static const WCHAR prop_currentrefreshrateW[] = @@ -150,6 +161,7 @@ static const WCHAR prop_currentscanmodeW[] = {'C','u','r','r','e','n','t','S','c','a','n','M','o','d','e',0}; static const WCHAR prop_currentverticalresW[] = {'C','u','r','r','e','n','t','V','e','r','t','i','c','a','l','R','e','s','o','l','u','t','i','o','n',0}; +#endif static const WCHAR prop_datawidthW[] = {'D','a','t','a','W','i','d','t','h',0}; static const WCHAR prop_defaultipgatewayW[] = @@ -180,12 +192,16 @@ static const WCHAR prop_domainroleW[] = {'D','o','m','a','i','n','R','o','l','e',0}; static const WCHAR prop_driveW[] = {'D','r','i','v','e',0}; +#ifndef __REACTOS__ static const WCHAR prop_driverdateW[] = {'D','r','i','v','e','r','D','a','t','e',0}; +#endif static const WCHAR prop_drivernameW[] = {'D','r','i','v','e','r','N','a','m','e',0}; +#ifndef __REACTOS__ static const WCHAR prop_driverversionW[] = {'D','r','i','v','e','r','V','e','r','s','i','o','n',0}; +#endif static const WCHAR prop_drivetypeW[] = {'D','r','i','v','e','T','y','p','e',0}; static const WCHAR prop_familyW[] = @@ -212,8 +228,10 @@ static const WCHAR prop_indexW[] = {'I','n','d','e','x',0}; static const WCHAR prop_installdateW[] = {'I','n','s','t','a','l','l','D','a','t','e',0}; +#ifndef __REACTOS__ static const WCHAR prop_installeddisplaydriversW[]= {'I','n','s','t','a','l','l','e','d','D','i','s','p','l','a','y','D','r','i','v','e','r','s',0}; +#endif static const WCHAR prop_interfaceindexW[] = {'I','n','t','e','r','f','a','c','e','I','n','d','e','x',0}; static const WCHAR prop_interfacetypeW[] = @@ -326,8 +344,10 @@ static const WCHAR prop_startingoffsetW[] = {'S','t','a','r','t','i','n','g','O','f','f','s','e','t',0}; static const WCHAR prop_stateW[] = {'S','t','a','t','e',0}; +#ifndef __REACTOS__ static const WCHAR prop_statusW[] = {'S','t','a','t','u','s',0}; +#endif static const WCHAR prop_statusinfoW[] = {'S','t','a','t','u','s','I','n','f','o',0}; static const WCHAR prop_strvalueW[] = @@ -362,6 +382,7 @@ static const WCHAR prop_versionW[] = {'V','e','r','s','i','o','n',0}; static const WCHAR prop_vendorW[] = {'V','e','n','d','o','r',0}; +#ifndef __REACTOS__ static const WCHAR prop_videoarchitectureW[] = {'V','i','d','e','o','A','r','c','h','i','t','e','c','t','u','r','e',0}; static const WCHAR prop_videomemorytypeW[] = @@ -370,6 +391,7 @@ static const WCHAR prop_videomodedescriptionW[] = {'V','i','d','e','o','M','o','d','e','D','e','s','c','r','i','p','t','i','o','n',0}; static const WCHAR prop_videoprocessorW[] = {'V','i','d','e','o','P','r','o','c','e','s','s','o','r',0}; +#endif /* !__REACTOS__ */ static const WCHAR prop_volumenameW[] = {'V','o','l','u','m','e','N','a','m','e',0}; static const WCHAR prop_volumeserialnumberW[] = @@ -663,6 +685,8 @@ static const struct column col_systemsecurity[] = { method_getsdW, CIM_FLAG_ARRAY|COL_FLAG_METHOD }, { method_setsdW, CIM_FLAG_ARRAY|COL_FLAG_METHOD }, }; + +#ifndef __REACTOS__ static const struct column col_videocontroller[] = { { prop_adapterdactypeW, CIM_STRING }, @@ -688,6 +712,7 @@ static const struct column col_videocontroller[] = { prop_videomodedescriptionW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_videoprocessorW, CIM_STRING|COL_FLAG_DYNAMIC }, }; +#endif static const WCHAR baseboard_manufacturerW[] = {'I','n','t','e','l',' ','C','o','r','p','o','r','a','t','i','o','n',0}; @@ -771,6 +796,7 @@ static const WCHAR systemenclosure_tagW[] = {'S','y','s','t','e','m',' ','E','n','c','l','o','s','u','r','e',' ','0',0}; static const WCHAR systemenclosure_manufacturerW[] = {'W','i','n','e',0}; +#ifndef __REACTOS__ static const WCHAR videocontroller_dactypeW[] = {'I','n','t','e','g','r','a','t','e','d',' ','R','A','M','D','A','C',0}; static const WCHAR videocontroller_deviceidW[] = @@ -781,6 +807,7 @@ static const WCHAR videocontroller_driverversionW[] = {'1','.','0',0}; static const WCHAR videocontroller_statusW[] = {'O','K',0}; +#endif #include "pshpack1.h" struct record_baseboard
7 years
1
0
0
0
[reactos] 01/01: [SHELL32] Remove unused debug channels and comment out unused variables. Silences some clang-cl warnings.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e83592920b1aa231be117…
commit e83592920b1aa231be117bed6ba992b05319f43d Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Dec 7 23:54:22 2017 +0100 [SHELL32] Remove unused debug channels and comment out unused variables. Silences some clang-cl warnings. --- dll/win32/shell32/folders.cpp | 2 -- dll/win32/shell32/shellmenu/CMenuSite.cpp | 2 -- dll/win32/shell32/wine/shellpath.c | 24 ++++++++++++++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/dll/win32/shell32/folders.cpp b/dll/win32/shell32/folders.cpp index db8312f1fa..5b69ff6d5c 100644 --- a/dll/win32/shell32/folders.cpp +++ b/dll/win32/shell32/folders.cpp @@ -19,8 +19,6 @@ #include "precomp.h" -WINE_DEFAULT_DEBUG_CHANNEL(shell); - WCHAR swShell32Name[MAX_PATH]; DWORD NumIconOverlayHandlers = 0; diff --git a/dll/win32/shell32/shellmenu/CMenuSite.cpp b/dll/win32/shell32/shellmenu/CMenuSite.cpp index 25b0803c38..010408de07 100644 --- a/dll/win32/shell32/shellmenu/CMenuSite.cpp +++ b/dll/win32/shell32/shellmenu/CMenuSite.cpp @@ -23,8 +23,6 @@ #include "CMenuSite.h" -WINE_DEFAULT_DEBUG_CHANNEL(menusite); - CMenuSite::CMenuSite() : m_DeskBarSite(NULL), m_BandObject(NULL), diff --git a/dll/win32/shell32/wine/shellpath.c b/dll/win32/shell32/wine/shellpath.c index 02072e9a85..3e2cd089ad 100644 --- a/dll/win32/shell32/wine/shellpath.c +++ b/dll/win32/shell32/wine/shellpath.c @@ -548,8 +548,10 @@ LONG WINAPI PathProcessCommandAW ( static const WCHAR szCurrentVersion[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\0'}; static const WCHAR Administrative_ToolsW[] = {'A','d','m','i','n','i','s','t','r','a','t','i','v','e',' ','T','o','o','l','s','\0'}; static const WCHAR AppDataW[] = {'A','p','p','D','a','t','a','\0'}; +#ifndef __REACTOS__ static const WCHAR AppData_LocalLowW[] = {'A','p','p','D','a','t','a','\\','L','o','c','a','l','L','o','w','\0'}; static const WCHAR Application_DataW[] = {'A','p','p','l','i','c','a','t','i','o','n',' ','D','a','t','a','\0'}; +#endif static const WCHAR CacheW[] = {'C','a','c','h','e','\0'}; static const WCHAR CD_BurningW[] = {'C','D',' ','B','u','r','n','i','n','g','\0'}; static const WCHAR Common_Administrative_ToolsW[] = {'C','o','m','m','o','n',' ','A','d','m','i','n','i','s','t','r','a','t','i','v','e',' ','T','o','o','l','s','\0'}; @@ -566,18 +568,27 @@ static const WCHAR Common_StartUpW[] = {'C','o','m','m','o','n',' ','S','t','a', static const WCHAR Common_Start_MenuW[] = {'C','o','m','m','o','n',' ','S','t','a','r','t',' ','M','e','n','u','\0'}; static const WCHAR Common_TemplatesW[] = {'C','o','m','m','o','n',' ','T','e','m','p','l','a','t','e','s','\0'}; static const WCHAR CommonVideoW[] = {'C','o','m','m','o','n','V','i','d','e','o','\0'}; +#ifndef __REACTOS__ static const WCHAR ContactsW[] = {'C','o','n','t','a','c','t','s','\0'}; +#endif static const WCHAR CookiesW[] = {'C','o','o','k','i','e','s','\0'}; static const WCHAR DesktopW[] = {'D','e','s','k','t','o','p','\0'}; +#ifndef __REACTOS__ static const WCHAR DocumentsW[] = {'D','o','c','u','m','e','n','t','s','\0'}; static const WCHAR DownloadsW[] = {'D','o','w','n','l','o','a','d','s','\0'}; +#endif static const WCHAR FavoritesW[] = {'F','a','v','o','r','i','t','e','s','\0'}; static const WCHAR FontsW[] = {'F','o','n','t','s','\0'}; static const WCHAR HistoryW[] = {'H','i','s','t','o','r','y','\0'}; +#ifndef __REACTOS__ static const WCHAR LinksW[] = {'L','i','n','k','s','\0'}; +#endif static const WCHAR Local_AppDataW[] = {'L','o','c','a','l',' ','A','p','p','D','a','t','a','\0'}; +#ifndef __REACTOS__ static const WCHAR Local_Settings_Application_DataW[] = {'L','o','c','a','l',' ','S','e','t','t','i','n','g','s','\\','A','p','p','l','i','c','a','t','i','o','n',' ','D','a','t','a','\0'}; +#endif static const WCHAR Local_Settings_CD_BurningW[] = {'L','o','c','a','l',' ','S','e','t','t','i','n','g','s','\\','A','p','p','l','i','c','a','t','i','o','n',' ','D','a','t','a','\\','M','i','c','r','o','s','o','f','t','\\','C','D',' ','B','u','r','n','i','n','g','\0'}; +#ifndef __REACTOS__ static const WCHAR Local_Settings_HistoryW[] = {'L','o','c','a','l',' ','S','e','t','t','i','n','g','s','\\','H','i','s','t','o','r','y','\0'}; static const WCHAR Local_Settings_Temporary_Internet_FilesW[] = {'L','o','c','a','l',' ','S','e','t','t','i','n','g','s','\\','T','e','m','p','o','r','a','r','y',' ','I','n','t','e','r','n','e','t',' ','F','i','l','e','s','\0'}; static const WCHAR Microsoft_Windows_GameExplorerW[] = {'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','G','a','m','e','E','x','p','l','o','r','e','r','\0'}; @@ -588,18 +599,23 @@ static const WCHAR Music_PlaylistsW[] = {'M','u','s','i','c','\\','P','l','a','y static const WCHAR Music_Sample_MusicW[] = {'M','u','s','i','c','\\','S','a','m','p','l','e',' ','M','u','s','i','c','\0'}; static const WCHAR Music_Sample_PlaylistsW[] = {'M','u','s','i','c','\\','S','a','m','p','l','e',' ','P','l','a','y','l','i','s','t','s','\0'}; static const WCHAR My_DocumentsW[] = {'M','y',' ','D','o','c','u','m','e','n','t','s','\0'}; +#endif static const WCHAR My_MusicW[] = {'M','y',' ','M','u','s','i','c','\0'}; static const WCHAR My_PicturesW[] = {'M','y',' ','P','i','c','t','u','r','e','s','\0'}; static const WCHAR My_VideoW[] = {'M','y',' ','V','i','d','e','o','\0'}; static const WCHAR NetHoodW[] = {'N','e','t','H','o','o','d','\0'}; static const WCHAR OEM_LinksW[] = {'O','E','M',' ','L','i','n','k','s','\0'}; static const WCHAR PersonalW[] = {'P','e','r','s','o','n','a','l','\0'}; +#ifndef __REACTOS__ static const WCHAR PicturesW[] = {'P','i','c','t','u','r','e','s','\0'}; static const WCHAR Pictures_Sample_PicturesW[] = {'P','i','c','t','u','r','e','s','\\','S','a','m','p','l','e',' ','P','i','c','t','u','r','e','s','\0'}; static const WCHAR Pictures_Slide_ShowsW[] = {'P','i','c','t','u','r','e','s','\\','S','l','i','d','e',' ','S','h','o','w','s','\0'}; +#endif static const WCHAR PrintHoodW[] = {'P','r','i','n','t','H','o','o','d','\0'}; +#ifndef __REACTOS__ static const WCHAR Program_FilesW[] = {'P','r','o','g','r','a','m',' ','F','i','l','e','s','\0'}; static const WCHAR Program_Files_Common_FilesW[] = {'P','r','o','g','r','a','m',' ','F','i','l','e','s','\\','C','o','m','m','o','n',' ','F','i','l','e','s','\0'}; +#endif static const WCHAR Program_Files_x86W[] = {'P','r','o','g','r','a','m',' ','F','i','l','e','s',' ','(','x','8','6',')','\0'}; static const WCHAR Program_Files_x86_Common_FilesW[] = {'P','r','o','g','r','a','m',' ','F','i','l','e','s',' ','(','x','8','6',')','\\','C','o','m','m','o','n',' ','F','i','l','e','s','\0'}; static const WCHAR ProgramFilesDirW[] = {'P','r','o','g','r','a','m','F','i','l','e','s','D','i','r','\0'}; @@ -607,19 +623,25 @@ static const WCHAR ProgramFilesDirX86W[] = {'P','r','o','g','r','a','m','F','i', static const WCHAR ProgramsW[] = {'P','r','o','g','r','a','m','s','\0'}; static const WCHAR RecentW[] = {'R','e','c','e','n','t','\0'}; static const WCHAR ResourcesW[] = {'R','e','s','o','u','r','c','e','s','\0'}; +#ifndef __REACTOS__ static const WCHAR Saved_GamesW[] = {'S','a','v','e','d',' ','G','a','m','e','s','\0'}; static const WCHAR SearchesW[] = {'S','e','a','r','c','h','e','s','\0'}; +#endif static const WCHAR SendToW[] = {'S','e','n','d','T','o','\0'}; static const WCHAR StartUpW[] = {'S','t','a','r','t','U','p','\0'}; static const WCHAR Start_MenuW[] = {'S','t','a','r','t',' ','M','e','n','u','\0'}; +#ifndef __REACTOS__ static const WCHAR Start_Menu_ProgramsW[] = {'S','t','a','r','t',' ','M','e','n','u','\\','P','r','o','g','r','a','m','s','\0'}; static const WCHAR Start_Menu_Admin_ToolsW[] = {'S','t','a','r','t',' ','M','e','n','u','\\','P','r','o','g','r','a','m','s','\\','A','d','m','i','n','i','s','t','r','a','t','i','v','e',' ','T','o','o','l','s','\0'}; static const WCHAR Start_Menu_StartupW[] = {'S','t','a','r','t',' ','M','e','n','u','\\','P','r','o','g','r','a','m','s','\\','S','t','a','r','t','U','p','\0'}; +#endif static const WCHAR TemplatesW[] = {'T','e','m','p','l','a','t','e','s','\0'}; +#ifndef __REACTOS__ static const WCHAR UsersW[] = {'U','s','e','r','s','\0'}; static const WCHAR UsersPublicW[] = {'U','s','e','r','s','\\','P','u','b','l','i','c','\0'}; static const WCHAR VideosW[] = {'V','i','d','e','o','s','\0'}; static const WCHAR Videos_Sample_VideosW[] = {'V','i','d','e','o','s','\\','S','a','m','p','l','e',' ','V','i','d','e','o','s','\0'}; +#endif static const WCHAR DefaultW[] = {'.','D','e','f','a','u','l','t','\0'}; static const WCHAR AllUsersProfileW[] = {'%','A','L','L','U','S','E','R','S','P','R','O','F','I','L','E','%','\0'}; static const WCHAR UserProfileW[] = {'%','U','S','E','R','P','R','O','F','I','L','E','%','\0'}; @@ -630,8 +652,10 @@ static const WCHAR AllUsersProfileValueW[] = {'A','l','l','U','s','e','r','s','P static const WCHAR szSHFolders[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l','o','r','e','r','\\','S','h','e','l','l',' ','F','o','l','d','e','r','s','\0'}; static const WCHAR szSHUserFolders[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l','o','r','e','r','\\','U','s','e','r',' ','S','h','e','l','l',' ','F','o','l','d','e','r','s','\0'}; static const WCHAR szDefaultProfileDirW[] = {'u','s','e','r','s',0}; +#ifndef __REACTOS__ static const WCHAR szKnownFolderDescriptions[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l','o','r','e','r','\\','F','o','l','d','e','r','D','e','s','c','r','i','p','t','i','o','n','s','\0'}; static const WCHAR szKnownFolderRedirections[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l','o','r','e','r','\\','U','s','e','r',' ','S','h','e','l','l',' ','F','o','l','d','e','r','s',0}; +#endif static const WCHAR AllUsersW[] = {'P','u','b','l','i','c',0}; typedef enum _CSIDL_Type {
7 years
1
0
0
0
[reactos] 01/01: [ADVAPI32] Remove unused debug channels and comment out unused variables. Silences some clang-cl warnings.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7ed4c1dd03a9d82f47708…
commit 7ed4c1dd03a9d82f47708538daf829e8f68f9a82 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Dec 7 23:34:28 2017 +0100 [ADVAPI32] Remove unused debug channels and comment out unused variables. Silences some clang-cl warnings. --- dll/win32/advapi32/misc/dllmain.c | 1 - dll/win32/advapi32/misc/unicode.c | 2 -- dll/win32/advapi32/sec/trustee.c | 2 -- dll/win32/advapi32/wine/security.c | 6 ++++++ 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dll/win32/advapi32/misc/dllmain.c b/dll/win32/advapi32/misc/dllmain.c index 7959cc2dd7..e914bc8b88 100644 --- a/dll/win32/advapi32/misc/dllmain.c +++ b/dll/win32/advapi32/misc/dllmain.c @@ -9,7 +9,6 @@ */ #include <advapi32.h> -WINE_DEFAULT_DEBUG_CHANNEL(advapi); extern BOOL RegInitialize(VOID); extern BOOL RegCleanup(VOID); diff --git a/dll/win32/advapi32/misc/unicode.c b/dll/win32/advapi32/misc/unicode.c index b4e2ddb009..d9cebc5596 100644 --- a/dll/win32/advapi32/misc/unicode.c +++ b/dll/win32/advapi32/misc/unicode.c @@ -10,8 +10,6 @@ #include <advapi32.h> -WINE_DEFAULT_DEBUG_CHANNEL(advapi); - /************************************************************************** * IsTextUnicode (ADVAPI32.@) * diff --git a/dll/win32/advapi32/sec/trustee.c b/dll/win32/advapi32/sec/trustee.c index a889cc9e6a..196cbd9832 100644 --- a/dll/win32/advapi32/sec/trustee.c +++ b/dll/win32/advapi32/sec/trustee.c @@ -6,8 +6,6 @@ */ #include <advapi32.h> -WINE_DEFAULT_DEBUG_CHANNEL(advapi); - /****************************************************************************** * BuildImpersonateTrusteeA [ADVAPI32.@] diff --git a/dll/win32/advapi32/wine/security.c b/dll/win32/advapi32/wine/security.c index 9b85eeef46..5885f5d738 100644 --- a/dll/win32/advapi32/wine/security.c +++ b/dll/win32/advapi32/wine/security.c @@ -120,7 +120,9 @@ static const WELLKNOWNRID WellKnownRids[] = { { {'R','S'}, WinAccountRasAndIasServersSid, DOMAIN_ALIAS_RID_RAS_SERVERS }, }; +#ifndef __REACTOS__ static const SID sidWorld = { SID_REVISION, 1, { SECURITY_WORLD_SID_AUTHORITY} , { SECURITY_WORLD_RID } }; +#endif static const WCHAR SDDL_NO_READ_UP[] = {'N','R',0}; static const WCHAR SDDL_NO_WRITE_UP[] = {'N','W',0}; @@ -131,13 +133,17 @@ static const WCHAR SDDL_NO_EXECUTE_UP[] = {'N','X',0}; */ static const WCHAR SDDL_ACCESS_ALLOWED[] = {'A',0}; static const WCHAR SDDL_ACCESS_DENIED[] = {'D',0}; +#ifndef __REACTOS__ static const WCHAR SDDL_OBJECT_ACCESS_ALLOWED[] = {'O','A',0}; static const WCHAR SDDL_OBJECT_ACCESS_DENIED[] = {'O','D',0}; +#endif static const WCHAR SDDL_AUDIT[] = {'A','U',0}; static const WCHAR SDDL_ALARM[] = {'A','L',0}; static const WCHAR SDDL_MANDATORY_LABEL[] = {'M','L',0}; +#ifndef __REACTOS__ static const WCHAR SDDL_OBJECT_AUDIT[] = {'O','U',0}; static const WCHAR SDDL_OBJECT_ALARM[] = {'O','L',0}; +#endif /* * SDDL ADS Rights
7 years
1
0
0
0
[reactos] 01/01: [FREETYPE][PORTCLS][RPCSS][SPOOLSV][STLPORT][USETUP][WLANSVC] Silence some clang-cl warnings.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=56334230869d0c5d8028a…
commit 56334230869d0c5d8028abd0199fdbd067b4aaed Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Dec 7 23:26:59 2017 +0100 [FREETYPE][PORTCLS][RPCSS][SPOOLSV][STLPORT][USETUP][WLANSVC] Silence some clang-cl warnings. --- base/services/rpcss/CMakeLists.txt | 5 +++++ base/services/wlansvc/CMakeLists.txt | 4 ++++ base/setup/usetup/CMakeLists.txt | 5 +++++ drivers/wdm/audio/backpln/portcls/CMakeLists.txt | 4 ++++ sdk/lib/3rdparty/freetype/CMakeLists.txt | 4 ++++ sdk/lib/3rdparty/stlport/CMakeLists.txt | 6 ++++++ win32ss/printing/base/spoolsv/CMakeLists.txt | 5 +++++ 7 files changed, 33 insertions(+) diff --git a/base/services/rpcss/CMakeLists.txt b/base/services/rpcss/CMakeLists.txt index 0591b005b3..1d429832a8 100644 --- a/base/services/rpcss/CMakeLists.txt +++ b/base/services/rpcss/CMakeLists.txt @@ -15,6 +15,11 @@ list(APPEND SOURCE include_directories(${REACTOS_BINARY_DIR}/sdk/include/reactos/wine) add_executable(rpcss ${SOURCE} rpcss.rc) + +if(USE_CLANG_CL) + add_target_compile_flags(rpcss "-Wno-cast-calling-convention") +endif() + target_link_libraries(rpcss ${PSEH_LIB} wine) set_module_type(rpcss win32cui UNICODE) add_importlibs(rpcss advapi32 rpcrt4 msvcrt kernel32 ntdll) diff --git a/base/services/wlansvc/CMakeLists.txt b/base/services/wlansvc/CMakeLists.txt index 11933ba939..f62b8eca9e 100644 --- a/base/services/wlansvc/CMakeLists.txt +++ b/base/services/wlansvc/CMakeLists.txt @@ -10,6 +10,10 @@ list(APPEND SOURCE add_executable(wlansvc ${SOURCE} wlansvc.rc) +if(USE_CLANG_CL) + add_target_compile_flags(wlansvc "-Wno-cast-calling-convention") +endif() + if(NOT MSVC) target_link_libraries(wlansvc ${PSEH_LIB}) endif() diff --git a/base/setup/usetup/CMakeLists.txt b/base/setup/usetup/CMakeLists.txt index d90103f16a..5922a4f040 100644 --- a/base/setup/usetup/CMakeLists.txt +++ b/base/setup/usetup/CMakeLists.txt @@ -35,6 +35,11 @@ list(APPEND SOURCE usetup.h) add_executable(usetup ${SOURCE} usetup.rc) + +if(USE_CLANG_CL) + add_target_compile_flags(usetup "-Wno-invalid-source-encoding") +endif() + target_link_libraries(usetup zlib inflib ext2lib vfatlib) set_module_type(usetup nativecui) add_importlibs(usetup ntdll) diff --git a/drivers/wdm/audio/backpln/portcls/CMakeLists.txt b/drivers/wdm/audio/backpln/portcls/CMakeLists.txt index e5f0704776..85660a9e33 100644 --- a/drivers/wdm/audio/backpln/portcls/CMakeLists.txt +++ b/drivers/wdm/audio/backpln/portcls/CMakeLists.txt @@ -55,6 +55,10 @@ add_library(portcls SHARED portcls.rc ${CMAKE_CURRENT_BINARY_DIR}/portcls.def) +if(USE_CLANG_CL) + add_target_compile_flags(portcls "-Wno-missing-braces") +endif() + target_link_libraries(portcls libcntpr ${PSEH_LIB}) set_module_type(portcls kernelmodedriver ENTRYPOINT 0 ) add_pch(portcls private.hpp SOURCE) diff --git a/sdk/lib/3rdparty/freetype/CMakeLists.txt b/sdk/lib/3rdparty/freetype/CMakeLists.txt index 2760d2691e..6a41e3dcf7 100644 --- a/sdk/lib/3rdparty/freetype/CMakeLists.txt +++ b/sdk/lib/3rdparty/freetype/CMakeLists.txt @@ -60,3 +60,7 @@ list(APPEND SOURCE src/winfonts/winfnt.c) add_library(freetype ${SOURCE}) + +if(USE_CLANG_CL) + add_target_compile_flags(freetype "-Wno-tautological-constant-compare") +endif() diff --git a/sdk/lib/3rdparty/stlport/CMakeLists.txt b/sdk/lib/3rdparty/stlport/CMakeLists.txt index 5210770d02..17c902fdd3 100644 --- a/sdk/lib/3rdparty/stlport/CMakeLists.txt +++ b/sdk/lib/3rdparty/stlport/CMakeLists.txt @@ -47,5 +47,11 @@ add_library(stlport src/cxa.c src/c_locale.c) +if(USE_CLANG_CL) + add_target_compile_flags(stlport "-Wno-missing-braces -Wno-unused-local-typedef") + add_target_compile_flags(stlport "-Wno-infinite-recursion -Wno-deprecated-register") + add_target_compile_flags(stlport "-Wno-tautological-unsigned-zero-compare") +endif() + add_dependencies(stlport xdk) add_pch(stlport src/stlport_prefix.h SOURCE) diff --git a/win32ss/printing/base/spoolsv/CMakeLists.txt b/win32ss/printing/base/spoolsv/CMakeLists.txt index 6467f3b583..da7f7b8bf5 100644 --- a/win32ss/printing/base/spoolsv/CMakeLists.txt +++ b/win32ss/printing/base/spoolsv/CMakeLists.txt @@ -22,6 +22,11 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/winspool_s.c) add_executable(spoolsv ${SOURCE} spoolsv.rc) + +if(USE_CLANG_CL) + add_target_compile_flags(spoolsv "-Wno-cast-calling-convention") +endif() + set_module_type(spoolsv win32cui UNICODE) target_link_libraries(spoolsv wine) add_delay_importlibs(spoolsv spoolss)
7 years
1
0
0
0
[reactos] 01/01: [CMAKE/CLANG-CL] Don't pass /TP twice when we're dealing with a clang-cl c++ PCH. Pass -nostdinc instead of /X on clang-cl builds.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9f85ef671270632e218d2…
commit 9f85ef671270632e218d2d0c93246a3866f88851 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Dec 7 23:22:27 2017 +0100 [CMAKE/CLANG-CL] Don't pass /TP twice when we're dealing with a clang-cl c++ PCH. Pass -nostdinc instead of /X on clang-cl builds. --- sdk/cmake/msvc.cmake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake index 19790ed91c..dd7392756e 100644 --- a/sdk/cmake/msvc.cmake +++ b/sdk/cmake/msvc.cmake @@ -224,7 +224,9 @@ if(PCH) if(IS_CPP) set(_pch_language CXX) - set(_cl_lang_flag "/TP") + if(NOT USE_CLANG_CL) + set(_cl_lang_flag "/TP") + endif() else() set(_pch_language C) set(_cl_lang_flag "/TC") @@ -443,9 +445,15 @@ function(CreateBootSectorTarget _target_name _asm_file _binary_file _base_addres set(_object_file ${_binary_file}.obj) set(_temp_file ${_binary_file}.tmp) + if(USE_CLANG_CL) + set(_no_std_includes_flag "-nostdinc") + else() + set(_no_std_includes_flag "/X") + endif() + add_custom_command( OUTPUT ${_temp_file} - COMMAND ${CMAKE_C_COMPILER} /nologo /X /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm /I${REACTOS_SOURCE_DIR}/boot/freeldr /D__ASM__ /D_USE_ML /EP /c ${_asm_file} > ${_temp_file} + COMMAND ${CMAKE_C_COMPILER} /nologo ${_no_std_includes_flag} /I${REACTOS_SOURCE_DIR}/sdk/include/asm /I${REACTOS_BINARY_DIR}/sdk/include/asm /I${REACTOS_SOURCE_DIR}/boot/freeldr /D__ASM__ /D_USE_ML /EP /c ${_asm_file} > ${_temp_file} DEPENDS ${_asm_file}) if(ARCH STREQUAL "arm")
7 years
1
0
0
0
[reactos] 01/01: [TRANSLATION] Update Simplified Chinese translations. (#170)
by CNAmira
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=43e1d6f177b687a14b4fd…
commit 43e1d6f177b687a14b4fdd88554ff64a6376ca1a Author: CNAmira <forucial(a)icloud.com> AuthorDate: Fri Dec 8 05:53:48 2017 +0800 [TRANSLATION] Update Simplified Chinese translations. (#170) - Add Simplified Chinese translation for EVENTCREATE. - Update translations for 'dxdiag', 'fontview', 'magnify', 'mmc', 'rapps' and 'wordpad'. Patch by Li Keqing. --- .../cmdutils/eventcreate/eventcreate.rc | 3 + .../cmdutils/eventcreate/lang/zh-CN.rc | 60 ++++++++++++++ base/applications/dxdiag/lang/zh-CN.rc | 91 +++++++++++----------- base/applications/fontview/lang/zh-CN.rc | 13 ++-- base/applications/magnify/lang/zh-CN.rc | 19 ++--- base/applications/mmc/lang/zh-CN.rc | 9 ++- base/applications/rapps/lang/zh-CN.rc | 62 +++++++-------- base/applications/wordpad/lang/zh-CN.rc | 3 +- 8 files changed, 164 insertions(+), 96 deletions(-) diff --git a/base/applications/cmdutils/eventcreate/eventcreate.rc b/base/applications/cmdutils/eventcreate/eventcreate.rc index 6722ee76f9..d87e9a8ff4 100644 --- a/base/applications/cmdutils/eventcreate/eventcreate.rc +++ b/base/applications/cmdutils/eventcreate/eventcreate.rc @@ -30,3 +30,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_TR_TR #include "lang/tr-TR.rc" #endif +#ifdef LANGUAGE_ZH_CN + #include "lang/zh-CN.rc" +#endif diff --git a/base/applications/cmdutils/eventcreate/lang/zh-CN.rc b/base/applications/cmdutils/eventcreate/lang/zh-CN.rc new file mode 100644 index 0000000000..4976227c18 --- /dev/null +++ b/base/applications/cmdutils/eventcreate/lang/zh-CN.rc @@ -0,0 +1,60 @@ +/* Translated by Li Keqing <auroracloud4096(a)gmail.com> */ +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED + +STRINGTABLE +BEGIN + IDS_USAGE "键入 “EVENTCREATE /?” 以了解用法。\n" + IDS_HELP "\n\ +EVENTCREATE [/S computer [/U [domain\\]user [/P password]]] /ID EventID\n\ + {[/L logname] | [/SO source]} /T type /C category /D description\n\ +\n\ +描述:\n\ + 该工具是管理员能够创建一个自定义事件于某制定事件日志里。\n\ +\n\ +参数列表:\n\ + /S computer 指定要连接的远程计算机。\n\ +\n\ + /U [domain\\]user 指定应该通过哪个用户执行命令。\n\ +\n\ + /P [password] 指定给定用户的密码。如果省略则提示输入。\n\ +\n\ + /L logname 指定要在其中创建事件事件日志。有效的日志是:\n\ + Application,System,Security\n\ + (最后一项仅为 SYSTEM 账户保留)。\n\ +\n\ + /SO source 指定为此事件要使用的来源(如果没有指定,\n\ + 默认来源则为‘eventcreate’)有效来源可以是\n\ + 任意字符串并应该代表应用程序或者生成事件的组件。\n\ +\n\ + /T type 指定要创建的事件类型。有效的类型是:\n\ + SUCCESS,ERROR,WARNING,INFORMATION。\n\ +\n\ + /C category 指定事件的种类(整数)。\n\ +\n\ + /ID EventID 指定事件的 ID。必须为介于 0 - 65535 以内的整数。\n\ +\n\ + /D description 为新事件指定描述文字。\n\ +\n\ + /? 显示此帮助消息。\n\ +" + IDS_INVALIDSWITCH "无效选项 - '%s'.\n" + IDS_BADSYNTAX_0 "错误的命令行语法。\n" + IDS_BADSYNTAX_1 "错误的命令行语法。选项 '%s' 需要一个值。\n" + IDS_BADSYNTAX_2 "错误的命令行语法。选项 '%s' 的值不能为空。\n" + IDS_BADSYNTAX_3 "错误的命令行语法。值 '%s' 不被选项 '%s' 所接受。\n" + IDS_BADSYNTAX_4 "错误的命令行语法。值不能被选项 '%s' 所指定。\n" + IDS_BADSYNTAX_5 "错误的命令行语法。选项 '%s' 不允许使用超过 %lu 次。\n" + IDS_BADSYNTAX_6 "错误的命令行语法。托管选项 '%s' 暂不可用。\n" + // IDS_BADSYNTAX_7 "错误的命令行语法。选项 '%s' 的值超过可允许的范围。\n" + IDS_BADSYNTAX_7 "错误的命令行语法。选项 '%s' 的值必须介于 %d - %d 以内。\n" + + IDS_LOG_NOT_FOUND "日志 '%s' 不存在。无法创建事件。\n" + IDS_SOURCE_NOCREATE "无法创建新的来源因为没有指定日志。请使用 /L 选项来指定日志。\n" + IDS_SOURCE_EXISTS "来源已经存在于日志 '%s' 中,不能重复操作。\n" + IDS_SOURCE_NOT_CUSTOM "来源参数被用于识别定制脚本/程序(未被安装的程序)。\n" + + IDS_SUCCESS_1 "操作成功:一个 '%s' 类型的事件已经被创建在日志 '%s' 中。\n" + IDS_SUCCESS_2 "操作成功:一个 '%s' 类型的事件已经被创建在来源 '%s' 中。\n" + IDS_SUCCESS_3 "操作成功:一个 '%s' 类型的事件已经被创建在日志 '%s' 和来源 '%s' 中。\n" + IDS_SWITCH_UNIMPLEMENTED "选项 '%s' 目前不被支持,很抱歉造成您的不便!\n" +END diff --git a/base/applications/dxdiag/lang/zh-CN.rc b/base/applications/dxdiag/lang/zh-CN.rc index a9ea4afd46..d376be5a88 100644 --- a/base/applications/dxdiag/lang/zh-CN.rc +++ b/base/applications/dxdiag/lang/zh-CN.rc @@ -4,6 +4,7 @@ * FILE: base/applications/dxdiag/lang/zh-CN.rc * PURPOSE: Chinese (Simplified) Language File for ReactX-Diagnostic program * TRANSLATOR: Elton Chung <elton328(a)gmail.com> + * Li Keqing <auroracloud4096(a)gmail.com> */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED @@ -11,25 +12,25 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU -CAPTION "ReactX 诊断程式" +CAPTION "ReactX 诊断工具" FONT 9, "MS Shell Dlg" BEGIN CONTROL "Tab1", IDC_TAB_CONTROL, "SysTabControl32", WS_TABSTOP, 2, 2, 474, 250 - PUSHBUTTON "说明(&H)", IDC_BUTTON_HELP, 2, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "帮助(&H)", IDC_BUTTON_HELP, 2, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP DEFPUSHBUTTON "下一页(&N)", IDC_BUTTON_NEXT, 257, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "储存所有资讯(&S)...", IDC_BUTTON_SAVE_INFO, 311, 260, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "结束(&E)", IDC_BUTTON_EXIT, 425, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "保存所有信息(&S)...", IDC_BUTTON_SAVE_INFO, 311, 260, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "退出(&E)", IDC_BUTTON_EXIT, 425, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS Shell Dlg" BEGIN - LTEXT "此工具会报告安装在您系统的ReactX 元件和驱动程式的详细资料。", IDC_STATIC, 5, 0, 443, 17 - LTEXT "如果你知道那个区域造成问题,单击上面相应的标签。否则,你可以使用「下一页」按钮来顺序访问每一页。 ", IDC_STATIC, 5, 15, 443, 25 - GROUPBOX "系统资讯", IDC_STATIC, 5, 35, 452, 150, SS_RIGHT - LTEXT "目前日期/时间:", IDC_STATIC, 70, 50, 80, 10, SS_RIGHT - LTEXT "电脑名称:", IDC_STATIC, 70, 60, 80, 10, SS_RIGHT + LTEXT "该工具会有关 ReactX 组件和安装在系统上的驱动程序的详细信息。", IDC_STATIC, 5, 0, 443, 17 + LTEXT "如果你知道是哪个部分引起的错误,请单击上面适当的选项卡。否则,你可以使用下面的“下一页”按钮按顺序查阅每一页。 ", IDC_STATIC, 5, 15, 443, 25 + GROUPBOX "系统信息", IDC_STATIC, 5, 35, 452, 150, SS_RIGHT + LTEXT "当前日期/时间:", IDC_STATIC, 70, 50, 80, 10, SS_RIGHT + LTEXT "计算机名:", IDC_STATIC, 70, 60, 80, 10, SS_RIGHT LTEXT "操作系统:", IDC_STATIC, 70, 70, 80, 10, SS_RIGHT LTEXT "语言:", IDC_STATIC, 70, 80, 80, 10, SS_RIGHT LTEXT "系统制造商:", IDC_STATIC, 70, 90, 80, 10, SS_RIGHT @@ -37,7 +38,7 @@ BEGIN LTEXT "BIOS:", IDC_STATIC, 70, 110, 80, 10, SS_RIGHT LTEXT "处理器:", IDC_STATIC, 70, 120, 80, 10, SS_RIGHT LTEXT "内存:", IDC_STATIC, 70, 130, 80, 10, SS_RIGHT - LTEXT "分页档案:", IDC_STATIC, 70, 140, 80, 10, SS_RIGHT + LTEXT "页面文件:", IDC_STATIC, 70, 140, 80, 10, SS_RIGHT LTEXT "ReactX 版本:", IDC_STATIC, 70, 150, 80, 10, SS_RIGHT EDITTEXT IDC_STATIC_TIME, 155, 50, 210, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL EDITTEXT IDC_STATIC_COMPUTER, 155, 60, 210, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL @@ -50,21 +51,21 @@ BEGIN EDITTEXT IDC_STATIC_MEM, 155, 130, 210, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL EDITTEXT IDC_STATIC_SWAP, 155, 140, 210, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL EDITTEXT IDC_STATIC_VERSION, 155, 150, 210, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL - CHECKBOX "WHQL 数字签名检查", IDC_WHQL_SIGN_CHECK, 15, 170, 135, 10, WS_DISABLED + CHECKBOX "检查 WHQL 数字签名", IDC_WHQL_SIGN_CHECK, 15, 170, 135, 10, WS_DISABLED END IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS Shell Dlg" BEGIN - GROUPBOX "装置", IDC_STATIC, 5, 0, 250, 95 + GROUPBOX "设备", IDC_STATIC, 5, 0, 250, 95 RTEXT "名称:", IDC_STATIC, 20, 10, 70, 10 RTEXT "制造商:", IDC_STATIC, 20, 20, 70, 10 - RTEXT "晶片类型:", IDC_STATIC, 20, 30, 70, 10 + RTEXT "芯片类型:", IDC_STATIC, 20, 30, 70, 10 RTEXT "DAC 类型:", IDC_STATIC, 20, 40, 70, 10 - RTEXT "内存总计约:", IDC_STATIC, 20, 50, 70, 10 - RTEXT "目前显示模式:", IDC_STATIC, 20, 60, 70, 10 - RTEXT "显示器:", IDC_STATIC, 20, 70, 70, 10 + RTEXT "总内存约为:", IDC_STATIC, 20, 50, 70, 10 + RTEXT "当前显示模式:", IDC_STATIC, 20, 60, 70, 10 + RTEXT "监视器:", IDC_STATIC, 20, 70, 70, 10 EDITTEXT IDC_STATIC_ADAPTER_ID, 95, 10, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL EDITTEXT IDC_STATIC_ADAPTER_VENDOR, 95, 20, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL EDITTEXT IDC_STATIC_ADAPTER_CHIP, 95, 30, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL @@ -73,10 +74,10 @@ BEGIN EDITTEXT IDC_STATIC_ADAPTER_MODE, 95, 60, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL EDITTEXT IDC_STATIC_ADAPTER_MONITOR, 95, 70, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL GROUPBOX "驱动程序", IDC_STATIC, 260, 0, 197, 95 - RTEXT "主要驱动程序:", IDC_STATIC, 275, 10, 55, 10 + RTEXT "主驱动程序:", IDC_STATIC, 275, 10, 55, 10 RTEXT "版本:", IDC_STATIC, 275, 20, 55, 10 RTEXT "日期:", IDC_STATIC, 275, 30, 55, 10 - RTEXT "WHQL 标志:", IDC_STATIC, 275, 40, 55, 10 + RTEXT "WHQL 徽标:", IDC_STATIC, 275, 40, 55, 10 RTEXT "迷你 VDD:", IDC_STATIC, 275, 50, 55, 10 RTEXT "VDD:", IDC_STATIC, 275, 60, 55, 10 RTEXT "DDI 版本:", IDC_STATIC, 275, 70, 55, 10 @@ -90,7 +91,7 @@ BEGIN GROUPBOX "ReactX 功能", IDC_STATIC, 5, 97, 452, 70 RTEXT "DirectDraw 加速:", IDC_STATIC, 15, 115, 110, 12 RTEXT "Direct3D 加速:", IDC_STATIC, 15, 130, 110, 12 - RTEXT "AGP 材质加速:", IDC_STATIC, 15, 145, 110, 12 + RTEXT "AGP 纹理加速:", IDC_STATIC, 15, 145, 110, 12 LTEXT "", IDC_STATIC_DDSTATE, 130, 115, 40, 10 LTEXT "", IDC_STATIC_D3DSTATE, 130, 130, 40, 10 LTEXT "", IDC_STATIC_AGPSTATE, 130, 145, 40, 10 @@ -99,7 +100,7 @@ BEGIN PUSHBUTTON "启用", IDC_BUTTON_AGP, 170, 144, 60, 14, WS_DISABLED PUSHBUTTON "测试 DirectDraw", IDC_BUTTON_TESTDD, 250, 112, 80, 14 PUSHBUTTON "测试 Direct3D", IDC_BUTTON_TEST3D, 250, 128, 80, 14 - GROUPBOX "备注", IDC_STATIC, 5, 170, 452, 50 + GROUPBOX "笔记", IDC_STATIC, 5, 170, 452, 50 EDITTEXT IDC_TEXT_INFO, 15, 182, 432, 30, ES_LEFT | WS_BORDER | ES_READONLY | WS_TABSTOP END @@ -107,26 +108,26 @@ IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS Shell Dlg" BEGIN - GROUPBOX "装置", IDC_STATIC, 5, 0, 250, 95 + GROUPBOX "设备", IDC_STATIC, 5, 0, 250, 95 RTEXT "名称:", IDC_STATIC, 20, 10, 70, 10 - RTEXT "装置识别码:", IDC_STATIC, 20, 20, 70, 10 - RTEXT "制造商识别码:", IDC_STATIC, 20, 30, 70, 10 - RTEXT "产品识别码:", IDC_STATIC, 20, 40, 70, 10 + RTEXT "硬件 ID:", IDC_STATIC, 20, 20, 70, 10 + RTEXT "制造商 ID:", IDC_STATIC, 20, 30, 70, 10 + RTEXT "产品 ID:", IDC_STATIC, 20, 40, 70, 10 RTEXT "类型:", IDC_STATIC, 20, 50, 70, 10 - RTEXT "预设装置:", IDC_STATIC, 20, 60, 70, 10 + RTEXT "默认设备:", IDC_STATIC, 20, 60, 70, 10 EDITTEXT IDC_STATIC_DSOUND_NAME, 95, 10, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL EDITTEXT IDC_STATIC_DSOUND_DEVICEID, 95, 20, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL EDITTEXT IDC_STATIC_DSOUND_VENDORID, 95, 30, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL EDITTEXT IDC_STATIC_DSOUND_PRODUCTID, 95, 40, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL EDITTEXT IDC_STATIC_DSOUND_TYPE, 95, 50, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL EDITTEXT IDC_STATIC_DSOUND_STANDARD, 95, 60, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL - GROUPBOX "驱动程式", IDC_STATIC, 260, 0, 197, 95 + GROUPBOX "驱动程序", IDC_STATIC, 260, 0, 197, 95 RTEXT "名称:", IDC_STATIC, 275, 10, 55, 10 RTEXT "版本:", IDC_STATIC, 275, 20, 55, 10 RTEXT "日期:", IDC_STATIC, 275, 30, 55, 10 - RTEXT "WHQL 标志:", IDC_STATIC, 275, 40, 55, 10 - RTEXT "其他档案:", IDC_STATIC, 275, 50, 55, 10 - RTEXT "提供者:", IDC_STATIC, 275, 60, 55, 10 + RTEXT "WHQL 徽标:", IDC_STATIC, 275, 40, 55, 10 + RTEXT "其他文件:", IDC_STATIC, 275, 50, 55, 10 + RTEXT "提供程序:", IDC_STATIC, 275, 60, 55, 10 EDITTEXT IDC_STATIC_DSOUND_DRIVER, 335, 10, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL EDITTEXT IDC_STATIC_DSOUND_VERSION, 335, 20, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL EDITTEXT IDC_STATIC_DSOUND_DATE, 335, 30, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL @@ -137,7 +138,7 @@ BEGIN CONTROL "", IDC_SLIDER_DSOUND, "msctls_trackbar32", TBS_BOTTOM | TBS_AUTOTICKS | WS_TABSTOP, 110, 125, 80, 17 RTEXT "硬体音效\n加速等级:", IDC_STATIC, 10, 125, 90, 20, WS_DISABLED PUSHBUTTON "测试 DirectSound", IDC_BUTTON_TESTDSOUND, 270, 125, 80, 14, WS_DISABLED - GROUPBOX "备注", IDC_STATIC, 5, 170, 452, 50 + GROUPBOX "笔记", IDC_STATIC, 5, 170, 452, 50 EDITTEXT IDC_TEXT_DSOUNDINFO, 15, 182, 432, 30, ES_LEFT | WS_BORDER | ES_READONLY | WS_TABSTOP END @@ -163,12 +164,12 @@ IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS Shell Dlg" BEGIN - GROUPBOX "DirectInput 装置", IDC_STATIC, 5, 0, 452, 85 + GROUPBOX "DirectInput 设备", IDC_STATIC, 5, 0, 452, 85 CONTROL "", IDC_LIST_DEVICE, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 15, 12, 432, 65 - GROUPBOX "输入装置", IDC_STATIC, 5, 87, 452, 81 + GROUPBOX "与输入相关的设备", IDC_STATIC, 5, 87, 452, 81 CONTROL "", IDC_TREE_PORT, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 15, 99, 432, 60, 0x00000200 - GROUPBOX "资讯", IDC_STATIC, 5, 170, 452, 50 + GROUPBOX "备注", IDC_STATIC, 5, 170, 452, 50 EDITTEXT IDC_RICH_INFO, 15, 182, 432, 30, ES_LEFT | WS_BORDER | ES_READONLY | WS_TABSTOP END @@ -215,23 +216,23 @@ BEGIN IDS_DEVICE_STATUS_ATTACHED "已连接" IDS_DEVICE_STATUS_MISSING "已中断连接" IDS_DEVICE_STATUS_UNKNOWN "未知" - IDS_DEVICE_NAME "装置名称" + IDS_DEVICE_NAME "设备名称" IDS_DEVICE_STATUS "状态" - IDS_DEVICE_CONTROLLER "控制器识别码" - IDS_DEVICE_MANUFACTURER "制造商识别码" - IDS_DEVICE_PRODUCT "产品识别码" - IDS_DEVICE_FORCEFEEDBACK "动力回馈驱动程式" - IDS_NOT_APPLICABLE "不适用" + IDS_DEVICE_CONTROLLER "控制器 ID" + IDS_DEVICE_MANUFACTURER "制造商 ID" + IDS_DEVICE_PRODUCT "产品 ID" + IDS_DEVICE_FORCEFEEDBACK "压力反馈驱动程序" + IDS_NOT_APPLICABLE "不可用" IDS_OPTION_YES "是" IDS_DIRECTPLAY_COL_NAME1 "名称" IDS_DIRECTPLAY_COL_NAME2 "登录" - IDS_DIRECTPLAY_COL_NAME3 "档案" + IDS_DIRECTPLAY_COL_NAME3 "文件" IDS_DIRECTPLAY_COL_NAME4 "版本" IDS_DIRECTPLAY8_MODEMSP "DirectPlay8 调制解调器服务提供者" IDS_DIRECTPLAY8_SERIALSP "DirectPlay8 序列服务提供者" IDS_DIRECTPLAY8_IPXSP "DirectPlay8 IPX 服务提供者" IDS_DIRECTPLAY8_TCPSP "DirectPlay8 TCP/IP 服务提供者" - IDS_DIRECTPLAY_TCPCONN "DirectPlay 网际网络 TCP/IP 连接" + IDS_DIRECTPLAY_TCPCONN "DirectPlay 互联网 TCP/IP 连接" IDS_DIRECTPLAY_IPXCONN "DirectPlay IPX 连接" IDS_DIRECTPLAY_MODEMCONN "DirectPlay 调制解调器连接" IDS_DIRECTPLAY_SERIALCONN "DirectPlay 序列连接" @@ -239,12 +240,12 @@ BEGIN IDS_REG_FAIL "错误" IDS_DDTEST_ERROR "测试失败!" IDS_DDTEST_DESCRIPTION "这将启动 DirectDraw 界面测试。要继续?" - IDS_DDPRIMARY_DESCRIPTION "此测试将使用 DirectDraw 在主要表面上绘图。你应会看见黑色和白色的矩形。要继续?" + IDS_DDPRIMARY_DESCRIPTION "此测试将使用 DirectDraw 在主表面上绘图。你应该会看见黑色和白色的矩形。要继续?" IDS_DDPRIMARY_RESULT "你看见黑色和白色的矩形吗?" - IDS_DDOFFSCREEN_DESCRIPTION "此测试将使用 DirectDraw 在幕外表面上绘图。你应会看见在移动的白色矩形。要继续?" + IDS_DDOFFSCREEN_DESCRIPTION "此测试将使用 DirectDraw 在离屏表面上绘图。你应该会看见在移动的白色矩形。要继续?" IDS_DDOFFSCREEN_RESULT "你看见在移动的白色矩形吗?" - IDS_DDFULLSCREEN_DESCRIPTION "此测试将使用 DirectDraw 在全萤幕模式绘图。你应会看见在移动的白色矩形。要继续?" - IDS_DDFULLSCREEN_RESULT "你在全萤幕模式中看见在移动的白色矩形吗?" + IDS_DDFULLSCREEN_DESCRIPTION "此测试将使用 DirectDraw 在全屏幕模式绘图。你应该会看见在移动的白色矩形。要继续?" + IDS_DDFULLSCREEN_RESULT "你在全屏幕模式中看见在移动的白色矩形吗?" IDS_FORMAT_ADAPTER_MEM "%u MB" IDS_FORMAT_ADAPTER_MODE "%d x %d (%u bit)(%uHz)" IDS_OPTION_NO "否" diff --git a/base/applications/fontview/lang/zh-CN.rc b/base/applications/fontview/lang/zh-CN.rc index 02ea461651..fef22f9a5c 100644 --- a/base/applications/fontview/lang/zh-CN.rc +++ b/base/applications/fontview/lang/zh-CN.rc @@ -4,6 +4,7 @@ * FILE: base/applications/fontview/lang/zh-CN.rc * PURPOSE: Chinese (Simplified) Language File for FontView * TRANSLATOR: Elton Chung aka MfldElton <elton328(a)gmail.com> + * Li Keqing <auroracloud4096(a)gmail.com> */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED @@ -11,13 +12,13 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED STRINGTABLE BEGIN IDS_INSTALL "安装" - IDS_PRINT "列印" + IDS_PRINT "打印" IDS_STRING "ReactOS 给所有人一个自由的操作系统!1234567890" - IDS_OPEN "打开字体档案..." + IDS_OPEN "打开字体文件..." IDS_ERROR "错误" IDS_ERROR_NOMEM "没有足够的内存来完成操作。" - IDS_ERROR_NOFONT "%1不是一个有效的字体档案。" - IDS_ERROR_NOCLASS "窗口无法初始化。" + IDS_ERROR_NOFONT "%1不是一个有效的字体文件。" + IDS_ERROR_NOCLASS "无法初始化窗口。" IDS_FILTER_LIST "支持所有的字体 (*.fon;*.fnt;*.ttf;*.ttc;*.otf;*.otc)\0*.fon;*.fnt;*.ttf;*.ttc;*.otf;*.otc\0\ 字体文件 (*.fon;*.fnt)\0*.fon;*.fnt\0\ TrueType 字体 (*.ttf)\0*.ttf\0\ @@ -25,6 +26,6 @@ TrueType Font Collection (*.ttc)\0*.ttc\0\ OpenType 字体 (*.otf)\0*.otf\0\ OpenType Font Collection (*.otc)\0*.otc\0\ 所有文件 (*.*)\0*.*\0" - IDS_PREVIOUS "< P&revious" - IDS_NEXT "&Next >" + IDS_PREVIOUS "< 上一个(&R)" + IDS_NEXT "下一个(&N) >" END diff --git a/base/applications/magnify/lang/zh-CN.rc b/base/applications/magnify/lang/zh-CN.rc index ef8969adc9..c600f62956 100644 --- a/base/applications/magnify/lang/zh-CN.rc +++ b/base/applications/magnify/lang/zh-CN.rc @@ -4,15 +4,16 @@ * FILE: base/applications/magnify/lang/zh-CN.rc * PURPOSE: Chinese (Simplified) Language File for Magnifier * TRANSLATOR: Elton Chung aka MfldElton <elton328(a)gmail.com> + * Li Keqing <auroracloud4096(a)gmail.com> */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED IDC_MAGNIFIER MENU BEGIN - POPUP "档案(&F)" + POPUP "文件(&F)" BEGIN - MENUITEM "结束(&X)", IDM_EXIT + MENUITEM "退出(&X)", IDM_EXIT MENUITEM "选项(&O)", IDM_OPTIONS MENUITEM SEPARATOR MENUITEM "关于(&A)", IDM_ABOUT @@ -41,21 +42,21 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSM CAPTION "放大镜设定" FONT 9, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "结束", IDOK, 96, 161, 50, 14 + DEFPUSHBUTTON "退出", IDOK, 96, 161, 50, 14 PUSHBUTTON "帮助(&H)", IDC_BUTTON_HELP, 38, 161, 50, 14 LTEXT "放大倍数:(&L)", IDC_STATIC, 6, 8, 68, 8 COMBOBOX IDC_ZOOM, 72, 6, 63, 66, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - GROUPBOX "追踪", IDC_STATIC, 7, 25, 139, 59 - GROUPBOX "展示", IDC_STATIC, 7, 87, 139, 57 - CONTROL "跟随滑鼠游标(&M)", IDC_FOLLOWMOUSECHECK, "Button", + GROUPBOX "跟踪", IDC_STATIC, 7, 25, 139, 59 + GROUPBOX "显示", IDC_STATIC, 7, 87, 139, 57 + CONTROL "跟随鼠标指针(&M)", IDC_FOLLOWMOUSECHECK, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 18, 42, 114, 10 CONTROL "跟随键盘焦点(&K)", IDC_FOLLOWKEYBOARDCHECK, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 18, 54, 114, 10 - CONTROL "跟随文本编辑(&T)", IDC_FOLLOWTEXTEDITINGCHECK, "Button", + CONTROL "跟随文本插入点(&T)", IDC_FOLLOWTEXTEDITINGCHECK, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 18, 66, 114, 10 - CONTROL "色彩对换(&I)", IDC_INVERTCOLORSCHECK, "Button", + CONTROL "反色(&I)", IDC_INVERTCOLORSCHECK, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 18, 102, 114, 10 - CONTROL "开始时隐藏(&S)", IDC_STARTMINIMIZEDCHECK, "Button", + CONTROL "启动时隐藏(&S)", IDC_STARTMINIMIZEDCHECK, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 18, 114, 114, 10 CONTROL "显示放大镜(&O)", IDC_SHOWMAGNIFIERCHECK, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 18, 126, 114, 10 diff --git a/base/applications/mmc/lang/zh-CN.rc b/base/applications/mmc/lang/zh-CN.rc index 49f769dabd..bea953ff02 100644 --- a/base/applications/mmc/lang/zh-CN.rc +++ b/base/applications/mmc/lang/zh-CN.rc @@ -4,18 +4,19 @@ * FILE: base/applications/mmc/lang/zh-CN.rc * PURPOSE: Chinese (Simplified) Language File for Management Console * TRANSLATOR: Elton Chung aka MfldElton <elton328(a)gmail.com> + * Li Keqing <auroracloud4096(a)gmail.com> */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED IDM_CONSOLE_SMALL MENU BEGIN - POPUP "档案(&F)" + POPUP "文件(&F)" BEGIN MENUITEM "新建(&N)\tCtrl+N", IDM_FILE_NEW MENUITEM "打开(&O)\tCtrl+O", IDM_FILE_OPEN MENUITEM SEPARATOR - MENUITEM "结束(&X)\tAlt+F4", IDM_FILE_EXIT + MENUITEM "退出(&X)\tAlt+F4", IDM_FILE_EXIT END POPUP "帮助(&H)" BEGIN @@ -25,14 +26,14 @@ END IDM_CONSOLE_LARGE MENU BEGIN - POPUP "档案(&F)" + POPUP "文件(&F)" BEGIN MENUITEM "新建(&N)\tCtrl+N", IDM_FILE_NEW MENUITEM "打开(&O)\tCtrl+O", IDM_FILE_OPEN MENUITEM "保存", IDM_FILE_SAVE MENUITEM "另存为...", IDM_FILE_SAVEAS MENUITEM SEPARATOR - MENUITEM "结束(&X)\tAlt+F4", IDM_FILE_EXIT + MENUITEM "退出(&X)\tAlt+F4", IDM_FILE_EXIT END POPUP "窗口(&W)" BEGIN diff --git a/base/applications/rapps/lang/zh-CN.rc b/base/applications/rapps/lang/zh-CN.rc index 620e9a1c4b..9fa791688f 100644 --- a/base/applications/rapps/lang/zh-CN.rc +++ b/base/applications/rapps/lang/zh-CN.rc @@ -1,5 +1,5 @@ /* Translated by Song Fuchang (0xfc) <sfc_0(a)yahoo.com.cn> */ - +/* Imporved by Li Keqing <auroracloud4096(a)gmail.com> */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED IDR_MAINMENU MENU @@ -154,13 +154,13 @@ END STRINGTABLE BEGIN IDS_AINFO_VERSION "\n版本:" - IDS_AINFO_AVAILABLEVERSION "\nAvailable Version: " + IDS_AINFO_AVAILABLEVERSION "\n可用版本: " IDS_AINFO_DESCRIPTION "\n描述:" IDS_AINFO_SIZE "\n大小:" IDS_AINFO_URLSITE "\n主页:" IDS_AINFO_LICENSE "\n协议:" IDS_AINFO_URLDOWNLOAD "\n下载:" - IDS_AINFO_LANGUAGES "\nLanguages: " + IDS_AINFO_LANGUAGES "\n语言: " END STRINGTABLE @@ -202,49 +202,49 @@ BEGIN IDS_APP_REG_REMOVE "您确定要从注册表删除该程序的数据吗?" IDS_INFORMATION "信息" IDS_UNABLE_TO_DOWNLOAD "无法下载该软件包 !找不到网络的地址 !" - IDS_UNABLE_TO_DOWNLOAD2 "Unable to download the package! Check Internet Connection!" + IDS_UNABLE_TO_DOWNLOAD2 "无法下载该软件包!请检查网络连接!" IDS_UNABLE_TO_REMOVE "无法从注册表删除该程序的数据!" - IDS_UNABLE_TO_INSTALL "Unable to open installer!" - IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed." - IDS_INTEG_CHECK_TITLE "Verifying package integrity..." - IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended." - IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet." - IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity." - IDS_SELECT_ALL "Select/Deselect All" - IDS_INSTALL_SELECTED "Install Selected" + IDS_UNABLE_TO_INSTALL "无法打开安装程序!" + IDS_CERT_DOES_NOT_MATCH "SSL 证书验证失败。" + IDS_INTEG_CHECK_TITLE "正在验证包完整性..." + IDS_INTEG_CHECK_FAIL "这个包没有通过完整性验证,它可能在下载过程中损坏或被人为篡改了。不推荐运行这个程序。" + IDS_INTERRUPTED_DOWNLOAD "下载中断。请检查网络连接。" + IDS_UNABLE_TO_WRITE "无法写入磁盘。磁盘可能已满。" + IDS_SELECT_ALL "全选/全反选" + IDS_INSTALL_SELECTED "安装已选中的" END STRINGTABLE BEGIN - IDS_STATUS_INSTALLED "Installed" - IDS_STATUS_NOTINSTALLED "Not installed" - IDS_STATUS_DOWNLOADED "Downloaded" - IDS_STATUS_UPDATE_AVAILABLE "Update available" - IDS_STATUS_DOWNLOADING "Downloading…" - IDS_STATUS_INSTALLING "Installing…" - IDS_STATUS_WAITING "Waiting to install…" - IDS_STATUS_FINISHED "Finished" + IDS_STATUS_INSTALLED "已安装" + IDS_STATUS_NOTINSTALLED "未安装" + IDS_STATUS_DOWNLOADED "下载" + IDS_STATUS_UPDATE_AVAILABLE "可用更新" + IDS_STATUS_DOWNLOADING "正在下载…" + IDS_STATUS_INSTALLING "正在安装…" + IDS_STATUS_WAITING "正在等待安装…" + IDS_STATUS_FINISHED "完成" END STRINGTABLE BEGIN - IDS_LICENSE_OPENSOURCE "Open Source" - IDS_LICENSE_FREEWARE "Freeware" - IDS_LICENSE_TRIAL "Trial/Demo" + IDS_LICENSE_OPENSOURCE "开源软件" + IDS_LICENSE_FREEWARE "免费软件" + IDS_LICENSE_TRIAL "试用版/演示版" END STRINGTABLE BEGIN - IDS_LANGUAGE_AVAILABLE_TRANSLATION "Supports your language" - IDS_LANGUAGE_NO_TRANSLATION "Supports other languages" - IDS_LANGUAGE_ENGLISH_TRANSLATION "Supports English" - IDS_LANGUAGE_SINGLE "Single language" - IDS_LANGUAGE_MORE_PLACEHOLDER " (+%d more)" - IDS_LANGUAGE_AVAILABLE_PLACEHOLDER " (+%d available)" + IDS_LANGUAGE_AVAILABLE_TRANSLATION "支持您的语言" + IDS_LANGUAGE_NO_TRANSLATION "支持其他语言" + IDS_LANGUAGE_ENGLISH_TRANSLATION "支持英语" + IDS_LANGUAGE_SINGLE "但语言" + IDS_LANGUAGE_MORE_PLACEHOLDER " (+%d 及更多)" + IDS_LANGUAGE_AVAILABLE_PLACEHOLDER " (+%d 可用)" END STRINGTABLE BEGIN - IDS_DL_DIALOG_DB_DISP "Applications Database" - IDS_DL_DIALOG_DB_DOWNLOAD_DISP "Updating Database..." + IDS_DL_DIALOG_DB_DISP "应用程序数据库" + IDS_DL_DIALOG_DB_DOWNLOAD_DISP "正在更新数据库..." END diff --git a/base/applications/wordpad/lang/zh-CN.rc b/base/applications/wordpad/lang/zh-CN.rc index 0b608d0f13..f9a5d79317 100644 --- a/base/applications/wordpad/lang/zh-CN.rc +++ b/base/applications/wordpad/lang/zh-CN.rc @@ -3,6 +3,7 @@ * * Copyright 2008 Hongbo Ni <
hongbo.at.njstar.com
> * Copyright 2010 Cheer Xiao <
xiaqqaix.at.gmail.com
> + * Copyright 2017 Li Keqing <
auroracloud4096.at.gmail.com
> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -183,7 +184,7 @@ BEGIN STRING_DEFAULT_FILENAME, "文档" STRING_PROMPT_SAVE_CHANGES, "要保存“%s”吗?" STRING_SEARCH_FINISHED, "文件查找结束。" - STRING_LOAD_RICHED_FAILED, "RichEdit 装载失败。" + STRING_LOAD_RICHED_FAILED, "RichEdit 加载失败。" STRING_SAVE_LOSEFORMATTING, "你已经选择保存为文本文件,而这可能导致格式丢失。你确定要这么做吗?" STRING_INVALID_NUMBER, "数字格式无效" STRING_OLE_STORAGE_NOT_SUPPORTED, "不支持 OLE 储存文件"
7 years
1
0
0
0
[reactos] 01/01: [USER32] We're still using this one. Fixes build.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=917b74b0dc4099bbf5a56…
commit 917b74b0dc4099bbf5a56da4c99f3ecbe88540c3 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Dec 7 22:37:40 2017 +0100 [USER32] We're still using this one. Fixes build. --- win32ss/user/user32/windows/defwnd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/win32ss/user/user32/windows/defwnd.c b/win32ss/user/user32/windows/defwnd.c index 563005a42c..27dcc574c5 100644 --- a/win32ss/user/user32/windows/defwnd.c +++ b/win32ss/user/user32/windows/defwnd.c @@ -11,6 +11,9 @@ #include <user32.h> +#include <wine/debug.h> +WINE_DEFAULT_DEBUG_CHANNEL(user32); + /* * @implemented */
7 years
1
0
0
0
← Newer
1
...
29
30
31
32
33
34
35
36
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
29
30
31
32
33
34
35
36
Results per page:
10
25
50
100
200