[ros-diffs] [pschweitzer] 72107: [MPR] Add a missing break

2016-08-04 Thread pschweitzer
Author: pschweitzer
Date: Thu Aug  4 12:25:51 2016
New Revision: 72107

URL: http://svn.reactos.org/svn/reactos?rev=72107&view=rev
Log:
[MPR]
Add a missing break

Modified:
trunk/reactos/dll/win32/mpr/wnet.c

Modified: trunk/reactos/dll/win32/mpr/wnet.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/wnet.c?rev=72107&r1=72106&r2=72107&view=diff
==
--- trunk/reactos/dll/win32/mpr/wnet.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mpr/wnet.c  [iso-8859-1] Thu Aug  4 12:25:51 2016
@@ -1454,6 +1454,7 @@
 }
 HeapFree(GetProcessHeap(), 0, handles);
 ret = WN_SUCCESS;
+break;
 case WNET_ENUMERATOR_TYPE_NULL:
 ret = WN_SUCCESS;
 break;




[ros-diffs] [pschweitzer] 72108: [MPR] Check for the right capability. Already sent upstream. CORE-11757

2016-08-04 Thread pschweitzer
Author: pschweitzer
Date: Thu Aug  4 12:27:59 2016
New Revision: 72108

URL: http://svn.reactos.org/svn/reactos?rev=72108&view=rev
Log:
[MPR]
Check for the right capability.
Already sent upstream.

CORE-11757

Modified:
trunk/reactos/dll/win32/mpr/wnet.c

