[PATCH] rasapi32: RasEnumConnections now returns correct buffer size (zero) when there are zero connections available

John Smith xixsimplicityxix at gmail.com
Thu Feb 1 16:36:52 CST 2007


Skipped content of type multipart/alternative-------------- next part --------------
From 4290e5bf6e662262e409879356ae65d4470ffa8c Mon Sep 17 00:00:00 2001
From: John Klehm <xixsimplicityxix at gmail.com>
Date: Thu, 1 Feb 2007 16:16:05 -0600
Subject: [PATCH] rasapi32: RasEnumConnectionsA/W if we are returning 0 for number of connections
then the buffer size needed should also be 0
---
 dlls/rasapi32/rasapi.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/rasapi32/rasapi.c b/dlls/rasapi32/rasapi.c
index a2dae0c..0977ffe 100644
--- a/dlls/rasapi32/rasapi.c
+++ b/dlls/rasapi32/rasapi.c
@@ -102,6 +102,7 @@ DWORD WINAPI RasEnumConnectionsA( LPRASCONNA rca, LPDWORD lpcb, LPDWORD lpcConne
 	/* Remote Access Service stuff is done by underlying OS anyway */
 	FIXME("(%p,%p,%p),stub!\n",rca,lpcb,lpcConnections);
 	FIXME("RAS support is not implemented! Configure program to use LAN connection/winsock instead!\n");
+	*lpcb = 0; /* size of buffer needed to enumerate connections */
 	*lpcConnections = 0; /* no RAS connections available */
 
 	return 0;
@@ -114,6 +115,7 @@ DWORD WINAPI RasEnumConnectionsW( LPRASCONNW rcw, LPDWORD lpcb, LPDWORD lpcConne
 	/* Remote Access Service stuff is done by underlying OS anyway */
 	FIXME("(%p,%p,%p),stub!\n",rcw,lpcb,lpcConnections);
 	FIXME("RAS support is not implemented! Configure program to use LAN connection/winsock instead!\n");
+	*lpcb = 0; /* size of buffer needed to enumerate connections */
 	*lpcConnections = 0; /* no RAS connections available */
 
 	return 0;
-- 
1.4.4.4


More information about the wine-patches mailing list