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
[cwittich] 67184: [RAPPS] disable the call to FreeAvailableAppList until caching is fixes
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Apr 13 09:16:23 2015 New Revision: 67184 URL:
http://svn.reactos.org/svn/reactos?rev=67184&view=rev
Log: [RAPPS] disable the call to FreeAvailableAppList until caching is fixes Modified: trunk/reactos/base/applications/rapps/winmain.c 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] Mon Apr 13 09:16:23 2015 @@ -202,8 +202,9 @@ if (IS_INSTALLED_ENUM(SelectedEnumType)) FreeInstalledAppList(); - else if (IS_AVAILABLE_ENUM(SelectedEnumType)) - FreeAvailableAppList(); + /* FIXME: reenable when caching is fixed */ + /* else if (IS_AVAILABLE_ENUM(SelectedEnumType)) + FreeAvailableAppList(); */ (VOID) ListView_DeleteAllItems(hListView);
9 years, 8 months
1
0
0
0
[cwittich] 67183: [RAPPS] fix a big memory leak
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Apr 13 08:10:54 2015 New Revision: 67183 URL:
http://svn.reactos.org/svn/reactos?rev=67183&view=rev
Log: [RAPPS] fix a big memory leak Modified: trunk/reactos/base/applications/rapps/winmain.c 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] Mon Apr 13 08:10:54 2015 @@ -198,6 +198,13 @@ SendMessage(hListView, WM_SETREDRAW, FALSE, 0); + if (EnumType == -1) EnumType = SelectedEnumType; + + if (IS_INSTALLED_ENUM(SelectedEnumType)) + FreeInstalledAppList(); + else if (IS_AVAILABLE_ENUM(SelectedEnumType)) + FreeAvailableAppList(); + (VOID) ListView_DeleteAllItems(hListView); /* Create image list */ @@ -215,13 +222,6 @@ ImageList_AddIcon(hImageListView, hIcon); DestroyIcon(hIcon); - - if (EnumType == -1) EnumType = SelectedEnumType; - - if (IS_INSTALLED_ENUM(SelectedEnumType)) - FreeInstalledAppList(); - else if (IS_AVAILABLE_ENUM(SelectedEnumType)) - FreeAvailableAppList(); if (IS_INSTALLED_ENUM(EnumType)) {
9 years, 8 months
1
0
0
0
[ekohl] 67182: [NETAPI32] Disable some functions in wksta_new.c and re-enable their counterparts in wksta.c. For some reason I cannot get the wine dummy code working in the workstation service. Per...
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Apr 12 22:07:22 2015 New Revision: 67182 URL:
http://svn.reactos.org/svn/reactos?rev=67182&view=rev
Log: [NETAPI32] Disable some functions in wksta_new.c and re-enable their counterparts in wksta.c. For some reason I cannot get the wine dummy code working in the workstation service. Perhaps it is yet another RPC bug. CORE-9415 Modified: trunk/reactos/dll/win32/netapi32/wksta.c trunk/reactos/dll/win32/netapi32/wksta_new.c Modified: trunk/reactos/dll/win32/netapi32/wksta.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/wksta.c…
============================================================================== --- trunk/reactos/dll/win32/netapi32/wksta.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/wksta.c [iso-8859-1] Sun Apr 12 22:07:22 2015 @@ -43,7 +43,6 @@ return ret && !strcmpiW( name, buf ); } -#if 0 static void wprint_mac(WCHAR* buffer, int len, const MIB_IFROW *ifRow) { int i; @@ -73,7 +72,6 @@ } buffer[2*i]=0; } -#endif /* Theoretically this could be too short, except that MS defines * MAX_ADAPTER_NAME as 128, and MAX_INTERFACE_NAME_LEN as 256, and both @@ -86,7 +84,6 @@ #define NBT_TRANSPORT_NAME_HEADER "\\Device\\NetBT_Tcpip_" #define UNKNOWN_TRANSPORT_NAME_HEADER "\\Device\\UnknownTransport_" -#if 0 static void wprint_name(WCHAR *buffer, int len, ULONG transport, PMIB_IFROW ifRow) { @@ -112,7 +109,6 @@ *ptr1 = *ptr2; *ptr1 = '\0'; } -#endif /*********************************************************************** * NetWkstaTransportEnum (NETAPI32.@) @@ -129,7 +125,6 @@ /**********************************************************************/ -#if 0 static BOOL WkstaEnumAdaptersCallback(UCHAR totalLANAs, UCHAR lanaIndex, ULONG transport, const NetBIOSAdapterImpl *data, void *closure) { @@ -219,11 +214,9 @@ ret = FALSE; return ret; } -#endif /**********************************************************************/ -#if 0 NET_API_STATUS WINAPI NetWkstaTransportEnum(LMSTR ServerName, DWORD level, PBYTE* pbuf, DWORD prefmaxlen, LPDWORD read_entries, @@ -278,13 +271,11 @@ } return ret; } -#endif /************************************************************ * NetWkstaUserGetInfo (NETAPI32.@) */ -#if 0 NET_API_STATUS WINAPI NetWkstaUserGetInfo(LMSTR reserved, DWORD level, PBYTE* bufptr) { @@ -422,12 +413,10 @@ } return NERR_Success; } -#endif /************************************************************ * NetWkstaUserEnum (NETAPI32.@) */ -#if 0 NET_API_STATUS WINAPI NetWkstaUserEnum(LMSTR servername, DWORD level, LPBYTE* bufptr, DWORD prefmaxlen, LPDWORD entriesread, @@ -437,7 +426,6 @@ level, bufptr, prefmaxlen, entriesread, totalentries, resumehandle); return ERROR_INVALID_PARAMETER; } -#endif /************************************************************ * NetpGetComputerName (NETAPI32.@) @@ -476,7 +464,6 @@ return ERROR_INVALID_PARAMETER; } -#if 0 NET_API_STATUS WINAPI NetWkstaGetInfo( LMSTR servername, DWORD level, LPBYTE* bufptr) { @@ -579,4 +566,3 @@ return NERR_Success; } -#endif Modified: trunk/reactos/dll/win32/netapi32/wksta_new.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/wksta_n…
============================================================================== --- trunk/reactos/dll/win32/netapi32/wksta_new.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/wksta_new.c [iso-8859-1] Sun Apr 12 22:07:22 2015 @@ -138,6 +138,7 @@ } +#if 0 NET_API_STATUS NET_API_FUNCTION NetGetJoinInformation( @@ -167,6 +168,7 @@ return status; } +#endif NET_API_STATUS @@ -342,6 +344,7 @@ } +#if 0 NET_API_STATUS WINAPI NetWkstaGetInfo( @@ -354,6 +357,9 @@ TRACE("NetWkstaGetInfo(%s, %d, %p)\n", debugstr_w(servername), level, bufptr); + if (bufptr == NULL) + return ERROR_INVALID_PARAMETER; + *bufptr = NULL; RpcTryExcept @@ -370,6 +376,7 @@ return status; } +#endif NET_API_STATUS @@ -460,6 +467,7 @@ } +#if 0 NET_API_STATUS WINAPI NetWkstaTransportEnum( @@ -621,6 +629,7 @@ return status; } +#endif NET_API_STATUS
9 years, 8 months
1
0
0
0
[dquintana] 67181: [NTOBJSHEX] * Fix comparison length: StrCmpNW takes chars, not bytes. * While at it, make canonical comparisons use memcmp instead of string comparison, as we only care about equ...
by dquintana@svn.reactos.org
Author: dquintana Date: Sun Apr 12 19:00:26 2015 New Revision: 67181 URL:
http://svn.reactos.org/svn/reactos?rev=67181&view=rev
Log: [NTOBJSHEX] * Fix comparison length: StrCmpNW takes chars, not bytes. * While at it, make canonical comparisons use memcmp instead of string comparison, as we only care about equality, not ordering. Better fix for CORE-9432 Modified: trunk/reactos/dll/shellext/ntobjshex/ntobjns.cpp trunk/reactos/dll/shellext/ntobjshex/precomp.h trunk/reactos/dll/shellext/ntobjshex/regfolder.cpp Modified: trunk/reactos/dll/shellext/ntobjshex/ntobjns.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/ntobjshex/nto…
============================================================================== --- trunk/reactos/dll/shellext/ntobjshex/ntobjns.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/ntobjshex/ntobjns.cpp [iso-8859-1] Sun Apr 12 19:00:26 2015 @@ -213,21 +213,21 @@ return E_FAIL; } - NtPidlEntry * info = (NtPidlEntry *) pcidl; + const NtPidlEntry * info = (const NtPidlEntry *) pcidl; if ((info->cb < sizeof(NtPidlEntry)) || (info->magic != NT_OBJECT_PIDL_MAGIC)) { ERR("FindPidlInList: Requested pidl is not of the correct type.\n"); return E_INVALIDARG; } - TRACE("Searching for pidl { cb=%d } in a list of %d items\n", pcidl->mkid.cb, m_hDpaCount); + TRACE("Searching for pidl { name='%S' } in a list of %d items\n", info->entryName, m_hDpaCount); for (UINT i = 0; i < m_hDpaCount; i++) { - NtPidlEntry * pInfo = (NtPidlEntry *) DPA_GetPtr(m_hDpa, i); + const NtPidlEntry * pInfo = (const NtPidlEntry *) DPA_GetPtr(m_hDpa, i); ASSERT(pInfo); - hr = CompareIDs(0, pInfo, pcidl); + hr = CompareIDs(SHCIDS_CANONICALONLY, pInfo, info); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -238,11 +238,13 @@ } else { - TRACE("Comparison returned %d\n", (int) (short) (hr & 0xFFFF)); + TRACE("Comparison returned %d for '%S'\n", (int) (short) (hr & 0xFFFF), pInfo->entryName); } } ERR("PIDL NOT FOUND: Requested filename: %S\n", info->entryName); + *pinfo = NULL; + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); } @@ -284,11 +286,9 @@ HRESULT GetPidl(UINT index, NtPidlEntry ** pEntry) { - HRESULT hr; - if (!m_hDpa) { - hr = Enumerate(); + HRESULT hr = Enumerate(); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -310,11 +310,9 @@ HRESULT GetCount(UINT * count) { - HRESULT hr; - if (!m_hDpa) { - hr = Enumerate(); + HRESULT hr = Enumerate(); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -377,23 +375,33 @@ return MAKE_HRESULT(0, 0, (USHORT) 1); if (second->entryNameLength < first->entryNameLength) return MAKE_HRESULT(0, 0, (USHORT) -1); + + int minlength = min(first->entryNameLength, second->entryNameLength); + if (minlength > 0) + { + int ord = memcmp(first->entryName, second->entryName, minlength); + if (ord != 0) + return MAKE_HRESULT(0, 0, (USHORT) ord); + } + return S_OK; } - - int minlength = min(first->entryNameLength, second->entryNameLength); - int ord = StrCmpNW(first->entryName, second->entryName, minlength); - - if (ord != 0) - return MAKE_HRESULT(0, 0, (USHORT) ord); - - if (!canonical) + else { + int minlength = min(first->entryNameLength, second->entryNameLength); + if (minlength > 0) + { + int ord = StrCmpNW(first->entryName, second->entryName, minlength / sizeof(WCHAR)); + if (ord != 0) + return MAKE_HRESULT(0, 0, (USHORT) ord); + } + if (second->entryNameLength > first->entryNameLength) return MAKE_HRESULT(0, 0, (USHORT) 1); if (second->entryNameLength < first->entryNameLength) return MAKE_HRESULT(0, 0, (USHORT) -1); + + return S_OK; } - - return S_OK; } case NTOBJECT_COLUMN_TYPE: { @@ -623,7 +631,6 @@ LPITEMIDLIST *ppidl, ULONG *pdwAttributes) { - HRESULT hr; NtPidlEntry * info; if (!ppidl) @@ -637,7 +644,7 @@ TRACE("CNtObjectFolder::ParseDisplayName name=%S (ntPath=%S)\n", lpszDisplayName, m_NtPath); - hr = m_PidlManager->FindByName(lpszDisplayName, &info); + HRESULT hr = m_PidlManager->FindByName(lpszDisplayName, &info); if (FAILED(hr)) { return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); @@ -669,11 +676,10 @@ void **ppvOut) { const NtPidlEntry * info; - HRESULT hr; if (IsEqualIID(riid, IID_IShellFolder)) { - hr = m_PidlManager->FindPidlInList(pidl, &info); + HRESULT hr = m_PidlManager->FindPidlInList(pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -830,15 +836,9 @@ { PCUITEMID_CHILD pidl = apidl[i]; -#ifndef DISABLE_STRICT_PIDL_CHECK HRESULT hr = m_PidlManager->FindPidlInList(pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; -#else - info = (const NtPidlEntry *) pidl; - if (info->magic != NT_OBJECT_PIDL_MAGIC) - return E_INVALIDARG; -#endif // Update attributes. *rgfInOut = m_PidlManager->ConvertAttributes(info, rgfInOut); @@ -918,19 +918,12 @@ STRRET *lpName) { const NtPidlEntry * info; - HRESULT hr; TRACE("GetDisplayNameOf %p\n", pidl); -#ifndef DISABLE_STRICT_PIDL_CHECK - hr = m_PidlManager->FindPidlInList(pidl, &info); + HRESULT hr = m_PidlManager->FindPidlInList(pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; -#else - info = (const NtPidlEntry *) pidl; - if (info->magic != NT_OBJECT_PIDL_MAGIC) - return E_INVALIDARG; -#endif if ((GET_SHGDN_RELATION(uFlags) == SHGDN_NORMAL) && (GET_SHGDN_FOR(uFlags) & SHGDN_FORPARSING)) @@ -1102,15 +1095,9 @@ if (pidl) { -#ifndef DISABLE_STRICT_PIDL_CHECK HRESULT hr = m_PidlManager->FindPidlInList(pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; -#else - info = (const NtPidlEntry *) pidl; - if (info->magic != NT_OBJECT_PIDL_MAGIC) - return E_INVALIDARG; -#endif static const GUID storage = PSGUID_STORAGE; if (IsEqualGUID(pscid->fmtid, storage)) @@ -1185,15 +1172,9 @@ if (pidl) { -#ifndef DISABLE_STRICT_PIDL_CHECK HRESULT hr = m_PidlManager->FindPidlInList(pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; -#else - info = (const NtPidlEntry *) pidl; - if (info->magic != NT_OBJECT_PIDL_MAGIC) - return E_INVALIDARG; -#endif switch (iColumn) { Modified: trunk/reactos/dll/shellext/ntobjshex/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/ntobjshex/pre…
============================================================================== --- trunk/reactos/dll/shellext/ntobjshex/precomp.h [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/ntobjshex/precomp.h [iso-8859-1] Sun Apr 12 19:00:26 2015 @@ -48,6 +48,3 @@ #include "ntobjns.h" #include "regfolder.h" - -// Workaround for missing entries -#define DISABLE_STRICT_PIDL_CHECKS Modified: trunk/reactos/dll/shellext/ntobjshex/regfolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/ntobjshex/reg…
============================================================================== --- trunk/reactos/dll/shellext/ntobjshex/regfolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/ntobjshex/regfolder.cpp [iso-8859-1] Sun Apr 12 19:00:26 2015 @@ -208,21 +208,21 @@ return E_FAIL; } - RegPidlEntry * info = (RegPidlEntry *) pcidl; + const RegPidlEntry * info = (const RegPidlEntry *) pcidl; if ((info->cb < sizeof(RegPidlEntry)) || (info->magic != REGISTRY_PIDL_MAGIC)) { ERR("FindPidlInList: Requested pidl is not of the correct type.\n"); return E_INVALIDARG; } - TRACE("Searching for pidl { cb=%d } in a list of %d items\n", pcidl->mkid.cb, m_hDpaCount); + TRACE("Searching for pidl { name='%S' } in a list of %d items\n", info->entryName, m_hDpaCount); for (UINT i = 0; i < m_hDpaCount; i++) { - RegPidlEntry * pInfo = (RegPidlEntry *) DPA_GetPtr(m_hDpa, i); + const RegPidlEntry * pInfo = (const RegPidlEntry *) DPA_GetPtr(m_hDpa, i); ASSERT(pInfo); - hr = CompareIDs(0, pInfo, pcidl); + hr = CompareIDs(SHCIDS_CANONICALONLY, pInfo, info); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -233,11 +233,13 @@ } else { - TRACE("Comparison returned %d\n", (int) (short) (hr & 0xFFFF)); + TRACE("Comparison returned %d for '%S'\n", (int) (short) (hr & 0xFFFF), pInfo->entryName); } } ERR("PIDL NOT FOUND: Requested filename: %S\n", info->entryName); + *pinfo = NULL; + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); } @@ -280,11 +282,9 @@ HRESULT GetPidl(UINT index, RegPidlEntry ** pEntry) { - HRESULT hr; - if (!m_hDpa) { - hr = Enumerate(); + HRESULT hr = Enumerate(); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -306,11 +306,9 @@ HRESULT GetCount(UINT * count) { - HRESULT hr; - if (!m_hDpa) { - hr = Enumerate(); + HRESULT hr = Enumerate(); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -374,23 +372,33 @@ return MAKE_HRESULT(0, 0, (USHORT) 1); if (second->entryNameLength < first->entryNameLength) return MAKE_HRESULT(0, 0, (USHORT) -1); + + int minlength = min(first->entryNameLength, second->entryNameLength); + if (minlength > 0) + { + int ord = memcmp(first->entryName, second->entryName, minlength); + if (ord != 0) + return MAKE_HRESULT(0, 0, (USHORT) ord); + } + return S_OK; } - - int minlength = min(first->entryNameLength, second->entryNameLength); - int ord = StrCmpNW(first->entryName, second->entryName, minlength); - - if (ord != 0) - return MAKE_HRESULT(0, 0, (USHORT) ord); - - if (!canonical) + else { + int minlength = min(first->entryNameLength, second->entryNameLength); + if (minlength > 0) + { + int ord = StrCmpNW(first->entryName, second->entryName, minlength / sizeof(WCHAR)); + if (ord != 0) + return MAKE_HRESULT(0, 0, (USHORT) ord); + } + if (second->entryNameLength > first->entryNameLength) return MAKE_HRESULT(0, 0, (USHORT) 1); if (second->entryNameLength < first->entryNameLength) return MAKE_HRESULT(0, 0, (USHORT) -1); + + return S_OK; } - - return S_OK; } case REGISTRY_COLUMN_TYPE: { @@ -707,7 +715,6 @@ LPITEMIDLIST *ppidl, ULONG *pdwAttributes) { - HRESULT hr; RegPidlEntry * info; if (!ppidl) @@ -721,7 +728,7 @@ TRACE("CRegistryFolder::ParseDisplayName name=%S (ntPath=%S)\n", lpszDisplayName, m_NtPath); - hr = m_PidlManager->FindByName(lpszDisplayName, &info); + HRESULT hr = m_PidlManager->FindByName(lpszDisplayName, &info); if (FAILED(hr)) { return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); @@ -753,11 +760,10 @@ void **ppvOut) { const RegPidlEntry * info; - HRESULT hr; if (IsEqualIID(riid, IID_IShellFolder)) { - hr = m_PidlManager->FindPidlInList(pidl, &info); + HRESULT hr = m_PidlManager->FindPidlInList(pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -880,15 +886,9 @@ { PCUITEMID_CHILD pidl = apidl[i]; -#ifndef DISABLE_STRICT_PIDL_CHECK HRESULT hr = m_PidlManager->FindPidlInList(pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; -#else - info = (const RegPidlEntry *) pidl; - if (info->magic != REGISTRY_PIDL_MAGIC) - return E_INVALIDARG; -#endif // Update attributes. *rgfInOut = m_PidlManager->ConvertAttributes(info, rgfInOut); @@ -968,19 +968,12 @@ STRRET *lpName) { const RegPidlEntry * info; - HRESULT hr; TRACE("GetDisplayNameOf %p\n", pidl); -#ifndef DISABLE_STRICT_PIDL_CHECK - hr = m_PidlManager->FindPidlInList(pidl, &info); + HRESULT hr = m_PidlManager->FindPidlInList(pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; -#else - info = (const RegPidlEntry *) pidl; - if (info->magic != REGISTRY_PIDL_MAGIC) - return E_INVALIDARG; -#endif if ((GET_SHGDN_RELATION(uFlags) == SHGDN_NORMAL) && (GET_SHGDN_FOR(uFlags) & SHGDN_FORPARSING)) @@ -1146,21 +1139,14 @@ VARIANT *pv) { const RegPidlEntry * info; - HRESULT hr; TRACE("GetDetailsEx\n"); if (pidl) { -#ifndef DISABLE_STRICT_PIDL_CHECK - hr = m_PidlManager->FindPidlInList(pidl, &info); + HRESULT hr = m_PidlManager->FindPidlInList(pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; -#else - info = (const RegPidlEntry *) pidl; - if (info->magic != REGISTRY_PIDL_MAGIC) - return E_INVALIDARG; -#endif static const GUID storage = PSGUID_STORAGE; if (IsEqualGUID(pscid->fmtid, storage)) @@ -1226,21 +1212,14 @@ SHELLDETAILS *psd) { const RegPidlEntry * info; - HRESULT hr; TRACE("GetDetailsOf\n"); if (pidl) { -#ifndef DISABLE_STRICT_PIDL_CHECK - hr = m_PidlManager->FindPidlInList(pidl, &info); + HRESULT hr = m_PidlManager->FindPidlInList(pidl, &info); if (FAILED_UNEXPECTEDLY(hr)) return hr; -#else - info = (const RegPidlEntry *) pidl; - if (info->magic != REGISTRY_PIDL_MAGIC) - return E_INVALIDARG; -#endif switch (iColumn) {
9 years, 8 months
1
0
0
0
[pschweitzer] 67180: [MYCOMPUT] Add French translation
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Apr 12 18:22:26 2015 New Revision: 67180 URL:
http://svn.reactos.org/svn/reactos?rev=67180&view=rev
Log: [MYCOMPUT] Add French translation Added: trunk/reactos/dll/win32/mycomput/lang/fr-FR.rc (with props) Modified: trunk/reactos/dll/win32/mycomput/mycomput.rc Added: trunk/reactos/dll/win32/mycomput/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mycomput/lang/fr…
============================================================================== --- trunk/reactos/dll/win32/mycomput/lang/fr-FR.rc (added) +++ trunk/reactos/dll/win32/mycomput/lang/fr-FR.rc [iso-8859-1] Sun Apr 12 18:22:26 2015 @@ -0,0 +1,6 @@ +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL + +STRINGTABLE +BEGIN + IDS_MANAGE "Administrer" +END Propchange: trunk/reactos/dll/win32/mycomput/lang/fr-FR.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/mycomput/mycomput.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mycomput/mycompu…
============================================================================== --- trunk/reactos/dll/win32/mycomput/mycomput.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mycomput/mycomput.rc [iso-8859-1] Sun Apr 12 18:22:26 2015 @@ -15,6 +15,9 @@ #ifdef LANGUAGE_EN_US #include "lang/en-US.rc" #endif +#ifdef LANGUAGE_FR_FR + #include "lang/fr-FR.rc" +#endif #ifdef LANGUAGE_IT_IT #include "lang/it-IT.rc" #endif
9 years, 8 months
1
0
0
0
[tkreuzer] 67179: [CRT] Implement __rt_sdiv as a wrapper around the unsigned divide (now factored out into an inline worker function)
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Apr 12 18:07:19 2015 New Revision: 67179 URL:
http://svn.reactos.org/svn/reactos?rev=67179&view=rev
Log: [CRT] Implement __rt_sdiv as a wrapper around the unsigned divide (now factored out into an inline worker function) Added: trunk/reactos/lib/sdk/crt/math/arm/__rt_div.c - copied, changed from r67178, trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.c Removed: trunk/reactos/lib/sdk/crt/math/arm/__rt_sdiv.s trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.c Modified: trunk/reactos/lib/sdk/crt/crt.cmake trunk/reactos/lib/sdk/crt/libcntpr.cmake Modified: trunk/reactos/lib/sdk/crt/crt.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/crt.cmake?rev=…
============================================================================== --- trunk/reactos/lib/sdk/crt/crt.cmake [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/crt.cmake [iso-8859-1] Sun Apr 12 18:07:19 2015 @@ -476,7 +476,7 @@ endif() elseif(ARCH STREQUAL "arm") list(APPEND LIBCNTPR_SOURCE - math/arm/__rt_udiv.c + math/arm/__rt_div.c ) list(APPEND CRT_ASM_SOURCE math/arm/floor.s @@ -484,7 +484,6 @@ math/arm/pow.s math/arm/__dtou64.s math/arm/__u64tod.s - math/arm/__rt_sdiv.s math/arm/__rt_sdiv64.s math/arm/__rt_udiv64.s ) Modified: trunk/reactos/lib/sdk/crt/libcntpr.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/libcntpr.cmake…
============================================================================== --- trunk/reactos/lib/sdk/crt/libcntpr.cmake [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/libcntpr.cmake [iso-8859-1] Sun Apr 12 18:07:19 2015 @@ -135,7 +135,7 @@ math/sin.c) elseif(ARCH STREQUAL "arm") list(APPEND LIBCNTPR_SOURCE - math/arm/__rt_udiv.c + math/arm/__rt_div.c ) list(APPEND LIBCNTPR_ASM_SOURCE math/arm/floor.s @@ -143,7 +143,6 @@ math/arm/pow.s math/arm/__dtou64.s math/arm/__u64tod.s - math/arm/__rt_sdiv.s math/arm/__rt_sdiv64.s math/arm/__rt_udiv64.s ) Copied: trunk/reactos/lib/sdk/crt/math/arm/__rt_div.c (from r67178, trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/arm/__rt_…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/arm/__rt_div.c [iso-8859-1] Sun Apr 12 18:07:19 2015 @@ -21,15 +21,16 @@ __emit(0xDEF9); } -ARM_UDIVRESULT -__rt_udiv( +__forceinline +void +__rt_udiv_internal( + ARM_UDIVRESULT *result, unsigned int divisor, unsigned int dividend) { - ARM_UDIVRESULT result; - unsigned int BitShift; - unsigned int BitMask; - unsigned int Quotient; + unsigned int shift; + unsigned int mask; + unsigned int quotient; if (divisor == 0) { @@ -39,35 +40,87 @@ if (divisor > dividend) { - result.quotient = 0; - result.modulus = divisor; - return result; + result->quotient = 0; + result->modulus = divisor; + return; } /* Get the difference in count of leading zeros between dividend and divisor */ - BitShift = _CountLeadingZeros(divisor); - BitShift -= _CountLeadingZeros(dividend); + shift = _CountLeadingZeros(divisor); + shift -= _CountLeadingZeros(dividend); /* Shift the divisor to the left, so that it's highest bit is the same as the highest bit of the dividend */ - divisor <<= BitShift; + divisor <<= shift; - BitMask = 1 << BitShift; + mask = 1 << shift; + quotient = 0; do { if (dividend >= divisor) { - Quotient |= BitMask; + quotient |= mask; dividend -= divisor; } divisor >>= 1; - BitMask >>= 1; + mask >>= 1; } - while (BitMask); + while (mask); - result.quotient = Quotient; - result.modulus = dividend; + result->quotient = quotient; + result->modulus = dividend; + return; +} + +ARM_UDIVRESULT +__rt_udiv( + unsigned int divisor, + unsigned int dividend) +{ + ARM_UDIVRESULT result; + + __rt_udiv_internal(&result, divisor, dividend); return result; } +typedef struct _ARM_SDIVRESULT +{ + int quotient; /* to be returned in R0 */ + int modulus; /* to be returned in R1 */ +} ARM_SDIVRESULT; + +ARM_SDIVRESULT +__rt_sdiv( + int divisor, + int dividend) +{ + ARM_SDIVRESULT result; + int divisor_sign, dividend_sign; + + dividend_sign = divisor & 0x80000000; + if (dividend_sign) + { + dividend = -dividend; + } + + divisor_sign = divisor & 0x80000000; + if (divisor_sign) + { + divisor = -divisor; + } + + __rt_udiv_internal((ARM_UDIVRESULT*)&result, divisor, dividend); + + if (dividend_sign ^ divisor_sign) + { + result.quotient = -result.quotient; + } + + if (dividend_sign) + { + result.modulus = -result.modulus; + } + + return result; +} Removed: trunk/reactos/lib/sdk/crt/math/arm/__rt_sdiv.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/arm/__rt_…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/arm/__rt_sdiv.s [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/arm/__rt_sdiv.s (removed) @@ -1,20 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * PURPOSE: Implementation of __rt_sdiv - * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) - */ - -/* INCLUDES ******************************************************************/ - -#include <kxarm.h> - -/* CODE **********************************************************************/ - TEXTAREA - - LEAF_ENTRY __rt_sdiv - - LEAF_END __rt_sdiv - - END -/* EOF */ Removed: trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/arm/__rt_…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.c (removed) @@ -1,73 +0,0 @@ -/* - * COPYRIGHT: BSD, see COPYING.ARM in the top level directory - * PROJECT: ReactOS crt library - * FILE: lib/sdk/crt/math/arm/__rt_udiv.c - * PURPOSE: Implementation of __rt_udiv - * PROGRAMMER: Timo Kreuzer - * REFERENCE:
http://research.microsoft.com/en-us/um/redmond/projects/invisible/src/crt/m…
- *
http://research.microsoft.com/en-us/um/redmond/projects/invisible/src/crt/m…
- */ - -typedef struct _ARM_UDIVRESULT -{ - unsigned int quotient; /* to be returned in R0 */ - unsigned int modulus; /* to be returned in R1 */ -} ARM_UDIVRESULT; - -__forceinline -void -__brkdiv0(void) -{ - __emit(0xDEF9); -} - -ARM_UDIVRESULT -__rt_udiv( - unsigned int divisor, - unsigned int dividend) -{ - ARM_UDIVRESULT result; - unsigned int BitShift; - unsigned int BitMask; - unsigned int Quotient; - - if (divisor == 0) - { - /* Raise divide by zero error */ - __brkdiv0(); - } - - if (divisor > dividend) - { - result.quotient = 0; - result.modulus = divisor; - return result; - } - - /* Get the difference in count of leading zeros between dividend and divisor */ - BitShift = _CountLeadingZeros(divisor); - BitShift -= _CountLeadingZeros(dividend); - - /* Shift the divisor to the left, so that it's highest bit is the same - as the highest bit of the dividend */ - divisor <<= BitShift; - - BitMask = 1 << BitShift; - - do - { - if (dividend >= divisor) - { - Quotient |= BitMask; - dividend -= divisor; - } - divisor >>= 1; - BitMask >>= 1; - } - while (BitMask); - - result.quotient = Quotient; - result.modulus = dividend; - return result; -} -
9 years, 8 months
1
0
0
0
[tkreuzer] 67178: [CRT] Implement __rt_udiv in C.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Apr 12 17:08:11 2015 New Revision: 67178 URL:
http://svn.reactos.org/svn/reactos?rev=67178&view=rev
Log: [CRT] Implement __rt_udiv in C. Added: trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.c (with props) Removed: trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.s Modified: trunk/reactos/lib/sdk/crt/crt.cmake trunk/reactos/lib/sdk/crt/libcntpr.cmake Modified: trunk/reactos/lib/sdk/crt/crt.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/crt.cmake?rev=…
============================================================================== --- trunk/reactos/lib/sdk/crt/crt.cmake [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/crt.cmake [iso-8859-1] Sun Apr 12 17:08:11 2015 @@ -475,6 +475,9 @@ except/amd64/cpp.s) endif() elseif(ARCH STREQUAL "arm") + list(APPEND LIBCNTPR_SOURCE + math/arm/__rt_udiv.c + ) list(APPEND CRT_ASM_SOURCE math/arm/floor.s math/arm/log10.s @@ -483,7 +486,6 @@ math/arm/__u64tod.s math/arm/__rt_sdiv.s math/arm/__rt_sdiv64.s - math/arm/__rt_udiv.s math/arm/__rt_udiv64.s ) endif() Modified: trunk/reactos/lib/sdk/crt/libcntpr.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/libcntpr.cmake…
============================================================================== --- trunk/reactos/lib/sdk/crt/libcntpr.cmake [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/libcntpr.cmake [iso-8859-1] Sun Apr 12 17:08:11 2015 @@ -134,6 +134,9 @@ math/cos.c math/sin.c) elseif(ARCH STREQUAL "arm") + list(APPEND LIBCNTPR_SOURCE + math/arm/__rt_udiv.c + ) list(APPEND LIBCNTPR_ASM_SOURCE math/arm/floor.s math/arm/log10.s @@ -142,7 +145,6 @@ math/arm/__u64tod.s math/arm/__rt_sdiv.s math/arm/__rt_sdiv64.s - math/arm/__rt_udiv.s math/arm/__rt_udiv64.s ) endif() Added: trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/arm/__rt_…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.c (added) +++ trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.c [iso-8859-1] Sun Apr 12 17:08:11 2015 @@ -0,0 +1,73 @@ +/* + * COPYRIGHT: BSD, see COPYING.ARM in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/math/arm/__rt_udiv.c + * PURPOSE: Implementation of __rt_udiv + * PROGRAMMER: Timo Kreuzer + * REFERENCE:
http://research.microsoft.com/en-us/um/redmond/projects/invisible/src/crt/m…
+ *
http://research.microsoft.com/en-us/um/redmond/projects/invisible/src/crt/m…
+ */ + +typedef struct _ARM_UDIVRESULT +{ + unsigned int quotient; /* to be returned in R0 */ + unsigned int modulus; /* to be returned in R1 */ +} ARM_UDIVRESULT; + +__forceinline +void +__brkdiv0(void) +{ + __emit(0xDEF9); +} + +ARM_UDIVRESULT +__rt_udiv( + unsigned int divisor, + unsigned int dividend) +{ + ARM_UDIVRESULT result; + unsigned int BitShift; + unsigned int BitMask; + unsigned int Quotient; + + if (divisor == 0) + { + /* Raise divide by zero error */ + __brkdiv0(); + } + + if (divisor > dividend) + { + result.quotient = 0; + result.modulus = divisor; + return result; + } + + /* Get the difference in count of leading zeros between dividend and divisor */ + BitShift = _CountLeadingZeros(divisor); + BitShift -= _CountLeadingZeros(dividend); + + /* Shift the divisor to the left, so that it's highest bit is the same + as the highest bit of the dividend */ + divisor <<= BitShift; + + BitMask = 1 << BitShift; + + do + { + if (dividend >= divisor) + { + Quotient |= BitMask; + dividend -= divisor; + } + divisor >>= 1; + BitMask >>= 1; + } + while (BitMask); + + result.quotient = Quotient; + result.modulus = dividend; + return result; +} + Propchange: trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.c ------------------------------------------------------------------------------ svn:eol-style = native Removed: trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/arm/__rt_…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.s [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/arm/__rt_udiv.s (removed) @@ -1,20 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * PURPOSE: Implementation of __rt_udiv - * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) - */ - -/* INCLUDES ******************************************************************/ - -#include <kxarm.h> - -/* CODE **********************************************************************/ - TEXTAREA - - LEAF_ENTRY __rt_udiv - - LEAF_END __rt_udiv - - END -/* EOF */
9 years, 8 months
1
0
0
0
[cwittich] 67177: [SNDREC32] do not delete objects which are still selected into a DC
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Apr 12 16:29:36 2015 New Revision: 67177 URL:
http://svn.reactos.org/svn/reactos?rev=67177&view=rev
Log: [SNDREC32] do not delete objects which are still selected into a DC Modified: trunk/reactos/base/applications/sndrec32/sndrec32.cpp Modified: trunk/reactos/base/applications/sndrec32/sndrec32.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
============================================================================== --- trunk/reactos/base/applications/sndrec32/sndrec32.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/sndrec32/sndrec32.cpp [iso-8859-1] Sun Apr 12 16:29:36 2015 @@ -352,6 +352,7 @@ PAINTSTRUCT ps; HDC hdc; HPEN pen; + HPEN oldpen; unsigned int max_h = (cli.bottom / 2); unsigned int samples; @@ -366,7 +367,7 @@ /* Initialize hdc objects */ hdc = BeginPaint(hWnd, &ps); pen = (HPEN)CreatePen(PS_SOLID, 1, WAVEBAR_COLOR); - SelectObject(hdc, (HBRUSH)pen); + oldpen = (HPEN) SelectObject(hdc, (HBRUSH)pen); if (AUD_OUT->current_status() == snd::WAVEOUT_PLAYING) { samples = AUD_OUT->tot_samples_buf(); @@ -412,6 +413,7 @@ LineTo(hdc, WAVEBAR_CX, cli.bottom / 2); } + SelectObject(hdc, oldpen); DeleteObject( pen ); EndPaint( hWnd, &ps ); break; @@ -437,6 +439,7 @@ PAINTSTRUCT ps; HDC hdc; HFONT font; + HFONT oldfont; long long slid_samp = 0; /* Checking for global pointers to buffer and io audio devices */ @@ -774,7 +777,7 @@ case WM_PAINT: hdc = BeginPaint(hWnd, &ps); font = CreateFontIndirect(&s_info.lfMenuFont); - SelectObject(hdc, font); + oldfont = (HFONT) SelectObject(hdc, font); SetBkMode(hdc, TRANSPARENT); if (AUD_IN->current_status() == snd::WAVEIN_RECORDING) @@ -877,6 +880,7 @@ _tcslen(str_tmp), 0); + SelectObject(hdc, oldfont); DeleteObject(font); EndPaint(hWnd, &ps); break;
9 years, 8 months
1
0
0
0
[cwittich] 67176: [TASKMGR] fix some more memory leaks CORE-9473
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Apr 12 16:09:26 2015 New Revision: 67176 URL:
http://svn.reactos.org/svn/reactos?rev=67176&view=rev
Log: [TASKMGR] fix some more memory leaks CORE-9473 Modified: trunk/reactos/base/applications/taskmgr/applpage.c trunk/reactos/base/applications/taskmgr/perfdata.c Modified: trunk/reactos/base/applications/taskmgr/applpage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
============================================================================== --- trunk/reactos/base/applications/taskmgr/applpage.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/applpage.c [iso-8859-1] Sun Apr 12 16:09:26 2015 @@ -89,6 +89,23 @@ return ColorDepth; } +void AppPageCleanup(void) +{ + int i; + LV_ITEM item; + LPAPPLICATION_PAGE_LIST_ITEM pData; + for (i = 0; i < ListView_GetItemCount(hApplicationPageListCtrl); i++) + { + memset(&item, 0, sizeof(LV_ITEM)); + item.mask = LVIF_PARAM; + item.iItem = i; + (void)ListView_GetItem(hApplicationPageListCtrl, &item); + pData = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam; + HeapFree(GetProcessHeap(), 0, pData); + } +} + + INT_PTR CALLBACK ApplicationPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { @@ -151,6 +168,7 @@ #ifdef RUN_APPS_PAGE EndLocalThread(&hApplicationThread, dwApplicationThread); #endif + AppPageCleanup(); break; case WM_COMMAND: Modified: trunk/reactos/base/applications/taskmgr/perfdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
============================================================================== --- trunk/reactos/base/applications/taskmgr/perfdata.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/perfdata.c [iso-8859-1] Sun Apr 12 16:09:26 2015 @@ -330,12 +330,12 @@ } /* Now alloc a new PERFDATA array and fill in the data */ + pPerfData = (PPERFDATA)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PERFDATA) * ProcessCount); if (pPerfDataOld) { HeapFree(GetProcessHeap(), 0, pPerfDataOld); } pPerfDataOld = pPerfData; - /* Clear out process perf data structures with HEAP_ZERO_MEMORY flag: */ - pPerfData = (PPERFDATA)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PERFDATA) * ProcessCount); + pSPI = (PSYSTEM_PROCESS_INFORMATION)pBuffer; for (Idx=0; Idx<ProcessCount; Idx++) { /* Get the old perf data for this process (if any) */
9 years, 8 months
1
0
0
0
[cwittich] 67175: [TASKMGR] fix some memory leaks
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Apr 12 15:45:40 2015 New Revision: 67175 URL:
http://svn.reactos.org/svn/reactos?rev=67175&view=rev
Log: [TASKMGR] fix some memory leaks Modified: trunk/reactos/base/applications/taskmgr/perfdata.c trunk/reactos/base/applications/taskmgr/procpage.c Modified: trunk/reactos/base/applications/taskmgr/perfdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
============================================================================== --- trunk/reactos/base/applications/taskmgr/perfdata.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/perfdata.c [iso-8859-1] Sun Apr 12 15:45:40 2015 @@ -105,6 +105,10 @@ pEntry = CONTAINING_RECORD(pCur, SIDTOUSERNAME, List); pCur = pCur->Flink; HeapFree(GetProcessHeap(), 0, pEntry); + } + + if (SystemProcessorTimeInfo) { + HeapFree(GetProcessHeap(), 0, SystemProcessorTimeInfo); } } Modified: trunk/reactos/base/applications/taskmgr/procpage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
============================================================================== --- trunk/reactos/base/applications/taskmgr/procpage.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/procpage.c [iso-8859-1] Sun Apr 12 15:45:40 2015 @@ -59,6 +59,22 @@ DWORD WINAPI ProcessPageRefreshThread(void *lpParameter); int ProcessRunning(ULONG ProcessId); +void Cleanup(void) +{ + int i; + LV_ITEM item; + LPPROCESS_PAGE_LIST_ITEM pData; + for (i = 0; i < ListView_GetItemCount(hProcessPageListCtrl); i++) + { + memset(&item, 0, sizeof(LV_ITEM)); + item.mask = LVIF_PARAM; + item.iItem = i; + (void)ListView_GetItem(hProcessPageListCtrl, &item); + pData = (LPPROCESS_PAGE_LIST_ITEM)item.lParam; + HeapFree(GetProcessHeap(), 0, pData); + } +} + int ProcGetIndexByProcessId(DWORD dwProcessId) { int i; @@ -170,6 +186,7 @@ EndLocalThread(&hProcessThread, dwProcessThread); #endif SaveColumnSettings(); + Cleanup(); break; case WM_COMMAND:
9 years, 8 months
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
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