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
August 2016
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
20 participants
462 discussions
Start a n
N
ew thread
[pschweitzer] 72198: [MPR] Import Wine commit: - b452e6285915b1ad46920fc8551335ab28bfb4c0, Implement local name automatic redirection for disks. - a65c31e46fa354fc8fbf86c0b9f273f86132a571, Implemen...
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Thu Aug 11 16:29:36 2016 New Revision: 72198 URL:
http://svn.reactos.org/svn/reactos?rev=72198&view=rev
Log: [MPR] Import Wine commit: - b452e6285915b1ad46920fc8551335ab28bfb4c0, Implement local name automatic redirection for disks. - a65c31e46fa354fc8fbf86c0b9f273f86132a571, Implement provider selection given remote name. CORE-11757 Modified: trunk/reactos/dll/win32/mpr/wnet.c Modified: trunk/reactos/dll/win32/mpr/wnet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/wnet.c?rev=7…
============================================================================== --- trunk/reactos/dll/win32/mpr/wnet.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mpr/wnet.c [iso-8859-1] Thu Aug 11 16:29:36 2016 @@ -1798,54 +1798,38 @@ strcpyW(accessname, ctxt->resource->lpRemoteName); } -static WCHAR * select_provider(struct use_connection_context *ctxt) -{ - DWORD ret, prov_size = 0x1000, len; - LPNETRESOURCEW provider; - WCHAR * system; - WCHAR * provider_name; - - provider = HeapAlloc(GetProcessHeap(), 0, prov_size); - if (!provider) - { - return NULL; - } - - ret = WNetGetResourceInformationW(ctxt->resource, provider, &prov_size, &system); - if (ret == ERROR_MORE_DATA) - { - HeapFree(GetProcessHeap(), 0, provider); - provider = HeapAlloc(GetProcessHeap(), 0, prov_size); - if (!provider) - { - return NULL; - } - - ret = WNetGetResourceInformationW(ctxt->resource, provider, &prov_size, &system); - } - - if (ret != NO_ERROR) - { - HeapFree(GetProcessHeap(), 0, provider); - return NULL; - } - - len = WideCharToMultiByte(CP_ACP, 0, provider->lpProvider, -1, NULL, 0, NULL, NULL); - provider_name = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - if (provider_name) - memcpy(provider_name, provider->lpProvider, len * sizeof(WCHAR)); - - HeapFree(GetProcessHeap(), 0, provider); - - return provider_name; +static DWORD wnet_use_provider( struct use_connection_context *ctxt, NETRESOURCEW * netres, WNetProvider *provider, BOOLEAN redirect ) +{ + DWORD caps, ret; + + caps = provider->getCaps(WNNC_CONNECTION); + if (!(caps & (WNNC_CON_ADDCONNECTION | WNNC_CON_ADDCONNECTION3))) + return ERROR_BAD_PROVIDER; + + ret = WN_ACCESS_DENIED; + do + { + if ((caps & WNNC_CON_ADDCONNECTION3) && provider->addConnection3) + ret = provider->addConnection3(ctxt->hwndOwner, netres, ctxt->password, ctxt->userid, ctxt->flags); + else if ((caps & WNNC_CON_ADDCONNECTION) && provider->addConnection) + ret = provider->addConnection(netres, ctxt->password, ctxt->userid); + + if (ret == WN_ALREADY_CONNECTED && redirect) + netres->lpLocalName[0] -= 1; + } while (redirect && ret == WN_ALREADY_CONNECTED && netres->lpLocalName[0] >= 'C'); + + if (ret == WN_SUCCESS && ctxt->accessname) + ctxt->set_accessname(ctxt, netres->lpLocalName); + + return ret; } static DWORD wnet_use_connection( struct use_connection_context *ctxt ) { WNetProvider *provider; - DWORD index, ret, caps; - BOOLEAN redirect = FALSE, prov = FALSE; - WCHAR letter[3] = {'z', ':', 0}; + DWORD index, ret = WN_NO_NETWORK; + BOOL redirect = FALSE; + WCHAR letter[3] = {'Z', ':', 0}; NETRESOURCEW netres; if (!providerTable || providerTable->numProviders == 0) @@ -1858,13 +1842,11 @@ if (!netres.lpLocalName && (ctxt->flags & CONNECT_REDIRECT)) { if (netres.dwType != RESOURCETYPE_DISK && netres.dwType != RESOURCETYPE_PRINT) - { return ERROR_BAD_DEV_TYPE; - } if (netres.dwType == RESOURCETYPE_PRINT) { - FIXME("Locale device selection is not implemented for printers.\n"); + FIXME("Local device selection is not implemented for printers.\n"); return WN_NO_NETWORK; } @@ -1873,62 +1855,30 @@ } if (ctxt->flags & CONNECT_INTERACTIVE) - { return ERROR_BAD_NET_NAME; - } - - if (ctxt->flags & CONNECT_UPDATE_PROFILE) - FIXME("Connection saving is not implemented\n"); - - if (!netres.lpProvider) - { - netres.lpProvider = select_provider(ctxt); - if (!netres.lpProvider) - { - return ERROR_NO_NET_OR_BAD_PATH; - } - - prov = TRUE; - } - - index = _findProviderIndexW(netres.lpProvider); - if (index == BAD_PROVIDER_INDEX) - { - ret = ERROR_BAD_PROVIDER; - goto done; - } - - provider = &providerTable->table[index]; - caps = provider->getCaps(WNNC_CONNECTION); - if (!(caps & (WNNC_CON_ADDCONNECTION | WNNC_CON_ADDCONNECTION3))) - { - ret = ERROR_BAD_PROVIDER; - goto done; - } if ((ret = ctxt->pre_set_accessname(ctxt, netres.lpLocalName))) - { - goto done; - } - - ret = WN_ACCESS_DENIED; - do - { - if ((caps & WNNC_CON_ADDCONNECTION3) && provider->addConnection3) - ret = provider->addConnection3(ctxt->hwndOwner, &netres, ctxt->password, ctxt->userid, ctxt->flags); - else if ((caps & WNNC_CON_ADDCONNECTION) && provider->addConnection) - ret = provider->addConnection(&netres, ctxt->password, ctxt->userid); - - if (ret != NO_ERROR && redirect) - letter[0] -= 1; - } while (redirect && ret == WN_ALREADY_CONNECTED && letter[0] >= 'c'); - - if (ret == WN_SUCCESS && ctxt->accessname) - ctxt->set_accessname(ctxt, netres.lpLocalName); - -done: - if (prov) - HeapFree(GetProcessHeap(), 0, netres.lpProvider); + return ret; + + if (netres.lpProvider) + { + index = _findProviderIndexW(netres.lpProvider); + if (index == BAD_PROVIDER_INDEX) + return ERROR_BAD_PROVIDER; + + provider = &providerTable->table[index]; + ret = wnet_use_provider(ctxt, &netres, provider, redirect); + } + else + { + for (index = 0; index < providerTable->numProviders; index++) + { + provider = &providerTable->table[index]; + ret = wnet_use_provider(ctxt, &netres, provider, redirect); + if (ret == WN_SUCCESS || ret == WN_ALREADY_CONNECTED) + break; + } + } return ret; }
8 years, 4 months
1
0
0
0
[jimtabor] 72197: [NtUser] - Fix up Language Layout Hotkey Toggle support for the new Keyboard switching. Support registry settings. Dedicated to Dmitry Chapyshev. - The registry entry it reads fro...
by jimtabor@svn.reactos.org
Author: jimtabor Date: Thu Aug 11 15:53:05 2016 New Revision: 72197 URL:
http://svn.reactos.org/svn/reactos?rev=72197&view=rev
Log: [NtUser] - Fix up Language Layout Hotkey Toggle support for the new Keyboard switching. Support registry settings. Dedicated to Dmitry Chapyshev. - The registry entry it reads from is the wrong (the short number) one. Someone with registry knowledge please help. Also VK_LSHIFT is passed all the time and not VK_RSHIFT (WIP). Support for Left Alt and Control work including SysParam. - Side Tracks : Fixed CORE-5683. ReactOS can switch from keyboard processing or from DeferWindowProc. Modified: trunk/reactos/win32ss/user/ntuser/input.h trunk/reactos/win32ss/user/ntuser/keyboard.c trunk/reactos/win32ss/user/ntuser/main.c trunk/reactos/win32ss/user/ntuser/misc.c trunk/reactos/win32ss/user/ntuser/msgqueue.c trunk/reactos/win32ss/user/ntuser/ntuser.h trunk/reactos/win32ss/user/ntuser/sysparams.c Modified: trunk/reactos/win32ss/user/ntuser/input.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/input.…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/input.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/input.h [iso-8859-1] Thu Aug 11 15:53:05 2016 @@ -75,6 +75,8 @@ BOOL NTAPI UserSendKeyboardInput(KEYBDINPUT *pKbdInput, BOOL bInjected); PKL NTAPI UserHklToKbl(HKL hKl); BOOL NTAPI UserSetDefaultInputLang(HKL hKl); +extern int gLanguageToggleKeyState; +extern DWORD gdwLanguageToggleKey; /* Mouse */ WORD FASTCALL UserGetMouseButtonsState(VOID); Modified: trunk/reactos/win32ss/user/ntuser/keyboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/keyboa…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/keyboard.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/keyboard.c [iso-8859-1] Thu Aug 11 15:53:05 2016 @@ -15,6 +15,8 @@ static PKEYBOARD_INDICATOR_TRANSLATION gpKeyboardIndicatorTrans = NULL; static KEYBOARD_INDICATOR_PARAMETERS gIndicators = {0, 0}; KEYBOARD_ATTRIBUTES gKeyboardInfo; +int gLanguageToggleKeyState = 0; +DWORD gdwLanguageToggleKey = 0; /* FUNCTIONS *****************************************************************/ @@ -819,7 +821,7 @@ } /* Check if this is a hotkey */ - if (co_UserProcessHotKeys(wSimpleVk, bIsDown)) + if (co_UserProcessHotKeys(wSimpleVk, bIsDown)) //// Check if this is correct, refer to hotkey sequence message tests. { TRACE("HotKey Processed\n"); bPostMsg = FALSE; @@ -920,22 +922,6 @@ ERR("Set last input\n"); //ptiLastInput = pti; } - } - - // TODO: When initializing win32k: Reading from the registry hotkey combination - // to switch the keyboard layout and store it to global variable. - // Using this combination of hotkeys in this function - if (wVk == VK_LSHIFT && IS_KEY_DOWN(gafAsyncKeyState, VK_LMENU)) - { - PKL pkl = pti->KeyboardLayout; - - if (pkl != NULL) - { - UserPostMessage(UserHMGetHandle(Wnd), - WM_INPUTLANGCHANGEREQUEST, - INPUTLANGCHANGE_FORWARD, - (LPARAM)pkl->hkl); - } } /* If it is VK_PACKET, high word of wParam is used for wchar */ Modified: trunk/reactos/win32ss/user/ntuser/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/main.c…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/main.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/main.c [iso-8859-1] Thu Aug 11 15:53:05 2016 @@ -1004,6 +1004,8 @@ return Status; } + gdwLanguageToggleKey = UserGetLanguageToggle(); + gusLanguageID = UserGetLanguageID(); return STATUS_SUCCESS; Modified: trunk/reactos/win32ss/user/ntuser/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/misc.c…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/misc.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/misc.c [iso-8859-1] Thu Aug 11 15:53:05 2016 @@ -49,6 +49,22 @@ _SEH2_END ObDereferenceObject(Thread); return pti; +} + +DWORD +FASTCALL +UserGetLanguageToggle(VOID) +{ + NTSTATUS Status; + DWORD dwValue = 0; + + Status = RegReadUserSetting(L"Keyboard Layout\\Toggle", L"Layout Hotkey", REG_SZ, &dwValue, sizeof(dwValue)); + if (NT_SUCCESS(Status)) + { + dwValue = atoi((char *)&dwValue); + ERR("Layout Hotkey %d\n",dwValue); + } + return dwValue; } SHORT Modified: trunk/reactos/win32ss/user/ntuser/msgqueue.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/msgque…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] Thu Aug 11 15:53:05 2016 @@ -1773,6 +1773,7 @@ PWND pWnd; UINT ImmRet; BOOL Ret = TRUE; + WPARAM wParam = Msg->wParam; PTHREADINFO pti = PsGetCurrentThreadWin32Thread(); if (Msg->message == VK_PACKET) @@ -1833,6 +1834,81 @@ } } + //// Key Down! + if ( *RemoveMessages && Msg->message == WM_SYSKEYDOWN ) + { + if ( HIWORD(Msg->lParam) & KF_ALTDOWN ) + { + if ( Msg->wParam == VK_ESCAPE || Msg->wParam == VK_TAB ) // Alt-Tab/ESC Alt-Shift-Tab/ESC + { + WPARAM wParamTmp; + + wParamTmp = UserGetKeyState(VK_SHIFT) & 0x8000 ? SC_PREVWINDOW : SC_NEXTWINDOW; + TRACE("Send WM_SYSCOMMAND Alt-Tab/ESC Alt-Shift-Tab/ESC\n"); + co_IntSendMessage( Msg->hwnd, WM_SYSCOMMAND, wParamTmp, Msg->wParam ); + + //// Keep looping. + Ret = FALSE; + //// Skip the rest. + goto Exit; + } + } + } + + if ( *RemoveMessages && (Msg->message == WM_SYSKEYDOWN || Msg->message == WM_KEYDOWN) ) + { + if (gdwLanguageToggleKey < 3) + { + if (IS_KEY_DOWN(gafAsyncKeyState, gdwLanguageToggleKey == 1 ? VK_LMENU : VK_CONTROL)) // L Alt 1 or Ctrl 2 . + { + if ( wParam == VK_LSHIFT ) gLanguageToggleKeyState = INPUTLANGCHANGE_FORWARD; // Left Alt - Left Shift, Next + //// FIXME : It seems to always be VK_LSHIFT. + if ( wParam == VK_RSHIFT ) gLanguageToggleKeyState = INPUTLANGCHANGE_BACKWARD; // Left Alt - Right Shift, Previous + } + } + } + + //// Key Up! Alt Key Ctrl Key + if ( *RemoveMessages && (Msg->message == WM_SYSKEYUP || Msg->message == WM_KEYUP) ) + { + // When initializing win32k: Reading from the registry hotkey combination + // to switch the keyboard layout and store it to global variable. + // Using this combination of hotkeys in this function + + if ( gdwLanguageToggleKey < 3 && + IS_KEY_DOWN(gafAsyncKeyState, gdwLanguageToggleKey == 1 ? VK_LMENU : VK_CONTROL) ) + { + if ( Msg->wParam == VK_SHIFT && !(IS_KEY_DOWN(gafAsyncKeyState, VK_SHIFT))) + { + PKL pkl = pti->KeyboardLayout; + + if (pWnd) UserDerefObjectCo(pWnd); + + //// Seems to override message window. + if (!(pWnd = pti->MessageQueue->spwndFocus)) + { + pWnd = pti->MessageQueue->spwndActive; + } + if (pWnd) UserRefObjectCo(pWnd, &Ref); + + if (pkl != NULL && gLanguageToggleKeyState) + { + TRACE("Posting WM_INPUTLANGCHANGEREQUEST KeyState %d\n", gLanguageToggleKeyState ); + UserPostMessage(UserHMGetHandle(pWnd), + WM_INPUTLANGCHANGEREQUEST, + gLanguageToggleKeyState, + (LPARAM)pkl->hkl); + + gLanguageToggleKeyState = 0; + //// Keep looping. + Ret = FALSE; + //// Skip the rest. + goto Exit; + } + } + } + } + if (co_HOOK_CallHooks( WH_KEYBOARD, *RemoveMessages ? HC_ACTION : HC_NOREMOVE, LOWORD(Msg->wParam), @@ -1865,7 +1941,7 @@ } } } - +Exit: if (pWnd) UserDerefObjectCo(pWnd); return Ret; } Modified: trunk/reactos/win32ss/user/ntuser/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/ntuser…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/ntuser.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/ntuser.h [iso-8859-1] Thu Aug 11 15:53:05 2016 @@ -26,5 +26,6 @@ VOID FASTCALL UserLeave(VOID); BOOL FASTCALL UserIsEntered(VOID); BOOL FASTCALL UserIsEnteredExclusive(VOID); +DWORD FASTCALL UserGetLanguageToggle(VOID); /* EOF */ Modified: trunk/reactos/win32ss/user/ntuser/sysparams.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/syspar…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/sysparams.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/sysparams.c [iso-8859-1] Thu Aug 11 15:53:05 2016 @@ -1209,7 +1209,8 @@ } case SPI_SETLANGTOGGLE: - ERR("SPI_SETLANGTOGGLE is unimplemented\n"); + gdwLanguageToggleKey = UserGetLanguageToggle();; + return gdwLanguageToggleKey; break; case SPI_GETWINDOWSEXTENSION:
8 years, 4 months
1
0
0
0
[tfaber] 72196: [FASTFAT] - Fail invalid opens specifying FILE_DELETE_ON_CLOSE CORE-6931
by tfaber@svn.reactos.org
Author: tfaber Date: Thu Aug 11 13:25:57 2016 New Revision: 72196 URL:
http://svn.reactos.org/svn/reactos?rev=72196&view=rev
Log: [FASTFAT] - Fail invalid opens specifying FILE_DELETE_ON_CLOSE CORE-6931 Modified: trunk/reactos/drivers/filesystems/fastfat/create.c Modified: trunk/reactos/drivers/filesystems/fastfat/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] Thu Aug 11 13:25:57 2016 @@ -460,6 +460,23 @@ return STATUS_ACCESS_DENIED; } + if ((*Fcb->Attributes & FILE_ATTRIBUTE_READONLY) && + (RequestedOptions & FILE_DELETE_ON_CLOSE)) + { + vfatReleaseFCB(DeviceExt, Fcb); + return STATUS_CANNOT_DELETE; + } + + if ((vfatFCBIsRoot(Fcb) || + (Fcb->LongNameU.Length == sizeof(WCHAR) && Fcb->LongNameU.Buffer[0] == L'.') || + (Fcb->LongNameU.Length == 2 * sizeof(WCHAR) && Fcb->LongNameU.Buffer[0] == L'.' && Fcb->LongNameU.Buffer[1] == L'.')) && + (RequestedOptions & FILE_DELETE_ON_CLOSE)) + { + // we cannot delete a '.', '..' or the root directory + vfatReleaseFCB(DeviceExt, Fcb); + return STATUS_CANNOT_DELETE; + } + DPRINT("Attaching FCB to fileObject\n"); Status = vfatAttachFCBToFileObject(DeviceExt, Fcb, FileObject); if (!NT_SUCCESS(Status)) @@ -552,6 +569,11 @@ return STATUS_INVALID_PARAMETER; } + if (RequestedOptions & FILE_DELETE_ON_CLOSE) + { + return STATUS_CANNOT_DELETE; + } + pFcb = DeviceExt->VolumeFcb; if (pFcb->OpenHandleCount == 0) @@ -870,7 +892,8 @@ { if (Stack->Parameters.Create.SecurityContext->DesiredAccess & FILE_WRITE_DATA || RequestedDisposition == FILE_OVERWRITE || - RequestedDisposition == FILE_OVERWRITE_IF) + RequestedDisposition == FILE_OVERWRITE_IF || + (RequestedOptions & FILE_DELETE_ON_CLOSE)) { if (!MmFlushImageSection(&pFcb->SectionObjectPointers, MmFlushForWrite)) { @@ -878,7 +901,8 @@ DPRINT1("%d %d %d\n", Stack->Parameters.Create.SecurityContext->DesiredAccess & FILE_WRITE_DATA, RequestedDisposition == FILE_OVERWRITE, RequestedDisposition == FILE_OVERWRITE_IF); VfatCloseFile (DeviceExt, FileObject); - return STATUS_SHARING_VIOLATION; + return (RequestedOptions & FILE_DELETE_ON_CLOSE) ? STATUS_CANNOT_DELETE + : STATUS_SHARING_VIOLATION; } } }
8 years, 4 months
1
0
0
0
[tfaber] 72195: [FASTFAT] - Cancel deletion of a directory if it is not empty when its last handle is closed CORE-6931
by tfaber@svn.reactos.org
Author: tfaber Date: Thu Aug 11 11:41:25 2016 New Revision: 72195 URL:
http://svn.reactos.org/svn/reactos?rev=72195&view=rev
Log: [FASTFAT] - Cancel deletion of a directory if it is not empty when its last handle is closed CORE-6931 Modified: trunk/reactos/drivers/filesystems/fastfat/cleanup.c Modified: trunk/reactos/drivers/filesystems/fastfat/cleanup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/cleanup.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/cleanup.c [iso-8859-1] Thu Aug 11 11:41:25 2016 @@ -66,7 +66,7 @@ pFcb->OpenHandleCount--; DeviceExt->OpenHandleCount--; - if (!(*pFcb->Attributes & FILE_ATTRIBUTE_DIRECTORY) && + if (!vfatFCBIsDirectory(pFcb) && FsRtlAreThereCurrentFileLocks(&pFcb->FileLock)) { /* remove all locks this process have on this file */ @@ -84,18 +84,26 @@ if (pFcb->Flags & FCB_DELETE_PENDING && pFcb->OpenHandleCount == 0) { - PFILE_OBJECT tmpFileObject; - tmpFileObject = pFcb->FileObject; - if (tmpFileObject != NULL) + if (vfatFCBIsDirectory(pFcb) && + !VfatIsDirectoryEmpty(pFcb)) { - pFcb->FileObject = NULL; - CcUninitializeCacheMap(tmpFileObject, NULL, NULL); - ObDereferenceObject(tmpFileObject); + pFcb->Flags &= ~FCB_DELETE_PENDING; } + else + { + PFILE_OBJECT tmpFileObject; + tmpFileObject = pFcb->FileObject; + if (tmpFileObject != NULL) + { + pFcb->FileObject = NULL; + CcUninitializeCacheMap(tmpFileObject, NULL, NULL); + ObDereferenceObject(tmpFileObject); + } - pFcb->RFCB.ValidDataLength.QuadPart = 0; - pFcb->RFCB.FileSize.QuadPart = 0; - pFcb->RFCB.AllocationSize.QuadPart = 0; + pFcb->RFCB.ValidDataLength.QuadPart = 0; + pFcb->RFCB.FileSize.QuadPart = 0; + pFcb->RFCB.AllocationSize.QuadPart = 0; + } } /* Uninitialize the cache (should be done even if caching was never initialized) */
8 years, 4 months
1
0
0
0
[jimtabor] 72194: - Fix Desktop hang if no windows open.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Thu Aug 11 00:29:26 2016 New Revision: 72194 URL:
http://svn.reactos.org/svn/reactos?rev=72194&view=rev
Log: - Fix Desktop hang if no windows open. Modified: trunk/reactos/win32ss/user/user32/controls/appswitch.c Modified: trunk/reactos/win32ss/user/user32/controls/appswitch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/contro…
============================================================================== --- trunk/reactos/win32ss/user/user32/controls/appswitch.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/controls/appswitch.c [iso-8859-1] Thu Aug 11 00:29:26 2016 @@ -312,7 +312,7 @@ ResizeAndCenter(switchdialog, totalW, totalH); } -void ProcessHotKey(VOID) +BOOL ProcessHotKey(VOID) { if (!isOpen) { @@ -320,7 +320,7 @@ EnumWindowsZOrder(EnumerateCallback, 0); if (windowCount < 2) - return; + return FALSE; selectedWindow = 1; @@ -335,6 +335,7 @@ selectedWindow = (selectedWindow + 1)%windowCount; InvalidateRect(switchdialog, NULL, TRUE); } + return TRUE; } LRESULT WINAPI DoAppSwitch( WPARAM wParam, LPARAM lParam ) @@ -359,7 +360,7 @@ case VK_TAB: if( !CreateSwitcherWindow(User32Instance) ) goto Exit; if( !GetDialogFont() ) goto Exit; - ProcessHotKey(); + if( !ProcessHotKey() ) goto Exit; break; case VK_ESCAPE:
8 years, 4 months
1
0
0
0
[tfaber] 72193: [NTOS:FSRTL] - Use the correct parent node when replacing an identical cache entry in FsRtlAddToTunnelCache CORE-11819
by tfaber@svn.reactos.org
Author: tfaber Date: Wed Aug 10 21:09:50 2016 New Revision: 72193 URL:
http://svn.reactos.org/svn/reactos?rev=72193&view=rev
Log: [NTOS:FSRTL] - Use the correct parent node when replacing an identical cache entry in FsRtlAddToTunnelCache CORE-11819 Modified: trunk/reactos/ntoskrnl/fsrtl/tunnel.c Modified: trunk/reactos/ntoskrnl/fsrtl/tunnel.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/tunnel.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/tunnel.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/tunnel.c [iso-8859-1] Wed Aug 10 21:09:50 2016 @@ -467,21 +467,21 @@ else { /* update parent node */ - if (LastEntry->LeftChild == CurEntry) + if (RtlIsLeftChild(CurEntry)) { - RtlInsertAsLeftChild(LastEntry, NodeEntry); + RtlInsertAsLeftChild(RtlParent(CurEntry), NodeEntry); } else { - RtlInsertAsRightChild(LastEntry, NodeEntry); + RtlInsertAsRightChild(RtlParent(CurEntry), NodeEntry); } } /* remove entry */ - RemoveEntryList(&((PTUNNEL_NODE_ENTRY)LastEntry)->TimerQueueEntry); + RemoveEntryList(&((PTUNNEL_NODE_ENTRY)CurEntry)->TimerQueueEntry); /* free node entry */ - FsRtlFreeTunnelNode((PTUNNEL_NODE_ENTRY)LastEntry, &PoolList); + FsRtlFreeTunnelNode((PTUNNEL_NODE_ENTRY)CurEntry, &PoolList); /* decrement node count */ Cache->NumEntries--;
8 years, 4 months
1
0
0
0
[pschweitzer] 72192: [KMTESTS:FSRTL] Add a stress test for tunnel cache implementation, where we have fun adding duplicated entries. It doesn't seem to go well. These tests are also known as "Learn...
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Wed Aug 10 20:50:36 2016 New Revision: 72192 URL:
http://svn.reactos.org/svn/reactos?rev=72192&view=rev
Log: [KMTESTS:FSRTL] Add a stress test for tunnel cache implementation, where we have fun adding duplicated entries. It doesn't seem to go well. These tests are also known as "Learn your English ordinals", or as "Learn how to count in English". My pleasure. CORE-11819 Modified: trunk/rostests/kmtests/ntos_fsrtl/FsRtlTunnel.c Modified: trunk/rostests/kmtests/ntos_fsrtl/FsRtlTunnel.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_fsrtl/FsRtlT…
============================================================================== --- trunk/rostests/kmtests/ntos_fsrtl/FsRtlTunnel.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/ntos_fsrtl/FsRtlTunnel.c [iso-8859-1] Wed Aug 10 20:50:36 2016 @@ -121,6 +121,116 @@ FsRtlDeleteKeyFromTunnelCache(T, a); } +static +void DuplicatesTest() +{ + UNICODE_STRING ShortName, LongName, OutShort, OutLong, ShortName2, LongName2; + ULONG First, Second, OutLength, OutData; + PTUNNEL Tunnel; + PVOID Buffer; + + First = 1; + Second = 2; + RtlInitUnicodeString(&ShortName, L"LONGFI~1.TXT"); + RtlInitUnicodeString(&LongName, L"Longfilename.txt"); + RtlInitUnicodeString(&ShortName2, L"LONGFI~2.TXT"); + RtlInitUnicodeString(&LongName2, L"Longfilenamr.txt"); + Tunnel = ExAllocatePool(NonPagedPool, sizeof(TUNNEL)); + RtlZeroMemory(Tunnel, sizeof(TUNNEL)); + OutShort.MaximumLength = 13 * sizeof(WCHAR); + OutShort.Buffer = ExAllocatePool(PagedPool, OutShort.MaximumLength); + OutLong.MaximumLength = 17 * sizeof(WCHAR); + OutLong.Buffer = Buffer = ExAllocatePool(PagedPool, OutLong.MaximumLength); + + FsRtlInitializeTunnelCache(Tunnel); + FsRtlAddToTunnelCache(Tunnel, 1, &ShortName, &LongName, TRUE, sizeof(ULONG), &First); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName, &OutShort, &OutLong, &OutLength, &OutData), "First call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 1); + ok_eq_pointer(OutLong.Buffer, Buffer); + + FsRtlAddToTunnelCache(Tunnel, 1, &ShortName, &LongName, TRUE, sizeof(ULONG), &Second); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName, &OutShort, &OutLong, &OutLength, &OutData), "Second call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 2); + ok_eq_pointer(OutLong.Buffer, Buffer); + + OutLong.MaximumLength = 13 * sizeof(WCHAR); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName, &OutShort, &OutLong, &OutLength, &OutData), "Third call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 2); + ok(OutLong.Buffer != Buffer, "Buffer didn't get reallocated!\n"); + ok_eq_uint(OutLong.MaximumLength, 16 * sizeof(WCHAR)); + + FsRtlDeleteKeyFromTunnelCache(Tunnel, 1); + ok_bool_false(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName, &OutShort, &OutLong, &OutLength, &OutData), "Fourth call"); + + FsRtlAddToTunnelCache(Tunnel, 1, &ShortName, &LongName, TRUE, sizeof(ULONG), &First); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName, &OutShort, &OutLong, &OutLength, &OutData), "Fifth call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 1); + + FsRtlAddToTunnelCache(Tunnel, 1, &ShortName2, &LongName2, TRUE, sizeof(ULONG), &First); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName, &OutShort, &OutLong, &OutLength, &OutData), "Sixth call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 1); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName2, &OutShort, &OutLong, &OutLength, &OutData), "Seventh call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 1); + + FsRtlAddToTunnelCache(Tunnel, 1, &ShortName, &LongName, TRUE, sizeof(ULONG), &Second); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName, &OutShort, &OutLong, &OutLength, &OutData), "Eighth call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 2); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName2, &OutShort, &OutLong, &OutLength, &OutData), "Ninth call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 1); + + FsRtlAddToTunnelCache(Tunnel, 1, &ShortName2, &LongName2, TRUE, sizeof(ULONG), &Second); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName, &OutShort, &OutLong, &OutLength, &OutData), "Tenth call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 2); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName2, &OutShort, &OutLong, &OutLength, &OutData), "Eleventh call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 2); + + FsRtlDeleteKeyFromTunnelCache(Tunnel, 1); + ok_bool_false(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName, &OutShort, &OutLong, &OutLength, &OutData), "Twelfth call"); + ok_bool_false(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName2, &OutShort, &OutLong, &OutLength, &OutData), "Thirteenth call"); + + FsRtlAddToTunnelCache(Tunnel, 1, &ShortName, &LongName, TRUE, sizeof(ULONG), &First); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName, &OutShort, &OutLong, &OutLength, &OutData), "Fourteenth call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 1); + + FsRtlAddToTunnelCache(Tunnel, 1, &ShortName, &LongName, TRUE, sizeof(ULONG), &Second); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName, &OutShort, &OutLong, &OutLength, &OutData), "Fifteenth call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 2); + + FsRtlAddToTunnelCache(Tunnel, 1, &ShortName2, &LongName2, TRUE, sizeof(ULONG), &First); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName, &OutShort, &OutLong, &OutLength, &OutData), "Sixteenth call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 2); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName2, &OutShort, &OutLong, &OutLength, &OutData), "Seventeenth call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 1); + + FsRtlAddToTunnelCache(Tunnel, 1, &ShortName2, &LongName2, TRUE, sizeof(ULONG), &Second); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName, &OutShort, &OutLong, &OutLength, &OutData), "Eighteenth call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 2); + ok_bool_true(FsRtlFindInTunnelCache(Tunnel, 1, &ShortName2, &OutShort, &OutLong, &OutLength, &OutData), "Nineteenth call"); + ok_eq_ulong(OutLength, sizeof(ULONG)); + ok_eq_ulong(OutData, 2); + + FsRtlDeleteTunnelCache(Tunnel); + ExFreePool(OutShort.Buffer); + ExFreePool(OutLong.Buffer); + ExFreePool(Buffer); + ExFreePool(Tunnel); +} + START_TEST(FsRtlTunnel) { PUNICODE_STRING s_name; @@ -183,4 +293,6 @@ ExFreePool(Tb); ExFreePool(T); -} + + DuplicatesTest(); +}
8 years, 4 months
1
0
0
0
[mjansen] 72191: [ATL][ATL_APITEST] Partially implement CRegKey + add tests. CORE-11746
by mjansen@svn.reactos.org
Author: mjansen Date: Wed Aug 10 19:34:38 2016 New Revision: 72191 URL:
http://svn.reactos.org/svn/reactos?rev=72191&view=rev
Log: [ATL][ATL_APITEST] Partially implement CRegKey + add tests. CORE-11746 Added: trunk/rostests/apitests/atl/CRegKey.cpp (with props) Modified: trunk/reactos/sdk/lib/atl/atlbase.cpp trunk/reactos/sdk/lib/atl/atlbase.h trunk/rostests/apitests/atl/CMakeLists.txt trunk/rostests/apitests/atl/testlist.c Modified: trunk/reactos/sdk/lib/atl/atlbase.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/atl/atlbase.cpp?re…
============================================================================== --- trunk/reactos/sdk/lib/atl/atlbase.cpp [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/atl/atlbase.cpp [iso-8859-1] Wed Aug 10 19:34:38 2016 @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <tchar.h> #include "atlbase.h" namespace ATL Modified: trunk/reactos/sdk/lib/atl/atlbase.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/atl/atlbase.h?rev=…
============================================================================== --- trunk/reactos/sdk/lib/atl/atlbase.h [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/atl/atlbase.h [iso-8859-1] Wed Aug 10 19:34:38 2016 @@ -25,6 +25,7 @@ #include "atlcomcli.h" #include "atlalloc.h" #include "comcat.h" +#include "tchar.h" #ifdef _MSC_VER // It is common to use this in ATL constructors. They only store this for later use, so the usage is safe. @@ -886,6 +887,218 @@ } }; +class CRegKey +{ +public: + HKEY m_hKey; + +public: + + CRegKey() throw() + : m_hKey(NULL) + { + } + + CRegKey(CRegKey& key) throw() + { + Attach(key.Detach()); + } + + explicit CRegKey(HKEY hKey) throw() + :m_hKey(hKey) + { + } + + ~CRegKey() throw() + { + } + + void Attach(HKEY hKey) throw() + { + m_hKey = hKey; + } + + LONG Close() throw() + { + if (m_hKey) + { + HKEY hKey = Detach(); + return RegCloseKey(hKey); + } + return ERROR_SUCCESS; + } + + HKEY Detach() throw() + { + HKEY hKey = m_hKey; + m_hKey = NULL; + return hKey; + } + + LONG Open(HKEY hKeyParent, LPCTSTR lpszKeyName, REGSAM samDesired = KEY_READ | KEY_WRITE) throw() + { + HKEY hKey = NULL; + + LONG lRes = RegOpenKeyEx(hKeyParent, lpszKeyName, NULL, samDesired, &hKey); + if (lRes == ERROR_SUCCESS) + { + Close(); + m_hKey = hKey; + } + return lRes; + } + + LONG Create(HKEY hKeyParent, LPCTSTR lpszKeyName, LPTSTR lpszClass = REG_NONE, DWORD dwOptions = REG_OPTION_NON_VOLATILE, REGSAM samDesired = KEY_READ | KEY_WRITE, LPSECURITY_ATTRIBUTES lpSecAttr = NULL, LPDWORD lpdwDisposition = NULL) throw() + { + HKEY hKey = NULL; + + LONG lRes = RegCreateKeyEx(hKeyParent, lpszKeyName, NULL, lpszClass, dwOptions, samDesired, lpSecAttr, &hKey, lpdwDisposition); + if (lRes == ERROR_SUCCESS) + { + Close(); + m_hKey = hKey; + } + return lRes; + } + + + LONG QueryValue(LPCTSTR pszValueName, DWORD* pdwType, void* pData, ULONG* pnBytes) throw() + { + return RegQueryValueEx(m_hKey, pszValueName, NULL, pdwType, (LPBYTE)pData, pnBytes); + } + + LONG QueryDWORDValue(LPCTSTR pszValueName, DWORD& dwValue) throw() + { + ULONG size = sizeof(DWORD); + DWORD type = 0; + LONG lRet = QueryValue(pszValueName, &type, &dwValue, &size); + + if (lRet == ERROR_SUCCESS && type != REG_DWORD) + lRet = ERROR_INVALID_DATA; + + return lRet; + } + + LONG QueryBinaryValue(LPCTSTR pszValueName, void* pValue, ULONG* pnBytes) throw() + { + DWORD type = 0; + LONG lRet = QueryValue(pszValueName, &type, pValue, pnBytes); + + if (lRet == ERROR_SUCCESS && type != REG_BINARY) + lRet = ERROR_INVALID_DATA; + + return lRet; + } + + LONG QueryStringValue(LPCTSTR pszValueName, LPTSTR pszValue, ULONG* pnChars) throw() + { + ULONG size = (*pnChars) * sizeof(TCHAR); + DWORD type = 0; + LONG lRet = QueryValue(pszValueName, &type, pszValue, &size); + + if (lRet == ERROR_SUCCESS && type != REG_SZ) + lRet = ERROR_INVALID_DATA; + + *pnChars = size / sizeof(TCHAR); + return lRet; + } + + LONG QueryGUIDValue(LPCTSTR pszValueName, GUID& guidValue) throw() + { + OLECHAR buf[40] = {0}; + ULONG nChars = 39; + LONG lRet; + +#ifdef UNICODE + lRet = QueryStringValue(pszValueName, buf, &nChars); +#else + CHAR bufA[40] = {0}; + lRet = QueryStringValue(pszValueName, bufA, &nChars); + if (lRet != ERROR_SUCCESS) + return lRet; + if (!::MultiByteToWideChar(CP_THREAD_ACP, 0, bufA, -1, buf, 39)) + lRet = ERROR_INVALID_DATA; +#endif + if (lRet != ERROR_SUCCESS) + return lRet; + + if (!SUCCEEDED(CLSIDFromString(buf, &guidValue))) + return ERROR_INVALID_DATA; + + return lRet; + } + + LONG SetValue(LPCTSTR pszValueName, DWORD dwType, const void* pValue, ULONG nBytes) throw() + { + return RegSetValueEx(m_hKey, pszValueName, NULL, dwType, (const BYTE*)pValue, nBytes); + } + + LONG SetDWORDValue(LPCTSTR pszValueName, DWORD dwValue) throw() + { + return SetValue(pszValueName, REG_DWORD, &dwValue, sizeof(DWORD)); + } + + LONG SetStringValue(LPCTSTR pszValueName, LPCTSTR pszValue, DWORD dwType = REG_SZ) throw() + { + if (dwType != REG_SZ) + return ERROR_INVALID_DATA; // not implemented yet. + + ULONG length = (_tcslen(pszValue) + 1) * sizeof(TCHAR); + return SetValue(pszValueName, dwType, pszValue, length); + } + + LONG SetGUIDValue(LPCTSTR pszValueName, REFGUID guidValue) throw() + { + OLECHAR buf[40] = {0}; + StringFromGUID2(guidValue, buf, 39); +#ifdef UNICODE + return SetStringValue(pszValueName, buf); +#else + CHAR bufA[40] = {0}; + ::WideCharToMultiByte(CP_THREAD_ACP, 0, buf, -1, bufA, 40, NULL, NULL); + return SetStringValue(pszValueName, bufA); +#endif + } + + LONG SetBinaryValue(LPCTSTR pszValueName, const void* pValue, ULONG nBytes) throw() + { + return SetValue(pszValueName, REG_BINARY, pValue, nBytes); + } + + LONG SetKeyValue(LPCTSTR lpszKeyName, LPCTSTR lpszValue, LPCTSTR lpszValueName = NULL) throw() + { + CRegKey key; + LONG lRet = key.Create(m_hKey, lpszKeyName); + if (lRet == ERROR_SUCCESS) + { + lRet = key.SetStringValue(lpszValueName, lpszValue); + } + return lRet; + } + + LONG DeleteValue(LPCTSTR lpszValue) throw() + { + return RegDeleteValue(m_hKey, lpszValue); + } + + LONG DeleteSubKey(LPCTSTR lpszSubKey) throw() + { + return RegDeleteKey(m_hKey, lpszSubKey); + } + + operator HKEY() const throw() + { + return m_hKey; + } + + CRegKey& operator =(CRegKey& key) throw() + { + Attach(Detach()); + return *this; + } + +}; + template<class T> class CComHeapPtr : public CHeapPtr<T, CComAllocator> Modified: trunk/rostests/apitests/atl/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/CMakeLists.t…
============================================================================== --- trunk/rostests/apitests/atl/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/atl/CMakeLists.txt [iso-8859-1] Wed Aug 10 19:34:38 2016 @@ -7,11 +7,12 @@ atltypes.cpp CComBSTR.cpp CComHeapPtr.cpp + CRegKey.cpp CString.cpp testlist.c atl_apitest.rc) target_link_libraries(atl_apitest wine uuid) set_module_type(atl_apitest win32cui) -add_importlibs(atl_apitest ole32 oleaut32 user32 msvcrt kernel32) +add_importlibs(atl_apitest ole32 oleaut32 advapi32 user32 msvcrt kernel32) add_cd_file(TARGET atl_apitest DESTINATION reactos/bin FOR all) Added: trunk/rostests/apitests/atl/CRegKey.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/CRegKey.cpp?…
============================================================================== --- trunk/rostests/apitests/atl/CRegKey.cpp (added) +++ trunk/rostests/apitests/atl/CRegKey.cpp [iso-8859-1] Wed Aug 10 19:34:38 2016 @@ -0,0 +1,188 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory + * PURPOSE: Test for CRegKey + * PROGRAMMER: Mark Jansen + */ + +#include <apitest.h> +#include <atlbase.h> + +START_TEST(CRegKey) +{ + CRegKey key; + CRegKey key2(HKEY_CURRENT_USER); + + ok(key.m_hKey == NULL, "Expected m_hKey to be initialized to 0, was: %p\n", key.m_hKey); + ok(key2.m_hKey == HKEY_CURRENT_USER, "Expected m_hKey to be initialized to HKEY_CURRENT_USER, was: %p\n", key2.m_hKey); + ok(key2 == HKEY_CURRENT_USER, "Expected operator HKEY() to be implemented\n"); + + // Take ownership + CRegKey key3(key2); + ok(key3.m_hKey == HKEY_CURRENT_USER, "Expected m_hKey to be initialized to HKEY_CURRENT_USER, was: %p\n", key3.m_hKey); + ok(key2.m_hKey == NULL, "Expected m_hKey to be initialized to 0, was: %p\n", key2.m_hKey); + + LSTATUS lret; + + lret = key.Close(); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + lret = key2.Close(); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + lret = key3.Close(); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + + // read/write + lret = key.Open(HKEY_CURRENT_USER, _T("Environment")); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + ok(key.m_hKey != NULL, "Expected m_hKey to not be NULL, was: %p\n", key.m_hKey); + + + HKEY tmp = key.m_hKey; + HKEY detached = key.Detach(); + ok(key.m_hKey == NULL, "Expected m_hKey to be 0, was: %p\n", key.m_hKey); + ok(detached == tmp, "Expected detached to be %p, was: %p\n", tmp, detached); + key.Attach(detached); + ok(key.m_hKey == tmp, "Expected m_hKey to be %p, was: %p\n", tmp, key.m_hKey); + + lret = key2.Open(HKEY_CURRENT_USER, _T("Environment"), KEY_READ); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + + lret = key3.Open(HKEY_CURRENT_USER, _T("Environment"), KEY_WRITE); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + + TCHAR testdata[] = _T("XX-XX"); + lret = key.SetValue(_T("APITEST_VALUE_NAME"), REG_SZ, testdata, sizeof(testdata)); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + + TCHAR buffer[100]; + ULONG buffer_size = sizeof(buffer); + DWORD type = 0x12345; + memset(buffer, 0, sizeof(buffer)); + + lret = key.QueryValue(_T("APITEST_VALUE_NAME"), &type, buffer, &buffer_size); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + ok(type == REG_SZ, "Expected type to be REG_SZ, was: %lu\n", type); + ok(buffer_size == sizeof(testdata), "Expected buffer_size to be %u, was: %lu\n", sizeof(testdata), buffer_size); + ok(!memcmp(buffer, testdata, sizeof(testdata)), "Expected to get the same input as what was written!\n"); + + + buffer_size = sizeof(buffer); + type = 0x12345; + memset(buffer, 0, sizeof(buffer)); + lret = key2.QueryValue(_T("APITEST_VALUE_NAME"), &type, buffer, &buffer_size); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + ok(type == REG_SZ, "Expected type to be REG_SZ, was: %lu\n", type); + ok(buffer_size == sizeof(testdata), "Expected buffer_size to be %u, was: %lu\n", sizeof(testdata), buffer_size); + ok(!memcmp(buffer, testdata, sizeof(testdata)), "Expected to get the same input as what was written!\n"); + + buffer_size = sizeof(buffer); + type = 0x12345; + memset(buffer, 0, sizeof(buffer)); + lret = key3.QueryValue(_T("APITEST_VALUE_NAME"), &type, buffer, &buffer_size); + ok(lret == ERROR_ACCESS_DENIED, "Expected lret to be ERROR_ACCESS_DENIED, was: %lu\n", lret); + ok(type == 0 || broken(type == 203), "Expected type to be 0, was: %lu\n", type); + ok(buffer_size == sizeof(buffer), "Expected buffer_size to be %u, was: %lu\n", sizeof(buffer), buffer_size); + + + lret = key2.SetValue(_T("APITEST_VALUE_NAME"), REG_SZ, testdata, sizeof(testdata)); + ok(lret == ERROR_ACCESS_DENIED, "Expected lret to be ERROR_ACCESS_DENIED, was: %lu\n", lret); + + lret = key2.DeleteValue(_T("APITEST_VALUE_NAME")); + ok(lret == ERROR_ACCESS_DENIED, "Expected lret to be ERROR_ACCESS_DENIED, was: %lu\n", lret); + + DWORD dword = 0x54321; + lret = key2.QueryDWORDValue(_T("APITEST_VALUE_NAME"), dword); + ok(lret == ERROR_MORE_DATA, "Expected lret to be ERROR_MORE_DATA, was: %lu\n", lret); + ok(dword == 0x54321, "Expected dword to be 0x54321, was: %lu\n", dword); + + lret = key.SetValue(_T("APITEST_VALUE_NAME"), REG_SZ, testdata, sizeof(TCHAR)); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_ACCESS_DENIED, was: %lu\n", lret); + + dword = 0x54321; + lret = key2.QueryDWORDValue(_T("APITEST_VALUE_NAME"), dword); + ok(lret == ERROR_INVALID_DATA, "Expected lret to be ERROR_MORE_DATA, was: %lu\n", lret); + ok(dword != 0x54321, "Expected dword to NOT be 0x54321, was: %lu\n", dword); + + lret = key3.SetDWORDValue(_T("APITEST_VALUE_NAME"), 0x12345); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + + dword = 0x54321; + lret = key2.QueryDWORDValue(_T("APITEST_VALUE_NAME"), dword); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + ok(dword == 0x12345, "Expected dword to be 0x12345, was: %lu\n", dword); + + + lret = key3.DeleteValue(_T("APITEST_VALUE_NAME")); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + + + lret = key.SetKeyValue(_T("APITEST_KEY_NAME"), _T("APITEST_VALUE")); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + + CRegKey qv; + + // COUNTOF, not SIZEOF!!!! + lret = qv.Open(HKEY_CURRENT_USER, _T("Environment\\APITEST_KEY_NAME")); + buffer_size = _countof(buffer); + memset(buffer, 0, sizeof(buffer)); + lret = qv.QueryStringValue(NULL, buffer, &buffer_size); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + ok(buffer_size == _countof("APITEST_VALUE"), "Expected buffer_size to be %u, was: %lu\n", _countof("APITEST_VALUE"), buffer_size); + ok(!_tcscmp(buffer, _T("APITEST_VALUE")), "Expected to get the same input as what was written!\n"); + + lret = key.SetKeyValue(_T("APITEST_KEY_NAME"), _T("APITEST_VALUE2"), _T("APITEST_VALUE_NAME")); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + + buffer_size = _countof(buffer); + memset(buffer, 0, sizeof(buffer)); + lret = qv.QueryStringValue(_T("APITEST_VALUE_NAME"), buffer, &buffer_size); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + ok(buffer_size == _countof("APITEST_VALUE2"), "Expected buffer_size to be %u, was: %lu\n", _countof("APITEST_VALUE2"), buffer_size); + ok(!_tcscmp(buffer, _T("APITEST_VALUE2")), "Expected to get the same input as what was written!\n"); + + lret = key.DeleteSubKey(_T("APITEST_KEY_NAME")); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + + GUID guid, guid2; + memset(&guid, 56, sizeof(guid)); + + lret = key.SetGUIDValue(_T("GUID_NAME"), guid); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + + lret = key.QueryGUIDValue(_T("GUID_NAME"), guid2); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + ok(!memcmp(&guid, &guid2, sizeof(guid)), "Expected guid to equal guid2\n"); + + buffer_size = _countof(buffer); + memset(buffer, 0, sizeof(buffer)); + lret = key2.QueryStringValue(_T("GUID_NAME"), buffer, &buffer_size); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + ok(buffer_size == _countof("{38383838-3838-3838-3838-383838383838}"), + "Expected buffer_size to be %u, was: %lu\n", _countof("{38383838-3838-3838-3838-383838383838}"), buffer_size); + ok(!_tcscmp(buffer, _T("{38383838-3838-3838-3838-383838383838}")), "Expected to get the same input as what was written!\n"); + + memset(&guid, 33, 5); + lret = key.SetBinaryValue(_T("BIN_NAME"), &guid, 5); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + + buffer_size = sizeof(buffer); + memset(buffer, 0, sizeof(buffer)); + lret = key.QueryBinaryValue(_T("GUID_NAME"), buffer, &buffer_size); + ok(lret == ERROR_INVALID_DATA, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + ok(buffer_size == sizeof(_T("{38383838-3838-3838-3838-383838383838}")), + "Expected buffer_size to be %u, was: %lu\n", sizeof(_T("{38383838-3838-3838-3838-383838383838}")), buffer_size); + ok(buffer[0] == '{', "Expected buffer[0] to be 123, was: %i\n", (int)buffer[0]); + + buffer_size = sizeof(buffer); + memset(buffer, 0, sizeof(buffer)); + lret = key.QueryBinaryValue(_T("BIN_NAME"), buffer, &buffer_size); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + ok(buffer_size == 5, "Expected buffer_size to be %i, was: %lu\n", 5, buffer_size); + ok(!memcmp(buffer, &guid, 5), "Expected the first 5 bytes of buffer to equal the data in null_guid\n"); + + lret = key.DeleteValue(_T("GUID_NAME")); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); + + lret = key.DeleteValue(_T("BIN_NAME")); + ok(lret == ERROR_SUCCESS, "Expected lret to be ERROR_SUCCESS, was: %lu\n", lret); +} Propchange: trunk/rostests/apitests/atl/CRegKey.cpp ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/atl/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/testlist.c?r…
============================================================================== --- trunk/rostests/apitests/atl/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/atl/testlist.c [iso-8859-1] Wed Aug 10 19:34:38 2016 @@ -4,6 +4,7 @@ extern void func_atltypes(void); extern void func_CComBSTR(void); extern void func_CComHeapPtr(void); +extern void func_CRegKey(void); extern void func_CString(void); const struct test winetest_testlist[] = @@ -11,6 +12,7 @@ { "atltypes", func_atltypes }, { "CComBSTR", func_CComBSTR }, { "CComHeapPtr", func_CComHeapPtr }, + { "CRegKey", func_CRegKey }, { "CString", func_CString }, { 0, 0 } };
8 years, 4 months
1
0
0
0
[dchapyshev] 72190: [SDK] - KLF_SHIFTLOCK is not equal 65535. Correct value is 0x00010000
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Wed Aug 10 19:05:54 2016 New Revision: 72190 URL:
http://svn.reactos.org/svn/reactos?rev=72190&view=rev
Log: [SDK] - KLF_SHIFTLOCK is not equal 65535. Correct value is 0x00010000 Modified: trunk/reactos/sdk/include/psdk/winuser.h Modified: trunk/reactos/sdk/include/psdk/winuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/winuser.h…
============================================================================== --- trunk/reactos/sdk/include/psdk/winuser.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/winuser.h [iso-8859-1] Wed Aug 10 19:05:54 2016 @@ -116,7 +116,7 @@ #define KLF_NOTELLSHELL 128 #define KLF_SETFORPROCESS 256 #if (_WIN32_WINNT >= 0x0500) -#define KLF_SHIFTLOCK 65535 +#define KLF_SHIFTLOCK 0x00010000 #define KLF_RESET 0x40000000 #endif /*(_WIN32_WINNT >= 0x0500) */ #define KL_NAMELENGTH 9
8 years, 4 months
1
0
0
0
[dchapyshev] 72189: [INPUT] - Draw 0x2022 unicode symbol instead 0x25CF (marking default input method) - Fix incorrect logic in CapsLock parameters - Notice system of change CapsLock mode parameters
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Wed Aug 10 19:04:11 2016 New Revision: 72189 URL:
http://svn.reactos.org/svn/reactos?rev=72189&view=rev
Log: [INPUT] - Draw 0x2022 unicode symbol instead 0x25CF (marking default input method) - Fix incorrect logic in CapsLock parameters - Notice system of change CapsLock mode parameters Modified: trunk/reactos/dll/cpl/input/input.h trunk/reactos/dll/cpl/input/key_settings_dialog.c trunk/reactos/dll/cpl/input/settings_page.c Modified: trunk/reactos/dll/cpl/input/input.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/input.h?rev=…
============================================================================== --- trunk/reactos/dll/cpl/input/input.h [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/input/input.h [iso-8859-1] Wed Aug 10 19:04:11 2016 @@ -67,6 +67,9 @@ INT_PTR CALLBACK KeySettingsDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); +DWORD +ReadAttributes(VOID); + /* key_sequence_dialog.c */ INT_PTR CALLBACK ChangeKeySeqDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); Modified: trunk/reactos/dll/cpl/input/key_settings_dialog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/key_settings…
============================================================================== --- trunk/reactos/dll/cpl/input/key_settings_dialog.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/input/key_settings_dialog.c [iso-8859-1] Wed Aug 10 19:04:11 2016 @@ -10,32 +10,40 @@ static KEY_SETTINGS _KeySettings = { 0 }; +DWORD +ReadAttributes(VOID) +{ + DWORD dwAttributes = 0; + HKEY hKey; + + if (RegOpenKeyExW(HKEY_CURRENT_USER, + L"Keyboard Layout", + 0, + KEY_QUERY_VALUE, + &hKey) == ERROR_SUCCESS) + { + DWORD dwSize; + + dwSize = sizeof(dwSize); + + RegQueryValueExW(hKey, + L"Attributes", + NULL, NULL, + (LPBYTE)&dwAttributes, + &dwSize); + + RegCloseKey(hKey); + } + + return dwAttributes; +} + static VOID ReadKeysSettings(VOID) { HKEY hKey; - if (RegOpenKeyExW(HKEY_CURRENT_USER, - L"Keyboard Layout", - 0, - KEY_QUERY_VALUE, - &hKey) == ERROR_SUCCESS) - { - DWORD dwSize; - - dwSize = sizeof(dwSize); - - if (RegQueryValueExW(hKey, - L"Attributes", - NULL, NULL, - (LPBYTE)&_KeySettings.dwAttributes, - &dwSize) != ERROR_SUCCESS) - { - _KeySettings.dwAttributes = (DWORD) -1; - } - - RegCloseKey(hKey); - } + _KeySettings.dwAttributes = ReadAttributes(); if (RegOpenKeyExW(HKEY_CURRENT_USER, L"Keyboard Layout\\Toggle", @@ -126,10 +134,13 @@ (wcslen(szBuffer) + 1) * sizeof(WCHAR)); RegCloseKey(hKey); - - /* Notice system of change of parameters */ - SystemParametersInfoW(SPI_SETLANGTOGGLE, 0, NULL, 0); - } + } + + /* Notice system of change hotkeys parameters */ + SystemParametersInfoW(SPI_SETLANGTOGGLE, 0, NULL, 0); + + /* Notice system of change CapsLock mode parameters */ + ActivateKeyboardLayout(GetKeyboardLayout(0), KLF_RESET | _KeySettings.dwAttributes); } @@ -178,20 +189,20 @@ if (_KeySettings.dwAttributes & KLF_SHIFTLOCK) { + CheckDlgButton(hwndDlg, IDC_PRESS_SHIFT_KEY_RB, BST_CHECKED); + CheckDlgButton(hwndDlg, IDC_PRESS_CL_KEY_RB, BST_UNCHECKED); + } + else + { CheckDlgButton(hwndDlg, IDC_PRESS_SHIFT_KEY_RB, BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_PRESS_CL_KEY_RB, BST_CHECKED); } - else - { - CheckDlgButton(hwndDlg, IDC_PRESS_SHIFT_KEY_RB, BST_CHECKED); - CheckDlgButton(hwndDlg, IDC_PRESS_CL_KEY_RB, BST_UNCHECKED); - } hwndList = GetDlgItem(hwndDlg, IDC_KEY_LISTVIEW); ListView_SetExtendedListViewStyle(hwndList, LVS_EX_FULLROWSELECT); - ZeroMemory(&column, sizeof(column)); + ZeroMemory(&column, sizeof(column)); column.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM; @@ -243,7 +254,7 @@ case IDOK: { - if (IsDlgButtonChecked(hwndDlg, IDC_PRESS_CL_KEY_RB) == BST_UNCHECKED) + if (IsDlgButtonChecked(hwndDlg, IDC_PRESS_CL_KEY_RB) == BST_CHECKED) { _KeySettings.dwAttributes &= ~KLF_SHIFTLOCK; } Modified: trunk/reactos/dll/cpl/input/settings_page.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/settings_pag…
============================================================================== --- trunk/reactos/dll/cpl/input/settings_page.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/input/settings_page.c [iso-8859-1] Wed Aug 10 19:04:11 2016 @@ -63,7 +63,7 @@ ExtTextOutW(hdc, rect.left, rect.top, ETO_OPAQUE, &rect, L"", 0, NULL); SelectObject(hdc, hFont); - DrawTextW(hdc, L"\x25CF", 1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER); + DrawTextW(hdc, L"\x2022", 1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER); } else {
8 years, 4 months
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
47
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
37
38
39
40
41
42
43
44
45
46
47
Results per page:
10
25
50
100
200