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
June 2015
----- 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
13 participants
343 discussions
Start a n
N
ew thread
[tfaber] 68187: [INCLUDE] - Fix undocshell.h build without UNICODE defined
by tfaber@svn.reactos.org
Author: tfaber Date: Thu Jun 18 13:45:17 2015 New Revision: 68187 URL:
http://svn.reactos.org/svn/reactos?rev=68187&view=rev
Log: [INCLUDE] - Fix undocshell.h build without UNICODE defined Modified: trunk/reactos/include/reactos/undocshell.h Modified: trunk/reactos/include/reactos/undocshell.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/undocshell…
============================================================================== --- trunk/reactos/include/reactos/undocshell.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/undocshell.h [iso-8859-1] Thu Jun 18 13:45:17 2015 @@ -605,7 +605,7 @@ mii.dwTypeData = label; mii.cch = _countof(label); - GetMenuItemInfo(hmenu, i, TRUE, &mii); + GetMenuItemInfoW(hmenu, i, TRUE, &mii); if (mii.fType & MFT_BITMAP) DbgPrint("%s%2d - %08x: BITMAP %08p (state=%d, has submenu=%s)\n", padding, i, mii.wID, mii.hbmpItem, mii.fState, mii.hSubMenu ? "TRUE" : "FALSE");
9 years, 6 months
1
0
0
0
[tfaber] 68186: [USER32_APITEST] - Add a simple test for RegisterHotKey with regular vs modifier-only hotkeys CORE-9728
by tfaber@svn.reactos.org
Author: tfaber Date: Thu Jun 18 13:41:52 2015 New Revision: 68186 URL:
http://svn.reactos.org/svn/reactos?rev=68186&view=rev
Log: [USER32_APITEST] - Add a simple test for RegisterHotKey with regular vs modifier-only hotkeys CORE-9728 Added: trunk/rostests/apitests/user32/RegisterHotKey.c (with props) Modified: trunk/rostests/apitests/user32/CMakeLists.txt trunk/rostests/apitests/user32/testlist.c Modified: trunk/rostests/apitests/user32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/CMakeList…
============================================================================== --- trunk/rostests/apitests/user32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/CMakeLists.txt [iso-8859-1] Thu Jun 18 13:41:52 2015 @@ -20,6 +20,7 @@ LoadImage.c LookupIconIdFromDirectoryEx.c RealGetWindowClass.c + RegisterHotKey.c ScrollDC.c ScrollWindowEx.c SendMessageTimeout.c Added: trunk/rostests/apitests/user32/RegisterHotKey.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/RegisterH…
============================================================================== --- trunk/rostests/apitests/user32/RegisterHotKey.c (added) +++ trunk/rostests/apitests/user32/RegisterHotKey.c [iso-8859-1] Thu Jun 18 13:41:52 2015 @@ -0,0 +1,227 @@ +/* + * PROJECT: ReactOS API tests + * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory + * PURPOSE: Test for RegisterHotKey + * PROGRAMMERS: Thomas Faber <thomas.faber(a)reactos.org> + */ + +#include <apitest.h> + +#include <winuser.h> +#include <shlobj.h> +#include <undocshell.h> +#include <undocuser.h> + +#define msg_hotkey(msg, id, mod, vk) do \ + { \ + ok((msg)->message == WM_HOTKEY, "Unexpected message %u\n", (msg)->message); \ + ok((msg)->hwnd == NULL, "hwnd = %p\n", (msg)->hwnd); \ + ok((msg)->wParam == (id), "wParam = 0x%Ix\n", (msg)->wParam); \ + ok((msg)->lParam == MAKELONG(mod, vk), \ + "wParam = 0x%Ix, expected 0x%lx\n", (msg)->lParam, MAKELONG(mod, vk)); \ + } while (0) +#define expect_hotkey(id, mod, vk) do \ + { \ + MSG msg; \ + BOOL got_hotkey = FALSE; \ + while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) \ + { \ + msg_hotkey(&msg, id, mod, vk); \ + if (msg.message == WM_HOTKEY) got_hotkey = TRUE; \ + DispatchMessageW(&msg); \ + } \ + ok(got_hotkey, "Did not receive expected WM_HOTKEY message\n"); \ + } while (0) +#define msg_no_hotkey(msg) do \ + { \ + if ((msg)->message == WM_HOTKEY) \ + ok((msg)->message != WM_HOTKEY, \ + "Got WM_HOTKEY with hwnd=%p, wParam=0x%Ix, lParam=0x%Ix\n", \ + (msg)->hwnd, (msg)->wParam, (msg)->lParam); \ + else \ + ok(0, \ + "Unexpected message %u posted to thread with hwnd=%p, wParam=0x%Ix, lParam=0x%Ix\n", \ + (msg)->message, (msg)->hwnd, (msg)->wParam, (msg)->lParam); \ + } while (0) +#define expect_no_hotkey() do \ + { \ + MSG msg; \ + while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) \ + { \ + msg_no_hotkey(&msg); \ + DispatchMessageW(&msg); \ + } \ + } while (0) + +START_TEST(RegisterHotKey) +{ + SetCursorPos(0, 0); + + RegisterHotKey(NULL, 1, MOD_CONTROL, 0); + RegisterHotKey(NULL, 2, MOD_CONTROL, 'U'); + RegisterHotKey(NULL, 3, MOD_CONTROL | MOD_ALT, 0); + RegisterHotKey(NULL, 4, MOD_CONTROL | MOD_ALT, 'U'); + + expect_no_hotkey(); + + trace("Ctrl only\n"); + keybd_event(VK_CONTROL, 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); + expect_hotkey(1, 0, VK_CONTROL); + + trace("Ctrl+U\n"); + keybd_event(VK_CONTROL, 0, 0, 0); + expect_no_hotkey(); + keybd_event('U', 0, 0, 0); + expect_hotkey(2, MOD_CONTROL, 'U'); + keybd_event('U', 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + + trace("Ctrl+U (with Ctrl up first)\n"); + keybd_event(VK_CONTROL, 0, 0, 0); + expect_no_hotkey(); + keybd_event('U', 0, 0, 0); + expect_hotkey(2, MOD_CONTROL, 'U'); + keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + keybd_event('U', 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + + trace("Ctrl+U (with U down first and Ctrl up first)\n"); + keybd_event('U', 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); + expect_hotkey(1, 0, VK_CONTROL); + keybd_event('U', 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + + trace("Ctrl+U (with U down first and U up first)\n"); + keybd_event('U', 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, 0, 0); + expect_no_hotkey(); + keybd_event('U', 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + + trace("Ctrl+Alt\n"); + keybd_event(VK_CONTROL, 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_MENU, 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); + expect_hotkey(3, MOD_CONTROL, VK_MENU); + keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + + trace("Ctrl+Alt (with Ctrl up first)\n"); + keybd_event(VK_CONTROL, 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_MENU, 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); + expect_hotkey(3, MOD_ALT, VK_CONTROL); + keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + + trace("Alt+Ctrl\n"); + keybd_event(VK_MENU, 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); + expect_hotkey(3, MOD_ALT, VK_CONTROL); + keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + + trace("Alt+Ctrl (with Alt up first)\n"); + keybd_event(VK_MENU, 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); + expect_hotkey(3, MOD_CONTROL, VK_MENU); + keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + + trace("Alt+U\n"); + keybd_event(VK_MENU, 0, 0, 0); + expect_no_hotkey(); + keybd_event('U', 0, 0, 0); + expect_no_hotkey(); + keybd_event('U', 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + + trace("Ctrl+Alt+U\n"); + keybd_event(VK_CONTROL, 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_MENU, 0, 0, 0); + expect_no_hotkey(); + keybd_event('U', 0, 0, 0); + expect_hotkey(4, MOD_CONTROL | MOD_ALT, 'U'); + keybd_event('U', 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + + trace("Alt+Ctrl+U\n"); + keybd_event(VK_MENU, 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, 0, 0); + expect_no_hotkey(); + keybd_event('U', 0, 0, 0); + expect_hotkey(4, MOD_CONTROL | MOD_ALT, 'U'); + keybd_event('U', 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + + trace("Ctrl+U+Alt\n"); + keybd_event(VK_CONTROL, 0, 0, 0); + expect_no_hotkey(); + keybd_event('U', 0, 0, 0); + expect_hotkey(2, MOD_CONTROL, 'U'); + keybd_event(VK_MENU, 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); + expect_hotkey(3, MOD_CONTROL, VK_MENU); + keybd_event('U', 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + + trace("Alt+U+Ctrl\n"); + keybd_event(VK_MENU, 0, 0, 0); + expect_no_hotkey(); + keybd_event('U', 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, 0, 0); + expect_no_hotkey(); + keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); + expect_hotkey(3, MOD_ALT, VK_CONTROL); + keybd_event('U', 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); + expect_no_hotkey(); + + /* The remaining combinations are an exercise left to the reader */ + + UnregisterHotKey(NULL, 4); + UnregisterHotKey(NULL, 3); + UnregisterHotKey(NULL, 2); + UnregisterHotKey(NULL, 1); + + expect_no_hotkey(); +} Propchange: trunk/rostests/apitests/user32/RegisterHotKey.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/user32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/testlist.…
============================================================================== --- trunk/rostests/apitests/user32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/testlist.c [iso-8859-1] Thu Jun 18 13:41:52 2015 @@ -22,6 +22,7 @@ extern void func_LoadImage(void); extern void func_LookupIconIdFromDirectoryEx(void); extern void func_RealGetWindowClass(void); +extern void func_RegisterHotKey(void); extern void func_ScrollDC(void); extern void func_ScrollWindowEx(void); extern void func_SendMessageTimeout(void); @@ -55,6 +56,7 @@ { "LoadImage", func_LoadImage }, { "LookupIconIdFromDirectoryEx", func_LookupIconIdFromDirectoryEx }, { "RealGetWindowClass", func_RealGetWindowClass }, + { "RegisterHotKey", func_RegisterHotKey }, { "ScrollDC", func_ScrollDC }, { "ScrollWindowEx", func_ScrollWindowEx }, { "SendMessageTimeout", func_SendMessageTimeout },
9 years, 6 months
1
0
0
0
[gedmurphy] 68185: [DEVMGR] - Add tooltips for the toolbar - Fix the 'disable' button not showing for devices that be disabled - Some code cleanup / noise
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Thu Jun 18 13:08:11 2015 New Revision: 68185 URL:
http://svn.reactos.org/svn/reactos?rev=68185&view=rev
Log: [DEVMGR] - Add tooltips for the toolbar - Fix the 'disable' button not showing for devices that be disabled - Some code cleanup / noise Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp trunk/reactos/dll/win32/devmgr/devmgmt/Resource.h trunk/reactos/dll/win32/devmgr/devmgmt/lang/en-US.rc Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/D…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp [iso-8859-1] Thu Jun 18 13:08:11 2015 @@ -286,7 +286,7 @@ CDeviceNode *Node = dynamic_cast<CDeviceNode *>(GetNode(TvItem)); if (Node) { - Node->CanDisable(); + return Node->CanDisable(); } return false; } @@ -348,9 +348,11 @@ } bool -CDeviceView::GetNextClass(_In_ ULONG ClassIndex, - _Out_ LPGUID ClassGuid, - _Out_ HDEVINFO *hDevInfo) +CDeviceView::GetNextClass( + _In_ ULONG ClassIndex, + _Out_ LPGUID ClassGuid, + _Out_ HDEVINFO *hDevInfo + ) { CONFIGRET cr; @@ -644,28 +646,24 @@ ATLASSERT(FALSE); } - // Check if this is a hidden device - if (DeviceNode->IsHidden()) - { - if (m_ShowHidden == FALSE) - continue; - } - - if (DeviceNode->HasProblem()) - { - HasProblem = true; - } - - // Add this device to the tree under its parent - hDevItem = InsertIntoTreeView(hParentTreeItem, - DeviceNode); - if (hDevItem) - { - // Check if this child has any children itself - if (!RecurseChildDevices(Device, hDevItem)) + // Don't show hidden devices if not requested + if ((m_ShowHidden == TRUE) || (!(DeviceNode->IsHidden()))) + { + if (DeviceNode->HasProblem()) + { HasProblem = true; - } - + } + + // Add this device to the tree under its parent + hDevItem = InsertIntoTreeView(hParentTreeItem, + DeviceNode); + if (hDevItem) + { + // Check if this child has any children itself + if (!RecurseChildDevices(Device, hDevItem)) + HasProblem = true; + } + } } (void)TreeView_SortChildren(m_hTreeView, @@ -816,7 +814,9 @@ CClassNode* -CDeviceView::GetClassNode(_In_ LPGUID ClassGuid) +CDeviceView::GetClassNode( + _In_ LPGUID ClassGuid + ) { POSITION Pos; CClassNode *Node; @@ -840,7 +840,9 @@ } CDeviceNode* -CDeviceView::GetDeviceNode(_In_ DEVINST Device) +CDeviceView::GetDeviceNode( + _In_ DEVINST Device + ) { POSITION Pos; CDeviceNode *Node; @@ -863,7 +865,9 @@ return Node; } -CNode* CDeviceView::GetNode(LPTV_ITEMW TvItem) +CNode* CDeviceView::GetNode( + _In_ LPTV_ITEMW TvItem + ) { TvItem->mask = TVIF_PARAM; if (TreeView_GetItem(m_hTreeView, TvItem)) @@ -883,19 +887,18 @@ void CDeviceView::EmptyLists() { - CClassNode *ClassNode; - CDeviceNode *DeviceNode; + CNode *Node; while (!m_ClassNodeList.IsEmpty()) { - ClassNode = m_ClassNodeList.RemoveTail(); - delete ClassNode; + Node = m_ClassNodeList.RemoveTail(); + delete Node; } while (!m_DeviceNodeList.IsEmpty()) { - DeviceNode = m_DeviceNodeList.RemoveTail(); - delete DeviceNode; + Node = m_DeviceNodeList.RemoveTail(); + delete Node; } } Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/D…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h [iso-8859-1] Thu Jun 18 13:08:11 2015 @@ -15,19 +15,15 @@ { CAtlList<CClassNode *> m_ClassNodeList; CAtlList<CDeviceNode *> m_DeviceNodeList; - SP_CLASSIMAGELIST_DATA m_ImageListData; - HWND m_hMainWnd; HWND m_hTreeView; HWND m_hPropertyDialog; HMENU m_hMenu; HMENU m_hContextMenu; ViewType m_ViewType; - HTREEITEM m_hTreeRoot; DEVINST m_RootDevInst; - bool m_ShowHidden; int m_RootClassImage; @@ -72,10 +68,16 @@ ViewType GetCurrentView() { return m_ViewType; } - bool HasProperties(_In_ LPTV_ITEMW TvItem); + bool HasProperties( + _In_ LPTV_ITEMW TvItem + ); //bool SelDeviceIsHidden(); - bool CanDisable(_In_ LPTV_ITEMW TvItem); - bool IsDisabled(_In_ LPTV_ITEMW TvItem); + bool CanDisable( + _In_ LPTV_ITEMW TvItem + ); + bool IsDisabled( + _In_ LPTV_ITEMW TvItem + ); bool SelDeviceIsStarted(); bool SelDeviceIsInstalled(); @@ -126,11 +128,17 @@ VOID EmptyDeviceView( ); - CNode* GetNode(_In_ LPTV_ITEMW TvItem); + CNode* GetNode( + _In_ LPTV_ITEMW TvItem + ); CNode* GetSelectedNode(); - CClassNode* GetClassNode(_In_ LPGUID ClassGuid); - CDeviceNode* GetDeviceNode(_In_ DEVINST Device); + CClassNode* GetClassNode( + _In_ LPGUID ClassGuid + ); + CDeviceNode* GetDeviceNode( + _In_ DEVINST Device + ); void EmptyLists(); }; Modified: trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/M…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp [iso-8859-1] Thu Jun 18 13:08:11 2015 @@ -500,6 +500,35 @@ case NM_RETURN: { m_DeviceView->DisplayPropertySheet(); + break; + } + + case TTN_GETDISPINFO: + { + LPTOOLTIPTEXT lpttt = (LPTOOLTIPTEXT)lParam; + + UINT_PTR idButton = (UINT)lpttt->hdr.idFrom; + switch (idButton) + { + case IDC_PROPERTIES: + lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_PROPERTIES); + break; + case IDC_SCAN_HARDWARE: + lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_SCAN); + break; + case IDC_ENABLE_DRV: + lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_ENABLE); + break; + case IDC_DISABLE_DRV: + lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_DIABLE); + break; + case IDC_UPDATE_DRV: + lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_UPDATE); + break; + case IDC_UNINSTALL_DRV: + lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_UNINSTALL); + break; + } break; } } @@ -657,12 +686,12 @@ WPARAM wParam, LPARAM lParam) { - CMainWindow *pThis; + CMainWindow *This; LRESULT RetCode = 0; // Get the object pointer from window context - pThis = (CMainWindow *)GetWindowLongPtr(hwnd, GWLP_USERDATA); - if (pThis == NULL) + This = (CMainWindow *)GetWindowLongPtr(hwnd, GWLP_USERDATA); + if (This == NULL) { // Check that this isn't a create message if (msg != WM_CREATE) @@ -677,47 +706,47 @@ case WM_CREATE: { // Get the object pointer from the create param - pThis = (CMainWindow *)((LPCREATESTRUCT)lParam)->lpCreateParams; + This = (CMainWindow *)((LPCREATESTRUCT)lParam)->lpCreateParams; // Store the pointer in the window's global user data - SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)pThis); + SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)This); // Call the create handler - RetCode = pThis->OnCreate(hwnd); + RetCode = This->OnCreate(hwnd); break; } case WM_SIZE: { - RetCode = pThis->OnSize(); + RetCode = This->OnSize(); break; } case WM_NOTIFY: { - RetCode = pThis->OnNotify(lParam); + RetCode = This->OnNotify(lParam); break; } case WM_CONTEXTMENU: { - RetCode = pThis->OnContext(lParam); + RetCode = This->OnContext(lParam); break; } case WM_MENUSELECT: { - if (pThis->m_hStatusBar != NULL) + if (This->m_hStatusBar != NULL) { - if (!pThis->MainWndMenuHint(LOWORD(wParam), - MainMenuHintTable, - sizeof(MainMenuHintTable) / sizeof(MainMenuHintTable[0]), - IDS_HINT_BLANK)) + if (!This->MainWndMenuHint(LOWORD(wParam), + MainMenuHintTable, + sizeof(MainMenuHintTable) / sizeof(MainMenuHintTable[0]), + IDS_HINT_BLANK)) { - pThis->MainWndMenuHint(LOWORD(wParam), - SystemMenuHintTable, - sizeof(SystemMenuHintTable) / sizeof(SystemMenuHintTable[0]), - IDS_HINT_BLANK); + This->MainWndMenuHint(LOWORD(wParam), + SystemMenuHintTable, + sizeof(SystemMenuHintTable) / sizeof(SystemMenuHintTable[0]), + IDS_HINT_BLANK); } } @@ -727,7 +756,7 @@ case WM_COMMAND: { // Handle the command message - RetCode = pThis->OnCommand(wParam, lParam); + RetCode = This->OnCommand(wParam, lParam); if (RetCode == -1) { // Hand it off to the default message handler @@ -738,13 +767,13 @@ case WM_ENTERMENULOOP: { - pThis->UpdateStatusBar(true); + This->UpdateStatusBar(true); break; } case WM_EXITMENULOOP: { - pThis->UpdateStatusBar(false); + This->UpdateStatusBar(false); break; } @@ -759,7 +788,7 @@ case WM_DESTROY: { // Call the destroy handler - RetCode = pThis->OnDestroy(); + RetCode = This->OnDestroy(); break; } Modified: trunk/reactos/dll/win32/devmgr/devmgmt/Resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/R…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/Resource.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/Resource.h [iso-8859-1] Thu Jun 18 13:08:11 2015 @@ -36,9 +36,14 @@ #define IDS_LICENSE 303 /* tooltips */ -#define IDS_TOOLTIP_PROP 6000 -#define IDS_TOOLTIP_REFRESH 6001 -#define IDS_TOOLTIP_HELP 6002 +#define IDS_TOOLTIP_PROPERTIES 6000 +#define IDS_TOOLTIP_SCAN 6001 +#define IDS_TOOLTIP_ENABLE 6002 +#define IDS_TOOLTIP_DIABLE 6003 +#define IDS_TOOLTIP_UPDATE 6004 +#define IDS_TOOLTIP_UNINSTALL 6005 + + /* menu hints */ #define IDS_HINT_BLANK 20000 Modified: trunk/reactos/dll/win32/devmgr/devmgmt/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/l…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/lang/en-US.rc [iso-8859-1] Thu Jun 18 13:08:11 2015 @@ -49,11 +49,21 @@ END END +#define IDS_HINT_PROPERTIES 20001 +#define IDS_HINT_SCAN 20002 +#define IDS_HINT_ENABLE 20003 +#define IDS_HINT_DISABLE 20004 +#define IDS_HINT_UPDATE 20005 +#define IDS_HINT_UNINSTALL 20006 + STRINGTABLE DISCARDABLE BEGIN - IDS_TOOLTIP_PROP "Properties" - IDS_TOOLTIP_REFRESH "Scan for hardware changes" - IDS_TOOLTIP_HELP "Help" + IDS_TOOLTIP_PROPERTIES "Properties" + IDS_TOOLTIP_SCAN "Scan for hardware changes" + IDS_TOOLTIP_ENABLE "Enable" + IDS_TOOLTIP_DIABLE "Disable" + IDS_TOOLTIP_UPDATE "Update Driver Software" + IDS_TOOLTIP_UNINSTALL "Uninstall" END /* Hints */
9 years, 6 months
1
0
0
0
[gedmurphy] 68184: [DEVMGR] - Add support for WM_ENTERMENULOOP/WM_EXITMENULOOP and update the status bar style to allow hints to be drawn - Fixup the menu hints
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Thu Jun 18 11:02:52 2015 New Revision: 68184 URL:
http://svn.reactos.org/svn/reactos?rev=68184&view=rev
Log: [DEVMGR] - Add support for WM_ENTERMENULOOP/WM_EXITMENULOOP and update the status bar style to allow hints to be drawn - Fixup the menu hints Modified: trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.h trunk/reactos/dll/win32/devmgr/devmgmt/Resource.h trunk/reactos/dll/win32/devmgr/devmgmt/lang/en-US.rc Modified: trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/M…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp [iso-8859-1] Thu Jun 18 11:02:52 2015 @@ -29,22 +29,39 @@ { IDC_EXIT, IDS_HINT_EXIT }, // Action Menu - { IDC_UPDATE_DRV, NULL }, - { IDC_DISABLE_DRV, NULL }, - { IDC_UNINSTALL_DRV, NULL }, - { IDC_SCAN_HARDWARE, IDS_HINT_REFRESH }, - { IDC_ADD_HARDWARE, NULL }, - { IDC_PROPERTIES, IDS_HINT_PROP}, + { IDC_PROPERTIES, IDS_HINT_PROPERTIES }, + { IDC_SCAN_HARDWARE, IDS_HINT_SCAN }, + { IDC_ENABLE_DRV, IDS_HINT_ENABLE }, + { IDC_DISABLE_DRV, IDS_HINT_DISABLE }, + { IDC_UPDATE_DRV, IDS_HINT_UPDATE }, + { IDC_UNINSTALL_DRV, IDS_HINT_UNINSTALL }, + { IDC_ADD_HARDWARE, IDS_HINT_ADD }, + // View Menu { IDC_DEVBYTYPE, IDS_HINT_DEV_BY_TYPE}, { IDC_DEVBYCONN, IDS_HINT_DEV_BY_CONN}, { IDC_RESBYTYPE, IDS_HINT_RES_BY_TYPE}, { IDC_RESBYCONN, IDS_HINT_RES_BY_TYPE}, + { IDC_SHOWHIDDEN, IDS_HINT_SHOW_HIDDEN }, { IDC_ABOUT, IDS_HINT_ABOUT } }; + + + + +#define IDS_HINT_BLANK 20000 +#define IDS_HINT_PROPERTIES 20001 +#define IDS_HINT_SCAN 20002 +#define IDS_HINT_ENABLE 20003 +#define IDS_HINT_DISABLE 20004 +#define IDS_HINT_UPDATE 20005 +#define IDS_HINT_UNINSTALL 20006 +#define IDS_HINT_ADD 20007 +#define IDS_HINT_ABOUT 20008 +#define IDS_HINT_EXIT 20009 // system menu hints static const MENU_HINT SystemMenuHintTable[] = @@ -188,6 +205,17 @@ HintId); return Found; +} + +void +CMainWindow::UpdateStatusBar( + _In_ bool InMenuLoop + ) +{ + SendMessageW(m_hStatusBar, + SB_SIMPLE, + (WPARAM)InMenuLoop, + 0); } bool @@ -708,6 +736,18 @@ break; } + case WM_ENTERMENULOOP: + { + pThis->UpdateStatusBar(true); + break; + } + + case WM_EXITMENULOOP: + { + pThis->UpdateStatusBar(false); + break; + } + case WM_CLOSE: { // Destroy the main window Modified: trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/M…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.h [iso-8859-1] Thu Jun 18 11:02:52 2015 @@ -53,6 +53,10 @@ UINT uID ); + void UpdateStatusBar( + _In_ bool InMenuLoop + ); + bool MainWndMenuHint( WORD CmdId, const MENU_HINT *HintArray, Modified: trunk/reactos/dll/win32/devmgr/devmgmt/Resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/R…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/Resource.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/Resource.h [iso-8859-1] Thu Jun 18 11:02:52 2015 @@ -42,16 +42,21 @@ /* menu hints */ #define IDS_HINT_BLANK 20000 -#define IDS_HINT_REFRESH 20002 -#define IDS_HINT_PROP 20003 -#define IDS_HINT_HELP 20004 -#define IDS_HINT_ABOUT 20005 -#define IDS_HINT_EXIT 20006 +#define IDS_HINT_PROPERTIES 20001 +#define IDS_HINT_SCAN 20002 +#define IDS_HINT_ENABLE 20003 +#define IDS_HINT_DISABLE 20004 +#define IDS_HINT_UPDATE 20005 +#define IDS_HINT_UNINSTALL 20006 +#define IDS_HINT_ADD 20007 +#define IDS_HINT_ABOUT 20008 +#define IDS_HINT_EXIT 20009 #define IDS_HINT_DEV_BY_TYPE 20020 #define IDS_HINT_DEV_BY_CONN 20021 #define IDS_HINT_RES_BY_TYPE 20022 #define IDS_HINT_RES_BY_CONN 20023 +#define IDS_HINT_SHOW_HIDDEN 20024 /* system menu hints */ #define IDS_HINT_SYS_RESTORE 21001 @@ -60,4 +65,3 @@ #define IDS_HINT_SYS_MINIMIZE 21004 #define IDS_HINT_SYS_MAXIMIZE 21005 #define IDS_HINT_SYS_CLOSE 21006 - Modified: trunk/reactos/dll/win32/devmgr/devmgmt/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/l…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/lang/en-US.rc [iso-8859-1] Thu Jun 18 11:02:52 2015 @@ -61,16 +61,21 @@ BEGIN IDS_APPNAME "ReactOS Device Manager" IDS_HINT_BLANK " " + IDS_HINT_PROPERTIES " Open property dialog for the current selection." + IDS_HINT_SCAN " Scan for changed or new plug and play devices." + IDS_HINT_ENABLE " Enables the selected device." + IDS_HINT_DISABLE " Disables the selected device." + IDS_HINT_UPDATE " Launches the Update Driver Software wizard for the selected device." + IDS_HINT_UNINSTALL " Uninstalls the driver for the selected device." + IDS_HINT_ADD " Adds a legacy (non-Plug and Play) device to the computer." + IDS_HINT_ABOUT " About ReactOS Device Manager." IDS_HINT_EXIT " Exits the program." - IDS_HINT_REFRESH " Scan for changed or new Plug and Play devices." - IDS_HINT_PROP " Open property dialog for the current selection." - IDS_HINT_HELP " Display help window." - IDS_HINT_ABOUT " About ReactOS Device Manager." - IDS_HINT_DEV_BY_TYPE "Displays devices by hardware type" - IDS_HINT_DEV_BY_CONN "Displays devices by connection" - IDS_HINT_RES_BY_TYPE "Displays resources by type" - IDS_HINT_RES_BY_CONN "Displays resources by connection type" + IDS_HINT_DEV_BY_TYPE " Displays devices by hardware type." + IDS_HINT_DEV_BY_CONN " Displays devices by connection." + IDS_HINT_RES_BY_TYPE " Displays resources by type." + IDS_HINT_RES_BY_CONN " Displays resources by connection type." + IDS_HINT_SHOW_HIDDEN " Displays legacy devices and devices that are no longer installed." IDS_HINT_SYS_RESTORE " Restores this window to normal size." IDS_HINT_SYS_MOVE " Moves this window."
9 years, 6 months
1
0
0
0
[akhaldi] 68183: [SHELL32] Add printer icons. By Lee Schroeder. CORE-9829
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Jun 18 10:48:00 2015 New Revision: 68183 URL:
http://svn.reactos.org/svn/reactos?rev=68183&view=rev
Log: [SHELL32] Add printer icons. By Lee Schroeder. CORE-9829 Added: trunk/reactos/dll/win32/shell32/res/icons/139.ico (with props) trunk/reactos/dll/win32/shell32/res/icons/140.ico (with props) trunk/reactos/dll/win32/shell32/res/icons/141.ico (with props) trunk/reactos/dll/win32/shell32/res/icons/168.ico (with props) trunk/reactos/dll/win32/shell32/res/icons/169.ico (with props) trunk/reactos/dll/win32/shell32/res/icons/170.ico (with props) Modified: trunk/reactos/dll/win32/shell32/icon_res.rc trunk/reactos/dll/win32/shell32/shresdef.h Modified: trunk/reactos/dll/win32/shell32/icon_res.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/icon_res…
============================================================================== --- trunk/reactos/dll/win32/shell32/icon_res.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/icon_res.rc [iso-8859-1] Thu Jun 18 10:48:00 2015 @@ -47,7 +47,9 @@ IDI_SHELL_OPEN_WITH ICON "res/icons/135.ico" IDI_SHELL_CONTROL_PANEL3 ICON "res/icons/137.ico" IDI_SHELL_PRINTER2 ICON "res/icons/138.ico" -/* TODO: 139.ico, 140.ico, 141.ico */ +IDI_SHELL_PRINTER_ADD ICON "res/icons/139.ico" +IDI_SHELL_NET_PRINTER ICON "res/icons/140.ico" +IDI_SHELL_FILE_PRINTER ICON "res/icons/141.ico" IDI_SHELL_TRASH_FILE ICON "res/icons/33.ico" //142 /* TODO 143.ico, 144,ico, 145.ico, 146.ico, 147.ico, 148.ico */ IDI_SHELL_INF_FILE ICON "res/icons/151.ico" @@ -62,7 +64,10 @@ IDI_SHELL_TOOLS_BACKUP ICON "res/icons/165.ico" IDI_SHELL_TOOLS_CHKDSK ICON "res/icons/166.ico" IDI_SHELL_TOOLS_DEFRAG ICON "res/icons/167.ico" -/* TODO: 168.ico, 169.ico, 170.ico, 171.ico */ +IDI_SHELL_PRINTER_OK ICON "res/icons/168.ico" +IDI_SHELL_NET_PRINTER_OK ICON "res/icons/169.ico" +IDI_SHELL_FILE_PRINTER_OK ICON "res/icons/170.ico" +/* TODO: 171.ico */ IDI_SHELL_NETWORK_FOLDER ICON "res/icons/172.ico" IDI_SHELL_FAVORITES2 ICON "res/icons/173.ico" IDI_SHELL_EXTENDED_PROPERTIES ICON "res/icons/174.ico" Added: trunk/reactos/dll/win32/shell32/res/icons/139.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/res/icon…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/shell32/res/icons/139.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/shell32/res/icons/140.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/res/icon…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/shell32/res/icons/140.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/shell32/res/icons/141.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/res/icon…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/shell32/res/icons/141.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/shell32/res/icons/168.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/res/icon…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/shell32/res/icons/168.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/shell32/res/icons/169.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/res/icon…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/shell32/res/icons/169.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: trunk/reactos/dll/win32/shell32/res/icons/170.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/res/icon…
============================================================================== Binary file - no diff available. Propchange: trunk/reactos/dll/win32/shell32/res/icons/170.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Modified: trunk/reactos/dll/win32/shell32/shresdef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shresdef…
============================================================================== --- trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] Thu Jun 18 10:48:00 2015 @@ -363,7 +363,9 @@ #define IDI_SHELL_OPEN_WITH 135 #define IDI_SHELL_CONTROL_PANEL3 137 #define IDI_SHELL_PRINTER2 138 -/* TODO: 139.ico, 140.ico, 141.ico */ +#define IDI_SHELL_PRINTER_ADD 139 +#define IDI_SHELL_NET_PRINTER 140 +#define IDI_SHELL_FILE_PRINTER 141 #define IDI_SHELL_TRASH_FILE 142 /* TODO: 143.ico, 144,ico, 145.ico, 146.ico, 147.ico, 148.ico */ #define IDI_SHELL_INF_FILE 151 @@ -378,7 +380,10 @@ #define IDI_SHELL_TOOLS_BACKUP 165 #define IDI_SHELL_TOOLS_CHKDSK 166 #define IDI_SHELL_TOOLS_DEFRAG 167 -/* TODO: 168.ico, 169.ico, 170.ico, 171.ico */ +#define IDI_SHELL_PRINTER_OK 168 +#define IDI_SHELL_NET_PRINTER_OK 169 +#define IDI_SHELL_FILE_PRINTER_OK 170 +/* TODO: 171.ico */ #define IDI_SHELL_NETWORK_FOLDER 172 #define IDI_SHELL_FAVORITES2 173 #define IDI_SHELL_EXTENDED_PROPERTIES 174
9 years, 6 months
1
0
0
0
[gedmurphy] 68182: [DEVMGR] - In 'Devices by Connection, if a device has a problem, expand the treeview to to show that problem device. - Add a missing break in WM_COMMAND to stop the app from clos...
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Thu Jun 18 10:26:30 2015 New Revision: 68182 URL:
http://svn.reactos.org/svn/reactos?rev=68182&view=rev
Log: [DEVMGR] - In 'Devices by Connection, if a device has a problem, expand the treeview to to show that problem device. - Add a missing break in WM_COMMAND to stop the app from closing - Fix clearing the lists Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/D…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp [iso-8859-1] Thu Jun 18 10:26:30 2015 @@ -570,37 +570,37 @@ bool CDeviceView::ListDevicesByConnection() { - BOOL bSuccess; + bool bSuccess; // Start by adding the root node to the tree bSuccess = AddRootDevice(); if (bSuccess == false) return false; // Walk the device tree and add all the devices - RecurseChildDevices(m_RootDevInst, m_hTreeRoot); + (void)RecurseChildDevices(m_RootDevInst, m_hTreeRoot); // Expand the root item - (VOID)TreeView_Expand(m_hTreeView, + (void)TreeView_Expand(m_hTreeView, m_hTreeRoot, TVE_EXPAND); return true; } -VOID +bool CDeviceView::RecurseChildDevices( _In_ DEVINST ParentDevice, _In_ HTREEITEM hParentTreeItem ) { - HTREEITEM hDevItem = NULL; DEVINST Device; - BOOL bSuccess; + bool HasProblem = false; + bool bSuccess; // Check if the parent has any child devices if (GetChildDevice(ParentDevice, &Device) == FALSE) - return; + return true; // Get the cached device node CDeviceNode *DeviceNode; @@ -608,59 +608,82 @@ if (DeviceNode == NULL) { ATLASSERT(FALSE); - return; - } - - - // Check if this is a hidden device + return false; + } + + // Don't show hidden devices if not requested if ((m_ShowHidden == TRUE) || (!(DeviceNode->IsHidden()))) { - // Add this device to the tree under its parent - hDevItem = InsertIntoTreeView(hParentTreeItem, - DeviceNode); - - - if (hDevItem) - { - // Check if this child has any children itself - RecurseChildDevices(Device, hDevItem); - } - } - - - for (;;) - { - // Check if the parent device has anything at the same level - bSuccess = GetSiblingDevice(Device, &Device); - if (bSuccess == FALSE) break; - - DeviceNode = dynamic_cast<CDeviceNode *>(GetDeviceNode(Device)); - if (DeviceNode == NULL) - { - ATLASSERT(FALSE); - } - - // Check if this is a hidden device - if (DeviceNode->IsHidden()) - { - if (m_ShowHidden == FALSE) - continue; - } - // Add this device to the tree under its parent hDevItem = InsertIntoTreeView(hParentTreeItem, DeviceNode); if (hDevItem) { // Check if this child has any children itself - RecurseChildDevices(Device, hDevItem); - } + if (!RecurseChildDevices(Device, hDevItem)) + HasProblem = true; + } + + if (DeviceNode->HasProblem()) + { + HasProblem = true; + } + } + + + // Check for siblings + for (;;) + { + // Check if the parent device has anything at the same level + bSuccess = GetSiblingDevice(Device, &Device); + if (bSuccess == FALSE) break; + + DeviceNode = dynamic_cast<CDeviceNode *>(GetDeviceNode(Device)); + if (DeviceNode == NULL) + { + ATLASSERT(FALSE); + } + + // Check if this is a hidden device + if (DeviceNode->IsHidden()) + { + if (m_ShowHidden == FALSE) + continue; + } + + if (DeviceNode->HasProblem()) + { + HasProblem = true; + } + + // Add this device to the tree under its parent + hDevItem = InsertIntoTreeView(hParentTreeItem, + DeviceNode); + if (hDevItem) + { + // Check if this child has any children itself + if (!RecurseChildDevices(Device, hDevItem)) + HasProblem = true; + } + } (void)TreeView_SortChildren(m_hTreeView, hParentTreeItem, 0); + // Expand the class if it has a problem device + if (HasProblem == true) + { + (void)TreeView_Expand(m_hTreeView, + hParentTreeItem, + TVE_EXPAND); + } + + // If there was a problem, expand the ancestors + if (HasProblem) return false; + + return true; } bool @@ -860,29 +883,19 @@ void CDeviceView::EmptyLists() { - POSITION Pos; - CNode *Node; - - if (!m_ClassNodeList.IsEmpty()) - { - Pos = m_ClassNodeList.GetHeadPosition(); - do - { - Node = m_ClassNodeList.GetNext(Pos); - delete Node; - - } while (Pos != NULL); - } - - if (!m_DeviceNodeList.IsEmpty()) - { - Pos = m_DeviceNodeList.GetHeadPosition(); - do - { - Node = m_DeviceNodeList.GetNext(Pos); - delete Node; - - } while (Pos != NULL); + CClassNode *ClassNode; + CDeviceNode *DeviceNode; + + while (!m_ClassNodeList.IsEmpty()) + { + ClassNode = m_ClassNodeList.RemoveTail(); + delete ClassNode; + } + + while (!m_DeviceNodeList.IsEmpty()) + { + DeviceNode = m_DeviceNodeList.RemoveTail(); + delete DeviceNode; } } Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/D…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h [iso-8859-1] Thu Jun 18 10:26:30 2015 @@ -99,7 +99,7 @@ _Out_ HDEVINFO *hDevInfo ); - VOID RecurseChildDevices( + bool RecurseChildDevices( _In_ DEVINST ParentDevice, _In_ HTREEITEM hParentTreeItem ); Modified: trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/M…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp [iso-8859-1] Thu Jun 18 10:26:30 2015 @@ -509,6 +509,36 @@ break; } + case IDC_ENABLE_DRV: + { + MessageBox(m_hMainWnd, L"Not yet implemented", L"Enable Driver", MB_OK); + break; + } + + case IDC_DISABLE_DRV: + { + MessageBox(m_hMainWnd, L"Not yet implemented", L"Disable Driver", MB_OK); + break; + } + + case IDC_UPDATE_DRV: + { + MessageBox(m_hMainWnd, L"Not yet implemented", L"Update Driver", MB_OK); + break; + } + + case IDC_UNINSTALL_DRV: + { + MessageBox(m_hMainWnd, L"Not yet implemented", L"Uninstall Driver", MB_OK); + break; + } + + case IDC_ADD_HARDWARE: + { + MessageBox(m_hMainWnd, L"Not yet implemented", L"Add Hardware", MB_OK); + break; + } + case IDC_DEVBYTYPE: { RefreshView(DevicesByType); @@ -523,31 +553,18 @@ case IDC_SHOWHIDDEN: { - UINT CurCheckState, NewCheckState; - // Get the current state - CurCheckState = GetMenuState(m_hMenu, IDC_SHOWHIDDEN, MF_BYCOMMAND); - + UINT CurCheckState = GetMenuState(m_hMenu, IDC_SHOWHIDDEN, MF_BYCOMMAND); if (CurCheckState == MF_CHECKED) { - // Inform the device view of the change m_DeviceView->SetHiddenDevices(false); - NewCheckState = MF_UNCHECKED; + CheckMenuItem(m_hMenu, IDC_SHOWHIDDEN, MF_BYCOMMAND | MF_UNCHECKED); } else if (CurCheckState == MF_UNCHECKED) { m_DeviceView->SetHiddenDevices(true); - NewCheckState = MF_CHECKED; + CheckMenuItem(m_hMenu, IDC_SHOWHIDDEN, MF_BYCOMMAND | MF_CHECKED); } - else - { - ATLASSERT(FALSE); - break; - } - - // Set the new check state - CheckMenuItem(m_hMenu, IDC_SHOWHIDDEN, MF_BYCOMMAND | NewCheckState); - // Refresh the device view m_DeviceView->Refresh(m_DeviceView->GetCurrentView(), false, @@ -688,14 +705,16 @@ // Hand it off to the default message handler goto HandleDefaultMessage; } + break; } case WM_CLOSE: { // Destroy the main window DestroyWindow(hwnd); - } - break; + break; + } + case WM_DESTROY: {
9 years, 6 months
1
0
0
0
[hbelusca] 68181: [NTVDM]: Implement INT 10h, AX=1018/1019 "Set/Get PEL Mask".
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Jun 17 23:21:12 2015 New Revision: 68181 URL:
http://svn.reactos.org/svn/reactos?rev=68181&view=rev
Log: [NTVDM]: Implement INT 10h, AX=1018/1019 "Set/Get PEL Mask". Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/bios…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c [iso-8859-1] Wed Jun 17 23:21:12 2015 @@ -3358,6 +3358,20 @@ break; } + /* Set PEL Mask */ + case 0x18: + { + IOWriteB(VGA_DAC_MASK, getBL()); + break; + } + + /* Get PEL Mask */ + case 0x19: + { + setBL(IOReadB(VGA_DAC_MASK)); + break; + } + default: { DPRINT1("BIOS Palette Control Sub-command AL = 0x%02X NOT IMPLEMENTED\n",
9 years, 6 months
1
0
0
0
[gedmurphy] 68180: [DEVMGR] - Make class and device nodes polymorphic and move the code into separate files - Add an abstract base class which we attach to the listview nodes - Add double clicking ...
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Jun 17 21:26:42 2015 New Revision: 68180 URL:
http://svn.reactos.org/svn/reactos?rev=68180&view=rev
Log: [DEVMGR] - Make class and device nodes polymorphic and move the code into separate files - Add an abstract base class which we attach to the listview nodes - Add double clicking of nodes Added: trunk/reactos/dll/win32/devmgr/devmgmt/ClassNode.cpp (with props) trunk/reactos/dll/win32/devmgr/devmgmt/ClassNode.h (with props) trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.cpp (with props) trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.h (with props) Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp trunk/reactos/dll/win32/devmgr/devmgmt/Node.cpp trunk/reactos/dll/win32/devmgr/devmgmt/Node.h Added: trunk/reactos/dll/win32/devmgr/devmgmt/ClassNode.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/C…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/ClassNode.cpp (added) +++ trunk/reactos/dll/win32/devmgr/devmgmt/ClassNode.cpp [iso-8859-1] Wed Jun 17 21:26:42 2015 @@ -0,0 +1,170 @@ +/* +* PROJECT: ReactOS Device Manager +* LICENSE: GPL - See COPYING in the top level directory +* FILE: dll/win32/devmgr/devmgr/ClassNode.cpp +* PURPOSE: Class object for +* COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy(a)reactos.org> +* +*/ + +#include "stdafx.h" +#include "devmgmt.h" +#include "ClassNode.h" + + +CClassNode::CClassNode( + _In_ LPGUID ClassGuid, + _In_ PSP_CLASSIMAGELIST_DATA ImageListData + ) : + CNode(ImageListData) +{ + CopyMemory(&m_ClassGuid, ClassGuid, sizeof(GUID)); +} + + +CClassNode::~CClassNode() +{ +} + + +bool +CClassNode::SetupNode() +{ + DWORD RequiredSize, Type, Size; + DWORD Success; + HKEY hKey; + + // Open the registry key for this class + hKey = SetupDiOpenClassRegKeyExW(&m_ClassGuid, + MAXIMUM_ALLOWED, + DIOCR_INSTALLER, + NULL, + 0); + if (hKey != INVALID_HANDLE_VALUE) + { + Size = DISPLAY_NAME_LEN; + Type = REG_SZ; + + // Lookup the class description (win7+) + Success = RegQueryValueExW(hKey, + L"ClassDesc", + NULL, + &Type, + (LPBYTE)m_DisplayName, + &Size); + if (Success == ERROR_SUCCESS) + { + // Check if the string starts with an @ + if (m_DisplayName[0] == L'@') + { + // The description is located in a module resource + Success = ConvertResourceDescriptorToString(m_DisplayName, DISPLAY_NAME_LEN); + } + } + else if (Success == ERROR_FILE_NOT_FOUND) + { + // WinXP stores the description in the default value + Success = RegQueryValueExW(hKey, + NULL, + NULL, + &Type, + (LPBYTE)m_DisplayName, + &Size); + } + + // Close the registry key + RegCloseKey(hKey); + } + else + { + Success = GetLastError(); + } + + // Check if we failed to get the class description + if (Success != ERROR_SUCCESS) + { + // Use the class name as the description + RequiredSize = DISPLAY_NAME_LEN; + (VOID)SetupDiClassNameFromGuidW(&m_ClassGuid, + m_DisplayName, + RequiredSize, + &RequiredSize); + } + + // Get the image index for this class + (VOID)SetupDiGetClassImageIndex(m_ImageListData, + &m_ClassGuid, + &m_ClassImage); + + return true; +} + + +DWORD +CClassNode::ConvertResourceDescriptorToString( + _Inout_z_ LPWSTR ResourceDescriptor, + _In_ DWORD ResourceDescriptorSize + ) +{ + WCHAR ModulePath[MAX_PATH]; + WCHAR ResString[256]; + INT ResourceId; + HMODULE hModule; + LPWSTR ptr; + DWORD Size; + DWORD dwError; + + + // First check for a semi colon */ + ptr = wcschr(ResourceDescriptor, L';'); + if (ptr) + { + // This must be an inf based descriptor, the desc is after the semi colon + wcscpy_s(ResourceDescriptor, ResourceDescriptorSize, ++ptr); + dwError = ERROR_SUCCESS; + } + else + { + // This must be a dll resource based descriptor. Find the comma + ptr = wcschr(ResourceDescriptor, L','); + if (ptr == NULL) return ERROR_INVALID_DATA; + + // Terminate the string where the comma was + *ptr = UNICODE_NULL; + + // Expand any environment strings + Size = ExpandEnvironmentStringsW(&ResourceDescriptor[1], ModulePath, MAX_PATH); + if (Size > MAX_PATH) return ERROR_BUFFER_OVERFLOW; + if (Size == 0) return GetLastError(); + + // Put the comma back and move past it + *ptr = L','; + ptr++; + + // Load the dll + hModule = LoadLibraryExW(ModulePath, NULL, LOAD_LIBRARY_AS_DATAFILE); + if (hModule == NULL) return GetLastError(); + + // Convert the resource id to a number + ResourceId = _wtoi(ptr); + + // If the number is negative, make it positive + if (ResourceId < 0) ResourceId = -ResourceId; + + // Load the string from the dll + if (LoadStringW(hModule, ResourceId, ResString, 256)) + { + wcscpy_s(ResourceDescriptor, ResourceDescriptorSize, ResString); + dwError = ERROR_SUCCESS; + } + else + { + dwError = GetLastError(); + } + + // Free the library + FreeLibrary(hModule); + } + + return dwError; +} Propchange: trunk/reactos/dll/win32/devmgr/devmgmt/ClassNode.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/devmgr/devmgmt/ClassNode.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/C…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/ClassNode.h (added) +++ trunk/reactos/dll/win32/devmgr/devmgmt/ClassNode.h [iso-8859-1] Wed Jun 17 21:26:42 2015 @@ -0,0 +1,24 @@ +#pragma once +#include "Node.h" + +class CClassNode : public CNode +{ +public: + + CClassNode( + _In_ LPGUID ClassGuid, + _In_ PSP_CLASSIMAGELIST_DATA ImageListData + ); + + ~CClassNode(); + + virtual bool SetupNode(); + +private: + + DWORD ConvertResourceDescriptorToString( + _Inout_z_ LPWSTR ResourceDescriptor, + _In_ DWORD ResourceDescriptorSize + ); +}; + Propchange: trunk/reactos/dll/win32/devmgr/devmgmt/ClassNode.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/D…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.cpp (added) +++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.cpp [iso-8859-1] Wed Jun 17 21:26:42 2015 @@ -0,0 +1,233 @@ +/* +* PROJECT: ReactOS Device Manager +* LICENSE: GPL - See COPYING in the top level directory +* FILE: dll/win32/devmgr/devmgr/ClassNode.cpp +* PURPOSE: Class object for +* COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy(a)reactos.org> +* +*/ + +#include "stdafx.h" +#include "devmgmt.h" +#include "DeviceNode.h" + + +CDeviceNode::CDeviceNode( + _In_opt_ DEVINST Device, + _In_ PSP_CLASSIMAGELIST_DATA ImageListData + ) : + CNode(ImageListData), + m_DevInst(Device), + m_Status(0), + m_ProblemNumber(0), + m_OverlayImage(0) +{ +} + +CDeviceNode::~CDeviceNode() +{ +} + +bool +CDeviceNode::SetupNode() +{ + WCHAR ClassGuidString[MAX_GUID_STRING_LEN]; + ULONG ulLength; + CONFIGRET cr; + + // ATLASSERT(m_DeviceId == NULL); + + // Get the length of the device id string + cr = CM_Get_Device_ID_Size(&ulLength, m_DevInst, 0); + if (cr == CR_SUCCESS) + { + // We alloc heap here because this will be stored in the lParam of the TV + m_DeviceId = (LPWSTR)HeapAlloc(GetProcessHeap(), + 0, + (ulLength + 1) * sizeof(WCHAR)); + if (m_DeviceId) + { + // Now get the actual device id + cr = CM_Get_Device_IDW(m_DevInst, + m_DeviceId, + ulLength + 1, + 0); + if (cr != CR_SUCCESS) + { + HeapFree(GetProcessHeap(), 0, m_DeviceId); + m_DeviceId = NULL; + } + } + } + + // Make sure we got the string + if (m_DeviceId == NULL) + return false; + + // Get the current status of the device + cr = CM_Get_DevNode_Status_Ex(&m_Status, + &m_ProblemNumber, + m_DevInst, + 0, + NULL); + if (cr != CR_SUCCESS) + { + HeapFree(GetProcessHeap(), 0, m_DeviceId); + m_DeviceId = NULL; + return false; + } + + // Check if the device has a problem + if (m_Status & DN_HAS_PROBLEM) + { + m_OverlayImage = 1; + } + + // The disabled overlay takes precidence over the problem overlay + if (m_ProblemNumber & (CM_PROB_DISABLED | CM_PROB_HARDWARE_DISABLED)) + { + m_OverlayImage = 2; + } + + + // Get the class guid for this device + ulLength = MAX_GUID_STRING_LEN * sizeof(WCHAR); + cr = CM_Get_DevNode_Registry_PropertyW(m_DevInst, + CM_DRP_CLASSGUID, + NULL, + ClassGuidString, + &ulLength, + 0); + if (cr == CR_SUCCESS) + { + // Convert the string to a proper guid + CLSIDFromString(ClassGuidString, &m_ClassGuid); + } + else + { + // It's a device with no driver + m_ClassGuid = GUID_DEVCLASS_UNKNOWN; + } + + + // Get the image for the class this device is in + SetupDiGetClassImageIndex(m_ImageListData, + &m_ClassGuid, + &m_ClassImage); + + // Get the description for the device + ulLength = DISPLAY_NAME_LEN * sizeof(WCHAR); + cr = CM_Get_DevNode_Registry_PropertyW(m_DevInst, + CM_DRP_FRIENDLYNAME, + NULL, + m_DisplayName, + &ulLength, + 0); + if (cr != CR_SUCCESS) + { + ulLength = DISPLAY_NAME_LEN * sizeof(WCHAR); + cr = CM_Get_DevNode_Registry_PropertyW(m_DevInst, + CM_DRP_DEVICEDESC, + NULL, + m_DisplayName, + &ulLength, + 0); + + } + + // Cleanup if something failed + if (cr != CR_SUCCESS) + { + HeapFree(GetProcessHeap(), 0, m_DeviceId); + m_DeviceId = NULL; + } + + return (cr == CR_SUCCESS ? true : false); +} + + +bool +CDeviceNode::IsHidden() +{ + CONFIGRET cr; + cr = CM_Get_DevNode_Status_Ex(&m_Status, + &m_ProblemNumber, + m_DevInst, + 0, + NULL); + if (cr == CR_SUCCESS) + { + return ((m_Status & DN_NO_SHOW_IN_DM) != 0); + } + + return false; +} + +bool +CDeviceNode::CanDisable() +{ + CONFIGRET cr; + cr = CM_Get_DevNode_Status_Ex(&m_Status, + &m_ProblemNumber, + m_DevInst, + 0, + NULL); + if (cr == CR_SUCCESS) + { + return ((m_Status & DN_DISABLEABLE) != 0); + } + + return false; +} + +bool +CDeviceNode::IsDisabled() +{ + CONFIGRET cr; + cr = CM_Get_DevNode_Status_Ex(&m_Status, + &m_ProblemNumber, + m_DevInst, + 0, + NULL); + if (cr == CR_SUCCESS) + { + return ((m_ProblemNumber & (CM_PROB_DISABLED | CM_PROB_HARDWARE_DISABLED)) != 0); + } + + return false; +} + +bool +CDeviceNode::IsStarted() +{ + CONFIGRET cr; + cr = CM_Get_DevNode_Status_Ex(&m_Status, + &m_ProblemNumber, + m_DevInst, + 0, + NULL); + if (cr == CR_SUCCESS) + { + return ((m_Status & DN_STARTED) != 0); + } + + return false; +} + +bool +CDeviceNode::IsInstalled() +{ + CONFIGRET cr; + cr = CM_Get_DevNode_Status_Ex(&m_Status, + &m_ProblemNumber, + m_DevInst, + 0, + NULL); + if (cr == CR_SUCCESS) + { + return ((m_Status & DN_HAS_PROBLEM) != 0 || + (m_Status & (DN_DRIVER_LOADED | DN_STARTED)) != 0); + } + + return false; +} Propchange: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/D…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.h (added) +++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.h [iso-8859-1] Wed Jun 17 21:26:42 2015 @@ -0,0 +1,34 @@ +#pragma once +#include "Node.h" + +class CDeviceNode : public CNode +{ +private: + DEVINST m_DevInst; + ULONG m_Status; + ULONG m_ProblemNumber; + int m_OverlayImage; + +public: + CDeviceNode( + _In_opt_ DEVINST Device, + _In_ PSP_CLASSIMAGELIST_DATA ImageListData + ); + + ~CDeviceNode(); + + virtual bool SetupNode(); + + DEVINST GetDeviceInst() { return m_DevInst; } + int GetOverlayImage() { return m_OverlayImage; } + + bool HasProblem() { return !!(m_ProblemNumber); } + bool IsHidden(); + bool CanDisable(); + bool IsDisabled(); + bool IsStarted(); + bool IsInstalled(); + bool CanInstall() { return TRUE; } // unimplemented + bool CanUninstall() { return TRUE; } // unimplemented +}; + Propchange: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/D…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp [iso-8859-1] Wed Jun 17 21:26:42 2015 @@ -1,11 +1,11 @@ /* -* PROJECT: ReactOS Device Manager -* LICENSE: GPL - See COPYING in the top level directory -* FILE: dll/win32/devmgr/devmgr/DeviceView.cpp -* PURPOSE: Implements the tree view which contains the devices -* COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy(a)reactos.org> -* -*/ + * PROJECT: ReactOS Device Manager + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll/win32/devmgr/devmgr/DeviceView.cpp + * PURPOSE: Implements the tree view which contains the devices + * COPYRIGHT: Copyright 2015 Ged Murphy <gedmurphy(a)reactos.org> + */ + #include "stdafx.h" @@ -13,10 +13,11 @@ #include "DeviceView.h" -/* DATA *********************************************/ +// DATA ********************************************/ #define CLASS_NAME_LEN 256 #define CLASS_DESC_LEN 256 +#define ROOT_NAME_SIZE MAX_COMPUTERNAME_LENGTH + 1 INT_PTR WINAPI @@ -38,7 +39,7 @@ }; -/* PUBLIC METHODS *************************************/ +// PUBLIC METHODS ************************************/ CDeviceView::CDeviceView( HWND hMainWnd @@ -269,7 +270,7 @@ _In_ LPTV_ITEMW TvItem ) { - CNode *Node = GetNode(TvItem); + CDeviceNode *Node = dynamic_cast<CDeviceNode *>(GetNode(TvItem)); if (Node) { return Node->IsDisabled(); @@ -282,16 +283,16 @@ _In_ LPTV_ITEMW TvItem ) { - CNode *Node = GetNode(TvItem); + CDeviceNode *Node = dynamic_cast<CDeviceNode *>(GetNode(TvItem)); if (Node) { - return Node->CanDisable(); + Node->CanDisable(); } return false; } -/* PRIVATE METHODS ********************************************/ +// PRIVATE METHODS *******************************************/ bool CDeviceView::AddRootDevice() @@ -312,7 +313,7 @@ DeleteObject(hRootImage); } - /* Get the root instance */ + // Get the root instance CONFIGRET cr; cr = CM_Locate_DevNodeW(&m_RootDevInst, NULL, @@ -322,7 +323,7 @@ return false; } - /* The root name is the computer name */ + // The root name is the computer name WCHAR RootDeviceName[ROOT_NAME_SIZE]; DWORD Size = ROOT_NAME_SIZE; if (GetComputerNameW(RootDeviceName, &Size)) @@ -425,7 +426,8 @@ bool CDeviceView::ListDevicesByType() { - CNode *ClassNode, *DeviceNode; + CClassNode *ClassNode; + CDeviceNode *DeviceNode; HDEVINFO hDevInfo; HTREEITEM hTreeItem = NULL; GUID ClassGuid; @@ -574,10 +576,10 @@ bSuccess = AddRootDevice(); if (bSuccess == false) return false; - /* Walk the device tree and add all the devices */ + // Walk the device tree and add all the devices RecurseChildDevices(m_RootDevInst, m_hTreeRoot); - /* Expand the root item */ + // Expand the root item (VOID)TreeView_Expand(m_hTreeView, m_hTreeRoot, TVE_EXPAND); @@ -596,13 +598,13 @@ DEVINST Device; BOOL bSuccess; - /* Check if the parent has any child devices */ + // Check if the parent has any child devices if (GetChildDevice(ParentDevice, &Device) == FALSE) return; // Get the cached device node - CNode *DeviceNode; - DeviceNode = GetDeviceNode(Device); + CDeviceNode *DeviceNode; + DeviceNode = dynamic_cast<CDeviceNode *>(GetDeviceNode(Device)); if (DeviceNode == NULL) { ATLASSERT(FALSE); @@ -610,17 +612,17 @@ } - /* Check if this is a hidden device */ + // Check if this is a hidden device if ((m_ShowHidden == TRUE) || (!(DeviceNode->IsHidden()))) { - /* Add this device to the tree under its parent */ + // Add this device to the tree under its parent hDevItem = InsertIntoTreeView(hParentTreeItem, DeviceNode); if (hDevItem) { - /* Check if this child has any children itself */ + // Check if this child has any children itself RecurseChildDevices(Device, hDevItem); } } @@ -628,29 +630,29 @@ for (;;) { - /* Check if the parent device has anything at the same level */ + // Check if the parent device has anything at the same level bSuccess = GetSiblingDevice(Device, &Device); if (bSuccess == FALSE) break; - DeviceNode = GetDeviceNode(Device); + DeviceNode = dynamic_cast<CDeviceNode *>(GetDeviceNode(Device)); if (DeviceNode == NULL) { ATLASSERT(FALSE); } - /* Check if this is a hidden device */ + // Check if this is a hidden device if (DeviceNode->IsHidden()) { if (m_ShowHidden == FALSE) continue; } - /* Add this device to the tree under its parent */ + // Add this device to the tree under its parent hDevItem = InsertIntoTreeView(hParentTreeItem, DeviceNode); if (hDevItem) { - /* Check if this child has any children itself */ + // Check if this child has any children itself RecurseChildDevices(Device, hDevItem); } } @@ -709,11 +711,13 @@ tvi.iImage = Node->GetClassImage(); tvi.iSelectedImage = Node->GetClassImage(); - if (Node->GetOverlayImage()) + // try to cast it to a device node. This will only suceed if it's the correct type + CDeviceNode *DeviceNode = dynamic_cast<CDeviceNode *>(Node); + if (DeviceNode && DeviceNode->GetOverlayImage()) { tvi.mask |= TVIF_STATE; tvi.stateMask = TVIS_OVERLAYMASK; - tvi.state = INDEXTOOVERLAYMASK(Node->GetOverlayImage()); + tvi.state = INDEXTOOVERLAYMASK(DeviceNode->GetOverlayImage()); } tvins.item = tvi; @@ -763,7 +767,7 @@ // delete reinterpret_cast<CNode *>(tvItem.lParam); } - /* This node may have its own children */ + // This node may have its own children RecurseDeviceView(hItem); } } @@ -788,11 +792,11 @@ -CNode* +CClassNode* CDeviceView::GetClassNode(_In_ LPGUID ClassGuid) { POSITION Pos; - CNode *Node; + CClassNode *Node; Pos = m_ClassNodeList.GetHeadPosition(); @@ -812,11 +816,11 @@ return Node; } -CNode* +CDeviceNode* CDeviceView::GetDeviceNode(_In_ DEVINST Device) { POSITION Pos; - CNode *Node; + CDeviceNode *Node; Pos = m_DeviceNodeList.GetHeadPosition(); @@ -843,6 +847,7 @@ { return (CNode *)TvItem->lParam; } + return NULL; } CNode* CDeviceView::GetSelectedNode() @@ -885,7 +890,8 @@ CDeviceView::RefreshDeviceList() { GUID ClassGuid; - CNode *Node; + CClassNode *ClassNode; + CDeviceNode *DeviceNode; HDEVINFO hDevInfo; SP_DEVINFO_DATA DeviceInfoData; DWORD i; @@ -895,22 +901,24 @@ EmptyLists(); + // Loop through all the classes do { Success = GetNextClass(ClassIndex, &ClassGuid, &hDevInfo); if (Success) { - /* Create a new class node */ - Node = new CNode(&ClassGuid, &m_ImageListData); - if (Node->Setup()) + // Create a new class node and add it to the list + ClassNode = new CClassNode(&ClassGuid, &m_ImageListData); + if (ClassNode->SetupNode()) { - m_ClassNodeList.AddTail(Node); + m_ClassNodeList.AddTail(ClassNode); } } ClassIndex++; } while (Success); + // Get all the devices on the local machine hDevInfo = SetupDiGetClassDevsW(NULL, 0, 0, @@ -920,17 +928,20 @@ return false; } - + // loop though all the devices DeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA); for (i = 0;; i++) { + // Get the devinst for this device Success = SetupDiEnumDeviceInfo(hDevInfo, i, &DeviceInfoData); if (Success == FALSE) break; - - Node = new CNode(DeviceInfoData.DevInst, &m_ImageListData); - Node->Setup(); - m_DeviceNodeList.AddTail(Node); + // create a new device node and add it to the list + DeviceNode = new CDeviceNode(DeviceInfoData.DevInst, &m_ImageListData); + if (DeviceNode->SetupNode()) + { + m_DeviceNodeList.AddTail(DeviceNode); + } } SetupDiDestroyDeviceInfoList(hDevInfo); Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/D…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h [iso-8859-1] Wed Jun 17 21:26:42 2015 @@ -1,5 +1,6 @@ #pragma once -#include "Node.h" +#include "DeviceNode.h" +#include "ClassNode.h" enum ViewType { @@ -12,8 +13,8 @@ class CDeviceView { - CAtlList<CNode *> m_ClassNodeList; - CAtlList<CNode *> m_DeviceNodeList; + CAtlList<CClassNode *> m_ClassNodeList; + CAtlList<CDeviceNode *> m_DeviceNodeList; SP_CLASSIMAGELIST_DATA m_ImageListData; @@ -128,8 +129,8 @@ CNode* GetNode(_In_ LPTV_ITEMW TvItem); CNode* GetSelectedNode(); - CNode* GetClassNode(_In_ LPGUID ClassGuid); - CNode* GetDeviceNode(_In_ DEVINST Device); + CClassNode* GetClassNode(_In_ LPGUID ClassGuid); + CDeviceNode* GetDeviceNode(_In_ DEVINST Device); void EmptyLists(); }; Modified: trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/M…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/MainWindow.cpp [iso-8859-1] Wed Jun 17 21:26:42 2015 @@ -453,6 +453,13 @@ { LPNMTREEVIEW NmTreeView = (LPNMTREEVIEW)lParam; UpdateUiContext(&NmTreeView->itemNew); + break; + } + + case NM_DBLCLK: + { + LPNMTREEVIEW NmTreeView = (LPNMTREEVIEW)lParam; + m_DeviceView->DisplayPropertySheet(); break; } Modified: trunk/reactos/dll/win32/devmgr/devmgmt/Node.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/N…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/Node.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/Node.cpp [iso-8859-1] Wed Jun 17 21:26:42 2015 @@ -14,34 +14,12 @@ /* PUBLIC METHODS *******************************************/ -CNode::CNode(_In_ LPGUID ClassGuid, - _In_ PSP_CLASSIMAGELIST_DATA ImageListData) : +CNode::CNode(_In_ PSP_CLASSIMAGELIST_DATA ImageListData) : m_ImageListData(ImageListData), - m_NodeType(NodeClass), - m_DevInst(0), m_DeviceId(NULL), - m_ClassImage(0), - m_Status(0), - m_ProblemNumber(0), - m_OverlayImage(0) + m_ClassImage(0) { m_DisplayName[0] = UNICODE_NULL; - CopyMemory(&m_ClassGuid, ClassGuid, sizeof(GUID)); -} - -CNode::CNode(_In_opt_ DEVINST Device, - _In_ PSP_CLASSIMAGELIST_DATA ImageListData) : - m_ImageListData(ImageListData), - m_NodeType(NodeDevice), - m_DevInst(Device), - m_DeviceId(NULL), - m_ClassImage(0), - m_Status(0), - m_ProblemNumber(0), - m_OverlayImage(0) -{ - m_DisplayName[0] = UNICODE_NULL; - CopyMemory(&m_ClassGuid, &GUID_NULL, sizeof(GUID)); } CNode::~CNode() @@ -49,306 +27,9 @@ Cleanup(); } -bool -CNode::Setup() -{ - // TODO: Make this polymorphic - - if (m_NodeType == NodeClass) - { - return SetupClassNode(); - } - else if (m_NodeType == NodeDevice) - { - return SetupDeviceNode(); - } - - return FALSE; -} - -bool -CNode::HasProperties() -{ - return (m_DeviceId != NULL); -} - -bool -CNode::IsHidden() -{ - CONFIGRET cr; - cr = CM_Get_DevNode_Status_Ex(&m_Status, - &m_ProblemNumber, - m_DevInst, - 0, - NULL); - if (cr == CR_SUCCESS) - { - return ((m_Status & DN_NO_SHOW_IN_DM) != 0); - } - - return false; -} - -bool -CNode::CanDisable() -{ - CONFIGRET cr; - cr = CM_Get_DevNode_Status_Ex(&m_Status, - &m_ProblemNumber, - m_DevInst, - 0, - NULL); - if (cr == CR_SUCCESS) - { - return (m_NodeType == NodeDevice && ((m_Status & DN_DISABLEABLE) != 0)); - } - - return false; -} - -bool -CNode::IsDisabled() -{ - CONFIGRET cr; - cr = CM_Get_DevNode_Status_Ex(&m_Status, - &m_ProblemNumber, - m_DevInst, - 0, - NULL); - if (cr == CR_SUCCESS) - { - return ((m_ProblemNumber & (CM_PROB_DISABLED | CM_PROB_HARDWARE_DISABLED)) != 0); - } - - return false; -} - -bool -CNode::IsStarted() -{ - CONFIGRET cr; - cr = CM_Get_DevNode_Status_Ex(&m_Status, - &m_ProblemNumber, - m_DevInst, - 0, - NULL); - if (cr == CR_SUCCESS) - { - return ((m_Status & DN_STARTED) != 0); - } - - return false; -} - -bool -CNode::IsInstalled() -{ - CONFIGRET cr; - cr = CM_Get_DevNode_Status_Ex(&m_Status, - &m_ProblemNumber, - m_DevInst, - 0, - NULL); - if (cr == CR_SUCCESS) - { - return ((m_Status & DN_HAS_PROBLEM) != 0 || - (m_Status & (DN_DRIVER_LOADED | DN_STARTED)) != 0); - } - - return false; -} - /* PRIVATE METHODS ******************************************/ -bool -CNode::SetupClassNode() -{ - DWORD RequiredSize, Type, Size; - DWORD Success; - HKEY hKey; - - // Open the registry key for this class - hKey = SetupDiOpenClassRegKeyExW(&m_ClassGuid, - MAXIMUM_ALLOWED, - DIOCR_INSTALLER, - NULL, - 0); - if (hKey != INVALID_HANDLE_VALUE) - { - Size = DISPLAY_NAME_LEN; - Type = REG_SZ; - - // Lookup the class description (win7+) - Success = RegQueryValueExW(hKey, - L"ClassDesc", - NULL, - &Type, - (LPBYTE)m_DisplayName, - &Size); - if (Success == ERROR_SUCCESS) - { - // Check if the string starts with an @ - if (m_DisplayName[0] == L'@') - { - // The description is located in a module resource - Success = ConvertResourceDescriptorToString(m_DisplayName, DISPLAY_NAME_LEN); - } - } - else if (Success == ERROR_FILE_NOT_FOUND) - { - // WinXP stores the description in the default value - Success = RegQueryValueExW(hKey, - NULL, - NULL, - &Type, - (LPBYTE)m_DisplayName, - &Size); - } - - // Close the registry key - RegCloseKey(hKey); - } - else - { - Success = GetLastError(); - } - - // Check if we failed to get the class description - if (Success != ERROR_SUCCESS) - { - // Use the class name as the description - RequiredSize = DISPLAY_NAME_LEN; - (VOID)SetupDiClassNameFromGuidW(&m_ClassGuid, - m_DisplayName, - RequiredSize, - &RequiredSize); - } - - // Get the image index for this class - (VOID)SetupDiGetClassImageIndex(m_ImageListData, - &m_ClassGuid, - &m_ClassImage); - - return true; -} - -bool -CNode::SetupDeviceNode() -{ - WCHAR ClassGuidString[MAX_GUID_STRING_LEN]; - ULONG ulLength; - CONFIGRET cr; - -// ATLASSERT(m_DeviceId == NULL); - - // Get the length of the device id string - cr = CM_Get_Device_ID_Size(&ulLength, m_DevInst, 0); - if (cr == CR_SUCCESS) - { - // We alloc heap here because this will be stored in the lParam of the TV - m_DeviceId = (LPWSTR)HeapAlloc(GetProcessHeap(), - 0, - (ulLength + 1) * sizeof(WCHAR)); - if (m_DeviceId) - { - // Now get the actual device id - cr = CM_Get_Device_IDW(m_DevInst, - m_DeviceId, - ulLength + 1, - 0); - if (cr != CR_SUCCESS) - { - HeapFree(GetProcessHeap(), 0, m_DeviceId); - m_DeviceId = NULL; - } - } - } - - // Make sure we got the string - if (m_DeviceId == NULL) - return false; - - // Get the current status of the device - cr = CM_Get_DevNode_Status_Ex(&m_Status, - &m_ProblemNumber, - m_DevInst, - 0, - NULL); - if (cr != CR_SUCCESS) - { - HeapFree(GetProcessHeap(), 0, m_DeviceId); - m_DeviceId = NULL; - return false; - } - - // Check if the device has a problem - if (m_Status & DN_HAS_PROBLEM) - { - m_OverlayImage = 1; - } - - // The disabled overlay takes precidence over the problem overlay - if (m_ProblemNumber & (CM_PROB_DISABLED | CM_PROB_HARDWARE_DISABLED)) - { - m_OverlayImage = 2; - } - - - // Get the class guid for this device - ulLength = MAX_GUID_STRING_LEN * sizeof(WCHAR); - cr = CM_Get_DevNode_Registry_PropertyW(m_DevInst, - CM_DRP_CLASSGUID, - NULL, - ClassGuidString, - &ulLength, - 0); - if (cr == CR_SUCCESS) - { - // Convert the string to a proper guid - CLSIDFromString(ClassGuidString, &m_ClassGuid); - } - else - { - // It's a device with no driver - m_ClassGuid = GUID_DEVCLASS_UNKNOWN; - } - - - // Get the image for the class this device is in - SetupDiGetClassImageIndex(m_ImageListData, - &m_ClassGuid, - &m_ClassImage); - - // Get the description for the device - ulLength = DISPLAY_NAME_LEN * sizeof(WCHAR); - cr = CM_Get_DevNode_Registry_PropertyW(m_DevInst, - CM_DRP_FRIENDLYNAME, - NULL, - m_DisplayName, - &ulLength, - 0); - if (cr != CR_SUCCESS) - { - ulLength = DISPLAY_NAME_LEN * sizeof(WCHAR); - cr = CM_Get_DevNode_Registry_PropertyW(m_DevInst, - CM_DRP_DEVICEDESC, - NULL, - m_DisplayName, - &ulLength, - 0); - - } - - // Cleanup if something failed - if (cr != CR_SUCCESS) - { - HeapFree(GetProcessHeap(), 0, m_DeviceId); - m_DeviceId = NULL; - } - - return (cr == CR_SUCCESS ? true : false); -} void CNode::Cleanup() @@ -359,72 +40,3 @@ m_DeviceId = NULL; } } - -DWORD -CNode::ConvertResourceDescriptorToString( - _Inout_z_ LPWSTR ResourceDescriptor, - _In_ DWORD ResourceDescriptorSize -) -{ - WCHAR ModulePath[MAX_PATH]; - WCHAR ResString[256]; - INT ResourceId; - HMODULE hModule; - LPWSTR ptr; - DWORD Size; - DWORD dwError; - - - // First check for a semi colon */ - ptr = wcschr(ResourceDescriptor, L';'); - if (ptr) - { - // This must be an inf based descriptor, the desc is after the semi colon - wcscpy_s(ResourceDescriptor, ResourceDescriptorSize, ++ptr); - dwError = ERROR_SUCCESS; - } - else - { - // This must be a dll resource based descriptor. Find the comma - ptr = wcschr(ResourceDescriptor, L','); - if (ptr == NULL) return ERROR_INVALID_DATA; - - // Terminate the string where the comma was - *ptr = UNICODE_NULL; - - // Expand any environment strings - Size = ExpandEnvironmentStringsW(&ResourceDescriptor[1], ModulePath, MAX_PATH); - if (Size > MAX_PATH) return ERROR_BUFFER_OVERFLOW; - if (Size == 0) return GetLastError(); - - // Put the comma back and move past it - *ptr = L','; - ptr++; - - // Load the dll - hModule = LoadLibraryExW(ModulePath, NULL, LOAD_LIBRARY_AS_DATAFILE); - if (hModule == NULL) return GetLastError(); - - // Convert the resource id to a number - ResourceId = _wtoi(ptr); - - // If the number is negative, make it positive - if (ResourceId < 0) ResourceId = -ResourceId; - - // Load the string from the dll - if (LoadStringW(hModule, ResourceId, ResString, 256)) - { - wcscpy_s(ResourceDescriptor, ResourceDescriptorSize, ResString); - dwError = ERROR_SUCCESS; - } - else - { - dwError = GetLastError(); - } - - // Free the library - FreeLibrary(hModule); - } - - return dwError; -} Modified: trunk/reactos/dll/win32/devmgr/devmgmt/Node.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/N…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgmt/Node.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/Node.h [iso-8859-1] Wed Jun 17 21:26:42 2015 @@ -1,78 +1,34 @@ #pragma once #define DISPLAY_NAME_LEN 256 -#define ROOT_NAME_SIZE MAX_COMPUTERNAME_LENGTH + 1 - -enum NodeType -{ - NodeClass, - NodeDevice -}; - -typedef ULONG Actions; -#define Update 0x01 -#define Enable 0x02 -#define Disable 0x04 -#define Uninstall 0x08 - class CNode { -private: +protected: PSP_CLASSIMAGELIST_DATA m_ImageListData; - NodeType m_NodeType; - DEVINST m_DevInst; - Actions m_Actions; LPWSTR m_DeviceId; WCHAR m_DisplayName[DISPLAY_NAME_LEN]; GUID m_ClassGuid; INT m_ClassImage; - ULONG m_Status; - ULONG m_ProblemNumber; - INT m_OverlayImage; public: CNode( - _In_ LPGUID ClassGuid, - _In_ PSP_CLASSIMAGELIST_DATA ImageListData - ); - - CNode( - _In_ DEVINST Device, _In_ PSP_CLASSIMAGELIST_DATA ImageListData ); ~CNode(); - bool Setup(); + virtual bool SetupNode() = 0; - LPGUID GetClassGuid() { return &m_ClassGuid; } - DEVINST GetDeviceInst() { return m_DevInst; } - + LPGUID GetClassGuid() { return &m_ClassGuid; } LPWSTR GetDisplayName() { return m_DisplayName; } INT GetClassImage() { return m_ClassImage; } - INT GetOverlayImage() { return m_OverlayImage; } LPWSTR GetDeviceId() { return m_DeviceId; } - Actions GetActions() { return m_Actions; } - bool HasProblem() { return !!(m_ProblemNumber); } - bool HasProperties(); - bool IsHidden(); - bool CanDisable(); - bool IsDisabled(); - bool IsStarted(); - bool IsInstalled(); - bool CanInstall() { return TRUE; } // unimplemented - bool CanUninstall() { return TRUE; } // unimplemented + bool HasProperties() { return (m_DeviceId != NULL); } private: - bool SetupClassNode(); - bool SetupDeviceNode(); void Cleanup(); - DWORD ConvertResourceDescriptorToString( - _Inout_z_ LPWSTR ResourceDescriptor, - _In_ DWORD ResourceDescriptorSize - ); };
9 years, 6 months
1
0
0
0
[pschweitzer] 68179: [CDFS] Don't attempt to complete an IRP that was took over by FsRtl. CORE-9777 #resolve #comment Fixed in r68179
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Wed Jun 17 20:33:08 2015 New Revision: 68179 URL:
http://svn.reactos.org/svn/reactos?rev=68179&view=rev
Log: [CDFS] Don't attempt to complete an IRP that was took over by FsRtl. CORE-9777 #resolve #comment Fixed in r68179 Modified: trunk/reactos/drivers/filesystems/cdfs/dirctl.c Modified: trunk/reactos/drivers/filesystems/cdfs/dirctl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/d…
============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/dirctl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/dirctl.c [iso-8859-1] Wed Jun 17 20:33:08 2015 @@ -751,7 +751,8 @@ static NTSTATUS CdfsNotifyChangeDirectory(PDEVICE_OBJECT DeviceObject, - PIRP Irp) + PIRP Irp, + PCDFS_IRP_CONTEXT IrpContext) { PDEVICE_EXTENSION DeviceExtension; PFCB Fcb; @@ -779,6 +780,9 @@ NULL, NULL); + /* We won't handle IRP completion */ + IrpContext->Flags &= ~IRPCONTEXT_COMPLETE; + return STATUS_PENDING; } @@ -809,7 +813,7 @@ case IRP_MN_NOTIFY_CHANGE_DIRECTORY: Status = CdfsNotifyChangeDirectory(DeviceObject, - Irp); + Irp, IrpContext); break; default:
9 years, 6 months
1
0
0
0
[akhaldi] 68178: [CDFS] Update the file paths in the header blocks. NFC
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Jun 17 20:27:52 2015 New Revision: 68178 URL:
http://svn.reactos.org/svn/reactos?rev=68178&view=rev
Log: [CDFS] Update the file paths in the header blocks. NFC Modified: trunk/reactos/drivers/filesystems/cdfs/cdfs.c trunk/reactos/drivers/filesystems/cdfs/cleanup.c trunk/reactos/drivers/filesystems/cdfs/close.c trunk/reactos/drivers/filesystems/cdfs/common.c trunk/reactos/drivers/filesystems/cdfs/create.c trunk/reactos/drivers/filesystems/cdfs/dirctl.c trunk/reactos/drivers/filesystems/cdfs/fcb.c trunk/reactos/drivers/filesystems/cdfs/finfo.c trunk/reactos/drivers/filesystems/cdfs/misc.c trunk/reactos/drivers/filesystems/cdfs/rw.c Modified: trunk/reactos/drivers/filesystems/cdfs/cdfs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/c…
============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/cdfs.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/cdfs.c [iso-8859-1] Wed Jun 17 20:27:52 2015 @@ -19,7 +19,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: drivers/fs/cdfs/cdfs.c + * FILE: drivers/filesystems/cdfs/cdfs.c * PURPOSE: CDROM (ISO 9660) filesystem driver * PROGRAMMER: Art Yerkes * Eric Kohl Modified: trunk/reactos/drivers/filesystems/cdfs/cleanup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/c…
============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/cleanup.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/cleanup.c [iso-8859-1] Wed Jun 17 20:27:52 2015 @@ -19,7 +19,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: services/fs/cdfs/cleanup.c + * FILE: drivers/filesystems/cdfs/cleanup.c * PURPOSE: CDROM (ISO 9660) filesystem driver * PROGRAMMER: * UPDATE HISTORY: Modified: trunk/reactos/drivers/filesystems/cdfs/close.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/c…
============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/close.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/close.c [iso-8859-1] Wed Jun 17 20:27:52 2015 @@ -19,7 +19,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: services/fs/cdfs/close.c + * FILE: drivers/filesystems/cdfs/close.c * PURPOSE: CDROM (ISO 9660) filesystem driver * PROGRAMMER: Art Yerkes * UPDATE HISTORY: Modified: trunk/reactos/drivers/filesystems/cdfs/common.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/c…
============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/common.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/common.c [iso-8859-1] Wed Jun 17 20:27:52 2015 @@ -19,7 +19,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: drivers/fs/cdfs/common.c + * FILE: drivers/filesystems/cdfs/common.c * PURPOSE: CDROM (ISO 9660) filesystem driver * PROGRAMMER: Art Yerkes * Eric Kohl Modified: trunk/reactos/drivers/filesystems/cdfs/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/c…
============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/create.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/create.c [iso-8859-1] Wed Jun 17 20:27:52 2015 @@ -19,7 +19,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: services/fs/cdfs/cdfs.c + * FILE: drivers/filesystems/cdfs/cdfs.c * PURPOSE: CDROM (ISO 9660) filesystem driver * PROGRAMMER: Art Yerkes * Eric Kohl Modified: trunk/reactos/drivers/filesystems/cdfs/dirctl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/d…
============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/dirctl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/dirctl.c [iso-8859-1] Wed Jun 17 20:27:52 2015 @@ -19,7 +19,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: services/fs/cdfs/dirctl.c + * FILE: drivers/filesystems/cdfs/dirctl.c * PURPOSE: CDROM (ISO 9660) filesystem driver * PROGRAMMER: Art Yerkes * Eric Kohl Modified: trunk/reactos/drivers/filesystems/cdfs/fcb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/f…
============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/fcb.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/fcb.c [iso-8859-1] Wed Jun 17 20:27:52 2015 @@ -19,7 +19,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: services/fs/cdfs/fcb.c + * FILE: drivers/filesystems/cdfs/fcb.c * PURPOSE: CDROM (ISO 9660) filesystem driver * PROGRAMMER: Art Yerkes * UPDATE HISTORY: Modified: trunk/reactos/drivers/filesystems/cdfs/finfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/f…
============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/finfo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/finfo.c [iso-8859-1] Wed Jun 17 20:27:52 2015 @@ -19,7 +19,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: services/fs/cdfs/finfo.c + * FILE: drivers/filesystems/cdfs/finfo.c * PURPOSE: CDROM (ISO 9660) filesystem driver * PROGRAMMER: Art Yerkes * Eric Kohl Modified: trunk/reactos/drivers/filesystems/cdfs/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/m…
============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/misc.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/misc.c [iso-8859-1] Wed Jun 17 20:27:52 2015 @@ -19,7 +19,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: services/fs/cdfs/misc.c + * FILE: drivers/filesystems/cdfs/misc.c * PURPOSE: CDROM (ISO 9660) filesystem driver * PROGRAMMER: Eric Kohl * UPDATE HISTORY: Modified: trunk/reactos/drivers/filesystems/cdfs/rw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/r…
============================================================================== --- trunk/reactos/drivers/filesystems/cdfs/rw.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/cdfs/rw.c [iso-8859-1] Wed Jun 17 20:27:52 2015 @@ -19,7 +19,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: drivers/fs/cdfs/rw.c + * FILE: drivers/filesystems/cdfs/rw.c * PURPOSE: CDROM (ISO 9660) filesystem driver * PROGRAMMER: Art Yerkes * Eric Kohl
9 years, 6 months
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
35
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
Results per page:
10
25
50
100
200