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
July 2016
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
18 participants
358 discussions
Start a n
N
ew thread
[akhaldi] 71986: [GDI32] Sync EMFDRV_PolyPolylinegon() with Wine Staging 1.9.14. CORE-11521
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jul 23 21:33:40 2016 New Revision: 71986 URL:
http://svn.reactos.org/svn/reactos?rev=71986&view=rev
Log: [GDI32] Sync EMFDRV_PolyPolylinegon() with Wine Staging 1.9.14. CORE-11521 Modified: trunk/reactos/win32ss/gdi/gdi32/wine/enhmfdrv/enhmetafiledrv.h trunk/reactos/win32ss/gdi/gdi32/wine/enhmfdrv/graphics.c Modified: trunk/reactos/win32ss/gdi/gdi32/wine/enhmfdrv/enhmetafiledrv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/wine/enh…
============================================================================== --- trunk/reactos/win32ss/gdi/gdi32/wine/enhmfdrv/enhmetafiledrv.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/gdi32/wine/enhmfdrv/enhmetafiledrv.h [iso-8859-1] Sat Jul 23 21:33:40 2016 @@ -42,8 +42,13 @@ HDC ref_dc; /* Reference device */ HDC screen_dc; /* Screen DC if no reference device specified */ INT restoring; /* RestoreDC counter */ + BOOL path; } EMFDRV_PDEVICE; +static inline EMFDRV_PDEVICE *get_emf_physdev( PHYSDEV dev ) +{ + return CONTAINING_RECORD( dev, EMFDRV_PDEVICE, dev ); +} extern BOOL EMFDRV_WriteRecord( PHYSDEV dev, EMR *emr ) DECLSPEC_HIDDEN; extern void EMFDRV_UpdateBBox( PHYSDEV dev, RECTL *rect ) DECLSPEC_HIDDEN; Modified: trunk/reactos/win32ss/gdi/gdi32/wine/enhmfdrv/graphics.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/wine/enh…
============================================================================== --- trunk/reactos/win32ss/gdi/gdi32/wine/enhmfdrv/graphics.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/gdi32/wine/enhmfdrv/graphics.c [iso-8859-1] Sat Jul 23 21:33:40 2016 @@ -33,6 +33,69 @@ WINE_DEFAULT_DEBUG_CHANNEL(enhmetafile); +static const RECTL empty_bounds = { 0, 0, -1, -1 }; + +/* determine if we can use 16-bit points to store all the input points */ +static BOOL can_use_short_points( const POINT *pts, UINT count ) +{ + UINT i; + + for (i = 0; i < count; i++) + if (((pts[i].x + 0x8000) & ~0xffff) || ((pts[i].y + 0x8000) & ~0xffff)) + return FALSE; + return TRUE; +} + +/* store points in either long or short format; return a pointer to the end of the stored data */ +static void *store_points( POINTL *dest, const POINT *pts, UINT count, BOOL short_points ) +{ + if (short_points) + { + UINT i; + POINTS *dest_short = (POINTS *)dest; + + for (i = 0; i < count; i++) + { + dest_short[i].x = pts[i].x; + dest_short[i].y = pts[i].y; + } + return dest_short + count; + } + else + { + memcpy( dest, pts, count * sizeof(*dest) ); + return dest + count; + } +} + +/* compute the bounds of an array of points, optionally including the current position */ +static void get_points_bounds( RECTL *bounds, const POINT *pts, UINT count, HDC hdc ) +{ + UINT i; + + if (hdc) + { + POINT cur_pt; + GetCurrentPositionEx( hdc, &cur_pt ); + bounds->left = bounds->right = cur_pt.x; + bounds->top = bounds->bottom = cur_pt.y; + } + else if (count) + { + bounds->left = bounds->right = pts[0].x; + bounds->top = bounds->bottom = pts[0].y; + } + else *bounds = empty_bounds; + + for (i = 0; i < count; i++) + { + bounds->left = min( bounds->left, pts[i].x ); + bounds->right = max( bounds->right, pts[i].x ); + bounds->top = min( bounds->top, pts[i].y ); + bounds->bottom = max( bounds->bottom, pts[i].y ); + } +} + /********************************************************************** * EMFDRV_MoveTo */ @@ -481,42 +544,50 @@ EMFDRV_PolyPolylinegon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT polys, DWORD iType) { + EMFDRV_PDEVICE *physDev = get_emf_physdev( dev ); EMRPOLYPOLYLINE *emr; DWORD cptl = 0, poly, size; - INT point; - RECTL bounds; - const POINT *pts; - BOOL ret; - - bounds.left = bounds.right = pt[0].x; - bounds.top = bounds.bottom = pt[0].y; - - pts = pt; + BOOL ret, use_small_emr, bounds_valid = TRUE; + for(poly = 0; poly < polys; poly++) { cptl += counts[poly]; - for(point = 0; point < counts[poly]; point++) { - if(bounds.left > pts->x) bounds.left = pts->x; - else if(bounds.right < pts->x) bounds.right = pts->x; - if(bounds.top > pts->y) bounds.top = pts->y; - else if(bounds.bottom < pts->y) bounds.bottom = pts->y; - pts++; - } - } - - size = sizeof(EMRPOLYPOLYLINE) + (polys - 1) * sizeof(DWORD) + - (cptl - 1) * sizeof(POINTL); + if(counts[poly] < 2) bounds_valid = FALSE; + } + if(!cptl) bounds_valid = FALSE; + use_small_emr = can_use_short_points( pt, cptl ); + + size = FIELD_OFFSET(EMRPOLYPOLYLINE, aPolyCounts[polys]); + if(use_small_emr) + size += cptl * sizeof(POINTS); + else + size += cptl * sizeof(POINTL); emr = HeapAlloc( GetProcessHeap(), 0, size ); emr->emr.iType = iType; + if(use_small_emr) emr->emr.iType += EMR_POLYPOLYLINE16 - EMR_POLYPOLYLINE; + emr->emr.nSize = size; - emr->rclBounds = bounds; + if(bounds_valid && !physDev->path) + get_points_bounds( &emr->rclBounds, pt, cptl, 0 ); + else + emr->rclBounds = empty_bounds; emr->nPolys = polys; emr->cptl = cptl; - memcpy(emr->aPolyCounts, counts, polys * sizeof(DWORD)); - memcpy(emr->aPolyCounts + polys, pt, cptl * sizeof(POINTL)); + + if(polys) + { + memcpy( emr->aPolyCounts, counts, polys * sizeof(DWORD) ); + store_points( (POINTL *)(emr->aPolyCounts + polys), pt, cptl, use_small_emr ); + } + ret = EMFDRV_WriteRecord( dev, &emr->emr ); - if(ret) + if(ret && !bounds_valid) + { + ret = FALSE; + SetLastError( ERROR_INVALID_PARAMETER ); + } + if(ret && !physDev->path) EMFDRV_UpdateBBox( dev, &emr->rclBounds ); HeapFree( GetProcessHeap(), 0, emr ); return ret;
8 years, 5 months
1
0
0
0
[mjansen] 71985: [CRT][GDI32] Introduce atan2 library, use it for gdi32 to fix a crash. CORE-11521 As suggested by Thomas :)
by mjansen@svn.reactos.org
Author: mjansen Date: Sat Jul 23 20:35:11 2016 New Revision: 71985 URL:
http://svn.reactos.org/svn/reactos?rev=71985&view=rev
Log: [CRT][GDI32] Introduce atan2 library, use it for gdi32 to fix a crash. CORE-11521 As suggested by Thomas :) Modified: trunk/reactos/sdk/lib/crt/CMakeLists.txt trunk/reactos/win32ss/gdi/gdi32/CMakeLists.txt trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c Modified: trunk/reactos/sdk/lib/crt/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/crt/CMakeLists.txt…
============================================================================== --- trunk/reactos/sdk/lib/crt/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/crt/CMakeLists.txt [iso-8859-1] Sat Jul 23 20:35:11 2016 @@ -66,3 +66,19 @@ string/wctype.c) add_target_compile_definitions(strtol _LIBCNT_) add_dependencies(strtol psdk) + + +if(ARCH STREQUAL "i386") + list(APPEND ATAN2_ASM_SOURCE math/i386/atan2_asm.s) +elseif(ARCH STREQUAL "amd64") + list(APPEND ATAN2_ASM_SOURCE math/amd64/atan2.S) +elseif(ARCH STREQUAL "arm") + list(APPEND ATAN2_ASM_SOURCE math/arm/atan2.s) +endif() + +add_asm_files(atan2_asm ${ATAN2_ASM_SOURCE}) +add_library(atan2 ${atan2_asm}) +set_target_properties(atan2 PROPERTIES LINKER_LANGUAGE "C") +add_dependencies(atan2 asm) + + Modified: trunk/reactos/win32ss/gdi/gdi32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/CMakeLis…
============================================================================== --- trunk/reactos/win32ss/gdi/gdi32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/gdi32/CMakeLists.txt [iso-8859-1] Sat Jul 23 20:35:11 2016 @@ -61,6 +61,7 @@ win32ksys dxguid msvcrtex + atan2 ${PSEH_LIB}) add_importlibs(gdi32 user32 advapi32 kernel32 ntdll) Modified: trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/wine/ros…
============================================================================== --- trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/gdi32/wine/rosglue.c [iso-8859-1] Sat Jul 23 20:35:11 2016 @@ -519,23 +519,6 @@ { DbgRaiseAssertionFailure(); } - -#if defined(_MSC_VER) && (DBG != 1) - -/* MSVC uses its own in this case. */ -#else - -double -__cdecl -atan2( - double y, - double x) -{ - __debugbreak(); - return 0.; -} - -#endif /******************************************************************************/
8 years, 5 months
1
0
0
0
[pschweitzer] 71984: [MPR] Provide ReactOS specific implementation for WNetGetConnection(), we cannot use Wine's due to Wine specific MountMgr calls.
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sat Jul 23 19:52:23 2016 New Revision: 71984 URL:
http://svn.reactos.org/svn/reactos?rev=71984&view=rev
Log: [MPR] Provide ReactOS specific implementation for WNetGetConnection(), we cannot use Wine's due to Wine specific MountMgr calls. Modified: trunk/reactos/dll/win32/mpr/mpr_ros.diff trunk/reactos/dll/win32/mpr/wnet.c Modified: trunk/reactos/dll/win32/mpr/mpr_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/mpr_ros.diff…
============================================================================== --- trunk/reactos/dll/win32/mpr/mpr_ros.diff [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mpr/mpr_ros.diff [iso-8859-1] Sat Jul 23 19:52:23 2016 @@ -45,3 +45,68 @@ 22 stdcall @(long) MPR_Alloc 23 stdcall @(ptr long) MPR_ReAlloc 24 stdcall @(ptr) MPR_Free +Index: wnet.c +=================================================================== +--- wnet.c (revision 71983) ++++ wnet.c (working copy) +@@ -48,6 +48,9 @@ + PF_NPGetResourceInformation getResourceInformation; + PF_NPAddConnection addConnection; + PF_NPAddConnection3 addConnection3; ++#ifdef __REACTOS__ ++ PF_NPGetConnection getConnection; ++#endif + } WNetProvider, *PWNetProvider; + + typedef struct _WNetProviderTable +@@ -196,6 +199,9 @@ + } + provider->addConnection = MPR_GETPROC(NPAddConnection); + provider->addConnection3 = MPR_GETPROC(NPAddConnection3); ++#ifdef __REACTOS__ ++ provider->getConnection = MPR_GETPROC(NPGetConnection); ++#endif + TRACE("NPAddConnection %p\n", provider->addConnection); + TRACE("NPAddConnection3 %p\n", provider->addConnection3); + providerTable->numProviders++; +@@ -1949,6 +1955,7 @@ + /* find the network connection for a given drive; helper for WNetGetConnection */ + static DWORD get_drive_connection( WCHAR letter, LPWSTR remote, LPDWORD size ) + { ++#ifndef __REACTOS__ + char buffer[1024]; + struct mountmgr_unix_drive *data = (struct mountmgr_unix_drive *)buffer; + HANDLE mgr; +@@ -1991,6 +1998,32 @@ + } + CloseHandle( mgr ); + return ret; ++#else ++ DWORD ret = WN_NO_NETWORK; ++ DWORD index; ++ WCHAR local[3] = {letter, ':', 0}; ++ ++ if (providerTable != NULL) ++ { ++ for (index = 0; index < providerTable->numProviders; index++) ++ { ++ if(providerTable->table[index].getCaps(WNNC_CONNECTION) & ++ WNNC_CON_GETCONNECTIONS) ++ { ++ if (providerTable->table[index].getConnection) ++ ret = providerTable->table[index].getConnection( ++ local, remote, size); ++ else ++ ret = WN_NO_NETWORK; ++ if (ret == WN_SUCCESS || ret == WN_MORE_DATA) ++ break; ++ } ++ } ++ } ++ if (ret) ++ SetLastError(ret); ++ return ret; ++#endif + } + + /************************************************************************** Modified: trunk/reactos/dll/win32/mpr/wnet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/wnet.c?rev=7…
============================================================================== --- trunk/reactos/dll/win32/mpr/wnet.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mpr/wnet.c [iso-8859-1] Sat Jul 23 19:52:23 2016 @@ -48,6 +48,9 @@ PF_NPGetResourceInformation getResourceInformation; PF_NPAddConnection addConnection; PF_NPAddConnection3 addConnection3; +#ifdef __REACTOS__ + PF_NPGetConnection getConnection; +#endif } WNetProvider, *PWNetProvider; typedef struct _WNetProviderTable @@ -196,6 +199,9 @@ } provider->addConnection = MPR_GETPROC(NPAddConnection); provider->addConnection3 = MPR_GETPROC(NPAddConnection3); +#ifdef __REACTOS__ + provider->getConnection = MPR_GETPROC(NPGetConnection); +#endif TRACE("NPAddConnection %p\n", provider->addConnection); TRACE("NPAddConnection3 %p\n", provider->addConnection3); providerTable->numProviders++; @@ -1949,6 +1955,7 @@ /* find the network connection for a given drive; helper for WNetGetConnection */ static DWORD get_drive_connection( WCHAR letter, LPWSTR remote, LPDWORD size ) { +#ifndef __REACTOS__ char buffer[1024]; struct mountmgr_unix_drive *data = (struct mountmgr_unix_drive *)buffer; HANDLE mgr; @@ -1991,6 +1998,32 @@ } CloseHandle( mgr ); return ret; +#else + DWORD ret = WN_NO_NETWORK; + DWORD index; + WCHAR local[3] = {letter, ':', 0}; + + if (providerTable != NULL) + { + for (index = 0; index < providerTable->numProviders; index++) + { + if(providerTable->table[index].getCaps(WNNC_CONNECTION) & + WNNC_CON_GETCONNECTIONS) + { + if (providerTable->table[index].getConnection) + ret = providerTable->table[index].getConnection( + local, remote, size); + else + ret = WN_NO_NETWORK; + if (ret == WN_SUCCESS || ret == WN_MORE_DATA) + break; + } + } + } + if (ret) + SetLastError(ret); + return ret; +#endif } /**************************************************************************
8 years, 5 months
1
0
0
0
[cwittich] 71983: [SHELL32] close hKey in error case
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Jul 23 19:39:16 2016 New Revision: 71983 URL:
http://svn.reactos.org/svn/reactos?rev=71983&view=rev
Log: [SHELL32] close hKey in error case Modified: trunk/reactos/dll/win32/shell32/CNewMenu.cpp Modified: trunk/reactos/dll/win32/shell32/CNewMenu.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CNewMenu…
============================================================================== --- trunk/reactos/dll/win32/shell32/CNewMenu.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CNewMenu.cpp [iso-8859-1] Sat Jul 23 19:39:16 2016 @@ -203,8 +203,8 @@ } } - dwSize++; - + dwSize++; + lpValues = (LPWSTR) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize * sizeof(WCHAR)); if (!lpValues) return FALSE; @@ -227,6 +227,7 @@ if (RegSetValueExW(hKey, L"Classes", NULL, REG_MULTI_SZ, (LPBYTE)lpValues, dwSize * sizeof(WCHAR)) != ERROR_SUCCESS) { HeapFree(GetProcessHeap(), 0, lpValues); + RegCloseKey(hKey); return FALSE; }
8 years, 5 months
1
0
0
0
[tfaber] 71982: [NTOS:IO] - Avoid infinite loop in IopMountVolume. Brought to you by Vadim Galyant. CORE-11663 #resolve
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Jul 23 18:18:11 2016 New Revision: 71982 URL:
http://svn.reactos.org/svn/reactos?rev=71982&view=rev
Log: [NTOS:IO] - Avoid infinite loop in IopMountVolume. Brought to you by Vadim Galyant. CORE-11663 #resolve Modified: trunk/reactos/ntoskrnl/io/iomgr/volume.c Modified: trunk/reactos/ntoskrnl/io/iomgr/volume.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/volume.c…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/volume.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/volume.c [iso-8859-1] Sat Jul 23 18:18:11 2016 @@ -554,6 +554,7 @@ (ListEntry->Flink != FsList)) { /* Then skip this entry */ + ListEntry = ListEntry->Flink; continue; }
8 years, 5 months
1
0
0
0
[mjansen] 71981: [SHELL32] Addendum to r71980, RegSetValueEx expects a size in bytes, not chars. CORE-10439
by mjansen@svn.reactos.org
Author: mjansen Date: Sat Jul 23 13:15:19 2016 New Revision: 71981 URL:
http://svn.reactos.org/svn/reactos?rev=71981&view=rev
Log: [SHELL32] Addendum to r71980, RegSetValueEx expects a size in bytes, not chars. CORE-10439 Modified: trunk/reactos/dll/win32/shell32/CNewMenu.cpp Modified: trunk/reactos/dll/win32/shell32/CNewMenu.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CNewMenu…
============================================================================== --- trunk/reactos/dll/win32/shell32/CNewMenu.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CNewMenu.cpp [iso-8859-1] Sat Jul 23 13:15:19 2016 @@ -224,7 +224,7 @@ return FALSE; } - if (RegSetValueExW(hKey, L"Classes", NULL, REG_MULTI_SZ, (LPBYTE)lpValues, dwSize) != ERROR_SUCCESS) + if (RegSetValueExW(hKey, L"Classes", NULL, REG_MULTI_SZ, (LPBYTE)lpValues, dwSize * sizeof(WCHAR)) != ERROR_SUCCESS) { HeapFree(GetProcessHeap(), 0, lpValues); return FALSE;
8 years, 5 months
1
0
0
0
[cwittich] 71980: [SHELL32] cache entries of "New" menu CORE-10439
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Jul 23 12:31:30 2016 New Revision: 71980 URL:
http://svn.reactos.org/svn/reactos?rev=71980&view=rev
Log: [SHELL32] cache entries of "New" menu CORE-10439 Modified: trunk/reactos/dll/win32/shell32/CNewMenu.cpp trunk/reactos/dll/win32/shell32/CNewMenu.h Modified: trunk/reactos/dll/win32/shell32/CNewMenu.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CNewMenu…
============================================================================== --- trunk/reactos/dll/win32/shell32/CNewMenu.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CNewMenu.cpp [iso-8859-1] Sat Jul 23 12:31:30 2016 @@ -163,17 +163,18 @@ } BOOL -CNewMenu::LoadAllItems() -{ +CNewMenu::CacheItems() +{ + HKEY hKey; + DWORD dwSize = 0; DWORD dwIndex = 0; + LPWSTR lpValue; + LPWSTR lpValues; WCHAR wszName[MAX_PATH]; SHELLNEW_ITEM *pNewItem; SHELLNEW_ITEM *pCurItem = NULL; - /* If there are any unload them */ - UnloadAllItems(); - - /* Enumerate all extesions */ + /* Enumerate all extensions */ while (RegEnumKeyW(HKEY_CLASSES_ROOT, dwIndex++, wszName, _countof(wszName)) == ERROR_SUCCESS) { if (wszName[0] != L'.') @@ -182,6 +183,7 @@ pNewItem = LoadItem(wszName); if (pNewItem) { + dwSize += wcslen(wszName) + 1; if (wcsicmp(pNewItem->pwszExt, L".lnk") == 0) { /* Link handler */ @@ -200,7 +202,109 @@ } } } - + + dwSize++; + + lpValues = (LPWSTR) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize * sizeof(WCHAR)); + if (!lpValues) + return FALSE; + + lpValue = lpValues; + pCurItem = m_pItems; + while (pCurItem) + { + memcpy(lpValue, pCurItem->pwszExt, (wcslen(pCurItem->pwszExt) + 1) * sizeof(WCHAR)); + lpValue += wcslen(pCurItem->pwszExt) + 1; + pCurItem = pCurItem->pNext; + } + + if (RegCreateKeyEx(HKEY_CURRENT_USER, ShellNewKey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS) + { + HeapFree(GetProcessHeap(), 0, lpValues); + return FALSE; + } + + if (RegSetValueExW(hKey, L"Classes", NULL, REG_MULTI_SZ, (LPBYTE)lpValues, dwSize) != ERROR_SUCCESS) + { + HeapFree(GetProcessHeap(), 0, lpValues); + return FALSE; + } + + HeapFree(GetProcessHeap(), 0, lpValues); + RegCloseKey(hKey); + + return TRUE; +} + +BOOL +CNewMenu::LoadCachedItems() +{ + LPWSTR wszName; + LPWSTR lpValues; + DWORD dwSize; + HKEY hKey; + SHELLNEW_ITEM *pNewItem; + SHELLNEW_ITEM *pCurItem = NULL; + + if (RegOpenKeyExW(HKEY_CURRENT_USER, ShellNewKey, 0, KEY_READ, &hKey) != ERROR_SUCCESS) + return FALSE; + + if (RegQueryValueExW(hKey, L"Classes", NULL, NULL, NULL, &dwSize) != ERROR_SUCCESS) + return FALSE; + + lpValues = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, dwSize); + if (!lpValues) + return FALSE; + + if (RegQueryValueExW(hKey, L"Classes", NULL, NULL, (LPBYTE)lpValues, &dwSize) != ERROR_SUCCESS) + { + HeapFree(GetProcessHeap(), 0, lpValues); + return FALSE; + } + + wszName = lpValues; + + for (; '\0' != *wszName; wszName += wcslen(wszName) + 1) + { + pNewItem = LoadItem(wszName); + if (pNewItem) + { + if (wcsicmp(pNewItem->pwszExt, L".lnk") == 0) + { + /* Link handler */ + m_pLinkItem = pNewItem; + } + else + { + /* Add at the end of list */ + if (pCurItem) + { + pCurItem->pNext = pNewItem; + pCurItem = pNewItem; + } + else + pCurItem = m_pItems = pNewItem; + } + } + } + + HeapFree(GetProcessHeap(), 0, lpValues); + RegCloseKey(hKey); + + return TRUE; +} + +BOOL +CNewMenu::LoadAllItems() +{ + /* If there are any unload them */ + UnloadAllItems(); + + if (!LoadCachedItems()) + { + CacheItems(); + } + if (!m_pLinkItem) { m_pLinkItem = static_cast<SHELLNEW_ITEM *>(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SHELLNEW_ITEM))); Modified: trunk/reactos/dll/win32/shell32/CNewMenu.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CNewMenu…
============================================================================== --- trunk/reactos/dll/win32/shell32/CNewMenu.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CNewMenu.h [iso-8859-1] Sat Jul 23 12:31:30 2016 @@ -23,33 +23,35 @@ #ifndef _SHV_ITEM_NEW_H_ #define _SHV_ITEM_NEW_H_ +const WCHAR ShellNewKey[] = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Discardable\\PostSetup\\ShellNew"; + class CNewMenu : - public CComCoClass<CNewMenu, &CLSID_NewMenu>, - public CComObjectRootEx<CComMultiThreadModelNoCS>, - public IObjectWithSite, - public IContextMenu3, - public IShellExtInit + public CComCoClass<CNewMenu, &CLSID_NewMenu>, + public CComObjectRootEx<CComMultiThreadModelNoCS>, + public IObjectWithSite, + public IContextMenu3, + public IShellExtInit { private: - enum SHELLNEW_TYPE - { - SHELLNEW_TYPE_INVALID = -1, - SHELLNEW_TYPE_COMMAND = 1, - SHELLNEW_TYPE_DATA = 2, - SHELLNEW_TYPE_FILENAME = 4, - SHELLNEW_TYPE_NULLFILE = 8 - }; + enum SHELLNEW_TYPE + { + SHELLNEW_TYPE_INVALID = -1, + SHELLNEW_TYPE_COMMAND = 1, + SHELLNEW_TYPE_DATA = 2, + SHELLNEW_TYPE_FILENAME = 4, + SHELLNEW_TYPE_NULLFILE = 8 + }; - struct SHELLNEW_ITEM - { - SHELLNEW_TYPE Type; - LPWSTR pwszExt; - PBYTE pData; - ULONG cbData; - LPWSTR pwszDesc; - HICON hIcon; - SHELLNEW_ITEM *pNext; - }; + struct SHELLNEW_ITEM + { + SHELLNEW_TYPE Type; + LPWSTR pwszExt; + PBYTE pData; + ULONG cbData; + LPWSTR pwszDesc; + HICON hIcon; + SHELLNEW_ITEM *pNext; + }; LPITEMIDLIST m_pidlFolder; LPWSTR m_wszPath; @@ -62,35 +64,37 @@ SHELLNEW_ITEM *LoadItem(LPCWSTR pwszExt); void UnloadItem(SHELLNEW_ITEM *pItem); - void UnloadAllItems(); - BOOL LoadAllItems(); - UINT InsertShellNewItems(HMENU hMenu, UINT idFirst, UINT idMenu); - SHELLNEW_ITEM *FindItemFromIdOffset(UINT IdOffset); - HRESULT CreateNewFolder(LPCMINVOKECOMMANDINFO lpici); - HRESULT CreateNewItem(SHELLNEW_ITEM *pItem, LPCMINVOKECOMMANDINFO lpcmi); + void UnloadAllItems(); + BOOL CacheItems(); + BOOL LoadCachedItems(); + BOOL LoadAllItems(); + UINT InsertShellNewItems(HMENU hMenu, UINT idFirst, UINT idMenu); + SHELLNEW_ITEM *FindItemFromIdOffset(UINT IdOffset); + HRESULT CreateNewFolder(LPCMINVOKECOMMANDINFO lpici); + HRESULT CreateNewItem(SHELLNEW_ITEM *pItem, LPCMINVOKECOMMANDINFO lpcmi); HRESULT SelectNewItem(LPCMINVOKECOMMANDINFO lpici, LONG wEventId, UINT uFlags, LPWSTR pszName); public: - CNewMenu(); - ~CNewMenu(); + CNewMenu(); + ~CNewMenu(); - // IObjectWithSite - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + // IObjectWithSite + virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); + virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); - // IContextMenu - virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); - virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); - virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + // IContextMenu + virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); + virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); + virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); - // IContextMenu3 - virtual HRESULT WINAPI HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult); + // IContextMenu3 + virtual HRESULT WINAPI HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult); - // IContextMenu2 - virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + // IContextMenu2 + virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); - // IShellExtInit - virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); + // IShellExtInit + virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); DECLARE_REGISTRY_RESOURCEID(IDR_NEWMENU) DECLARE_NOT_AGGREGATABLE(CNewMenu) @@ -98,11 +102,11 @@ DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CNewMenu) - COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) - COM_INTERFACE_ENTRY_IID(IID_IContextMenu3, IContextMenu3) - COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2) - COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) - COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit) + COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu3, IContextMenu3) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) + COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit) END_COM_MAP() };
8 years, 5 months
1
0
0
0
[gadamopoulos] 71979: [SHELL32] - CDefView: Add the skeleton check that should be used to implement moving items in the CDefView. Nothing more is implemented because GetKeyState is completely unrel...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Sat Jul 23 08:42:38 2016 New Revision: 71979 URL:
http://svn.reactos.org/svn/reactos?rev=71979&view=rev
Log: [SHELL32] - CDefView: Add the skeleton check that should be used to implement moving items in the CDefView. Nothing more is implemented because GetKeyState is completely unreliable. Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
============================================================================== --- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Sat Jul 23 08:42:38 2016 @@ -97,6 +97,7 @@ DWORD m_dwAdvf; CComPtr<IAdviseSink> m_pAdvSink; // for drag and drop + CComPtr<IDataObject> m_pSourceDataObject; CComPtr<IDropTarget> m_pCurDropTarget; /* The sub-item, which is currently dragged over */ CComPtr<IDataObject> m_pCurDataObject; /* The dragged data-object */ LONG m_iDragOverItem; /* Dragged over item's index, iff m_pCurDropTarget != NULL */ @@ -1786,7 +1787,12 @@ } DWORD dwEffect2; + + m_pSourceDataObject = pda; + DoDragDrop(pda, this, dwEffect, &dwEffect2); + + m_pSourceDataObject.Release(); } } break; @@ -2937,7 +2943,23 @@ HRESULT WINAPI CDefView::Drop(IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) { - if (m_pCurDropTarget) + ERR("GetKeyState(VK_LBUTTON): %d\n", GetKeyState(VK_LBUTTON)); + + if ((m_iDragOverItem == -1) && + (*pdwEffect & DROPEFFECT_MOVE) && + (GetKeyState(VK_LBUTTON) != 0) && + (m_pSourceDataObject.p) && + (SHIsSameObject(pDataObject, m_pSourceDataObject))) + { + ERR("Should implement moving items here!\n"); + + if (m_pCurDropTarget) + { + m_pCurDropTarget->DragLeave(); + m_pCurDropTarget.Release(); + } + } + else if (m_pCurDropTarget) { m_pCurDropTarget->Drop(pDataObject, grfKeyState, pt, pdwEffect); m_pCurDropTarget.Release();
8 years, 5 months
1
0
0
0
[hbelusca] 71978: [ADVPACK]: Addendum to r71977: Add the resource file into the CMakeList. CORE-7645
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri Jul 22 14:15:09 2016 New Revision: 71978 URL:
http://svn.reactos.org/svn/reactos?rev=71978&view=rev
Log: [ADVPACK]: Addendum to r71977: Add the resource file into the CMakeList. CORE-7645 Modified: trunk/reactos/dll/win32/advpack/CMakeLists.txt Modified: trunk/reactos/dll/win32/advpack/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advpack/CMakeLis…
============================================================================== --- trunk/reactos/dll/win32/advpack/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advpack/CMakeLists.txt [iso-8859-1] Fri Jul 22 14:15:09 2016 @@ -12,6 +12,7 @@ add_library(advpack SHARED ${SOURCE} + advpack.rc ${CMAKE_CURRENT_BINARY_DIR}/advpack.def) set_module_type(advpack win32dll)
8 years, 5 months
1
0
0
0
[hbelusca] 71977: [ADVPACK]: Add file version information resource. CORE-7645 #comment Please retest the installation of Visual Basic 6 runtime with revision >= 71977.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri Jul 22 13:19:25 2016 New Revision: 71977 URL:
http://svn.reactos.org/svn/reactos?rev=71977&view=rev
Log: [ADVPACK]: Add file version information resource. CORE-7645 #comment Please retest the installation of Visual Basic 6 runtime with revision >= 71977. Added: trunk/reactos/dll/win32/advpack/advpack.rc (with props) Added: trunk/reactos/dll/win32/advpack/advpack.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advpack/advpack.…
============================================================================== --- trunk/reactos/dll/win32/advpack/advpack.rc (added) +++ trunk/reactos/dll/win32/advpack/advpack.rc [iso-8859-1] Fri Jul 22 13:19:25 2016 @@ -0,0 +1,7 @@ +#include <windef.h> + +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "Advanced INF Package Installer" +#define REACTOS_STR_INTERNAL_NAME "advpack" +#define REACTOS_STR_ORIGINAL_FILENAME "advpack.dll" +#include <reactos/version.rc> Propchange: trunk/reactos/dll/win32/advpack/advpack.rc ------------------------------------------------------------------------------ svn:eol-style = native
8 years, 5 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
36
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
Results per page:
10
25
50
100
200