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
October 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
18 participants
347 discussions
Start a n
N
ew thread
[pschweitzer] 69667: [MSGINA] Don't leak memory CID 1206901
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sat Oct 24 09:39:20 2015 New Revision: 69667 URL:
http://svn.reactos.org/svn/reactos?rev=69667&view=rev
Log: [MSGINA] Don't leak memory CID 1206901 Modified: trunk/reactos/dll/win32/msgina/gui.c Modified: trunk/reactos/dll/win32/msgina/gui.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/gui.c?rev…
============================================================================== --- trunk/reactos/dll/win32/msgina/gui.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msgina/gui.c [iso-8859-1] Sat Oct 24 09:39:20 2015 @@ -1306,7 +1306,10 @@ BOOL res = FALSE; if (GetTextboxText(hwndDlg, IDC_USERNAME, &UserName) && *UserName == '\0') + { + HeapFree(GetProcessHeap(), 0, UserName); return FALSE; + } if (GetTextboxText(hwndDlg, IDC_PASSWORD, &Password)) {
9 years, 2 months
1
0
0
0
[pschweitzer] 69666: [MSCOREE] Backport Wine commit: 85d49c5819fb4494d9f81c56c3504bef5732b726 "Correct possible uninitialized variable (clang)." by Alistair Leslie-Hughes CID 215556
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sat Oct 24 09:36:16 2015 New Revision: 69666 URL:
http://svn.reactos.org/svn/reactos?rev=69666&view=rev
Log: [MSCOREE] Backport Wine commit: 85d49c5819fb4494d9f81c56c3504bef5732b726 "Correct possible uninitialized variable (clang)." by Alistair Leslie-Hughes CID 215556 Modified: trunk/reactos/dll/win32/mscoree/corruntimehost.c Modified: trunk/reactos/dll/win32/mscoree/corruntimehost.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscoree/corrunti…
============================================================================== --- trunk/reactos/dll/win32/mscoree/corruntimehost.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscoree/corruntimehost.c [iso-8859-1] Sat Oct 24 09:36:16 2015 @@ -1218,7 +1218,7 @@ WCHAR path[CHARS_IN_GUID + ARRAYSIZE(wszCLSIDSlash) + ARRAYSIZE(wszInprocServer32) - 1]; MonoDomain *domain; MonoAssembly *assembly; - ICLRRuntimeInfo *info; + ICLRRuntimeInfo *info = NULL; RuntimeHost *host; HRESULT hr; HKEY key;
9 years, 2 months
1
0
0
0
[pschweitzer] 69665: [LSASRV] Initialize pointers addresses before the first goto, to avoid uninit addresses handling CID 1206997, 1206998
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sat Oct 24 08:49:08 2015 New Revision: 69665 URL:
http://svn.reactos.org/svn/reactos?rev=69665&view=rev
Log: [LSASRV] Initialize pointers addresses before the first goto, to avoid uninit addresses handling CID 1206997, 1206998 Modified: trunk/reactos/dll/win32/lsasrv/authpackage.c Modified: trunk/reactos/dll/win32/lsasrv/authpackage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/authpacka…
============================================================================== --- trunk/reactos/dll/win32/lsasrv/authpackage.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/authpackage.c [iso-8859-1] Sat Oct 24 08:49:08 2015 @@ -1029,6 +1029,9 @@ for (i = 0; i < TokenInfo1->Groups->GroupCount; i++) SidArray.Sids[i + 1].SidPointer = TokenInfo1->Groups->Groups[i].Sid; + BuiltinMembership.Element = NULL; + AccountMembership.Element = NULL; + Status = SamIConnect(NULL, &ServerHandle, SAM_SERVER_CONNECT | SAM_SERVER_LOOKUP_DOMAIN, @@ -1059,7 +1062,6 @@ goto done; } - BuiltinMembership.Element = NULL; Status = SamrGetAliasMembership(BuiltinDomainHandle, &SidArray, &BuiltinMembership); @@ -1069,7 +1071,6 @@ goto done; } - AccountMembership.Element = NULL; Status = SamrGetAliasMembership(AccountDomainHandle, &SidArray, &AccountMembership);
9 years, 2 months
1
0
0
0
[pschweitzer] 69664: [KERNEL32] Don't pass uninit pointer address to CsrFreeCaptureBuffer() CID 1223181
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sat Oct 24 08:43:54 2015 New Revision: 69664 URL:
http://svn.reactos.org/svn/reactos?rev=69664&view=rev
Log: [KERNEL32] Don't pass uninit pointer address to CsrFreeCaptureBuffer() CID 1223181 Modified: trunk/reactos/dll/win32/kernel32/client/vdm.c Modified: trunk/reactos/dll/win32/kernel32/client/vdm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/client/vdm.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/vdm.c [iso-8859-1] Sat Oct 24 08:43:54 2015 @@ -101,7 +101,7 @@ { NTSTATUS Status; PBASE_CHECK_VDM CheckVdm = &ApiMessage->Data.CheckVDMRequest; - PCSR_CAPTURE_BUFFER CaptureBuffer; + PCSR_CAPTURE_BUFFER CaptureBuffer = NULL; PWCHAR CurrentDir = NULL; PWCHAR ShortAppName = NULL; PWCHAR ShortCurrentDir = NULL; @@ -517,7 +517,7 @@ if (AnsiReserved) RtlFreeHeap(RtlGetProcessHeap(), 0, AnsiReserved); /* Free the capture buffer */ - CsrFreeCaptureBuffer(CaptureBuffer); + if (CaptureBuffer) CsrFreeCaptureBuffer(CaptureBuffer); /* Free the current directory, if it was allocated here, and its short path */ if (ShortCurrentDir) RtlFreeHeap(RtlGetProcessHeap(), 0, ShortCurrentDir);
9 years, 2 months
1
0
0
0
[pschweitzer] 69663: [BROWSEUI] Use correct delete operator CID 1321947
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sat Oct 24 08:33:20 2015 New Revision: 69663 URL:
http://svn.reactos.org/svn/reactos?rev=69663&view=rev
Log: [BROWSEUI] Use correct delete operator CID 1321947 Modified: trunk/reactos/dll/win32/browseui/bandsitemenu.cpp Modified: trunk/reactos/dll/win32/browseui/bandsitemenu.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/bandsit…
============================================================================== --- trunk/reactos/dll/win32/browseui/bandsitemenu.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/bandsitemenu.cpp [iso-8859-1] Sat Oct 24 08:33:20 2015 @@ -63,7 +63,7 @@ ret = InsertMenuItemW(hmenu, 0, TRUE, &mii); - delete mii.dwTypeData; + delete[] mii.dwTypeData; RemoveMenu(hm, 0, MF_BYPOSITION);
9 years, 2 months
1
0
0
0
[pschweitzer] 69662: [DESK] Pass a buffer big enough to hold the drive size to _wsplitpath(). This fixes a buffer overrun. CID 1322097
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sat Oct 24 08:21:09 2015 New Revision: 69662 URL:
http://svn.reactos.org/svn/reactos?rev=69662&view=rev
Log: [DESK] Pass a buffer big enough to hold the drive size to _wsplitpath(). This fixes a buffer overrun. CID 1322097 Modified: trunk/reactos/dll/cpl/desk/desk.c Modified: trunk/reactos/dll/cpl/desk/desk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/desk.c?rev=69…
============================================================================== --- trunk/reactos/dll/cpl/desk/desk.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/desk/desk.c [iso-8859-1] Sat Oct 24 08:21:09 2015 @@ -219,7 +219,7 @@ IN UINT nCmdShow) { WCHAR pszSystemDir[MAX_PATH]; - WCHAR pszDrive[2]; + WCHAR pszDrive[3]; WCHAR pszPath[MAX_PATH]; WCHAR pszFilename[MAX_PATH]; WCHAR pszExt[MAX_PATH];
9 years, 2 months
1
0
0
0
[pschweitzer] 69661: [MSVCRT] Add a test that shows that _splitpath() null-terminates drive
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sat Oct 24 08:20:05 2015 New Revision: 69661 URL:
http://svn.reactos.org/svn/reactos?rev=69661&view=rev
Log: [MSVCRT] Add a test that shows that _splitpath() null-terminates drive Modified: trunk/rostests/apitests/msvcrt/splitpath.c Modified: trunk/rostests/apitests/msvcrt/splitpath.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/splitpath…
============================================================================== --- trunk/rostests/apitests/msvcrt/splitpath.c [iso-8859-1] (original) +++ trunk/rostests/apitests/msvcrt/splitpath.c [iso-8859-1] Sat Oct 24 08:20:05 2015 @@ -22,11 +22,13 @@ Major = (DWORD)(LOBYTE(LOWORD(GetVersion()))); + drive[2] = 0xFF; _splitpath("c:\\dir1\\dir2\\file.ext", drive, dir, fname, ext); ok_str(drive, "c:"); ok_str(dir, "\\dir1\\dir2\\"); ok_str(fname, "file"); ok_str(ext, ".ext"); + ok_int(drive[2], 0); *_errno() = 0; _splitpath("c:\\dir1\\dir2\\file.ext", 0, 0, 0, 0);
9 years, 2 months
1
0
0
0
[pschweitzer] 69660: [CONSOLE] Don't overrun two buffers CID 1322100, 1237057
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sat Oct 24 07:59:52 2015 New Revision: 69660 URL:
http://svn.reactos.org/svn/reactos?rev=69660&view=rev
Log: [CONSOLE] Don't overrun two buffers CID 1322100, 1237057 Modified: trunk/reactos/dll/cpl/console/font.c Modified: trunk/reactos/dll/cpl/console/font.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/console/font.c?rev…
============================================================================== --- trunk/reactos/dll/cpl/console/font.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/console/font.c [iso-8859-1] Sat Oct 24 07:59:52 2015 @@ -305,7 +305,7 @@ LB_GETTEXT, nSel, (LPARAM)FaceName); FaceName[Length] = '\0'; - Length = min(Length/*wcslen(FaceName) + 1*/, LF_FACESIZE); // wcsnlen + Length = min(Length/*wcslen(FaceName) + 1*/, LF_FACESIZE - 1); // wcsnlen wcsncpy(pConInfo->FaceName, FaceName, LF_FACESIZE); pConInfo->FaceName[Length] = L'\0'; DPRINT1("pConInfo->FaceName = '%S'\n", pConInfo->FaceName);
9 years, 2 months
1
0
0
0
[gedmurphy] 69659: [DEVMGR] - Force all refreshes to go through the CDeviceManager method instead of calling CDeviceView directly. - Fixes missing checked radio item in the view menu on startup
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Fri Oct 23 13:16:25 2015 New Revision: 69659 URL:
http://svn.reactos.org/svn/reactos?rev=69659&view=rev
Log: [DEVMGR] - Force all refreshes to go through the CDeviceManager method instead of calling CDeviceView directly. - Fixes missing checked radio item in the view menu on startup 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/MainWindow.h 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] Fri Oct 23 13:16:25 2015 @@ -188,8 +188,7 @@ CDeviceView::Refresh( _In_ ViewType Type, _In_ bool ScanForChanges, - _In_ bool UpdateView, - _In_opt_ LPWSTR DeviceId + _In_ bool UpdateView ) { // Enum devices on a seperate thread to keep the gui responsive @@ -230,8 +229,7 @@ { Refresh(GetCurrentView(), true, - true, - NULL); + true); break; } 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] Fri Oct 23 13:16:25 2015 @@ -60,8 +60,7 @@ VOID Refresh( _In_ ViewType Type, _In_ bool ScanForChanges, - _In_ bool UpdateView, - _In_opt_ LPWSTR DeviceId + _In_ bool UpdateView ); VOID DisplayPropertySheet(); 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] Fri Oct 23 13:16:25 2015 @@ -245,12 +245,13 @@ } bool -CDeviceManager::RefreshView(_In_ ViewType Type) +CDeviceManager::RefreshView(_In_ ViewType Type, + _In_ bool ScanForChanges) { UINT CheckId = 0; // Refreshed the cached view - m_DeviceView->Refresh(Type, FALSE, TRUE, NULL); + m_DeviceView->Refresh(Type, ScanForChanges, true); // Get the menu item id switch (Type) @@ -437,10 +438,7 @@ if (m_DeviceView->Initialize()) { // Do the initial scan - m_DeviceView->Refresh(m_DeviceView->GetCurrentView(), - true, - true, - NULL); + RefreshView(m_DeviceView->GetCurrentView(), true); // Display the window according to the user request ShowWindow(hwnd, m_CmdShow); @@ -608,13 +606,13 @@ case IDC_DEVBYTYPE: { - RefreshView(DevicesByType); + RefreshView(DevicesByType, false); break; } case IDC_DEVBYCONN: { - RefreshView(DevicesByConnection); + RefreshView(DevicesByConnection, false); break; } @@ -633,10 +631,7 @@ CheckMenuItem(m_hMenu, IDC_SHOWHIDDEN, MF_BYCOMMAND | MF_CHECKED); } // Refresh the device view - m_DeviceView->Refresh(m_DeviceView->GetCurrentView(), - false, - true, - NULL); + RefreshView(m_DeviceView->GetCurrentView(), false); break; } @@ -798,10 +793,7 @@ if (wParam == REFRESH_TIMER) { // Schedule a refresh (this just creates a thread and returns) - This->m_DeviceView->Refresh(This->m_DeviceView->GetCurrentView(), - true, - true, - NULL); + This->RefreshView(This->m_DeviceView->GetCurrentView(), true); // Cleanup the timer KillTimer(hwnd, REFRESH_TIMER); 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] Fri Oct 23 13:16:25 2015 @@ -90,7 +90,8 @@ ); bool RefreshView( - _In_ ViewType Type + _In_ ViewType Type, + _In_ bool ScanForChanges ); };
9 years, 2 months
1
0
0
0
[gedmurphy] 69658: [DEVMGR] - When refreshing the view, reselect and expand the previously selected node in the tree. This allows to switch from 'by type' to 'by connection' and see where the selec...
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Fri Oct 23 12:45:41 2015 New Revision: 69658 URL:
http://svn.reactos.org/svn/reactos?rev=69658&view=rev
Log: [DEVMGR] - When refreshing the view, reselect and expand the previously selected node in the tree. This allows to switch from 'by type' to 'by connection' and see where the selected device sits in the tree hierarchy (and vice versa) Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.cpp trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.h trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.h trunk/reactos/dll/win32/devmgr/devmgmt/Node.cpp trunk/reactos/dll/win32/devmgr/devmgmt/Node.h Modified: 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 [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.cpp [iso-8859-1] Fri Oct 23 12:45:41 2015 @@ -26,6 +26,24 @@ ZeroMemory(&m_DevinfoData, sizeof(SP_DEVINFO_DATA)); } +CDeviceNode::CDeviceNode( + _In_ const CDeviceNode &Node + ) : + CNode(Node) +{ + m_DevInst = Node.m_DevInst; + m_hDevInfo = Node.m_hDevInfo; + m_Status = Node.m_Status; + m_ProblemNumber = Node.m_ProblemNumber; + m_OverlayImage = Node.m_OverlayImage; + CopyMemory(&m_DevinfoData, &Node.m_DevinfoData, sizeof(SP_DEVINFO_DATA)); + + size_t size = wcslen(Node.m_DeviceId) + 1; + m_DeviceId = new WCHAR[size]; + StringCbCopyW(m_DeviceId, size * sizeof(WCHAR), Node.m_DeviceId); + +} + CDeviceNode::~CDeviceNode() { Cleanup(); @@ -290,7 +308,7 @@ for (int i = 0; i < 2; i++) { // Check globally first, then check config specific - pcp.Scope = (i == 0) ? DICS_FLAG_GLOBAL : DICS_FLAG_CONFIGSPECIFIC; + pcp.Scope = (i == 0) ? DICS_FLAG_CONFIGGENERAL : DICS_FLAG_CONFIGSPECIFIC; if (SetupDiSetClassInstallParamsW(m_hDevInfo, &m_DevinfoData, @@ -319,6 +337,7 @@ { SetupDiChangeState(m_hDevInfo, &m_DevinfoData); } + if (Enable) { Modified: 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 [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceNode.h [iso-8859-1] Fri Oct 23 12:45:41 2015 @@ -19,6 +19,10 @@ ); ~CDeviceNode(); + + CDeviceNode( + _In_ const CDeviceNode &Node + ); virtual bool SetupNode(); 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] Fri Oct 23 12:45:41 2015 @@ -27,7 +27,6 @@ CDeviceView *This; BOOL ScanForChanges; BOOL UpdateView; - LPWSTR DeviceId; }; @@ -79,6 +78,10 @@ // Give the treeview arrows instead of +/- boxes (on Win7) SetWindowTheme(m_hTreeView, L"explorer", NULL); + + // Create the root node + m_RootNode = new CRootNode(&m_ImageListData); + m_RootNode->SetupNode(); } @@ -198,15 +201,6 @@ ThreadData->This = this; ThreadData->ScanForChanges = ScanForChanges; ThreadData->UpdateView = UpdateView; - ThreadData->DeviceId = NULL; - - if (DeviceId) - { - // Node gets deleted on refresh so we copy it to another block - size_t Length = wcslen(DeviceId) + 1; - ThreadData->DeviceId = new WCHAR[Length]; - StringCbCopyW(ThreadData->DeviceId, Length, DeviceId); - } HANDLE hThread; @@ -377,13 +371,29 @@ RefreshThreadData *ThreadData = (RefreshThreadData *)Param; CDeviceView *This = ThreadData->This; + // Get a copy of the currently selected node + CNode *LastSelectedNode = This->GetSelectedNode(); + if (LastSelectedNode == nullptr || (LastSelectedNode->GetNodeType() == RootNode)) + { + LastSelectedNode = new CRootNode(*This->m_RootNode); + } + else if (LastSelectedNode->GetNodeType() == ClassNode) + { + LastSelectedNode = new CClassNode(*dynamic_cast<CClassNode *>(LastSelectedNode)); + } + else if (LastSelectedNode->GetNodeType() == DeviceNode) + { + LastSelectedNode = new CDeviceNode(*dynamic_cast<CDeviceNode *>(LastSelectedNode)); + } // Empty the treeview This->EmptyDeviceView(); - This->m_hTreeRoot = NULL; - - // Refresh the devices only if requested. This means - // switching views uses the cache and remains fast + + // Re-add the root node to the tree + if (This->AddRootDevice() == false) + return 0; + + // Refresh the devices only if requested if (ThreadData->ScanForChanges) { This->RefreshDeviceList(); @@ -408,10 +418,8 @@ } - This->SelectNode(ThreadData->DeviceId); - - if (ThreadData->DeviceId) - delete[] ThreadData->DeviceId; + This->SelectNode(LastSelectedNode); + delete ThreadData; return 0; @@ -428,10 +436,6 @@ GUID ClassGuid; INT ClassIndex; BOOL bClassSuccess, bSuccess; - - // Start by adding the root node to the tree - bSuccess = AddRootDevice(); - if (bSuccess == false) return false; ClassIndex = 0; do @@ -564,12 +568,6 @@ bool CDeviceView::ListDevicesByConnection() { - 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 (void)RecurseChildDevices(m_RootNode->GetDeviceInst(), m_hTreeRoot); @@ -928,13 +926,13 @@ HTREEITEM CDeviceView::RecurseFindDevice( _In_ HTREEITEM hParentItem, - _In_ LPWSTR DeviceId + _In_ CNode *Node ) { HTREEITEM FoundItem; HTREEITEM hItem; TVITEMW tvItem; - CNode *Node; + CNode *FoundNode; // Check if this node has any children hItem = TreeView_GetChild(m_hTreeView, hParentItem); @@ -946,17 +944,22 @@ if (TreeView_GetItem(m_hTreeView, &tvItem) && tvItem.lParam != NULL) { - // check for a matching deviceid - Node = reinterpret_cast<CNode *>(tvItem.lParam); - if (Node->GetDeviceId() && - (wcscmp(Node->GetDeviceId(), DeviceId) == 0)) - { - return hItem; + // check for a matching node + FoundNode = reinterpret_cast<CNode *>(tvItem.lParam); + if ((FoundNode->GetNodeType() == Node->GetNodeType()) && + (IsEqualGUID(*FoundNode->GetClassGuid(), *Node->GetClassGuid()))) + { + // check if this is a class node, or a device with matching ID's + if ((FoundNode->GetNodeType() == ClassNode) || + (wcscmp(FoundNode->GetDeviceId(), Node->GetDeviceId()) == 0)) + { + return hItem; + } } } // This node may have its own children - FoundItem = RecurseFindDevice(hItem, DeviceId); + FoundItem = RecurseFindDevice(hItem, Node); if (FoundItem) return FoundItem; // Loop all the siblings @@ -971,17 +974,22 @@ tvItem.mask = TVIF_PARAM; if (TreeView_GetItem(m_hTreeView, &tvItem)) { - // check for a matching deviceid - Node = reinterpret_cast<CNode *>(tvItem.lParam); - if (Node->GetDeviceId() && - wcscmp(Node->GetDeviceId(), DeviceId) == 0) + // check for a matching class + FoundNode = reinterpret_cast<CNode *>(tvItem.lParam); + if ((FoundNode->GetNodeType() == Node->GetNodeType()) && + (IsEqualGUID(*FoundNode->GetClassGuid(), *Node->GetClassGuid()))) { - return hItem; + // check if this is a class node, or a device with matching ID's + if ((FoundNode->GetNodeType() == ClassNode) || + (wcscmp(FoundNode->GetDeviceId(), Node->GetDeviceId()) == 0)) + { + return hItem; + } } } // This node may have its own children - FoundItem = RecurseFindDevice(hItem, DeviceId); + FoundItem = RecurseFindDevice(hItem, Node); if (FoundItem) return FoundItem; } @@ -990,7 +998,7 @@ void CDeviceView::SelectNode( - _In_ LPWSTR DeviceId + _In_ CNode *Node ) { HTREEITEM hRoot, hItem; @@ -1000,18 +1008,17 @@ if (hRoot == NULL) return; // If we don't want to set select a node, just select root - if (DeviceId == NULL) + if (Node == nullptr || Node->GetNodeType() == RootNode) { TreeView_SelectItem(m_hTreeView, hRoot); return; } // Scan the tree looking for the node we want - hItem = RecurseFindDevice(hRoot, DeviceId); + hItem = RecurseFindDevice(hRoot, Node); if (hItem) { TreeView_SelectItem(m_hTreeView, hItem); - TreeView_Expand(m_hTreeView, hItem, TVM_EXPAND); } else { @@ -1033,7 +1040,7 @@ ) { POSITION Pos; - CClassNode *Node; + CClassNode *Node = nullptr; Pos = m_ClassNodeList.GetHeadPosition(); if (Pos == NULL) return nullptr; @@ -1047,7 +1054,7 @@ break; } - Node = NULL; + Node = nullptr; } while (Pos != NULL); @@ -1060,7 +1067,7 @@ ) { POSITION Pos; - CDeviceNode *Node; + CDeviceNode *Node = nullptr; Pos = m_DeviceNodeList.GetHeadPosition(); if (Pos == NULL) return nullptr; @@ -1074,7 +1081,7 @@ break; } - Node = NULL; + Node = nullptr; } while (Pos != NULL); @@ -1090,7 +1097,7 @@ { return (CNode *)TvItem->lParam; } - return NULL; + return nullptr; } void 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] Fri Oct 23 12:45:41 2015 @@ -148,11 +148,11 @@ HTREEITEM RecurseFindDevice( _In_ HTREEITEM hParentItem, - _In_ LPWSTR DeviceId + _In_ CNode *Node ); void SelectNode( - _In_ LPWSTR DeviceId + _In_ CNode *Node ); void EmptyDeviceView( 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] Fri Oct 23 12:45:41 2015 @@ -25,6 +25,17 @@ m_ClassGuid = GUID_NULL; } +CNode::CNode(const CNode &Node) +{ + m_NodeType = Node.m_NodeType; + m_ImageListData = Node.m_ImageListData; + m_DeviceId = Node.m_DeviceId; + m_ClassImage = Node.m_ClassImage; + + StringCbCopyW(m_DisplayName, DISPLAY_NAME_LEN, Node.m_DisplayName); + CopyMemory(&m_ClassGuid, &Node.m_ClassGuid, sizeof(GUID)); +} + CNode::~CNode() { -} +} 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] Fri Oct 23 12:45:41 2015 @@ -25,6 +25,10 @@ _In_ PSP_CLASSIMAGELIST_DATA ImageListData ); + CNode( + _In_ const CNode& Node + ); + virtual ~CNode(); virtual bool SetupNode() = 0;
9 years, 2 months
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
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