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
April 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
17 participants
481 discussions
Start a n
N
ew thread
[tfaber] 67314: [NETSHELL] - Do not display a message box in CLanStatus::QueryInterface. Fixes hang when running com_apitest:netshell - Change the order of some interfaces in CNetworkConnections to...
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Apr 19 22:16:34 2015 New Revision: 67314 URL:
http://svn.reactos.org/svn/reactos?rev=67314&view=rev
Log: [NETSHELL] - Do not display a message box in CLanStatus::QueryInterface. Fixes hang when running com_apitest:netshell - Change the order of some interfaces in CNetworkConnections to make com_apitest slightly happier Modified: trunk/reactos/dll/shellext/netshell/lanstatusui.cpp trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp Modified: trunk/reactos/dll/shellext/netshell/lanstatusui.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/lans…
============================================================================== --- trunk/reactos/dll/shellext/netshell/lanstatusui.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/lanstatusui.cpp [iso-8859-1] Sun Apr 19 22:16:34 2015 @@ -1132,7 +1132,7 @@ AddRef(); return S_OK; } - MessageBoxW(NULL, L"IOleCommandTarget_fnQueryInterface", NULL, MB_OK); + return E_NOINTERFACE; } Modified: trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/shfl…
============================================================================== --- trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp [iso-8859-1] Sun Apr 19 22:16:34 2015 @@ -27,8 +27,8 @@ */ class CNetworkConnections final : + public IPersistFolder2, public IShellFolder2, - public IPersistFolder2, public IShellExecuteHookW { public: @@ -170,26 +170,22 @@ *ppvObj = NULL; if (IsEqualIID(riid, IID_IUnknown) || - IsEqualIID(riid, IID_IShellFolder) || - IsEqualIID(riid, IID_IShellFolder2)) + IsEqualIID (riid, IID_IPersist) || + IsEqualIID (riid, IID_IPersistFolder) || + IsEqualIID (riid, IID_IPersistFolder2)) + { + *ppvObj = static_cast<IPersistFolder2*>(this); + } + else if (IsEqualIID(riid, IID_IShellFolder) || + IsEqualIID(riid, IID_IShellFolder2)) { *ppvObj = static_cast<IShellFolder2*>(this); } - else if (IsEqualIID (riid, IID_IPersistFolder) || - IsEqualIID (riid, IID_IPersistFolder2)) - { - *ppvObj = static_cast<IPersistFolder2*>(this); - } else if (IsEqualIID(riid, IID_IShellExecuteHookW)) { *ppvObj = static_cast<IShellExecuteHookW*>(this); } -#if 0 - else if (IsEqualIID(riid, IID_IPersistIDList)) - { - //*ppvObj = static_cast<IPersistIDList*>(this); - } -#endif + if (*ppvObj) { AddRef(); @@ -197,11 +193,9 @@ } /* TODO: - * IID_IPersistFreeThreadedObject - * IID_IBrowserFrameOptions - * IID_IShellIconOverlay - * IID_IPersistIDList - * IID_IPersist + * IID_IShellExtInit + * IID_IOleCommandTarget + * IID_IShellFolderViewCB */ return E_NOINTERFACE;
9 years, 8 months
1
0
0
0
[tfaber] 67313: [COM_APITEST] - Add test for netshell classes - Add some interfaces
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Apr 19 21:28:09 2015 New Revision: 67313 URL:
http://svn.reactos.org/svn/reactos?rev=67313&view=rev
Log: [COM_APITEST] - Add test for netshell classes - Add some interfaces Added: trunk/rostests/apitests/com/netshell.c (with props) Modified: trunk/rostests/apitests/com/CMakeLists.txt trunk/rostests/apitests/com/com_apitest.c trunk/rostests/apitests/com/com_apitest.h trunk/rostests/apitests/com/ieframe.c trunk/rostests/apitests/com/shdocvw.c trunk/rostests/apitests/com/shell32.c trunk/rostests/apitests/com/testlist.c Modified: trunk/rostests/apitests/com/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/com/CMakeLists.t…
============================================================================== --- trunk/rostests/apitests/com/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/com/CMakeLists.txt [iso-8859-1] Sun Apr 19 21:28:09 2015 @@ -4,6 +4,7 @@ list(APPEND SOURCE browseui.c ieframe.c + netshell.c shdocvw.c shell32.c com_apitest.c Modified: trunk/rostests/apitests/com/com_apitest.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/com/com_apitest.…
============================================================================== --- trunk/rostests/apitests/com/com_apitest.c [iso-8859-1] (original) +++ trunk/rostests/apitests/com/com_apitest.c [iso-8859-1] Sun Apr 19 21:28:09 2015 @@ -34,7 +34,11 @@ { ID_NAME(IID_IACList), TRUE }, { ID_NAME(IID_IACList2), TRUE }, { ID_NAME(IID_IADesktopP2), TRUE }, + { ID_NAME(IID_IAccIdentity) }, + { ID_NAME(IID_IAccPropServer) }, + { ID_NAME(IID_IAccPropServices) }, { ID_NAME(IID_IAccessible) }, + { ID_NAME(IID_IAccessibleHandler) }, { ID_NAME(IID_IAccessControl), TRUE }, { ID_NAME(IID_IAccessor) }, { ID_NAME(IID_IActiveDesktop), TRUE }, @@ -88,6 +92,7 @@ { ID_NAME(IID_IDefViewFrameGroup) }, { ID_NAME(IID_IDefViewSafety), }, { ID_NAME(IID_IDefViewScript), TRUE }, + { ID_NAME(IID_IDelayedRelease), TRUE }, { ID_NAME(IID_IDeskBand) }, { ID_NAME(IID_IDeskBandEx) }, { ID_NAME(IID_IDeskBar), TRUE }, @@ -105,6 +110,7 @@ { ID_NAME(IID_IEnumExtraSearch) }, { ID_NAME(IID_IEnumGUID) }, { ID_NAME(IID_IEnumIDList) }, + { ID_NAME(IID_IEnumNetConnection) }, { ID_NAME(IID_IEnumShellItems) }, { ID_NAME(IID_IEnumString) }, { ID_NAME(IID_IEnumUnknown) }, @@ -132,6 +138,7 @@ { ID_NAME(IID_IFolderViewHost), TRUE }, { ID_NAME(IID_IFolderViewOC) }, { ID_NAME(IID_IFolderViewSettings) }, + { ID_NAME(IID_IGetNameSpaceExtensionPointer),TRUE}, { ID_NAME(IID_IGlobalFolderSettings), TRUE }, { ID_NAME(IID_IHWEventHandler) }, { ID_NAME(IID_IHWEventHandler2) }, @@ -148,6 +155,12 @@ { ID_NAME(IID_IMultiQI), TRUE }, { ID_NAME(IID_INamespaceProxy), TRUE }, { ID_NAME(IID_INameSpaceTreeControl), TRUE }, + { ID_NAME(IID_INetConnectionConnectUi), TRUE }, + { ID_NAME(IID_INetConnectionPropertyUi), TRUE }, + { ID_NAME(IID_INetConnectionPropertyUi2), TRUE }, + { ID_NAME(IID_INetConnectionManager) }, + { ID_NAME(IID_INewShortcutHookA), TRUE }, + { ID_NAME(IID_INewShortcutHookW), TRUE }, { ID_NAME(IID_INSCTree), TRUE }, { ID_NAME(IID_INSCTree2), TRUE }, { ID_NAME(IID_IObjMgr), TRUE }, @@ -169,6 +182,7 @@ { ID_NAME(IID_IPersistFolder) }, { ID_NAME(IID_IPersistFolder2) }, { ID_NAME(IID_IPersistFolder3) }, + { ID_NAME(IID_IPersistFreeThreadedObject), TRUE }, { ID_NAME(IID_IPersistHistory) }, { ID_NAME(IID_IPersistIDList) }, { ID_NAME(IID_IPersistMemory) }, @@ -183,6 +197,7 @@ { ID_NAME(IID_IProgressDialog), TRUE }, { ID_NAME(IID_IPropertyBag) }, { ID_NAME(IID_IPropertyBag2) }, + { ID_NAME(IID_IPropSheetPage), TRUE }, { ID_NAME(IID_IQueryAssociations), TRUE }, { ID_NAME(IID_IQueryInfo), TRUE }, { ID_NAME(IID_IRegTreeOptions), TRUE }, @@ -196,6 +211,8 @@ { ID_NAME(IID_IShellBrowser) }, { ID_NAME(IID_IShellBrowserService), TRUE }, { ID_NAME(IID_IShellChangeNotify), TRUE }, + { ID_NAME(IID_IShellCopyHookA), TRUE }, + { ID_NAME(IID_IShellCopyHookW), TRUE }, { ID_NAME(IID_IShellDesktopTray), TRUE }, { ID_NAME(IID_IShellDetails), TRUE }, { ID_NAME(IID_IShellDispatch) }, @@ -203,9 +220,9 @@ { ID_NAME(IID_IShellDispatch3) }, { ID_NAME(IID_IShellDispatch4) }, { ID_NAME(IID_IShellDispatch5), TRUE }, + { ID_NAME(IID_IShellExecuteHookA), TRUE }, + { ID_NAME(IID_IShellExecuteHookW), TRUE }, { ID_NAME(IID_IShellExtInit), TRUE }, - { ID_NAME(IID_IShellPropSheetExt), TRUE }, - { ID_NAME(IID_IShellIconOverlayIdentifier), TRUE }, { ID_NAME(IID_IShellFolder) }, { ID_NAME(IID_IShellFolder2) }, { ID_NAME(IID_IShellFolderBand), TRUE }, @@ -257,6 +274,8 @@ { ID_NAME(IID_ITrayPriv), TRUE }, { ID_NAME(IID_ITrayPriv2), TRUE }, { ID_NAME(IID_IUnknown) }, + { ID_NAME(IID_IURLSearchHook), TRUE }, + { ID_NAME(IID_IURLSearchHook2), TRUE }, { ID_NAME(IID_IViewObject) }, { ID_NAME(IID_IViewObject2) }, { ID_NAME(IID_IViewObjectEx), TRUE }, Modified: trunk/rostests/apitests/com/com_apitest.h URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/com/com_apitest.…
============================================================================== --- trunk/rostests/apitests/com/com_apitest.h [iso-8859-1] (original) +++ trunk/rostests/apitests/com/com_apitest.h [iso-8859-1] Sun Apr 19 21:28:09 2015 @@ -23,6 +23,7 @@ #include <objsafe.h> #include <oleacc.h> #include <oaidl.h> +#include <netcon.h> #include <mshtmhst.h> #include <perhist.h> #include <shlguid.h> @@ -126,9 +127,11 @@ DEFINE_GUID(IID_IFolderView2, 0x1af3a467, 0x214f, 0x4298, 0x90, 0x8e, 0x06, 0xb0, 0x3e, 0x0b, 0x39, 0xf9); DEFINE_GUID(IID_IFolderViewHost, 0x1ea58f02, 0xd55a, 0x411d, 0xb0, 0x9e, 0x9e, 0x65, 0xac, 0x21, 0x60, 0x5b); DEFINE_GUID(IID_IFolderViewSettings, 0xae8c987d, 0x8797, 0x4ed3, 0xbe, 0x72, 0x2a, 0x47, 0xdd, 0x93, 0x8d, 0xb0); +DEFINE_GUID(IID_IGetNameSpaceExtensionPointer,0x287d4a71, 0x439f, 0x43a4, 0x8d, 0x5b, 0x0e, 0x0a, 0xe7, 0x1e, 0x84, 0xa9); DEFINE_GUID(IID_IHWEventHandler, 0xc1fb73d0, 0xec3a, 0x4ba2, 0xb5, 0x12, 0x8c, 0xdb, 0x91, 0x87, 0xb6, 0xd1); DEFINE_GUID(IID_IHWEventHandler2, 0xcfcc809f, 0x295d, 0x42e8, 0x9f, 0xfc, 0x42, 0x4b, 0x33, 0xc4, 0x87, 0xe6); DEFINE_GUID(IID_IMultiMonitorDockingSite, 0x03879de0, 0xa205, 0x11d0, 0x99, 0xcb, 0x00, 0xc0, 0x4f, 0xd6, 0x55, 0xe1); +DEFINE_GUID(IID_IPersistFreeThreadedObject,0xc7264bf0, 0xedb6, 0x11d1, 0x85, 0x46, 0x00, 0x60, 0x08, 0x05, 0x93, 0x68); DEFINE_GUID(IID_IPreviewHandler, 0x8895b1c6, 0xb41f, 0x4c1c, 0xa5, 0x62, 0x0d, 0x56, 0x42, 0x50, 0x83, 0x6f); DEFINE_GUID(IID_IPreviewHandlerFrame, 0xfec87aaf, 0x35f9, 0x447a, 0xad, 0xb7, 0x20, 0x23, 0x44, 0x91, 0x40, 0x1a); DEFINE_GUID(IID_IPreviewHandlerVisuals, 0x196bf9a5, 0xb346, 0x4ef0, 0xaa, 0x1e, 0x5d, 0xcd, 0xb7, 0x67, 0x68, 0xb1); Modified: trunk/rostests/apitests/com/ieframe.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/com/ieframe.c?re…
============================================================================== --- trunk/rostests/apitests/com/ieframe.c [iso-8859-1] (original) +++ trunk/rostests/apitests/com/ieframe.c [iso-8859-1] Sun Apr 19 21:28:09 2015 @@ -15,12 +15,20 @@ { ID_NAME(CLSID_ShellWindows), { - { -0xa0, &IID_IMarshal }, - { -0x20, &IID_IClientSecurity }, - { 0x0, &IID_IMultiQI }, + { -0xa0, &IID_IMarshal }, + { -0x20, &IID_IClientSecurity }, + { 0x0, &IID_IMultiQI }, + { 0x0, &IID_IUnknown }, + { FARAWY, &IID_IShellWindows }, + { FARAWY, &IID_IDispatch }, + } + }, + { + ID_NAME(CLSID_CURLSearchHook), + { + { 0x0, &IID_IURLSearchHook2 }, + { 0x0, &IID_IURLSearchHook }, { 0x0, &IID_IUnknown }, - { FARAWY, &IID_IShellWindows }, - { FARAWY, &IID_IDispatch }, } }, }; Added: trunk/rostests/apitests/com/netshell.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/com/netshell.c?r…
============================================================================== --- trunk/rostests/apitests/com/netshell.c (added) +++ trunk/rostests/apitests/com/netshell.c [iso-8859-1] Sun Apr 19 21:28:09 2015 @@ -0,0 +1,152 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory + * PURPOSE: COM interface test for netshell classes + * PROGRAMMER: Thomas Faber <thomas.faber(a)reactos.org> + */ + +#include "com_apitest.h" + +#define NDEBUG +#include <debug.h> + +static const CLASS_AND_INTERFACES ExpectedInterfaces[] = +{ + { + ID_NAME(CLSID_ConnectionCommonUi), + { + { 0x0, &IID_IUnknown }, + }, + L"Both" + }, + { + ID_NAME(CLSID_ConnectionFolder), + { + { 0x0, &IID_IPersistFolder2 }, + { 0x0, &IID_IPersistFolder }, + { 0x0, &IID_IPersist }, + { 0x0, &IID_IUnknown }, + { 0x4, &IID_IShellExtInit }, + { 0x8, &IID_IShellFolder2 }, + { 0x8, &IID_IShellFolder }, + { 0xc, &IID_IOleCommandTarget }, + { 0x10, &IID_IShellFolderViewCB }, + }, + L"Both" + }, + { + ID_NAME(CLSID_ConnectionFolderEnum), + { + { 0x0, &IID_IEnumIDList }, + { 0x0, &IID_IUnknown }, + }, + L"Both" + }, +#if 0 + { + ID_NAME(CLSID_ConnectionManager), + { + { 0x0, &IID_IUnknown }, + } + }, +#endif + { + ID_NAME(CLSID_ConnectionTray), + { + { 0x0, &IID_IOleCommandTarget }, + { 0x0, &IID_IUnknown }, + }, + L"Both" + }, + { + ID_NAME(CLSID_DialupConnectionUi), + { + { 0x0, &IID_INetConnectionConnectUi }, + { 0x0, &IID_IUnknown }, + { 0x4, &IID_INetConnectionPropertyUi2 }, + //{ 0x4, &IID_INetConnectionPropertyUi }, + }, + L"Both" + }, + { + ID_NAME(CLSID_DirectConnectionUi), + { + { 0x0, &IID_INetConnectionConnectUi }, + { 0x0, &IID_IUnknown }, + { 0x4, &IID_INetConnectionPropertyUi2 }, + //{ 0x4, &IID_INetConnectionPropertyUi }, + }, + L"Both" + }, + { + ID_NAME(CLSID_InboundConnectionUi), + { + { 0x0, &IID_INetConnectionPropertyUi2 }, + { 0x0, &IID_IUnknown }, + }, + L"Both" + }, + { + ID_NAME(CLSID_InternetConnectionUi), + { + { 0x0, &IID_INetConnectionConnectUi }, + { 0x0, &IID_IUnknown }, + { 0x4, &IID_INetConnectionPropertyUi2 }, + //{ 0x4, &IID_INetConnectionPropertyUi }, + }, + L"Both" + }, + { + ID_NAME(CLSID_LanConnectionUi), + { + { 0x0, &IID_INetConnectionConnectUi }, + { 0x0, &IID_IUnknown }, + { 0x4, &IID_INetConnectionPropertyUi2 }, + { 0x4, &IID_INetConnectionPropertyUi }, + }, + L"Both" + }, + { + ID_NAME(CLSID_NetConnectionUiUtilities), + { + { 0x0, &IID_IUnknown }, + }, + L"Both" + }, + { + ID_NAME(CLSID_SharedAccessConnectionUi), + { + { 0x0, &IID_INetConnectionConnectUi }, + { 0x0, &IID_IUnknown }, + { 0x4, &IID_INetConnectionPropertyUi2 }, + { 0x4, &IID_INetConnectionPropertyUi }, + }, + L"Both" + }, + { + ID_NAME(CLSID_PPPoEUi), + { + { 0x0, &IID_INetConnectionConnectUi }, + { 0x0, &IID_IUnknown }, + { 0x4, &IID_INetConnectionPropertyUi2 }, + //{ 0x4, &IID_INetConnectionPropertyUi }, + }, + L"Both" + }, + { + ID_NAME(CLSID_VpnConnectionUi), + { + { 0x0, &IID_INetConnectionConnectUi }, + { 0x0, &IID_IUnknown }, + { 0x4, &IID_INetConnectionPropertyUi2 }, + //{ 0x4, &IID_INetConnectionPropertyUi }, + }, + L"Both" + }, +}; +static const INT ExpectedInterfaceCount = RTL_NUMBER_OF(ExpectedInterfaces); + +START_TEST(netshell) +{ + TestClasses(L"netshell", ExpectedInterfaces, ExpectedInterfaceCount); +} Propchange: trunk/rostests/apitests/com/netshell.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/com/shdocvw.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/com/shdocvw.c?re…
============================================================================== --- trunk/rostests/apitests/com/shdocvw.c [iso-8859-1] (original) +++ trunk/rostests/apitests/com/shdocvw.c [iso-8859-1] Sun Apr 19 21:28:09 2015 @@ -57,7 +57,7 @@ { ID_NAME(CLSID_ShellDispatchInproc), { - { 0x0, &IID_IUnknown }, + { 0x0, &IID_IUnknown }, } }, #endif Modified: trunk/rostests/apitests/com/shell32.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/com/shell32.c?re…
============================================================================== --- trunk/rostests/apitests/com/shell32.c [iso-8859-1] (original) +++ trunk/rostests/apitests/com/shell32.c [iso-8859-1] Sun Apr 19 21:28:09 2015 @@ -274,6 +274,7 @@ { 0x10, &IID_IPersistFolder2 }, { 0x10, &IID_IPersistFolder }, { 0x10, &IID_IPersist }, + { 0x10, &IID_IPersistFreeThreadedObject }, { FARAWY, &IID_IShellIconOverlay }, { FARAWY, &IID_IShellFolder2 }, { FARAWY, &IID_IShellFolder }, @@ -304,6 +305,7 @@ { 0x10, &IID_IPersistFolder2 }, { 0x10, &IID_IPersistFolder }, { 0x10, &IID_IPersist }, + { 0x10, &IID_IPersistFreeThreadedObject }, { FARAWY, &IID_IShellIconOverlay }, { FARAWY, &IID_IShellFolder2 }, { FARAWY, &IID_IShellFolder }, @@ -453,6 +455,7 @@ { 0x18, &IID_IPersistFolder2 }, { 0x18, &IID_IPersistFolder }, { 0x18, &IID_IPersist }, + { 0x18, &IID_IPersistFreeThreadedObject }, { 0x1c, &IID_IStorage }, { 0x2c, &IID_IContextMenuCB }, { 0x34, &IID_IOleCommandTarget }, Modified: trunk/rostests/apitests/com/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/com/testlist.c?r…
============================================================================== --- trunk/rostests/apitests/com/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/com/testlist.c [iso-8859-1] Sun Apr 19 21:28:09 2015 @@ -6,6 +6,7 @@ extern void func_browseui(void); extern void func_ieframe(void); extern void func_interfaces(void); +extern void func_netshell(void); extern void func_shdocvw(void); extern void func_shell32(void); @@ -14,6 +15,7 @@ { "browseui", func_browseui }, { "ieframe", func_ieframe }, { "interfaces", func_interfaces }, + { "netshell", func_netshell }, { "shdocvw", func_shdocvw }, { "shell32", func_shell32 },
9 years, 8 months
1
0
0
0
[tfaber] 67312: [NETSHELL] - Use the correct names for netshell's CLSIDs as indicated by the registry and public symbols
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Apr 19 21:14:49 2015 New Revision: 67312 URL:
http://svn.reactos.org/svn/reactos?rev=67312&view=rev
Log: [NETSHELL] - Use the correct names for netshell's CLSIDs as indicated by the registry and public symbols Modified: trunk/reactos/dll/shellext/netshell/README trunk/reactos/dll/shellext/netshell/classfactory.cpp trunk/reactos/dll/shellext/netshell/connectmanager.cpp trunk/reactos/dll/shellext/netshell/enumlist.cpp trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp trunk/reactos/include/reactos/shlguid_undoc.h Modified: trunk/reactos/dll/shellext/netshell/README URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/READ…
============================================================================== --- trunk/reactos/dll/shellext/netshell/README [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/README [iso-8859-1] Sun Apr 19 21:14:49 2015 @@ -22,7 +22,7 @@ === Status Dialog & Notification Area === -The status dialog is implemented by IOleCommandTarget interface(CLSID_LanConnectStatusUI). This interface manages all status dialogs +The status dialog is implemented by IOleCommandTarget interface(CLSID_ConnectionTray). This interface manages all status dialogs for all available dialogs. The interface is implemented as a singleton to advoid multiple notification icons appear in the Notification area of the explorer. Everytime the IShellFolder object is created (ISF_NetConnect_Constructor), it creates a reference to IOleCommandTarget interface and calls its IOleCommandTarget::Exec function with CGID_ShellServiceObject. Modified: trunk/reactos/dll/shellext/netshell/classfactory.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/clas…
============================================================================== --- trunk/reactos/dll/shellext/netshell/classfactory.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/classfactory.cpp [iso-8859-1] Sun Apr 19 21:14:49 2015 @@ -72,13 +72,13 @@ { *ppvObject = NULL; - if (IsEqualCLSID(m_clsid, CLSID_NetworkConnections)) + if (IsEqualCLSID(m_clsid, CLSID_ConnectionFolder)) return ISF_NetConnect_Constructor(pUnkOuter, riid, ppvObject); else if (IsEqualCLSID(m_clsid, CLSID_ConnectionManager)) return INetConnectionManager_Constructor(pUnkOuter, riid, ppvObject); - else if (IsEqualCLSID(m_clsid, CLSID_LANConnectUI)) + else if (IsEqualCLSID(m_clsid, CLSID_LanConnectionUi)) return LanConnectUI_Constructor(pUnkOuter, riid, ppvObject); - else if (IsEqualCLSID(m_clsid, CLSID_LanConnectStatusUI)) + else if (IsEqualCLSID(m_clsid, CLSID_ConnectionTray)) return LanConnectStatusUI_Constructor(pUnkOuter, riid, ppvObject); return E_NOINTERFACE; Modified: trunk/reactos/dll/shellext/netshell/connectmanager.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/conn…
============================================================================== --- trunk/reactos/dll/shellext/netshell/connectmanager.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/connectmanager.cpp [iso-8859-1] Sun Apr 19 21:14:49 2015 @@ -321,7 +321,7 @@ { if (m_Props.MediaType == NCM_LAN) { - CopyMemory(pclsid, &CLSID_LANConnectUI, sizeof(CLSID)); + CopyMemory(pclsid, &CLSID_LanConnectionUi, sizeof(CLSID)); return S_OK; } Modified: trunk/reactos/dll/shellext/netshell/enumlist.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/enum…
============================================================================== --- trunk/reactos/dll/shellext/netshell/enumlist.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/enumlist.cpp [iso-8859-1] Sun Apr 19 21:14:49 2015 @@ -207,7 +207,7 @@ { LPPIDLDATA pData = _ILGetDataPointer(pidlOut); - memcpy(&(pData->u.guid.guid), &CLSID_NetworkConnections, sizeof(GUID)); + memcpy(&(pData->u.guid.guid), &CLSID_ConnectionFolder, sizeof(GUID)); } return pidlOut; } @@ -231,7 +231,7 @@ const IID *piid = _ILGetGUIDPointer(const_cast<LPITEMIDLIST>(pidl)); if (piid) - return IsEqualIID(*piid, CLSID_NetworkConnections); + return IsEqualIID(*piid, CLSID_ConnectionFolder); return FALSE; } Modified: trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/shfl…
============================================================================== --- trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp [iso-8859-1] Sun Apr 19 21:14:49 2015 @@ -144,7 +144,7 @@ m_pidlRoot(_ILCreateNetConnect()) { HRESULT hr; - hr = CoCreateInstance(CLSID_LanConnectStatusUI, NULL, CLSCTX_INPROC_SERVER, IID_IOleCommandTarget, reinterpret_cast<PVOID*>(&m_lpOleCmd)); + hr = CoCreateInstance(CLSID_ConnectionTray, NULL, CLSCTX_INPROC_SERVER, IID_IOleCommandTarget, reinterpret_cast<PVOID*>(&m_lpOleCmd)); if (FAILED(hr)) { ERR("CoCreateInstance failed with %lx\n", hr); @@ -1115,7 +1115,7 @@ if (!lpClassId) return E_POINTER; - *lpClassId = CLSID_NetworkConnections; + *lpClassId = CLSID_ConnectionFolder; return S_OK; } Modified: trunk/reactos/include/reactos/shlguid_undoc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/shlguid_un…
============================================================================== --- trunk/reactos/include/reactos/shlguid_undoc.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/shlguid_undoc.h [iso-8859-1] Sun Apr 19 21:14:49 2015 @@ -114,16 +114,24 @@ DEFINE_GUID(CGID_MenuDeskBar, 0x5C9F0A12, 0x959E, 0x11D0, 0xA3, 0xA4, 0x00, 0xA0, 0xC9, 0x08, 0x26, 0x36); -DEFINE_GUID(CLSID_LANConnectUI, 0x7007ACC5, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); -DEFINE_GUID(CLSID_NetworkConnections, 0x7007ACC7, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); -DEFINE_GUID(CLSID_LanConnectStatusUI, 0x7007ACCF, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); +DEFINE_GUID(CLSID_DialupConnectionUi, 0x7007ACC1, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); +DEFINE_GUID(CLSID_DirectConnectionUi, 0x7007ACC2, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); +DEFINE_GUID(CLSID_InboundConnectionUi, 0x7007ACC3, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); +DEFINE_GUID(CLSID_InternetConnectionUi, 0x7007ACC4, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); +DEFINE_GUID(CLSID_LanConnectionUi, 0x7007ACC5, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); +DEFINE_GUID(CLSID_VpnConnectionUi, 0x7007ACC6, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); +DEFINE_GUID(CLSID_ConnectionFolder, 0x7007ACC7, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); +DEFINE_GUID(CLSID_ConnectionFolderEnum, 0x7007ACC8, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); +DEFINE_GUID(CLSID_ConnectionTray, 0x7007ACCF, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); +DEFINE_GUID(CLSID_ConnectionCommonUi, 0x7007ACD1, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); +DEFINE_GUID(CLSID_NetConnectionUiUtilities,0x7007ACD3, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); +DEFINE_GUID(CLSID_PPPoEUi, 0x7007ACD4, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); +DEFINE_GUID(CLSID_SharedAccessConnectionUi,0x7007ACD5, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E); DEFINE_GUID(CLSID_SysTray, 0x35CEC8A3, 0x2BE6, 0x11D2, 0x87, 0x73, 0x92, 0xE2, 0x20, 0x52, 0x41, 0x53); DEFINE_GUID(CLSID_BackgroundTaskScheduler, 0x603D3800, 0xBD81, 0x11d0, 0xA3, 0xA5, 0x00, 0xC0, 0x4F, 0xD7, 0x06, 0xEC); DEFINE_GUID(CLSID_SharedTaskScheduler, 0x603D3801, 0xBD81, 0x11d0, 0xA3, 0xA5, 0x00, 0xC0, 0x4F, 0xD7, 0x06, 0xEC); - -#define CLSID_ConnectionTray CLSID_LanConnectStatusUI #define CGID_IExplorerToolbar IID_IExplorerToolbar #define SID_IExplorerToolbar IID_IExplorerToolbar
9 years, 8 months
1
0
0
0
[tfaber] 67311: [NETSHELL] - Keep a CLanStatus instance around in CNetworkConnections (as before r65758) and properly manage its lifetime. Fixes Status context menu item for network connections. CO...
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Apr 19 21:07:35 2015 New Revision: 67311 URL:
http://svn.reactos.org/svn/reactos?rev=67311&view=rev
Log: [NETSHELL] - Keep a CLanStatus instance around in CNetworkConnections (as before r65758) and properly manage its lifetime. Fixes Status context menu item for network connections. CORE-9564 Modified: trunk/reactos/dll/shellext/netshell/lanstatusui.cpp trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp Modified: trunk/reactos/dll/shellext/netshell/lanstatusui.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/lans…
============================================================================== --- trunk/reactos/dll/shellext/netshell/lanstatusui.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/lanstatusui.cpp [iso-8859-1] Sun Apr 19 21:07:35 2015 @@ -34,7 +34,7 @@ UINT Status; } LANSTATUSUI_CONTEXT; -class CLanStatus : +class CLanStatus final : public IOleCommandTarget { public: @@ -1149,16 +1149,12 @@ WINAPI CLanStatus::Release() { -#if 0 // WTF?! ULONG refCount = InterlockedDecrement(&m_ref); if (!refCount) delete this; return refCount; -#else - return 1; -#endif } HRESULT Modified: trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/shfl…
============================================================================== --- trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp [iso-8859-1] Sun Apr 19 21:07:35 2015 @@ -111,6 +111,8 @@ virtual HRESULT STDMETHODCALLTYPE Extract(LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); private: + ~CNetConUiObject(); + LONG m_ref; PCUITEMID_CHILD m_pidl; IUnknown *m_pUnknown; @@ -139,13 +141,21 @@ CNetworkConnections::CNetworkConnections() : m_ref(0), - m_pidlRoot(_ILCreateNetConnect()), - m_lpOleCmd(NULL) -{ + m_pidlRoot(_ILCreateNetConnect()) +{ + HRESULT hr; + hr = CoCreateInstance(CLSID_LanConnectStatusUI, NULL, CLSCTX_INPROC_SERVER, IID_IOleCommandTarget, reinterpret_cast<PVOID*>(&m_lpOleCmd)); + if (FAILED(hr)) + { + ERR("CoCreateInstance failed with %lx\n", hr); + m_lpOleCmd = NULL; + } } CNetworkConnections::~CNetworkConnections() { + if (m_lpOleCmd) + m_lpOleCmd->Release(); SHFree(m_pidlRoot); } @@ -670,6 +680,14 @@ m_pUnknown(NULL), m_lpOleCmd(lpOleCmd) { + if (m_lpOleCmd) + m_lpOleCmd->AddRef(); +} + +CNetConUiObject::~CNetConUiObject() +{ + if (m_lpOleCmd) + m_lpOleCmd->Release(); } /************************************************************************ @@ -856,7 +874,7 @@ if (pNetConnect->GetProperties(&pProperties) != S_OK) return E_FAIL; - hr = lpOleCmd->Exec(&pProperties->guidId, 2, OLECMDEXECOPT_DODEFAULT, NULL, NULL); + hr = lpOleCmd->Exec(&pProperties->guidId, OLECMDID_NEW, OLECMDEXECOPT_DODEFAULT, NULL, NULL); NcFreeNetconProperties(pProperties); return hr;
9 years, 8 months
1
0
0
0
[tfaber] 67310: [NETSHELL] - Some additions to the previous commit - Make destructors private - Use delete to free object allocated using new - Try to fix some ITEMIDLIST typing
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Apr 19 20:56:42 2015 New Revision: 67310 URL:
http://svn.reactos.org/svn/reactos?rev=67310&view=rev
Log: [NETSHELL] - Some additions to the previous commit - Make destructors private - Use delete to free object allocated using new - Try to fix some ITEMIDLIST typing Modified: trunk/reactos/dll/shellext/netshell/classfactory.cpp trunk/reactos/dll/shellext/netshell/connectmanager.cpp trunk/reactos/dll/shellext/netshell/enumlist.cpp trunk/reactos/dll/shellext/netshell/enumlist.h trunk/reactos/dll/shellext/netshell/lanconnectui.cpp trunk/reactos/dll/shellext/netshell/lanstatusui.cpp trunk/reactos/dll/shellext/netshell/precomp.h trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp Modified: trunk/reactos/dll/shellext/netshell/classfactory.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/clas…
============================================================================== --- trunk/reactos/dll/shellext/netshell/classfactory.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/classfactory.cpp [iso-8859-1] Sun Apr 19 20:56:42 2015 @@ -1,6 +1,6 @@ #include "precomp.h" -class CNetshellClassFactory : +class CNetshellClassFactory final : public IClassFactory { public: @@ -58,7 +58,7 @@ ULONG refCount = InterlockedDecrement(&m_ref); if (!refCount) - CoTaskMemFree(this); + delete this; return refCount; } Modified: trunk/reactos/dll/shellext/netshell/connectmanager.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/conn…
============================================================================== --- trunk/reactos/dll/shellext/netshell/connectmanager.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/connectmanager.cpp [iso-8859-1] Sun Apr 19 20:56:42 2015 @@ -40,7 +40,6 @@ { public: CNetConnection(PINetConnectionItem pItem); - ~CNetConnection(); // IUnknown virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut); @@ -57,6 +56,8 @@ HRESULT WINAPI Rename(LPCWSTR pszwDuplicateName); private: + ~CNetConnection(); + LONG m_ref; NETCON_PROPERTIES m_Props; DWORD m_dwAdapterIndex; Modified: trunk/reactos/dll/shellext/netshell/enumlist.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/enum…
============================================================================== --- trunk/reactos/dll/shellext/netshell/enumlist.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/enumlist.cpp [iso-8859-1] Sun Apr 19 20:56:42 2015 @@ -4,7 +4,7 @@ * AddToEnumList() */ BOOL -CEnumIDList::AddToEnumList(LPITEMIDLIST pidl) +CEnumIDList::AddToEnumList(PITEMID_CHILD pidl) { LPENUMLIST pNew; @@ -99,17 +99,15 @@ WINAPI CEnumIDList::Next( ULONG celt, - LPITEMIDLIST * rgelt, + PITEMID_CHILD *rgelt, ULONG *pceltFetched) { ULONG i; HRESULT hr = S_OK; - LPITEMIDLIST temp; + PITEMID_CHILD temp; if (pceltFetched) *pceltFetched = 0; - - *rgelt=0; if (celt > 1 && !pceltFetched) { @@ -170,15 +168,13 @@ CEnumIDList::Clone( LPENUMIDLIST * ppenum) { - //IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - return E_NOTIMPL; } -LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl) +LPPIDLDATA _ILGetDataPointer(LPITEMIDLIST pidl) { if (pidl && pidl->mkid.cb != 0x00) - return (LPPIDLDATA) &(pidl->mkid.abID); + return reinterpret_cast<LPPIDLDATA>(&pidl->mkid.abID); return NULL; } @@ -186,7 +182,7 @@ { LPITEMIDLIST pidlOut = NULL; - pidlOut = (LPITEMIDLIST)SHAlloc(size + 5); + pidlOut = static_cast<LPITEMIDLIST>(SHAlloc(size + 5)); if (pidlOut) { LPPIDLDATA pData; @@ -202,9 +198,9 @@ return pidlOut; } -LPITEMIDLIST _ILCreateNetConnect() -{ - LPITEMIDLIST pidlOut; +PITEMID_CHILD _ILCreateNetConnect() +{ + PITEMID_CHILD pidlOut; pidlOut = _ILAlloc(PT_GUID, sizeof(PIDLDATA)); if (pidlOut) @@ -216,9 +212,9 @@ return pidlOut; } -IID* _ILGetGUIDPointer(LPCITEMIDLIST pidl) -{ - LPPIDLDATA pdata =_ILGetDataPointer(pidl); +GUID* _ILGetGUIDPointer(LPITEMIDLIST pidl) +{ + LPPIDLDATA pdata = _ILGetDataPointer(pidl); if (!pdata) return NULL; @@ -232,7 +228,7 @@ BOOL _ILIsNetConnect(LPCITEMIDLIST pidl) { - IID *piid = _ILGetGUIDPointer(pidl); + const IID *piid = _ILGetGUIDPointer(const_cast<LPITEMIDLIST>(pidl)); if (piid) return IsEqualIID(*piid, CLSID_NetworkConnections); @@ -240,9 +236,9 @@ return FALSE; } -LPITEMIDLIST ILCreateNetConnectItem(INetConnection * pItem) -{ - LPITEMIDLIST pidl; +PITEMID_CHILD ILCreateNetConnectItem(INetConnection * pItem) +{ + PITEMID_CHILD pidl; LPPIDLDATA pdata; pidl = _ILAlloc(0x99, sizeof(PIDLDATA)); @@ -252,12 +248,12 @@ return pidl; } -VALUEStruct * _ILGetValueStruct(LPCITEMIDLIST pidl) -{ - LPPIDLDATA pdata = _ILGetDataPointer(pidl); +const VALUEStruct * _ILGetValueStruct(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata = _ILGetDataPointer(const_cast<LPITEMIDLIST>(pidl)); if (pdata && pdata->type==0x99) - return (VALUEStruct*)&(pdata->u.value); + return reinterpret_cast<const VALUEStruct*>(&pdata->u.value); return NULL; } Modified: trunk/reactos/dll/shellext/netshell/enumlist.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/enum…
============================================================================== --- trunk/reactos/dll/shellext/netshell/enumlist.h [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/enumlist.h [iso-8859-1] Sun Apr 19 20:56:42 2015 @@ -21,7 +21,7 @@ typedef struct tagENUMLIST { struct tagENUMLIST *pNext; - LPITEMIDLIST pidl; + PITEMID_CHILD pidl; } ENUMLIST, *LPENUMLIST; class CEnumIDList final : @@ -29,7 +29,7 @@ { public: CEnumIDList(); - BOOL AddToEnumList(LPITEMIDLIST pidl); + BOOL AddToEnumList(PITEMID_CHILD pidl); // IUnknown virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut); @@ -37,7 +37,7 @@ virtual ULONG WINAPI Release(); // IEnumIDList - virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched); + virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, PITEMID_CHILD *rgelt, ULONG *pceltFetched); virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt); virtual HRESULT STDMETHODCALLTYPE Reset(); virtual HRESULT STDMETHODCALLTYPE Clone(IEnumIDList **ppenum); Modified: trunk/reactos/dll/shellext/netshell/lanconnectui.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/lanc…
============================================================================== --- trunk/reactos/dll/shellext/netshell/lanconnectui.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/lanconnectui.cpp [iso-8859-1] Sun Apr 19 20:56:42 2015 @@ -31,7 +31,6 @@ { public: CNetConnectionPropertyUi(); - ~CNetConnectionPropertyUi(); // IUnknown virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut); @@ -51,6 +50,8 @@ virtual HRESULT WINAPI Disconnect(HWND hwndParent, DWORD dwFlags); private: + ~CNetConnectionPropertyUi(); + BOOL GetINetCfgComponent(INetCfg *pNCfg, INetCfgComponent ** pOut); VOID EnumComponents(HWND hDlgCtrl, INetCfg *pNCfg, const GUID *CompGuid, UINT Type); VOID InitializeLANPropertiesUIDlg(HWND hwndDlg); Modified: trunk/reactos/dll/shellext/netshell/lanstatusui.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/lans…
============================================================================== --- trunk/reactos/dll/shellext/netshell/lanstatusui.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/lanstatusui.cpp [iso-8859-1] Sun Apr 19 20:56:42 2015 @@ -53,16 +53,16 @@ HRESULT InitializeNetTaskbarNotifications(); HRESULT ShowStatusDialogByCLSID(const GUID *pguidCmdGroup); - INetConnectionManager *lpNetMan; - LONG ref; - NOTIFICATION_ITEM *pHead; + INetConnectionManager *m_lpNetMan; + LONG m_ref; + NOTIFICATION_ITEM *m_pHead; }; -CLanStatus::CLanStatus() -{ - ref = 0; - lpNetMan = NULL; - pHead = NULL; +CLanStatus::CLanStatus() : + m_lpNetMan(NULL), + m_ref(0), + m_pHead(NULL) +{ } VOID @@ -965,9 +965,9 @@ TRACE("InitializeNetTaskbarNotifications\n"); - if (pHead) - { - pItem = pHead; + if (m_pHead) + { + pItem = m_pHead; while (pItem) { hr = pItem->pNet->GetProperties(&pProps); @@ -1074,7 +1074,7 @@ if (pLast) pLast->pNext = pItem; else - pHead = pItem; + m_pHead = pItem; pLast = pItem; Index++; @@ -1092,7 +1092,7 @@ } } while (hr == S_OK); - lpNetMan = pNetConMan; + m_lpNetMan = pNetConMan; pEnumCon->Release(); return S_OK; } @@ -1102,7 +1102,7 @@ { NOTIFICATION_ITEM *pItem; - pItem = pHead; + pItem = m_pHead; while (pItem) { if (IsEqualGUID(pItem->guidItem, *pguidCmdGroup)) @@ -1140,7 +1140,7 @@ WINAPI CLanStatus::AddRef() { - ULONG refCount = InterlockedIncrement(&ref); + ULONG refCount = InterlockedIncrement(&m_ref); return refCount; } @@ -1150,7 +1150,7 @@ CLanStatus::Release() { #if 0 // WTF?! - ULONG refCount = InterlockedDecrement(&ref); + ULONG refCount = InterlockedDecrement(&m_ref); if (!refCount) delete this; Modified: trunk/reactos/dll/shellext/netshell/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/prec…
============================================================================== --- trunk/reactos/dll/shellext/netshell/precomp.h [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/precomp.h [iso-8859-1] Sun Apr 19 20:56:42 2015 @@ -61,11 +61,10 @@ HRESULT WINAPI ISF_NetConnect_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); /* enumlist.c */ -LPITEMIDLIST _ILCreateNetConnect(void); -LPITEMIDLIST ILCreateNetConnectItem(INetConnection *pItem); +PITEMID_CHILD _ILCreateNetConnect(void); +PITEMID_CHILD ILCreateNetConnectItem(INetConnection *pItem); BOOL _ILIsNetConnect(LPCITEMIDLIST pidl); -//BOOL AddToEnumList(IEnumIDList *iface, LPITEMIDLIST pidl); -VALUEStruct * _ILGetValueStruct(LPCITEMIDLIST pidl); +const VALUEStruct * _ILGetValueStruct(LPCITEMIDLIST pidl); /* classfactory.c */ HRESULT IClassFactory_fnConstructor(REFCLSID rclsid, REFIID riid, LPVOID *ppvOut); Modified: trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/shfl…
============================================================================== --- trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp [iso-8859-1] Sun Apr 19 20:56:42 2015 @@ -33,7 +33,6 @@ { public: CNetworkConnections(); - ~CNetworkConnections(); /* IUnknown */ virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut); @@ -41,38 +40,40 @@ virtual ULONG WINAPI Release(); // IShellFolder - virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes); + virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes); virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); - virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); + virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); + virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2); virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI GetAttributesOf (UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut); + virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut); virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); - virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); - virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); + virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet); + virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut); /* IShellFolder2 */ virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); - virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv); - virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd); + virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv); + virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd); virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); // IPersistFolder2 virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); - virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); - virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST *pidl); + virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl); + virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE *pidl); // IShellExecuteHookW virtual HRESULT WINAPI Execute(LPSHELLEXECUTEINFOW pei); private: + ~CNetworkConnections(); + LONG m_ref; /* both paths are parsible from the desktop */ - LPITEMIDLIST m_pidlRoot; /* absolute pidl */ + PIDLIST_ABSOLUTE m_pidlRoot; IOleCommandTarget *m_lpOleCmd; }; @@ -83,7 +84,7 @@ public IExtractIconW { public: - CNetConUiObject(LPCITEMIDLIST apidl, IOleCommandTarget *lpOleCmd); + CNetConUiObject(PCUITEMID_CHILD pidl, IOleCommandTarget *lpOleCmd); // IUnknown virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut); @@ -111,7 +112,7 @@ private: LONG m_ref; - LPCITEMIDLIST m_apidl; + PCUITEMID_CHILD m_pidl; IUnknown *m_pUnknown; IOleCommandTarget *m_lpOleCmd; }; @@ -136,10 +137,10 @@ HRESULT ShowNetConnectionStatus(IOleCommandTarget * lpOleCmd, INetConnection * pNetConnect, HWND hwnd); -CNetworkConnections::CNetworkConnections() - : m_ref(0), - m_pidlRoot(_ILCreateNetConnect()), - m_lpOleCmd(NULL) +CNetworkConnections::CNetworkConnections() : + m_ref(0), + m_pidlRoot(_ILCreateNetConnect()), + m_lpOleCmd(NULL) { } @@ -218,7 +219,7 @@ */ HRESULT WINAPI CNetworkConnections::ParseDisplayName ( HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) + DWORD * pchEaten, PIDLIST_RELATIVE * ppidl, DWORD * pdwAttributes) { HRESULT hr = E_UNEXPECTED; @@ -239,7 +240,7 @@ IEnumNetConnection *pEnumCon; INetConnection *INetCon; ULONG Count; - LPITEMIDLIST pidl; + PITEMID_CHILD pidl; /* get an instance to of IConnectionManager */ hr = INetConnectionManager_Constructor(NULL, IID_INetConnectionManager, (LPVOID*)&pNetConMan); @@ -296,7 +297,7 @@ * ISF_NetConnect_fnBindToObject */ HRESULT WINAPI CNetworkConnections::BindToObject ( - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) + PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) { return E_NOTIMPL; } @@ -305,7 +306,7 @@ * ISF_NetConnect_fnBindToStorage */ HRESULT WINAPI CNetworkConnections::BindToStorage( - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) + PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) { *ppvOut = NULL; return E_NOTIMPL; @@ -316,12 +317,8 @@ */ HRESULT WINAPI CNetworkConnections::CompareIDs( - LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - //IGenericSFImpl *This = (IGenericSFImpl *)iface; - - - + LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) +{ return E_NOTIMPL; } @@ -404,9 +401,9 @@ * */ -HRESULT IContextMenuImpl_Constructor(REFIID riid, LPCITEMIDLIST apidl, LPVOID * ppvOut, IOleCommandTarget * lpOleCmd) -{ - CNetConUiObject *pMenu = new CNetConUiObject(apidl, lpOleCmd); +HRESULT IContextMenuImpl_Constructor(REFIID riid, PCUITEMID_CHILD pidl, LPVOID * ppvOut, IOleCommandTarget * lpOleCmd) +{ + CNetConUiObject *pMenu = new CNetConUiObject(pidl, lpOleCmd); if (!pMenu) return E_OUTOFMEMORY; @@ -444,12 +441,12 @@ * ISF_NetConnect_fnGetDisplayNameOf * */ -HRESULT WINAPI CNetworkConnections::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +HRESULT WINAPI CNetworkConnections::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) { LPWSTR pszName; HRESULT hr = E_FAIL; NETCON_PROPERTIES * pProperties; - VALUEStruct * val; + const VALUEStruct * val; if (!strRet) return E_INVALIDARG; @@ -510,10 +507,10 @@ * ppidlOut [out] simple pidl returned */ HRESULT WINAPI CNetworkConnections::SetNameOf ( - HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - VALUEStruct * val; + HWND hwndOwner, PCUITEMID_CHILD pidl, /*simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD * pPidlOut) +{ + const VALUEStruct * val; val = _ILGetValueStruct(pidl); if (!val) @@ -554,17 +551,17 @@ } HRESULT WINAPI CNetworkConnections::GetDetailsEx( - LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) + PCUITEMID_CHILD pidl, const SHCOLUMNID * pscid, VARIANT * pv) { return E_NOTIMPL; } HRESULT WINAPI CNetworkConnections::GetDetailsOf( - LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) + PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS * psd) { WCHAR buffer[MAX_PATH] = {0}; HRESULT hr = E_FAIL; - VALUEStruct * val; + const VALUEStruct * val; NETCON_PROPERTIES * pProperties; if (iColumn >= NETCONNECTSHELLVIEWCOLUMNS) @@ -667,9 +664,9 @@ * IContextMenu2 Implementation */ -CNetConUiObject::CNetConUiObject(LPCITEMIDLIST apidl, IOleCommandTarget *lpOleCmd) +CNetConUiObject::CNetConUiObject(PCUITEMID_CHILD pidl, IOleCommandTarget *lpOleCmd) : m_ref(0), - m_apidl(apidl), + m_pidl(pidl), m_pUnknown(NULL), m_lpOleCmd(lpOleCmd) { @@ -784,10 +781,10 @@ UINT idCmdLast, UINT uFlags) { - VALUEStruct * val; + const VALUEStruct * val; NETCON_PROPERTIES * pProperties; - val = _ILGetValueStruct(m_apidl); + val = _ILGetValueStruct(m_pidl); if (!val) return E_FAIL; @@ -923,9 +920,9 @@ */ HRESULT WINAPI CNetConUiObject::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) { - VALUEStruct * val; - - val = _ILGetValueStruct(m_apidl); + const VALUEStruct * val; + + val = _ILGetValueStruct(m_pidl); if (!val) return E_FAIL; @@ -1032,7 +1029,7 @@ int *piIndex, UINT *pwFlags) { - VALUEStruct *val; + const VALUEStruct *val; NETCON_PROPERTIES *pProperties; *pwFlags = 0; @@ -1042,7 +1039,7 @@ return E_FAIL; } - val = _ILGetValueStruct(m_apidl); + val = _ILGetValueStruct(m_pidl); if (!val) { ERR("_ILGetValueStruct failed\n"); @@ -1110,7 +1107,7 @@ * * NOTES: it makes no sense to change the pidl */ -HRESULT WINAPI CNetworkConnections::Initialize(LPCITEMIDLIST pidl) +HRESULT WINAPI CNetworkConnections::Initialize(PCIDLIST_ABSOLUTE pidl) { SHFree(m_pidlRoot); m_pidlRoot = ILClone(pidl); @@ -1121,7 +1118,7 @@ /************************************************************************** * ISF_NetConnect_PersistFolder2_GetCurFolder */ -HRESULT WINAPI CNetworkConnections::GetCurFolder(LPITEMIDLIST *pidl) +HRESULT WINAPI CNetworkConnections::GetCurFolder(PIDLIST_ABSOLUTE *pidl) { if (!pidl) return E_POINTER; @@ -1136,7 +1133,7 @@ */ HRESULT WINAPI CNetworkConnections::Execute(LPSHELLEXECUTEINFOW pei) { - VALUEStruct *val; + const VALUEStruct *val; NETCON_PROPERTIES * pProperties; val = _ILGetValueStruct(ILFindLastID((ITEMIDLIST*)pei->lpIDList));
9 years, 8 months
1
0
0
0
[dreimer] 67309: [ROSAPPS] Add Fraginator to build. This thing NEVER could have worked in that state in RBUILD. rc file was not even selected to have any chance of any dialog. Billions of things ar...
by dreimer@svn.reactos.org
Author: dreimer Date: Sun Apr 19 20:30:44 2015 New Revision: 67309 URL:
http://svn.reactos.org/svn/reactos?rev=67309&view=rev
Log: [ROSAPPS] Add Fraginator to build. This thing NEVER could have worked in that state in RBUILD. rc file was not even selected to have any chance of any dialog. Billions of things are defined a billion times in any language RC file. etcetc. Added: trunk/rosapps/applications/fraginator/CMakeLists.txt (with props) Modified: trunk/rosapps/applications/CMakeLists.txt trunk/rosapps/applications/fraginator/DriveVolume.cpp trunk/rosapps/applications/fraginator/Fraginator.rc trunk/rosapps/applications/fraginator/ReportDialog.cpp trunk/rosapps/applications/fraginator/Unfrag.cpp trunk/rosapps/applications/fraginator/lang/en-US.rc trunk/rosapps/applications/fraginator/lang/es-ES.rc trunk/rosapps/applications/fraginator/lang/fr-FR.rc trunk/rosapps/applications/fraginator/lang/no-NO.rc trunk/rosapps/applications/fraginator/lang/ro-RO.rc trunk/rosapps/applications/fraginator/lang/sk-SK.rc trunk/rosapps/applications/fraginator/lang/uk-UA.rc Modified: trunk/rosapps/applications/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/CMakeLists.tx…
============================================================================== --- trunk/rosapps/applications/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rosapps/applications/CMakeLists.txt [iso-8859-1] Sun Apr 19 20:30:44 2015 @@ -1,7 +1,7 @@ add_subdirectory(cmdutils) add_subdirectory(devutils) add_subdirectory(explorer-old) -#add_subdirectory(fraginator) +add_subdirectory(fraginator) add_subdirectory(imagesoft) #add_subdirectory(net) add_subdirectory(notevil) Added: trunk/rosapps/applications/fraginator/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/fraginator/CM…
============================================================================== --- trunk/rosapps/applications/fraginator/CMakeLists.txt (added) +++ trunk/rosapps/applications/fraginator/CMakeLists.txt [iso-8859-1] Sun Apr 19 20:30:44 2015 @@ -0,0 +1,24 @@ + +set_cpp(WITH_RUNTIME WITH_STL) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +list(APPEND SOURCE + Fraginator.cpp + MainDialog.cpp + ReportDialog.cpp) + +list(APPEND UNFRAG_SOURCE + Unfrag.cpp + Defragment.cpp + DriveVolume.cpp) + +add_executable(frag ${SOURCE} ${UNFRAG_SOURCE} Fraginator.rc) +set_module_type(frag win32gui UNICODE) +add_importlibs(frag user32 advapi32 shell32 comctl32 msvcrt kernel32 ntdll) +add_cd_file(TARGET frag DESTINATION reactos/system32 FOR all) + +add_executable(unfrag ${UNFRAG_SOURCE}) +set_module_type(unfrag win32cui UNICODE) +add_importlibs(unfrag advapi32 msvcrt kernel32 ntdll) +add_cd_file(TARGET unfrag DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/fraginator/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rosapps/applications/fraginator/DriveVolume.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/fraginator/Dr…
============================================================================== --- trunk/rosapps/applications/fraginator/DriveVolume.cpp [iso-8859-1] (original) +++ trunk/rosapps/applications/fraginator/DriveVolume.cpp [iso-8859-1] Sun Apr 19 20:30:44 2015 @@ -94,7 +94,7 @@ swprintf (SerialText, L"%x-%x", (VolSN & 0xffff0000) >> 16, VolSN & 0x0000ffff); - wcsupr (SerialText); + _wcsupr (SerialText); VolInfo.Serial = SerialText; } else Modified: trunk/rosapps/applications/fraginator/Fraginator.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/fraginator/Fr…
============================================================================== --- trunk/rosapps/applications/fraginator/Fraginator.rc [iso-8859-1] (original) +++ trunk/rosapps/applications/fraginator/Fraginator.rc [iso-8859-1] Sun Apr 19 20:30:44 2015 @@ -1,24 +1,70 @@ -// Microsoft Visual C++ generated resource script. -// +#include <windef.h> +#include <winuser.h> + #include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// #include "windows.h" -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +IDB_LOGO BITMAP "Fraginator Motif Icon.bmp" +IDI_ICON ICON "icon1.ico" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,3,0,0 + PRODUCTVERSION 1,3,0,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", " " + VALUE "FileDescription", "Fraginator" + VALUE "FileVersion", "1.03" + VALUE "InternalName", "Fraginator" + VALUE "LegalCopyright", "Copyright © 2000-2002 Rick Brewster" + VALUE "OriginalFilename", "Fraginator.exe" + VALUE "ProductName", "Fraginator" + VALUE "ProductVersion", "1.03" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#include <reactos/manifest_exe.rc> /* UTF-8 */ #pragma code_page(65001) -#include "lang/en-US.rc" -#include "lang/es-ES.rc" -#include "lang/fr-FR.rc" -#include "lang/no-NO.rc" -#include "lang/ro-RO.rc" -#include "lang/sk-SK.rc" -#include "lang/uk-UA.rc" +#ifdef LANGUAGE_EN_US + #include "lang/en-US.rc" +#endif +#ifdef LANGUAGE_ES_ES + #include "lang/es-ES.rc" +#endif +#ifdef LANGUAGE_FR_FR + #include "lang/fr-FR.rc" +#endif +#ifdef LANGUAGE_NO_NO + #include "lang/no-NO.rc" +#endif +#ifdef LANGUAGE_RO_RO + #include "lang/ro-RO.rc" +#endif +#ifdef LANGUAGE_SK_SK + #include "lang/sk-SK.rc" +#endif +#ifdef LANGUAGE_UK_UA + #include "lang/uk-UA.rc" +#endif Modified: trunk/rosapps/applications/fraginator/ReportDialog.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/fraginator/Re…
============================================================================== --- trunk/rosapps/applications/fraginator/ReportDialog.cpp [iso-8859-1] (original) +++ trunk/rosapps/applications/fraginator/ReportDialog.cpp [iso-8859-1] Sun Apr 19 20:30:44 2015 @@ -6,7 +6,7 @@ #include "resource.h" -void SetReportInfo (HWND Dlg, DefragReport &Report, uint32 BytesDivisor, wchar_t *BytesUnits, bool Fractional) +void SetReportInfo (HWND Dlg, DefragReport &Report, uint32 BytesDivisor, const wchar_t *BytesUnits, bool Fractional) { wchar_t Text[1000]; wchar_t Text2[1000]; Modified: trunk/rosapps/applications/fraginator/Unfrag.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/fraginator/Un…
============================================================================== --- trunk/rosapps/applications/fraginator/Unfrag.cpp [iso-8859-1] (original) +++ trunk/rosapps/applications/fraginator/Unfrag.cpp [iso-8859-1] Sun Apr 19 20:30:44 2015 @@ -143,7 +143,7 @@ // Main Initialization -int wmain (int argc, wchar_t **argv) +extern "C" int wmain (int argc, wchar_t **argv) { vector<wstring> Drives; vector<Defragment *> Defrags; @@ -157,10 +157,10 @@ { if (wcslen(argv[c]) == 2 && argv[c][1] == L':') { - Drives.push_back (wcsupr(argv[c])); + Drives.push_back (_wcsupr(argv[c])); } else - if (argv[c][0] == L'-' || argv[c][0] == L'/' && wcslen(argv[c]) == 2) + if (argv[c][0] == L'-' || (argv[c][0] == L'/' && wcslen(argv[c]) == 2)) { switch (tolower(argv[c][1])) { Modified: trunk/rosapps/applications/fraginator/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/fraginator/la…
============================================================================== --- trunk/rosapps/applications/fraginator/lang/en-US.rc [iso-8859-1] (original) +++ trunk/rosapps/applications/fraginator/lang/en-US.rc [iso-8859-1] Sun Apr 19 20:30:44 2015 @@ -1,19 +1,4 @@ -// Microsoft Visual C++ generated resource script. -// - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// IDD_MAIN DIALOGEX 0, 0, 346, 103 STYLE DS_SHELLFONT | DS_CENTERMOUSE | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | @@ -97,134 +82,3 @@ IDC_RECOMMEND,7,106,377,38,SS_SUNKEN LTEXT "Recommendations:",-1,7,96,62,8 END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_MAIN, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 339 - TOPMARGIN, 7 - BOTTOMMARGIN, 96 - END - - IDD_REPORT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 384 - TOPMARGIN, 7 - BOTTOMMARGIN, 162 - END -END -#endif // APSTUDIO_INVOKED - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""windows.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,0,0 - PRODUCTVERSION 1,3,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", " " - VALUE "FileDescription", "Fraginator" - VALUE "FileVersion", "1.03" - VALUE "InternalName", "Fraginator" - VALUE "LegalCopyright", "Copyright © 2000-2002 Rick Brewster" - VALUE "OriginalFilename", "Fraginator.exe" - VALUE "ProductName", "Fraginator" - VALUE "ProductVersion", "1.03" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDB_LOGO BITMAP "Fraginator Motif Icon.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON ICON "icon1.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// RT_MANIFEST -// - -1 RT_MANIFEST "default1.bin" -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - Modified: trunk/rosapps/applications/fraginator/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/fraginator/la…
============================================================================== --- trunk/rosapps/applications/fraginator/lang/es-ES.rc [iso-8859-1] (original) +++ trunk/rosapps/applications/fraginator/lang/es-ES.rc [iso-8859-1] Sun Apr 19 20:30:44 2015 @@ -1,18 +1,4 @@ -// Microsoft Visual C++ generated resource script. -// - -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// IDD_MAIN DIALOGEX 0, 0, 346, 103 STYLE DS_SHELLFONT | DS_CENTERMOUSE | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | @@ -96,134 +82,3 @@ IDC_RECOMMEND,7,106,377,38,SS_SUNKEN LTEXT "Recomendaciones:",-1,7,96,62,8 END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_MAIN, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 339 - TOPMARGIN, 7 - BOTTOMMARGIN, 96 - END - - IDD_REPORT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 384 - TOPMARGIN, 7 - BOTTOMMARGIN, 162 - END -END -#endif // APSTUDIO_INVOKED - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""windows.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,0,0 - PRODUCTVERSION 1,3,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Organización", " " - VALUE "FileDescription", "Fraginator" - VALUE "Versión del archivo", "1.03" - VALUE "Nombre interno", "Fraginator" - VALUE "Copyright", "Copyright © 2000-2002 Rick Brewster" - VALUE "Nombre original del archivo", "Fraginator.exe" - VALUE "Nombre del producto", "Fraginator" - VALUE "Versión del producto", "1.03" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDB_LOGO BITMAP "Fraginator Motif Icon.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON ICON "icon1.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// RT_MANIFEST -// - -1 RT_MANIFEST "default1.bin" -#endif // Spanish resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - Modified: trunk/rosapps/applications/fraginator/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/fraginator/la…
============================================================================== --- trunk/rosapps/applications/fraginator/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/rosapps/applications/fraginator/lang/fr-FR.rc [iso-8859-1] Sun Apr 19 20:30:44 2015 @@ -1,19 +1,4 @@ -// Microsoft Visual C++ generated resource script. -// - -///////////////////////////////////////////////////////////////////////////// -// French resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// IDD_MAIN DIALOGEX 0, 0, 346, 103 STYLE DS_SHELLFONT | DS_CENTERMOUSE | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | @@ -97,134 +82,3 @@ IDC_RECOMMEND,7,106,377,38,SS_SUNKEN LTEXT "Recommandations :",-1,7,96,62,8 END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_MAIN, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 339 - TOPMARGIN, 7 - BOTTOMMARGIN, 96 - END - - IDD_REPORT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 384 - TOPMARGIN, 7 - BOTTOMMARGIN, 162 - END -END -#endif // APSTUDIO_INVOKED - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""windows.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,0,0 - PRODUCTVERSION 1,3,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", " " - VALUE "FileDescription", "Fraginator" - VALUE "FileVersion", "1.03" - VALUE "InternalName", "Fraginator" - VALUE "LegalCopyright", "Copyright © 2000-2002 Rick Brewster" - VALUE "OriginalFilename", "Fraginator.exe" - VALUE "ProductName", "Fraginator" - VALUE "ProductVersion", "1.03" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDB_LOGO BITMAP "Fraginator Motif Icon.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON ICON "icon1.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// RT_MANIFEST -// - -1 RT_MANIFEST "default1.bin" -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - Modified: trunk/rosapps/applications/fraginator/lang/no-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/fraginator/la…
============================================================================== --- trunk/rosapps/applications/fraginator/lang/no-NO.rc [iso-8859-1] (original) +++ trunk/rosapps/applications/fraginator/lang/no-NO.rc [iso-8859-1] Sun Apr 19 20:30:44 2015 @@ -1,19 +1,4 @@ -// Microsoft Visual C++ generated resource script. -// - -///////////////////////////////////////////////////////////////////////////// -// Norwegian (N.O.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// IDD_MAIN DIALOGEX 0, 0, 346, 103 STYLE DS_SHELLFONT | DS_CENTERMOUSE | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | @@ -97,134 +82,3 @@ IDC_RECOMMEND,7,106,377,38,SS_SUNKEN LTEXT "Anbefalinger:",-1,7,96,62,8 END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_MAIN, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 339 - TOPMARGIN, 7 - BOTTOMMARGIN, 96 - END - - IDD_REPORT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 384 - TOPMARGIN, 7 - BOTTOMMARGIN, 162 - END -END -#endif // APSTUDIO_INVOKED - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""windows.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,0,0 - PRODUCTVERSION 1,3,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Bedriftnavn", " " - VALUE "Filbeskrivelse", "Fraginator" - VALUE "Filversjon", "1.03" - VALUE "Internasjonaltnavn", "Fraginator" - VALUE "LegalCopyright", "enerett © 2000-2002 Rick Brewster" - VALUE "Originalfilnavn", "Fraginator.exe" - VALUE "Produktnavn", "Fraginator" - VALUE "ProduktVersjon", "1.03" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDB_LOGO BITMAP "Fraginator Motif Icon.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON ICON "icon1.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// RT_MANIFEST -// - -1 RT_MANIFEST "default1.bin" -#endif // Norwegian (N.O.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - Modified: trunk/rosapps/applications/fraginator/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/fraginator/la…
============================================================================== --- trunk/rosapps/applications/fraginator/lang/ro-RO.rc [iso-8859-1] (original) +++ trunk/rosapps/applications/fraginator/lang/ro-RO.rc [iso-8859-1] Sun Apr 19 20:30:44 2015 @@ -1,19 +1,4 @@ -// Microsoft Visual C++ generated resource script. -// - -///////////////////////////////////////////////////////////////////////////// -// Romanian resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// IDD_MAIN DIALOGEX 0, 0, 346, 103 STYLE DS_SHELLFONT | DS_CENTERMOUSE | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | @@ -97,134 +82,3 @@ IDC_RECOMMEND,7,106,377,38,SS_SUNKEN LTEXT "RecomandÄri:",-1,7,96,62,8 END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_MAIN, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 339 - TOPMARGIN, 7 - BOTTOMMARGIN, 96 - END - - IDD_REPORT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 384 - TOPMARGIN, 7 - BOTTOMMARGIN, 162 - END -END -#endif // APSTUDIO_INVOKED - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""windows.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,0,0 - PRODUCTVERSION 1,3,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", " " - VALUE "FileDescription", "Fraginator" - VALUE "FileVersion", "1.03" - VALUE "InternalName", "Fraginator" - VALUE "LegalCopyright", "Drept de autor © 2000-2002 Rick Brewster" - VALUE "OriginalFilename", "Fraginator.exe" - VALUE "ProductName", "Fraginator" - VALUE "ProductVersion", "1.03" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDB_LOGO BITMAP "Fraginator Motif Icon.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON ICON "icon1.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// RT_MANIFEST -// - -1 RT_MANIFEST "default1.bin" -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - Modified: trunk/rosapps/applications/fraginator/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/fraginator/la…
============================================================================== --- trunk/rosapps/applications/fraginator/lang/sk-SK.rc [iso-8859-1] (original) +++ trunk/rosapps/applications/fraginator/lang/sk-SK.rc [iso-8859-1] Sun Apr 19 20:30:44 2015 @@ -2,22 +2,7 @@ * DATE OF TR.: 04-09-2008 */ -// Microsoft Visual C++ generated resource script. -// - -///////////////////////////////////////////////////////////////////////////// -// Slovak resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -#pragma code_page(1250) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// IDD_MAIN DIALOGEX 0, 0, 346, 103 STYLE DS_SHELLFONT | DS_CENTERMOUSE | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | @@ -101,134 +86,3 @@ IDC_RECOMMEND,7,106,377,38,SS_SUNKEN LTEXT "OdporúÄania:",-1,7,96,62,8 END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_MAIN, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 339 - TOPMARGIN, 7 - BOTTOMMARGIN, 96 - END - - IDD_REPORT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 384 - TOPMARGIN, 7 - BOTTOMMARGIN, 162 - END -END -#endif // APSTUDIO_INVOKED - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""windows.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,0,0 - PRODUCTVERSION 1,3,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Názov spoloÄnosti", " " - VALUE "Popis súboru", "Fraginator" - VALUE "Verzia súboru", "1.03" - VALUE "Vnútorný názov", "Fraginator" - VALUE "Autorské práva", "Copyright © 2000-2002 Rick Brewster" - VALUE "Pôvodný názov súboru", "Fraginator.exe" - VALUE "Názov produktu", "Fraginator" - VALUE "Verzia produktu", "1.03" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDB_LOGO BITMAP "Fraginator Motif Icon.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON ICON "icon1.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// RT_MANIFEST -// - -1 RT_MANIFEST "default1.bin" -#endif // Slovak resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - Modified: trunk/rosapps/applications/fraginator/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/fraginator/la…
============================================================================== --- trunk/rosapps/applications/fraginator/lang/uk-UA.rc [iso-8859-1] (original) +++ trunk/rosapps/applications/fraginator/lang/uk-UA.rc [iso-8859-1] Sun Apr 19 20:30:44 2015 @@ -1,19 +1,4 @@ -// Microsoft Visual C++ generated resource script. -// - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// IDD_MAIN DIALOGEX 0, 0, 346, 103 STYLE DS_SHELLFONT | DS_CENTERMOUSE | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | @@ -97,134 +82,3 @@ IDC_RECOMMEND,7,106,377,38,SS_SUNKEN LTEXT "РекомендаÑÑÑ:",-1,7,96,62,8 END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_MAIN, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 339 - TOPMARGIN, 7 - BOTTOMMARGIN, 96 - END - - IDD_REPORT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 384 - TOPMARGIN, 7 - BOTTOMMARGIN, 162 - END -END -#endif // APSTUDIO_INVOKED - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""windows.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,0,0 - PRODUCTVERSION 1,3,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", " " - VALUE "FileDescription", "Fraginator" - VALUE "FileVersion", "1.03" - VALUE "InternalName", "Fraginator" - VALUE "LegalCopyright", "Copyright © 2000-2002 Rick Brewster" - VALUE "OriginalFilename", "Fraginator.exe" - VALUE "ProductName", "Fraginator" - VALUE "ProductVersion", "1.03" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDB_LOGO BITMAP "Fraginator Motif Icon.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON ICON "icon1.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// RT_MANIFEST -// - -1 RT_MANIFEST "default1.bin" -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED -
9 years, 8 months
1
0
0
0
[dreimer] 67308: [ROSAPPS] Add devutils to cmake build. Thx for Amine Khaldi, Thomas Faber and learn_more for help. More will come.
by dreimer@svn.reactos.org
Author: dreimer Date: Sun Apr 19 20:27:51 2015 New Revision: 67308 URL:
http://svn.reactos.org/svn/reactos?rev=67308&view=rev
Log: [ROSAPPS] Add devutils to cmake build. Thx for Amine Khaldi, Thomas Faber and learn_more for help. More will come. Added: trunk/rosapps/applications/devutils/gdb2/CMakeLists.txt (with props) trunk/rosapps/applications/devutils/gdihv/CMakeLists.txt (with props) trunk/rosapps/applications/devutils/genguid/CMakeLists.txt (with props) trunk/rosapps/applications/devutils/symdump/CMakeLists.txt (with props) trunk/rosapps/applications/devutils/syscalldump/CMakeLists.txt (with props) Modified: trunk/rosapps/applications/devutils/CMakeLists.txt trunk/rosapps/applications/devutils/symdump/symdump.c trunk/rosapps/applications/devutils/syscalldump/syscalldump.c Modified: trunk/rosapps/applications/devutils/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/devutils/CMak…
============================================================================== --- trunk/rosapps/applications/devutils/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rosapps/applications/devutils/CMakeLists.txt [iso-8859-1] Sun Apr 19 20:27:51 2015 @@ -1,6 +1,6 @@ -#add_subdirectory(gdb2) -#add_subdirectory(gdihv) -#add_subdirectory(genguid) -#add_subdirectory(symdump) -#add_subdirectory(syscalldump) +add_subdirectory(gdb2) +add_subdirectory(gdihv) +add_subdirectory(genguid) +add_subdirectory(symdump) +add_subdirectory(syscalldump) add_subdirectory(vgafontedit) Added: trunk/rosapps/applications/devutils/gdb2/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/devutils/gdb2…
============================================================================== --- trunk/rosapps/applications/devutils/gdb2/CMakeLists.txt (added) +++ trunk/rosapps/applications/devutils/gdb2/CMakeLists.txt [iso-8859-1] Sun Apr 19 20:27:51 2015 @@ -0,0 +1,6 @@ + +set_cpp(WITH_RUNTIME) +add_executable(gdb2 gdb2.cpp) +set_module_type(gdb2 win32cui) +add_importlibs(gdb2 user32 msvcrt kernel32) +add_cd_file(TARGET gdb2 DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/devutils/gdb2/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/devutils/gdihv/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/devutils/gdih…
============================================================================== --- trunk/rosapps/applications/devutils/gdihv/CMakeLists.txt (added) +++ trunk/rosapps/applications/devutils/gdihv/CMakeLists.txt [iso-8859-1] Sun Apr 19 20:27:51 2015 @@ -0,0 +1,14 @@ + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +list(APPEND SOURCE + gdihv.c + gdihv.rc + mainwnd.c + handlelist.c + proclist.c) + +add_executable(gdihv ${SOURCE}) +set_module_type(gdihv win32cui) +add_importlibs(gdihv user32 comctl32 psapi msvcrt kernel32) +add_cd_file(TARGET gdihv DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/devutils/gdihv/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/devutils/genguid/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/devutils/geng…
============================================================================== --- trunk/rosapps/applications/devutils/genguid/CMakeLists.txt (added) +++ trunk/rosapps/applications/devutils/genguid/CMakeLists.txt [iso-8859-1] Sun Apr 19 20:27:51 2015 @@ -0,0 +1,6 @@ + +add_executable(genguid genguid.c genguid.rc) +set_module_type(genguid win32cui) +target_link_libraries(genguid uuid) +add_importlibs(genguid ole32 msvcrt kernel32) +add_cd_file(TARGET genguid DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/devutils/genguid/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/devutils/symdump/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/devutils/symd…
============================================================================== --- trunk/rosapps/applications/devutils/symdump/CMakeLists.txt (added) +++ trunk/rosapps/applications/devutils/symdump/CMakeLists.txt [iso-8859-1] Sun Apr 19 20:27:51 2015 @@ -0,0 +1,8 @@ + +include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/reactos/wine) +add_executable(symdump symdump.c) +set_module_type(symdump win32cui) +target_link_libraries(symdump wine) +add_importlibs(symdump dbghelp shlwapi msvcrt kernel32) +add_compile_flags("-Wno-error=unused-but-set-variable") +add_cd_file(TARGET symdump DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/devutils/symdump/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rosapps/applications/devutils/symdump/symdump.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/devutils/symd…
============================================================================== --- trunk/rosapps/applications/devutils/symdump/symdump.c [iso-8859-1] (original) +++ trunk/rosapps/applications/devutils/symdump/symdump.c [iso-8859-1] Sun Apr 19 20:27:51 2015 @@ -16,6 +16,7 @@ #include <stdio.h> #define _WINVER 0x501 +#define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS 0x00000800 #include <windows.h> #include <shlwapi.h> #include <dbghelp.h> Added: trunk/rosapps/applications/devutils/syscalldump/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/devutils/sysc…
============================================================================== --- trunk/rosapps/applications/devutils/syscalldump/CMakeLists.txt (added) +++ trunk/rosapps/applications/devutils/syscalldump/CMakeLists.txt [iso-8859-1] Sun Apr 19 20:27:51 2015 @@ -0,0 +1,6 @@ + +add_executable(syscalldump syscalldump.c) +set_module_type(syscalldump win32cui) +target_link_libraries(syscalldump wine) +add_importlibs(syscalldump dbghelp msvcrt kernel32) +add_cd_file(TARGET syscalldump DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/devutils/syscalldump/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rosapps/applications/devutils/syscalldump/syscalldump.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/devutils/sysc…
============================================================================== --- trunk/rosapps/applications/devutils/syscalldump/syscalldump.c [iso-8859-1] (original) +++ trunk/rosapps/applications/devutils/syscalldump/syscalldump.c [iso-8859-1] Sun Apr 19 20:27:51 2015 @@ -2,6 +2,7 @@ #include <stdlib.h> #include <ctype.h> #define _WINVER 0x501 +#define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS 0x00000800 #include <windows.h> #include <shlwapi.h> #include <dbghelp.h>
9 years, 8 months
1
0
0
0
[tfaber] 67307: [NETSHELL] Fix artifacts from incomplete C++ conversion: - Add m_ prefix to member variables to avoid shadowing locals - Use initializer lists in constructors - Use destructors inst...
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Apr 19 20:18:25 2015 New Revision: 67307 URL:
http://svn.reactos.org/svn/reactos?rev=67307&view=rev
Log: [NETSHELL] Fix artifacts from incomplete C++ conversion: - Add m_ prefix to member variables to avoid shadowing locals - Use initializer lists in constructors - Use destructors instead of putting code in Release - Avoid C-style casts (not exhaustive) Modified: trunk/reactos/dll/shellext/netshell/CMakeLists.txt trunk/reactos/dll/shellext/netshell/classfactory.cpp trunk/reactos/dll/shellext/netshell/connectmanager.cpp trunk/reactos/dll/shellext/netshell/enumlist.cpp trunk/reactos/dll/shellext/netshell/enumlist.h trunk/reactos/dll/shellext/netshell/lanconnectui.cpp trunk/reactos/dll/shellext/netshell/lanstatusui.cpp trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp Modified: trunk/reactos/dll/shellext/netshell/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/CMak…
============================================================================== --- trunk/reactos/dll/shellext/netshell/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/CMakeLists.txt [iso-8859-1] Sun Apr 19 20:18:25 2015 @@ -5,7 +5,7 @@ if(NOT MSVC) # HACK: this should be enabled globally! - add_compile_flags_language("-std=c++11" "CXX") + add_compile_flags_language("-std=c++11 -Wshadow" "CXX") endif() remove_definitions(-D_WIN32_WINNT=0x502) Modified: trunk/reactos/dll/shellext/netshell/classfactory.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/clas…
============================================================================== --- trunk/reactos/dll/shellext/netshell/classfactory.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/classfactory.cpp [iso-8859-1] Sun Apr 19 20:18:25 2015 @@ -16,14 +16,14 @@ virtual HRESULT WINAPI LockServer(BOOL fLock); private: - LONG ref; - CLSID clsid; + LONG m_ref; + CLSID m_clsid; }; -CNetshellClassFactory::CNetshellClassFactory(REFCLSID rclsid) +CNetshellClassFactory::CNetshellClassFactory(REFCLSID rclsid) : + m_ref(0), + m_clsid(rclsid) { - ref = 0; - clsid = rclsid; } HRESULT @@ -33,10 +33,10 @@ LPVOID *ppvObj) { *ppvObj = NULL; - if(IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IClassFactory)) + if (IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IClassFactory)) { - *ppvObj = (IClassFactory*)this; - InterlockedIncrement(&ref); + *ppvObj = static_cast<IClassFactory*>(this); + AddRef(); return S_OK; } return E_NOINTERFACE; @@ -46,7 +46,7 @@ WINAPI CNetshellClassFactory::AddRef() { - ULONG refCount = InterlockedIncrement(&ref); + ULONG refCount = InterlockedIncrement(&m_ref); return refCount; } @@ -55,13 +55,11 @@ WINAPI CNetshellClassFactory::Release() { - ULONG refCount = InterlockedDecrement(&ref); + ULONG refCount = InterlockedDecrement(&m_ref); if (!refCount) - { CoTaskMemFree(this); - return 0; - } + return refCount; } @@ -74,13 +72,13 @@ { *ppvObject = NULL; - if (IsEqualCLSID(clsid, CLSID_NetworkConnections)) + if (IsEqualCLSID(m_clsid, CLSID_NetworkConnections)) return ISF_NetConnect_Constructor(pUnkOuter, riid, ppvObject); - else if (IsEqualCLSID(clsid, CLSID_ConnectionManager)) + else if (IsEqualCLSID(m_clsid, CLSID_ConnectionManager)) return INetConnectionManager_Constructor(pUnkOuter, riid, ppvObject); - else if (IsEqualCLSID(clsid, CLSID_LANConnectUI)) + else if (IsEqualCLSID(m_clsid, CLSID_LANConnectUI)) return LanConnectUI_Constructor(pUnkOuter, riid, ppvObject); - else if (IsEqualCLSID(clsid, CLSID_LanConnectStatusUI)) + else if (IsEqualCLSID(m_clsid, CLSID_LanConnectStatusUI)) return LanConnectStatusUI_Constructor(pUnkOuter, riid, ppvObject); return E_NOINTERFACE; Modified: trunk/reactos/dll/shellext/netshell/connectmanager.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/conn…
============================================================================== --- trunk/reactos/dll/shellext/netshell/connectmanager.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/connectmanager.cpp [iso-8859-1] Sun Apr 19 20:18:25 2015 @@ -30,9 +30,9 @@ virtual HRESULT WINAPI Clone(IEnumNetConnection **ppenum); private: - LONG ref; - PINetConnectionItem pHead; - PINetConnectionItem pCurrent; + LONG m_ref; + PINetConnectionItem m_pHead; + PINetConnectionItem m_pCurrent; }; class CNetConnection final : @@ -40,6 +40,7 @@ { public: CNetConnection(PINetConnectionItem pItem); + ~CNetConnection(); // IUnknown virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut); @@ -56,18 +57,18 @@ HRESULT WINAPI Rename(LPCWSTR pszwDuplicateName); private: - LONG ref; - NETCON_PROPERTIES Props; - DWORD dwAdapterIndex; + LONG m_ref; + NETCON_PROPERTIES m_Props; + DWORD m_dwAdapterIndex; }; VOID NormalizeOperStatus(MIB_IFROW *IfEntry, NETCON_PROPERTIES * Props); -CNetConnectionManager::CNetConnectionManager() -{ - ref = 0; - pHead = NULL; - pCurrent = NULL; +CNetConnectionManager::CNetConnectionManager() : + m_ref(0), + m_pHead(NULL), + m_pCurrent(NULL) +{ } HRESULT @@ -81,7 +82,7 @@ if (IsEqualIID(iid, IID_IUnknown) || IsEqualIID(iid, IID_INetConnectionManager)) { - *ppvObj = (INetConnectionManager*)this; + *ppvObj = static_cast<INetConnectionManager*>(this); AddRef(); return S_OK; } @@ -93,7 +94,7 @@ WINAPI CNetConnectionManager::AddRef() { - ULONG refCount = InterlockedIncrement(&ref); + ULONG refCount = InterlockedIncrement(&m_ref); return refCount; } @@ -102,7 +103,7 @@ WINAPI CNetConnectionManager::Release() { - ULONG refCount = InterlockedDecrement(&ref); + ULONG refCount = InterlockedDecrement(&m_ref); if (!refCount) delete this; @@ -124,7 +125,7 @@ if (Flags != NCME_DEFAULT) return E_FAIL; - *ppEnum = (IEnumNetConnection*)this; + *ppEnum = static_cast<IEnumNetConnection*>(this); AddRef(); return S_OK; } @@ -133,25 +134,30 @@ * INetConnection Interface */ -CNetConnection::CNetConnection(PINetConnectionItem pItem) -{ - ref = 0; - dwAdapterIndex = pItem->dwAdapterIndex; - CopyMemory(&Props, &pItem->Props, sizeof(NETCON_PROPERTIES)); - +CNetConnection::CNetConnection(PINetConnectionItem pItem) : + m_ref(0), + m_Props(pItem->Props), + m_dwAdapterIndex(pItem->dwAdapterIndex) +{ if (pItem->Props.pszwName) { - Props.pszwName = (LPWSTR)CoTaskMemAlloc((wcslen(pItem->Props.pszwName)+1)*sizeof(WCHAR)); - if (Props.pszwName) - wcscpy(Props.pszwName, pItem->Props.pszwName); + m_Props.pszwName = static_cast<PWSTR>(CoTaskMemAlloc((wcslen(pItem->Props.pszwName)+1)*sizeof(WCHAR))); + if (m_Props.pszwName) + wcscpy(m_Props.pszwName, pItem->Props.pszwName); } if (pItem->Props.pszwDeviceName) { - Props.pszwDeviceName = (LPWSTR)CoTaskMemAlloc((wcslen(pItem->Props.pszwDeviceName)+1)*sizeof(WCHAR)); - if (Props.pszwDeviceName) - wcscpy(Props.pszwDeviceName, pItem->Props.pszwDeviceName); - } + m_Props.pszwDeviceName = static_cast<PWSTR>(CoTaskMemAlloc((wcslen(pItem->Props.pszwDeviceName)+1)*sizeof(WCHAR))); + if (m_Props.pszwDeviceName) + wcscpy(m_Props.pszwDeviceName, pItem->Props.pszwDeviceName); + } +} + +CNetConnection::~CNetConnection() +{ + CoTaskMemFree(m_Props.pszwName); + CoTaskMemFree(m_Props.pszwDeviceName); } HRESULT @@ -177,7 +183,7 @@ WINAPI CNetConnection::AddRef() { - ULONG refCount = InterlockedIncrement(&ref); + ULONG refCount = InterlockedIncrement(&m_ref); return refCount; } @@ -186,14 +192,10 @@ WINAPI CNetConnection::Release() { - ULONG refCount = InterlockedDecrement(&ref); + ULONG refCount = InterlockedDecrement(&m_ref); if (!refCount) - { - CoTaskMemFree(Props.pszwName); - CoTaskMemFree(Props.pszwDeviceName); delete this; - } return refCount; } @@ -243,32 +245,32 @@ if (!ppProps) return E_POINTER; - pProperties = (NETCON_PROPERTIES*)CoTaskMemAlloc(sizeof(NETCON_PROPERTIES)); + pProperties = static_cast<NETCON_PROPERTIES*>(CoTaskMemAlloc(sizeof(NETCON_PROPERTIES))); if (!pProperties) return E_OUTOFMEMORY; - CopyMemory(pProperties, &Props, sizeof(NETCON_PROPERTIES)); + CopyMemory(pProperties, &m_Props, sizeof(NETCON_PROPERTIES)); pProperties->pszwName = NULL; - if (Props.pszwDeviceName) - { - pProperties->pszwDeviceName = (LPWSTR)CoTaskMemAlloc((wcslen(Props.pszwDeviceName)+1)*sizeof(WCHAR)); + if (m_Props.pszwDeviceName) + { + pProperties->pszwDeviceName = static_cast<LPWSTR>(CoTaskMemAlloc((wcslen(m_Props.pszwDeviceName)+1)*sizeof(WCHAR))); if (pProperties->pszwDeviceName) - wcscpy(pProperties->pszwDeviceName, Props.pszwDeviceName); + wcscpy(pProperties->pszwDeviceName, m_Props.pszwDeviceName); } *ppProps = pProperties; /* get updated adapter characteristics */ ZeroMemory(&IfEntry, sizeof(IfEntry)); - IfEntry.dwIndex = dwAdapterIndex; - if(GetIfEntry(&IfEntry) != NO_ERROR) + IfEntry.dwIndex = m_dwAdapterIndex; + if (GetIfEntry(&IfEntry) != NO_ERROR) return NOERROR; NormalizeOperStatus(&IfEntry, pProperties); - hr = StringFromCLSID((CLSID)Props.guidId, &pStr); + hr = StringFromCLSID((CLSID)m_Props.guidId, &pStr); if (SUCCEEDED(hr)) { wcscpy(szName, L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\"); @@ -290,18 +292,18 @@ { /* use updated name */ dwSize = wcslen(szName) + 1; - pProperties->pszwName = (LPWSTR)CoTaskMemAlloc(dwSize * sizeof(WCHAR)); + pProperties->pszwName = static_cast<PWSTR>(CoTaskMemAlloc(dwSize * sizeof(WCHAR))); if (pProperties->pszwName) CopyMemory(pProperties->pszwName, szName, dwSize * sizeof(WCHAR)); } else { /* use cached name */ - if (Props.pszwName) + if (m_Props.pszwName) { - pProperties->pszwName = (LPWSTR)CoTaskMemAlloc((wcslen(Props.pszwName)+1)*sizeof(WCHAR)); + pProperties->pszwName = static_cast<PWSTR>(CoTaskMemAlloc((wcslen(m_Props.pszwName)+1)*sizeof(WCHAR))); if (pProperties->pszwName) - wcscpy(pProperties->pszwName, Props.pszwName); + wcscpy(pProperties->pszwName, m_Props.pszwName); } } RegCloseKey(hKey); @@ -316,7 +318,7 @@ WINAPI CNetConnection::GetUiObjectClassId(CLSID *pclsid) { - if (Props.MediaType == NCM_LAN) + if (m_Props.MediaType == NCM_LAN) { CopyMemory(pclsid, &CLSID_LANConnectUI, sizeof(CLSID)); return S_OK; @@ -338,20 +340,20 @@ if (pszwDuplicateName == NULL || wcslen(pszwDuplicateName) == 0) return S_OK; - if (Props.pszwName) - { - CoTaskMemFree(Props.pszwName); - Props.pszwName = NULL; + if (m_Props.pszwName) + { + CoTaskMemFree(m_Props.pszwName); + m_Props.pszwName = NULL; } dwSize = (wcslen(pszwDuplicateName) + 1) * sizeof(WCHAR); - Props.pszwName = (LPWSTR)CoTaskMemAlloc(dwSize); - if (Props.pszwName == NULL) + m_Props.pszwName = static_cast<PWSTR>(CoTaskMemAlloc(dwSize)); + if (m_Props.pszwName == NULL) return E_OUTOFMEMORY; - wcscpy(Props.pszwName, pszwDuplicateName); - - hr = StringFromCLSID((CLSID)Props.guidId, &pStr); + wcscpy(m_Props.pszwName, pszwDuplicateName); + + hr = StringFromCLSID((CLSID)m_Props.guidId, &pStr); if (SUCCEEDED(hr)) { wcscpy(szName, L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\"); @@ -360,7 +362,7 @@ if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szName, 0, KEY_WRITE, &hKey) == ERROR_SUCCESS) { - RegSetValueExW(hKey, L"Name", NULL, REG_SZ, (LPBYTE)Props.pszwName, dwSize); + RegSetValueExW(hKey, L"Name", NULL, REG_SZ, (LPBYTE)m_Props.pszwName, dwSize); RegCloseKey(hKey); } @@ -380,7 +382,7 @@ return E_OUTOFMEMORY; pConnection->AddRef(); - *ppv = (INetConnection *)pConnection; + *ppv = pConnection; return S_OK; } @@ -405,11 +407,11 @@ if (celt != 1) return E_FAIL; - if (!pCurrent) + if (!m_pCurrent) return S_FALSE; - hr = IConnection_Constructor(rgelt, pCurrent); - pCurrent = pCurrent->Next; + hr = IConnection_Constructor(rgelt, m_pCurrent); + m_pCurrent = m_pCurrent->Next; return hr; } @@ -418,8 +420,8 @@ WINAPI CNetConnectionManager::Skip(ULONG celt) { - while(pCurrent && celt-- > 0) - pCurrent = pCurrent->Next; + while (m_pCurrent && celt-- > 0) + m_pCurrent = m_pCurrent->Next; if (celt) return S_FALSE; @@ -432,7 +434,7 @@ WINAPI CNetConnectionManager::Reset() { - pCurrent = pHead; + m_pCurrent = m_pHead; return S_OK; } @@ -450,7 +452,7 @@ IP_ADAPTER_INFO * pCurrentAdapter; pCurrentAdapter = pAdapterInfo; - while(pCurrentAdapter) + while (pCurrentAdapter) { szBuffer[0] = L'\0'; if (MultiByteToWideChar(CP_ACP, 0, pCurrentAdapter->AdapterName, -1, szBuffer, sizeof(szBuffer)/sizeof(szBuffer[0]))) @@ -472,7 +474,7 @@ MIB_IFROW *IfEntry, NETCON_PROPERTIES * Props) { - switch(IfEntry->dwOperStatus) + switch (IfEntry->dwOperStatus) { case MIB_IF_OPER_STATUS_NON_OPERATIONAL: Props->Status = NCS_HARDWARE_DISABLED; @@ -518,7 +520,7 @@ if (GetIfTable(NULL, &dwSize, TRUE) != ERROR_INSUFFICIENT_BUFFER) return FALSE; - pIfTable = (PMIB_IFTABLE)CoTaskMemAlloc(dwSize); + pIfTable = static_cast<PMIB_IFTABLE>(CoTaskMemAlloc(dwSize)); if (!pIfTable) return FALSE; @@ -537,7 +539,7 @@ return FALSE; } - pAdapterInfo = (PIP_ADAPTER_INFO)CoTaskMemAlloc(dwSize); + pAdapterInfo = static_cast<PIP_ADAPTER_INFO>(CoTaskMemAlloc(dwSize)); if (!pAdapterInfo) { CoTaskMemFree(pIfTable); @@ -593,11 +595,11 @@ /* get detailed adapter info */ ZeroMemory(&IfEntry, sizeof(IfEntry)); IfEntry.dwIndex = dwAdapterIndex; - if(GetIfEntry(&IfEntry) != NO_ERROR) + if (GetIfEntry(&IfEntry) != NO_ERROR) break; /* allocate new INetConnectionItem */ - PINetConnectionItem pNew = (PINetConnectionItem)CoTaskMemAlloc(sizeof(INetConnectionItem)); + PINetConnectionItem pNew = static_cast<PINetConnectionItem>(CoTaskMemAlloc(sizeof(INetConnectionItem))); if (!pNew) break; @@ -607,7 +609,7 @@ CLSIDFromString(szNetCfg, &pNew->Props.guidId); NormalizeOperStatus(&IfEntry, &pNew->Props); - switch(IfEntry.dwType) + switch (IfEntry.dwType) { case IF_TYPE_ETHERNET_CSMACD: pNew->Props.MediaType = NCM_LAN; @@ -628,7 +630,7 @@ dwSize = sizeof(szAdapterNetCfg); if (RegQueryValueExW(hSubKey, L"Name", NULL, NULL, (LPBYTE)szAdapterNetCfg, &dwSize) == ERROR_SUCCESS) { - pNew->Props.pszwName = (LPWSTR)CoTaskMemAlloc((wcslen(szAdapterNetCfg)+1) * sizeof(WCHAR)); + pNew->Props.pszwName = static_cast<PWSTR>(CoTaskMemAlloc((wcslen(szAdapterNetCfg)+1) * sizeof(WCHAR))); if (pNew->Props.pszwName) wcscpy(pNew->Props.pszwName, szAdapterNetCfg); } @@ -646,7 +648,7 @@ SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_DEVICEDESC, NULL, NULL, 0, &dwSize); if (dwSize != 0) { - pNew->Props.pszwDeviceName = (LPWSTR)CoTaskMemAlloc(dwSize); + pNew->Props.pszwDeviceName = static_cast<PWSTR>(CoTaskMemAlloc(dwSize)); if (pNew->Props.pszwDeviceName) SetupDiGetDeviceRegistryPropertyW(hInfo, &DevInfo, SPDRP_DEVICEDESC, NULL, (PBYTE)pNew->Props.pszwDeviceName, dwSize, &dwSize); } @@ -654,16 +656,16 @@ if (pCurrent) pCurrent->Next = pNew; else - pHead = pNew; + m_pHead = pNew; pCurrent = pNew; - }while(TRUE); + } while (TRUE); CoTaskMemFree(pIfTable); CoTaskMemFree(pAdapterInfo); SetupDiDestroyDeviceInfoList(hInfo); - this->pCurrent = pHead; + m_pCurrent = m_pHead; return TRUE; } Modified: trunk/reactos/dll/shellext/netshell/enumlist.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/enum…
============================================================================== --- trunk/reactos/dll/shellext/netshell/enumlist.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/enumlist.cpp [iso-8859-1] Sun Apr 19 20:18:25 2015 @@ -3,7 +3,7 @@ /************************************************************************** * AddToEnumList() */ -BOOL +BOOL CEnumIDList::AddToEnumList(LPITEMIDLIST pidl) { LPENUMLIST pNew; @@ -11,37 +11,50 @@ if (!pidl) return FALSE; - pNew = (LPENUMLIST)SHAlloc(sizeof(ENUMLIST)); - if(pNew) + pNew = static_cast<LPENUMLIST>(SHAlloc(sizeof(ENUMLIST))); + if (pNew) { pNew->pNext = NULL; pNew->pidl = pidl; - if(!mpFirst) + if (!m_pFirst) { - mpFirst = pNew; - mpCurrent = pNew; + m_pFirst = pNew; + m_pCurrent = pNew; } - if(mpLast) + if (m_pLast) { /*add the new item to the end of the list */ - mpLast->pNext = pNew; + m_pLast->pNext = pNew; } /*update the last item pointer */ - mpLast = pNew; + m_pLast = pNew; return TRUE; } return FALSE; } -CEnumIDList::CEnumIDList() -{ - ref = 0; - mpCurrent = NULL; - mpLast = NULL; - mpFirst = NULL; +CEnumIDList::CEnumIDList() : + m_ref(0), + m_pFirst(NULL), + m_pLast(NULL), + m_pCurrent(NULL) +{ +} + +CEnumIDList::~CEnumIDList() +{ + LPENUMLIST pDelete; + + while (m_pFirst) + { + pDelete = m_pFirst; + m_pFirst = pDelete->pNext; + SHFree(pDelete->pidl); + SHFree(pDelete); + } } HRESULT @@ -54,7 +67,7 @@ if (IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IEnumIDList)) { - *ppvObj = (IEnumIDList*)this; + *ppvObj = static_cast<IEnumIDList*>(this); AddRef(); return S_OK; } @@ -66,7 +79,7 @@ WINAPI CEnumIDList::AddRef() { - ULONG refCount = InterlockedIncrement(&ref); + ULONG refCount = InterlockedIncrement(&m_ref); return refCount; } @@ -74,20 +87,11 @@ ULONG WINAPI CEnumIDList::Release() { - LPENUMLIST pDelete; - ULONG refCount = InterlockedDecrement(&ref); - - if (!refCount) - { - while (mpFirst) - { - pDelete = mpFirst; - mpFirst = pDelete->pNext; - SHFree(pDelete->pidl); - SHFree(pDelete); - } + ULONG refCount = InterlockedDecrement(&m_ref); + + if (!refCount) delete this; - } + return refCount; } @@ -102,7 +106,7 @@ HRESULT hr = S_OK; LPITEMIDLIST temp; - if(pceltFetched) + if (pceltFetched) *pceltFetched = 0; *rgelt=0; @@ -112,19 +116,19 @@ return E_INVALIDARG; } - if (celt > 0 && !mpCurrent) + if (celt > 0 && !m_pCurrent) { return S_FALSE; } for (i = 0; i < celt; i++) { - if (!mpCurrent) + if (!m_pCurrent) break; - temp = ILClone(mpCurrent->pidl); + temp = ILClone(m_pCurrent->pidl); rgelt[i] = temp; - mpCurrent = mpCurrent->pNext; + m_pCurrent = m_pCurrent->pNext; } if (pceltFetched) @@ -142,12 +146,12 @@ for (dwIndex = 0; dwIndex < celt; dwIndex++) { - if (!mpCurrent) + if (!m_pCurrent) { hr = S_FALSE; break; } - mpCurrent = mpCurrent->pNext; + m_pCurrent = m_pCurrent->pNext; } return hr; @@ -157,7 +161,7 @@ WINAPI CEnumIDList::Reset() { - mpCurrent = mpFirst; + m_pCurrent = m_pFirst; return S_OK; } @@ -173,7 +177,7 @@ LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl) { - if(pidl && pidl->mkid.cb != 0x00) + if (pidl && pidl->mkid.cb != 0x00) return (LPPIDLDATA) &(pidl->mkid.abID); return NULL; } @@ -183,7 +187,7 @@ LPITEMIDLIST pidlOut = NULL; pidlOut = (LPITEMIDLIST)SHAlloc(size + 5); - if(pidlOut) + if (pidlOut) { LPPIDLDATA pData; @@ -243,7 +247,7 @@ pidl = _ILAlloc(0x99, sizeof(PIDLDATA)); pdata = _ILGetDataPointer(pidl); - pdata->u.value.pItem = (INetConnection*)pItem; + pdata->u.value.pItem = pItem; return pidl; } Modified: trunk/reactos/dll/shellext/netshell/enumlist.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/enum…
============================================================================== --- trunk/reactos/dll/shellext/netshell/enumlist.h [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/enumlist.h [iso-8859-1] Sun Apr 19 20:18:25 2015 @@ -43,8 +43,10 @@ virtual HRESULT STDMETHODCALLTYPE Clone(IEnumIDList **ppenum); private: - LONG ref; - LPENUMLIST mpFirst; - LPENUMLIST mpLast; - LPENUMLIST mpCurrent; + ~CEnumIDList(); + + LONG m_ref; + LPENUMLIST m_pFirst; + LPENUMLIST m_pLast; + LPENUMLIST m_pCurrent; }; Modified: trunk/reactos/dll/shellext/netshell/lanconnectui.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/lanc…
============================================================================== --- trunk/reactos/dll/shellext/netshell/lanconnectui.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/lanconnectui.cpp [iso-8859-1] Sun Apr 19 20:18:25 2015 @@ -31,6 +31,7 @@ { public: CNetConnectionPropertyUi(); + ~CNetConnectionPropertyUi(); // IUnknown virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut); @@ -57,20 +58,37 @@ BOOL GetDeviceInstanceID(OUT LPOLESTR *DeviceInstanceID); static INT_PTR CALLBACK LANPropertiesUIDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); - INetConnection * pCon; - INetCfgLock *NCfgLock; - INetCfg * pNCfg; - NETCON_PROPERTIES * pProperties; - LONG ref; + INetConnection * m_pCon; + INetCfgLock *m_NCfgLock; + INetCfg * m_pNCfg; + NETCON_PROPERTIES * m_pProperties; + LONG m_ref; }; -CNetConnectionPropertyUi::CNetConnectionPropertyUi() -{ - ref = 0; - pCon = NULL; - pNCfg = NULL; - NCfgLock = NULL; - pProperties = NULL; +CNetConnectionPropertyUi::CNetConnectionPropertyUi() : + m_pCon(NULL), + m_NCfgLock(NULL), + m_pNCfg(NULL), + m_pProperties(NULL), + m_ref(0) +{ +} + +CNetConnectionPropertyUi::~CNetConnectionPropertyUi() +{ + if (m_pNCfg) + { + m_pNCfg->Uninitialize(); + m_pNCfg->Release(); + } + if (m_NCfgLock) + { + m_NCfgLock->Release(); + } + if (m_pProperties) + { + NcFreeNetconProperties(m_pProperties); + } } HPROPSHEETPAGE @@ -127,7 +145,7 @@ hr = pNCg->GetDisplayName(&pName); if (SUCCEEDED(hr)) { - if (!_wcsicmp(pName, pProperties->pszwDeviceName)) + if (!_wcsicmp(pName, m_pProperties->pszwDeviceName)) { *pOut = pNCg; pEnumCfg->Release(); @@ -160,7 +178,7 @@ pNCfg->Release(); return; } - while(pENetCfg->Next(1, &pNCfgComp, &Num) == S_OK) + while (pENetCfg->Next(1, &pNCfgComp, &Num) == S_OK) { hr = pNCfgComp->GetCharacteristics(&dwCharacteristics); if (SUCCEEDED(hr) && (dwCharacteristics & NCF_HIDDEN)) @@ -188,7 +206,7 @@ } } - pItem = (NET_ITEM*)CoTaskMemAlloc(sizeof(NET_ITEM)); + pItem = static_cast<NET_ITEM*>(CoTaskMemAlloc(sizeof(NET_ITEM))); if (!pItem) continue; @@ -217,13 +235,13 @@ LPWSTR pDisplayName; LVITEMW li; - SendDlgItemMessageW(hwndDlg, IDC_NETCARDNAME, WM_SETTEXT, 0, (LPARAM)pProperties->pszwDeviceName); - if (pProperties->dwCharacter & NCCF_SHOW_ICON) + SendDlgItemMessageW(hwndDlg, IDC_NETCARDNAME, WM_SETTEXT, 0, (LPARAM)m_pProperties->pszwDeviceName); + if (m_pProperties->dwCharacter & NCCF_SHOW_ICON) { /* check show item on taskbar*/ SendDlgItemMessageW(hwndDlg, IDC_SHOWTASKBAR, BM_SETCHECK, BST_CHECKED, 0); } - if (pProperties->dwCharacter & NCCF_NOTIFY_DISCONNECTED) + if (m_pProperties->dwCharacter & NCCF_NOTIFY_DISCONNECTED) { /* check notify item */ SendDlgItemMessageW(hwndDlg, IDC_NOTIFYNOCONNECTION, BM_SETCHECK, BST_CHECKED, 0); @@ -255,7 +273,7 @@ return; } - NCfgLock = pNCfgLock; + m_NCfgLock = pNCfgLock; hr = pNCfg->Initialize(NULL); if (FAILED(hr)) { @@ -266,7 +284,7 @@ EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETCLIENT, NET_TYPE_CLIENT); EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETSERVICE, NET_TYPE_SERVICE); EnumComponents(hDlgCtrl, pNCfg, &GUID_DEVCLASS_NETTRANS, NET_TYPE_PROTOCOL); - this->pNCfg = pNCfg; + m_pNCfg = pNCfg; ZeroMemory(&li, sizeof(li)); li.mask = LVIF_STATE; @@ -337,7 +355,7 @@ LPOLESTR pStr; HKEY hKey; - switch(uMsg) + switch (uMsg) { case WM_INITDIALOG: page = (PROPSHEETPAGE*)lParam; @@ -351,9 +369,9 @@ if (lppsn->hdr.code == PSN_APPLY) { This = (CNetConnectionPropertyUi*)GetWindowLongPtr(hwndDlg, DWLP_USER); - if (This->pNCfg) + if (This->m_pNCfg) { - hr = This->pNCfg->Apply(); + hr = This->m_pNCfg->Apply(); if (FAILED(hr)) return PSNRET_INVALID; } @@ -364,7 +382,7 @@ dwShowIcon = 0; - if (StringFromCLSID((CLSID)This->pProperties->guidId, &pStr) == ERROR_SUCCESS) + if (StringFromCLSID((CLSID)This->m_pProperties->guidId, &pStr) == ERROR_SUCCESS) { swprintf(szKey, L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\%s\\Connection", pStr); CoTaskMemFree(pStr); @@ -381,9 +399,9 @@ else if (lppsn->hdr.code == PSN_CANCEL) { This = (CNetConnectionPropertyUi*)GetWindowLongPtr(hwndDlg, DWLP_USER); - if (This->pNCfg) + if (This->m_pNCfg) { - hr = This->pNCfg->Cancel(); + hr = This->m_pNCfg->Cancel(); if (SUCCEEDED(hr)) return PSNRET_NOERROR; else @@ -465,7 +483,7 @@ WCHAR szKeyName[2*MAX_PATH]; WCHAR szInstanceID[2*MAX_PATH]; - if (StringFromCLSID(pProperties->guidId, &pStr) != ERROR_SUCCESS) + if (StringFromCLSID(m_pProperties->guidId, &pStr) != ERROR_SUCCESS) { // failed to convert guid to string return FALSE; @@ -484,7 +502,7 @@ if (RegGetValueW(hKey, NULL, L"PnpInstanceId", RRF_RT_REG_SZ, NULL, (PVOID)szInstanceID, &dwInstanceID) == ERROR_SUCCESS) { szInstanceID[MAX_PATH-1] = L'\0'; - pResult = (LPOLESTR)CoTaskMemAlloc((wcslen(szInstanceID) + 1) * sizeof(WCHAR)); + pResult = static_cast<LPOLESTR>(CoTaskMemAlloc((wcslen(szInstanceID) + 1) * sizeof(WCHAR))); if (pResult != 0) { wcscpy(pResult, szInstanceID); @@ -537,7 +555,7 @@ WINAPI CNetConnectionPropertyUi::AddRef() { - ULONG refCount = InterlockedIncrement(&ref); + ULONG refCount = InterlockedIncrement(&m_ref); return refCount; } @@ -546,25 +564,10 @@ WINAPI CNetConnectionPropertyUi::Release() { - ULONG refCount = InterlockedDecrement(&ref); + ULONG refCount = InterlockedDecrement(&m_ref); if (!refCount) - { - if (pNCfg) - { - pNCfg->Uninitialize(); - pNCfg->Release(); - } - if (NCfgLock) - { - NCfgLock->Release(); - } - if (pProperties) - { - NcFreeNetconProperties(pProperties); - } delete this; - } return refCount; } @@ -583,14 +586,14 @@ initEx.dwSize = sizeof(initEx); initEx.dwICC = ICC_LISTVIEW_CLASSES; - if(!InitCommonControlsEx(&initEx)) + if (!InitCommonControlsEx(&initEx)) return E_FAIL; - hr = pCon->GetProperties(&pProperties); + hr = m_pCon->GetProperties(&m_pProperties); if (FAILED(hr)) return hr; - hProp = InitializePropertySheetPage(MAKEINTRESOURCEW(IDD_NETPROPERTIES), LANPropertiesUIDlg, (LPARAM)this, pProperties->pszwName); + hProp = InitializePropertySheetPage(MAKEINTRESOURCEW(IDD_NETPROPERTIES), LANPropertiesUIDlg, (LPARAM)this, m_pProperties->pszwName); if (hProp) { ret = (*pfnAddPage)(hProp, lParam); @@ -619,7 +622,7 @@ WINAPI CNetConnectionPropertyUi::GetDeviceGuid(GUID *pGuid) { - CopyMemory(pGuid, &pProperties->guidId, sizeof(GUID)); + CopyMemory(pGuid, &m_pProperties->guidId, sizeof(GUID)); return S_OK; } @@ -627,13 +630,13 @@ WINAPI CNetConnectionPropertyUi::SetConnection(INetConnection* pCon) { - if (this->pCon) - this->pCon->Release(); + if (m_pCon) + m_pCon->Release(); if (!pCon) return E_POINTER; - this->pCon = pCon; + m_pCon = pCon; pCon->AddRef(); return S_OK; @@ -645,12 +648,12 @@ HWND hwndParent, DWORD dwFlags) { - if (!pCon) + if (!m_pCon) return E_POINTER; //FIXME if (dwFlags & NCUC_NO_UI) - return pCon->Connect(); + return m_pCon->Connect(); return E_FAIL; } Modified: trunk/reactos/dll/shellext/netshell/lanstatusui.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/lans…
============================================================================== --- trunk/reactos/dll/shellext/netshell/lanstatusui.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/lanstatusui.cpp [iso-8859-1] Sun Apr 19 20:18:25 2015 @@ -175,7 +175,7 @@ ZeroMemory(&IfEntry, sizeof(IfEntry)); IfEntry.dwIndex = pContext->dwAdapterIndex; - if(GetIfEntry(&IfEntry) != NO_ERROR) + if (GetIfEntry(&IfEntry) != NO_ERROR) { return; } @@ -381,7 +381,7 @@ } SubIndex++; pCur = pCur->Next; - }while(pCur && pCur->IpAddress.String[0]); + } while (pCur && pCur->IpAddress.String[0]); } static @@ -423,7 +423,7 @@ HWND hDlgCtrl; RECT rect; - switch(uMsg) + switch (uMsg) { case WM_INITDIALOG: pContext = (LANSTATUSUI_CONTEXT*)lParam; @@ -444,16 +444,16 @@ pAdapterInfo = NULL; if (GetAdaptersInfo(NULL, &dwSize) == ERROR_BUFFER_OVERFLOW) { - pAdapterInfo = (PIP_ADAPTER_INFO)CoTaskMemAlloc(dwSize); + pAdapterInfo = static_cast<PIP_ADAPTER_INFO>(CoTaskMemAlloc(dwSize)); if (pAdapterInfo) { if (GetAdaptersInfo(pAdapterInfo, &dwSize) == NO_ERROR) { pCurAdapter = pAdapterInfo; - while(pCurAdapter && pCurAdapter->Index != pContext->dwAdapterIndex) + while (pCurAdapter && pCurAdapter->Index != pContext->dwAdapterIndex) pCurAdapter = pCurAdapter->Next; - if(pCurAdapter->Index != pContext->dwAdapterIndex) + if (pCurAdapter->Index != pContext->dwAdapterIndex) pCurAdapter = NULL; } } @@ -498,7 +498,7 @@ dwSize = 0; if (GetPerAdapterInfo(pContext->dwAdapterIndex, NULL, &dwSize) == ERROR_BUFFER_OVERFLOW) { - pPerAdapter = (PIP_PER_ADAPTER_INFO)CoTaskMemAlloc(dwSize); + pPerAdapter = static_cast<PIP_PER_ADAPTER_INFO>(CoTaskMemAlloc(dwSize)); if (pPerAdapter) { if (GetPerAdapterInfo(pContext->dwAdapterIndex, pPerAdapter, &dwSize) == ERROR_SUCCESS) @@ -544,7 +544,7 @@ DWORD dwIpAddr; - switch(uMsg) + switch (uMsg) { case WM_INITDIALOG: page = (PROPSHEETPAGE*)lParam; @@ -633,8 +633,7 @@ { return TRUE; } - } - while(TRUE); + } while (TRUE); return FALSE; } @@ -702,7 +701,7 @@ return; } - pPnp = (LPWSTR)CoTaskMemAlloc(dwSize); + pPnp = static_cast<PWSTR>(CoTaskMemAlloc(dwSize)); if (!pPnp) { RegCloseKey(hKey); @@ -755,7 +754,7 @@ LANSTATUSUI_CONTEXT * pContext; LPPSHNOTIFY lppsn; - switch(uMsg) + switch (uMsg) { case WM_INITDIALOG: page = (PROPSHEETPAGE*)lParam; @@ -817,7 +816,7 @@ return; } - pAdapterInfo = (PIP_ADAPTER_INFO)CoTaskMemAlloc(dwSize); + pAdapterInfo = static_cast<PIP_ADAPTER_INFO>(CoTaskMemAlloc(dwSize)); if (!pAdapterInfo) { CoTaskMemFree(pAdapterInfo); @@ -840,7 +839,7 @@ } pCurAdapter = pAdapterInfo; - while(pCurAdapter->Index != dwAdapterIndex) + while (pCurAdapter->Index != dwAdapterIndex) pCurAdapter = pCurAdapter->Next; @@ -912,7 +911,7 @@ { LANSTATUSUI_CONTEXT * pContext; - switch(uMsg) + switch (uMsg) { case WM_INITDIALOG: pContext = (LANSTATUSUI_CONTEXT *)lParam; @@ -969,7 +968,7 @@ if (pHead) { pItem = pHead; - while(pItem) + while (pItem) { hr = pItem->pNet->GetProperties(&pProps); if (SUCCEEDED(hr)) @@ -1018,11 +1017,11 @@ if (hr == S_OK) { TRACE("new connection\n"); - pItem = (NOTIFICATION_ITEM*)CoTaskMemAlloc(sizeof(NOTIFICATION_ITEM)); + pItem = static_cast<NOTIFICATION_ITEM*>(CoTaskMemAlloc(sizeof(NOTIFICATION_ITEM))); if (!pItem) break; - pContext = (LANSTATUSUI_CONTEXT*)CoTaskMemAlloc(sizeof(LANSTATUSUI_CONTEXT)); + pContext = static_cast<LANSTATUSUI_CONTEXT*>(CoTaskMemAlloc(sizeof(LANSTATUSUI_CONTEXT))); if (!pContext) { CoTaskMemFree(pItem); @@ -1091,7 +1090,7 @@ } else ERR("CreateDialogParamW failed\n"); } - } while(hr == S_OK); + } while (hr == S_OK); lpNetMan = pNetConMan; pEnumCon->Release(); @@ -1104,7 +1103,7 @@ NOTIFICATION_ITEM *pItem; pItem = pHead; - while(pItem) + while (pItem) { if (IsEqualGUID(pItem->guidItem, *pguidCmdGroup)) { Modified: trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/shfl…
============================================================================== --- trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp [iso-8859-1] Sun Apr 19 20:18:25 2015 @@ -33,6 +33,7 @@ { public: CNetworkConnections(); + ~CNetworkConnections(); /* IUnknown */ virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut); @@ -40,7 +41,7 @@ virtual ULONG WINAPI Release(); // IShellFolder - virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes); + virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes); virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); @@ -51,7 +52,7 @@ virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); - /* ShellFolder2 */ + /* IShellFolder2 */ virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); @@ -69,11 +70,10 @@ virtual HRESULT WINAPI Execute(LPSHELLEXECUTEINFOW pei); private: - LONG ref; + LONG m_ref; /* both paths are parsible from the desktop */ - LPITEMIDLIST pidlRoot; /* absolute pidl */ - LPITEMIDLIST pidl; /* enumerated pidl */ - IOleCommandTarget * lpOleCmd; + LPITEMIDLIST m_pidlRoot; /* absolute pidl */ + IOleCommandTarget *m_lpOleCmd; }; class CNetConUiObject final : @@ -110,10 +110,10 @@ virtual HRESULT STDMETHODCALLTYPE Extract(LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); private: - LONG ref; - LPCITEMIDLIST apidl; - IUnknown *pUnknown; - IOleCommandTarget * lpOleCmd; + LONG m_ref; + LPCITEMIDLIST m_apidl; + IUnknown *m_pUnknown; + IOleCommandTarget *m_lpOleCmd; }; static const shvheader NetConnectSFHeader[] = { @@ -137,8 +137,15 @@ HRESULT ShowNetConnectionStatus(IOleCommandTarget * lpOleCmd, INetConnection * pNetConnect, HWND hwnd); CNetworkConnections::CNetworkConnections() -{ - pidlRoot = _ILCreateNetConnect(); /* my qualified pidl */ + : m_ref(0), + m_pidlRoot(_ILCreateNetConnect()), + m_lpOleCmd(NULL) +{ +} + +CNetworkConnections::~CNetworkConnections() +{ + SHFree(m_pidlRoot); } /************************************************************************** @@ -155,21 +162,21 @@ IsEqualIID(riid, IID_IShellFolder) || IsEqualIID(riid, IID_IShellFolder2)) { - *ppvObj = (IShellFolder2*)this; + *ppvObj = static_cast<IShellFolder2*>(this); } else if (IsEqualIID (riid, IID_IPersistFolder) || IsEqualIID (riid, IID_IPersistFolder2)) { - *ppvObj = (IPersistFolder2*)this; + *ppvObj = static_cast<IPersistFolder2*>(this); } else if (IsEqualIID(riid, IID_IShellExecuteHookW)) { - *ppvObj = (IShellExecuteHookW*)this; + *ppvObj = static_cast<IShellExecuteHookW*>(this); } #if 0 else if (IsEqualIID(riid, IID_IPersistIDList)) { - //*ppvObj = (IPersistIDList*)this; + //*ppvObj = static_cast<IPersistIDList*>(this); } #endif if (*ppvObj) @@ -191,20 +198,18 @@ ULONG WINAPI CNetworkConnections::AddRef() { - ULONG refCount = InterlockedIncrement(&ref); + ULONG refCount = InterlockedIncrement(&m_ref); return refCount; } ULONG WINAPI CNetworkConnections::Release() { - ULONG refCount = InterlockedDecrement(&ref); + ULONG refCount = InterlockedDecrement(&m_ref); if (!refCount) - { - SHFree(pidlRoot); delete this; - } + return refCount; } @@ -263,7 +268,7 @@ { break; } - }while(TRUE); + } while (TRUE); pEnumCon->Release(); pNetConMan->Release(); @@ -278,7 +283,7 @@ HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) { CEnumIDList *pList = new CEnumIDList; - *ppEnumIDList = (LPENUMIDLIST)pList; + *ppEnumIDList = static_cast<LPENUMIDLIST>(pList); if (!pList) return E_OUTOFMEMORY; @@ -338,7 +343,7 @@ { ZeroMemory(&cvf, sizeof(cvf)); cvf.cbSize = sizeof(cvf); - cvf.pshf = (IShellFolder*)this; + cvf.pshf = static_cast<IShellFolder*>(this); IShellView* pShellView; hr = SHCreateShellFolderViewEx(&cvf, &pShellView); @@ -375,7 +380,7 @@ if (*rgfInOut == 0) *rgfInOut = ~0; - if(cidl == 0) + if (cidl == 0) *rgfInOut = dwNetConnectAttributes; else *rgfInOut = dwNetConnectItemAttributes; @@ -423,10 +428,10 @@ *ppvOut = NULL; - if ((IsEqualIID (riid, IID_IContextMenu) || IsEqualIID (riid, IID_IContextMenu2) || IsEqualIID(riid, IID_IContextMenu3) || + if ((IsEqualIID(riid, IID_IContextMenu) || IsEqualIID (riid, IID_IContextMenu2) || IsEqualIID(riid, IID_IContextMenu3) || IsEqualIID(riid, IID_IQueryInfo) || IsEqualIID(riid, IID_IExtractIconW)) && cidl >= 1) { - return IContextMenuImpl_Constructor(riid, apidl[0], ppvOut, lpOleCmd); + return IContextMenuImpl_Constructor(riid, apidl[0], ppvOut, m_lpOleCmd); } else hr = E_NOINTERFACE; @@ -449,7 +454,7 @@ if (!strRet) return E_INVALIDARG; - pszName = (WCHAR*)CoTaskMemAlloc(MAX_PATH * sizeof(WCHAR)); + pszName = static_cast<LPWSTR>(CoTaskMemAlloc(MAX_PATH * sizeof(WCHAR))); if (!pszName) return E_OUTOFMEMORY; @@ -593,7 +598,7 @@ return E_FAIL; - switch(iColumn) + switch (iColumn) { case COLUMN_TYPE: if (pProperties->MediaType == NCM_LAN || pProperties->MediaType == NCM_SHAREDACCESSHOST_RAS) @@ -663,11 +668,11 @@ */ CNetConUiObject::CNetConUiObject(LPCITEMIDLIST apidl, IOleCommandTarget *lpOleCmd) -{ - this->apidl = apidl; - pUnknown = NULL; - this->lpOleCmd = lpOleCmd; - ref = 0; + : m_ref(0), + m_apidl(apidl), + m_pUnknown(NULL), + m_lpOleCmd(lpOleCmd) +{ } /************************************************************************ @@ -678,17 +683,17 @@ *ppvObject = NULL; if (IsEqualIID(iid, IID_IContextMenu) || IsEqualIID(iid, IID_IContextMenu2) || IsEqualIID(iid, IID_IContextMenu3)) - *ppvObject = (IContextMenu3*)this; + *ppvObject = static_cast<IContextMenu3*>(this); else if (IsEqualIID(iid, IID_IObjectWithSite)) - *ppvObject = (IObjectWithSite*)this; + *ppvObject = static_cast<IObjectWithSite*>(this); else if (IsEqualIID(iid, IID_IQueryInfo)) - *ppvObject = (IQueryInfo*)this; - else if(IsEqualIID(iid, IID_IExtractIconW)) - *ppvObject = (IExtractIconW*)this; + *ppvObject = static_cast<IQueryInfo*>(this); + else if (IsEqualIID(iid, IID_IExtractIconW)) + *ppvObject = static_cast<IExtractIconW*>(this); if (*ppvObject) { - InterlockedIncrement(&ref); + AddRef(); return S_OK; } @@ -705,7 +710,7 @@ { ULONG refCount; - refCount = InterlockedIncrement(&ref); + refCount = InterlockedIncrement(&m_ref); return refCount; } @@ -717,7 +722,7 @@ { ULONG refCount; - refCount = InterlockedDecrement(&ref); + refCount = InterlockedDecrement(&m_ref); if (!refCount) delete this; @@ -782,7 +787,7 @@ VALUEStruct * val; NETCON_PROPERTIES * pProperties; - val = _ILGetValueStruct(apidl); + val = _ILGetValueStruct(m_apidl); if (!val) return E_FAIL; @@ -903,7 +908,7 @@ hr = pNCP->AddPages(hwnd, PropSheetExCallback, (LPARAM)&pinfo); if (SUCCEEDED(hr)) { - if(PropertySheetW(&pinfo) < 0) + if (PropertySheetW(&pinfo) < 0) hr = E_FAIL; } } @@ -920,14 +925,14 @@ { VALUEStruct * val; - val = _ILGetValueStruct(apidl); + val = _ILGetValueStruct(m_apidl); if (!val) return E_FAIL; if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_NET_STATUS) || lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_NET_STATUS-1)) //HACK for Windows XP { - return ShowNetConnectionStatus(lpOleCmd, val->pItem, lpcmi->hwnd); + return ShowNetConnectionStatus(m_lpOleCmd, val->pItem, lpcmi->hwnd); } else if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_NET_PROPERTIES) || lpcmi->lpVerb == MAKEINTRESOURCEA(10099)) //HACK for Windows XP @@ -978,13 +983,13 @@ HRESULT hr; IUnknown *pUnknown; - if (!this->pUnknown) + if (!m_pUnknown) { *ppvSite = NULL; return E_FAIL; } - hr = this->pUnknown->QueryInterface(riid, (LPVOID*)&pUnknown); + hr = m_pUnknown->QueryInterface(riid, reinterpret_cast<PVOID*>(&pUnknown)); if (SUCCEEDED(hr)) { pUnknown->AddRef(); @@ -998,20 +1003,20 @@ HRESULT WINAPI CNetConUiObject::SetSite(IUnknown *pUnkSite) { - if(!pUnkSite) - { - if (this->pUnknown) + if (!pUnkSite) + { + if (m_pUnknown) { - this->pUnknown->Release(); - this->pUnknown = NULL; + m_pUnknown->Release(); + m_pUnknown = NULL; } } else { pUnkSite->AddRef(); - if (this->pUnknown) - this->pUnknown->Release(); - this->pUnknown = pUnkSite; + if (m_pUnknown) + m_pUnknown->Release(); + m_pUnknown = pUnkSite; } return S_OK; @@ -1037,7 +1042,7 @@ return E_FAIL; } - val = _ILGetValueStruct(apidl); + val = _ILGetValueStruct(m_apidl); if (!val) { ERR("_ILGetValueStruct failed\n"); @@ -1107,8 +1112,8 @@ */ HRESULT WINAPI CNetworkConnections::Initialize(LPCITEMIDLIST pidl) { - SHFree(pidlRoot); - pidlRoot = ILClone(pidl); + SHFree(m_pidlRoot); + m_pidlRoot = ILClone(pidl); return S_OK; } @@ -1121,7 +1126,7 @@ if (!pidl) return E_POINTER; - *pidl = ILClone(pidlRoot); + *pidl = ILClone(m_pidlRoot); return S_OK; } @@ -1144,7 +1149,7 @@ if (pProperties->Status == NCS_CONNECTED) { NcFreeNetconProperties(pProperties); - return ShowNetConnectionStatus(lpOleCmd, val->pItem, pei->hwnd); + return ShowNetConnectionStatus(m_lpOleCmd, val->pItem, pei->hwnd); } NcFreeNetconProperties(pProperties);
9 years, 8 months
1
0
0
0
[pschweitzer] 67306: [KERNEL32_APITEST] Complete a bit more the PrivMoveFileIdentityW tests
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Apr 19 19:36:42 2015 New Revision: 67306 URL:
http://svn.reactos.org/svn/reactos?rev=67306&view=rev
Log: [KERNEL32_APITEST] Complete a bit more the PrivMoveFileIdentityW tests Modified: trunk/rostests/apitests/kernel32/PrivMoveFileIdentityW.c Modified: trunk/rostests/apitests/kernel32/PrivMoveFileIdentityW.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/kernel32/PrivMov…
============================================================================== --- trunk/rostests/apitests/kernel32/PrivMoveFileIdentityW.c [iso-8859-1] (original) +++ trunk/rostests/apitests/kernel32/PrivMoveFileIdentityW.c [iso-8859-1] Sun Apr 19 19:36:42 2015 @@ -13,6 +13,8 @@ #include <ndk/rtltypes.h> static const WCHAR FileName[] = L"TestFile.xxx"; +static const CHAR FileNameA[] = "TestFile.xxx"; +static const WCHAR FileName2[] = L"TestFile2.xxx"; static BOOL (WINAPI * pPrivMoveFileIdentityW)(LPCWSTR, LPCWSTR, DWORD); @@ -59,10 +61,11 @@ FILE_STANDARD_INFORMATION FileStandardInfo; LARGE_INTEGER CreationTime, EndOfFile; HANDLE hDest; - NTSTATUS Status; WCHAR Self[MAX_PATH]; + OFSTRUCT ReOpen; DeleteFileW(FileName); + DeleteFileW(FileName2); if (GetModuleFileNameW(NULL, Self, MAX_PATH) == 0) { @@ -96,8 +99,14 @@ ok(QueryFileInfo(FileName, &FileBasicInfo, &FileStandardInfo) == TRUE, "QueryFileInfo returned FALSE\n"); ok(FileBasicInfo.CreationTime.QuadPart != CreationTime.QuadPart, "Equal creation times\n"); ok(FileStandardInfo.EndOfFile.QuadPart == 0LL, "File wasn't created empty: %I64d\n", FileStandardInfo.EndOfFile.QuadPart); - Status = (NTSTATUS)pPrivMoveFileIdentityW(Self, FileName, 0); - ok(Status == STATUS_SUCCESS, "PrivMoveFileIdentityW failed with %lx\n", Status); + SetLastError(0xdeadbeef); + ok(pPrivMoveFileIdentityW(Self, FileName, 0) == FALSE, "PrivMoveFileIdentityW succeed\n"); + ok(GetLastError() == ERROR_SHARING_VIOLATION, "Last error: %lx\n", GetLastError()); + ok(QueryFileInfo(FileName, &FileBasicInfo, &FileStandardInfo) == TRUE, "QueryFileInfo returned FALSE\n"); + ok(FileBasicInfo.CreationTime.QuadPart != CreationTime.QuadPart, "Equal creation times\n"); + ok(FileStandardInfo.EndOfFile.QuadPart == 0LL, "File wasn't created empty: %I64d\n", FileStandardInfo.EndOfFile.QuadPart); + SetLastError(0xdeadbeef); + ok(pPrivMoveFileIdentityW(Self, FileName, 2) == TRUE, "PrivMoveFileIdentityW failed with %lx\n", GetLastError()); ok(QueryFileInfo(FileName, &FileBasicInfo, &FileStandardInfo) == TRUE, "QueryFileInfo returned FALSE\n"); ok(FileBasicInfo.CreationTime.QuadPart == CreationTime.QuadPart, "Creation time didn't change\n"); ok(FileStandardInfo.EndOfFile.QuadPart == 0LL, "File not empty anymore: %I64d\n", FileStandardInfo.EndOfFile.QuadPart); @@ -105,6 +114,27 @@ ok(FileBasicInfo.CreationTime.QuadPart == CreationTime.QuadPart, "Creation time changed\n"); ok(FileStandardInfo.EndOfFile.QuadPart == EndOfFile.QuadPart, "File size changed: %I64d\n", FileStandardInfo.EndOfFile.QuadPart); + hDest = CreateFileW(FileName2, GENERIC_WRITE | SYNCHRONIZE, + FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_SYNCHRONOUS_IO_NONALERT, + NULL); + if (hDest == INVALID_HANDLE_VALUE) + { + win_skip("Failed creating new\n"); + return; + } + + CloseHandle(hDest); + + ok(QueryFileInfo(FileName2, &FileBasicInfo, &FileStandardInfo) == TRUE, "QueryFileInfo returned FALSE\n"); + ok(FileBasicInfo.CreationTime.QuadPart != CreationTime.QuadPart, "Equal creation times\n"); + SetLastError(0xdeadbeef); + ok(pPrivMoveFileIdentityW(FileName, FileName2, 3) == TRUE, "PrivMoveFileIdentityW failed with %lx\n", GetLastError()); + ok(QueryFileInfo(FileName2, &FileBasicInfo, &FileStandardInfo) == TRUE, "QueryFileInfo returned FALSE\n"); + ok(FileBasicInfo.CreationTime.QuadPart == CreationTime.QuadPart, "Creation time didn't change\n"); + ok(OpenFile(FileNameA, &ReOpen, OF_EXIST) == HFILE_ERROR, "Source file still exists\n"); + + DeleteFileW(FileName2); DeleteFileW(FileName); }
9 years, 8 months
1
0
0
0
[cwittich] 67305: [RAPPS] fix handle leaks
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Apr 19 19:28:03 2015 New Revision: 67305 URL:
http://svn.reactos.org/svn/reactos?rev=67305&view=rev
Log: [RAPPS] fix handle leaks Modified: trunk/reactos/base/applications/rapps/available.c trunk/reactos/base/applications/rapps/installed.c trunk/reactos/base/applications/rapps/winmain.c Modified: trunk/reactos/base/applications/rapps/available.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/av…
============================================================================== --- trunk/reactos/base/applications/rapps/available.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/rapps/available.c [iso-8859-1] Sun Apr 19 19:28:03 2015 @@ -26,7 +26,7 @@ b[0] = '\0'; LIST_ENTRY CachedEntriesHead = { &CachedEntriesHead, &CachedEntriesHead }; -PLIST_ENTRY pCachedEntry = NULL; +PLIST_ENTRY pCachedEntry = &CachedEntriesHead; BOOL ShowAvailableAppInfo(INT Index) @@ -150,13 +150,6 @@ WCHAR szCabPath[MAX_PATH]; PAPPLICATION_INFO Info; HRESULT hr; - - /* initialize the cached list if hasn't been yet */ - if (pCachedEntry == NULL) - { - InitializeListHead(&CachedEntriesHead); - pCachedEntry = &CachedEntriesHead; - } if (!GetStorageDirectory(szPath, _countof(szPath))) return FALSE; Modified: trunk/reactos/base/applications/rapps/installed.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/in…
============================================================================== --- trunk/reactos/base/applications/rapps/installed.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/rapps/installed.c [iso-8859-1] Sun Apr 19 19:28:03 2015 @@ -282,7 +282,19 @@ if (!lpEnumProc(ItemIndex, pszDisplayName, &Info)) break; } + else + { + RegCloseKey(Info.hSubKey); + } } + else + { + RegCloseKey(Info.hSubKey); + } + } + else + { + RegCloseKey(Info.hSubKey); } } Modified: trunk/reactos/base/applications/rapps/winmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/wi…
============================================================================== --- trunk/reactos/base/applications/rapps/winmain.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/rapps/winmain.c [iso-8859-1] Sun Apr 19 19:28:03 2015 @@ -127,10 +127,17 @@ INT Index; if (!SearchPatternMatch(lpName, szSearchPattern)) + { + RegCloseKey(Info->hSubKey); return TRUE; + } ItemInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(INSTALLED_INFO)); - if (!ItemInfo) return FALSE; + if (!ItemInfo) + { + RegCloseKey(Info->hSubKey); + return FALSE; + } RtlCopyMemory(ItemInfo, Info, sizeof(INSTALLED_INFO));
9 years, 8 months
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
49
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Results per page:
10
25
50
100
200