Modified: trunk/reactos/dll/win32/mpr/wnet.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/wnet.c?rev=72108&r1=72107&r2=72108&view=diff
==
--- trunk/reactos/dll/win32/mpr/wnet.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mpr/wnet.c  [iso-8859-1] Thu Aug  4 12:27:59 2016
@@ -2110,7 +2110,7 @@
 for (index = 0; index < providerTable->numProviders; index++)
 {
 if(providerTable->table[index].getCaps(WNNC_CONNECTION) &
-WNNC_CON_GETCONNECTIONS)
+WNNC_CON_CANCELCONNECTION)
 {
 if (providerTable->table[index].cancelConnection)
 ret = 
providerTable->table[index].cancelConnection((LPWSTR)lpName, fForce);




[ros-diffs] [mjansen] 72109: [INCLUDE/WINE] Update test.h with debug functions for POINT and SIZE.

2016-08-04 Thread mjansen
Author: mjansen
Date: Thu Aug  4 19:11:50 2016
New Revision: 72109

URL: http://svn.reactos.org/svn/reactos?rev=72109&view=rev
Log:
[INCLUDE/WINE] Update test.h with debug functions for POINT and SIZE.

Modified:
trunk/reactos/sdk/include/reactos/wine/test.h

Modified: trunk/reactos/sdk/include/reactos/wine/test.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/wine/test.h?rev=72109&r1=72108&r2=72109&view=diff
==
--- trunk/reactos/sdk/include/reactos/wine/test.h   [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/reactos/wine/test.h   [iso-8859-1] Thu Aug  4 
19:11:50 2016
@@ -70,6 +70,8 @@
 
 extern const char *wine_dbgstr_wn( const WCHAR *str, intptr_t n );
 extern const char *wine_dbgstr_guid( const GUID *guid );
+extern const char *wine_dbgstr_point( const POINT *guid );
+extern const char *wine_dbgstr_size( const SIZE *guid );
 extern const char *wine_dbgstr_rect( const RECT *rect );
 static inline const char *wine_dbgstr_w( const WCHAR *s ) { return 
wine_dbgstr_wn( s, -1 ); }
 
@@ -575,6 +577,36 @@
 return res;
 }
 
+const char *wine_dbgstr_point( const POINT *point )
+{
+char *res;
+
+if (!point) return "(null)";
+res = get_temp_buffer( 60 );
+#ifdef __ROS_LONG64__
+sprintf( res, "(%d,%d)", point->x, point->y );
+#else
+sprintf( res, "(%ld,%ld)", point->x, point->y );
+#endif
+release_temp_buffer( res, strlen(res) + 1 );
+return res;
+}
+
+const char *wine_dbgstr_size( const SIZE *size )
+{
+char *res;
+
+if (!size) return "(null)";
+res = get_temp_buffer( 60 );
+#ifdef __ROS_LONG64__
+sprintf( res, "(%d,%d)", size->cx, size->cy );
+#else
+sprintf( res, "(%ld,%ld)", size->cx, size->cy );
+#endif
+release_temp_buffer( res, strlen(res) + 1 );
+return res;
+}
+
 const char *wine_dbgstr_rect( const RECT *rect )
 {
 char *res;




[ros-diffs] [mjansen] 72110: [ATL][ATL_APITEST] Add implementation + tests for most functions from CPoint, CSize, CRect. CORE-11747 #resolve Not all functions are implemented, the ones that are not im

2016-08-04 Thread mjansen
Author: mjansen
Date: Thu Aug  4 19:15:21 2016
New Revision: 72110

URL: http://svn.reactos.org/svn/reactos?rev=72110&view=rev
Log:
[ATL][ATL_APITEST] Add implementation + tests for most functions from CPoint, 
CSize, CRect. CORE-11747 #resolve
Not all functions are implemented, the ones that are not implemented are left 
in a comment in the header.

Added:
trunk/reactos/sdk/lib/atl/atltypes.h   (with props)
trunk/rostests/apitests/atl/atltypes.cpp   (with props)
Modified:
trunk/rostests/apitests/atl/CMakeLists.txt
trunk/rostests/apitests/atl/testlist.c

Added: trunk/reactos/sdk/lib/atl/atltypes.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/atl/atltypes.h?rev=72110
==
--- trunk/reactos/sdk/lib/atl/atltypes.h(added)
+++ trunk/reactos/sdk/lib/atl/atltypes.h[iso-8859-1] Thu Aug  4 
19:15:21 2016
@@ -0,0 +1,566 @@
+/*
+ * ReactOS ATL
+ *
+ * Copyright 2016 Mark Jansen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ */
+
+#pragma once
+
+
+class CSize;
+class CRect;
+
+
+class CPoint : public tagPOINT
+{
+public:
+
+CPoint() throw()
+{
+x = y = 0;
+}
+
+CPoint(int initX, int initY) throw()
+{
+x = initX;
+y = initY;
+}
+
+CPoint(POINT initPt) throw()
+{
+*((POINT*)this) = initPt;
+}
+
+CPoint(SIZE initSize) throw()
+{
+*((SIZE*)this) = initSize;
+}
+
+CPoint(LPARAM dwPoint) throw()
+{
+x = LOWORD(dwPoint);
+y = HIWORD(dwPoint);
+}
+
+void Offset(int xOffset, int yOffset) throw()
+{
+x += xOffset;
+y += yOffset;
+}
+
+void Offset(POINT point) throw()
+{
+Offset(point.x, point.y);
+}
+
+void Offset(SIZE size) throw()
+{
+Offset(size.cx, size.cy);
+}
+
+BOOL operator==(POINT point) const throw()
+{
+return (x == point.x && y == point.y);
+}
+
+BOOL operator!=(POINT point) const throw()
+{
+return !(*this == point);
+}
+
+void operator+=(SIZE size) throw()
+{
+Offset(size);
+}
+
+void operator+=(POINT point) throw()
+{
+Offset(point);
+}
+
+void operator-=(SIZE size) throw()
+{
+Offset(-size.cx, -size.cy);
+}
+
+void operator-=(POINT point) throw()
+{
+Offset(-point.x, -point.y);
+}
+
+CPoint operator+(SIZE size) const throw()
+{
+return CPoint(x + size.cx, y + size.cy);
+}
+
+CPoint operator+(POINT point) const throw()
+{
+return CPoint(x + point.x, y + point.y);
+}
+
+CRect operator+(const RECT* lpRect) const throw();
+
+CSize operator-(POINT point) const throw();
+
+CPoint operator-(SIZE size) const throw()
+{
+return CPoint(x - size.cx, y - size.cy);
+}
+
+CRect operator-(const RECT* lpRect) const throw();
+
+CPoint operator-() const throw()
+{
+return CPoint(-x, -y);
+}
+};
+
+class CSize : public tagSIZE
+{
+public:
+CSize() throw()
+{
+cx = cy = 0;
+}
+
+CSize(int initCX, int initCY) throw()
+{
+cx = initCX;
+cy = initCY;
+}
+
+CSize(SIZE initSize) throw()
+{
+*((SIZE*)this) = initSize;
+}
+
+CSize(POINT initPt) throw()
+{
+*((POINT*)this) = initPt;
+}
+
+CSize(DWORD dwSize) throw()
+{
+cx = LOWORD(dwSize);
+cy = HIWORD(dwSize);
+}
+
+BOOL operator==(SIZE size) const throw()
+{
+return (size.cx == cx && size.cy == cy);
+}
+
+BOOL operator!=(SIZE size) const throw()
+{
+return !(*this == size);
+}
+
+void operator+=(SIZE size) throw()
+{
+cx += size.cx;
+cy += size.cy;
+}
+
+void operator-=(SIZE size) throw()
+{
+cx -= size.cx;
+cy -= size.cy;
+}
+
+CSize operator+(SIZE size) const throw()
+{
+return CSize(cx + size.cx, cy + size.cy);
+}
+
+CPoint operator+(POINT point) const throw()
+{
+return CPoint(cx + point.x, cy + point.y);
+}
+
+CRect operator+(const RECT* lpRect) const throw();
+
+CSize operator-(SIZE size) const throw()
+{
+