PATCH: more ras stubs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Ciao, Marcus

Changelog:
	New structures: RASIPADDR, RASDEVINFO, RASENTRY.
	New stubs: RasSetEntryProperties
	RasEnumDevicesA enhanced.

Index: include/ras.h
===================================================================
RCS file: /home/wine/wine/include/ras.h,v
retrieving revision 1.7
diff -u -r1.7 ras.h
--- include/ras.h	31 May 2002 23:06:48 -0000	1.7
+++ include/ras.h	7 Nov 2002 15:03:28 -0000
@@ -32,9 +32,39 @@
 #define RAS_MaxDeviceType     16
 #define RAS_MaxEntryName      256
 #define RAS_MaxPhoneNumber    128
+#define RAS_MaxAreaCode       10
+#define RAS_MaxPadType        32
+#define RAS_MaxX25Address     200
+#define RAS_MaxFacilities     200
+#define RAS_MaxUserData       200
 
 DECLARE_HANDLE(HRASCONN);
 
+/* szDeviceType strings for RASDEVINFO */
+#define	RASDT_Direct	"direct"
+#define	RASDT_Modem	"modem"
+#define	RASDT_Isdn	"isdn"
+#define	RASDT_X25	"x25"
+
+#define RASBASE				600
+#define ERROR_BUFFER_TOO_SMALL		(RASBASE+3)
+#define ERROR_INVALID_SIZE		(RASBASE+32)
+
+typedef struct tagRASDEVINFOA {
+    DWORD    dwSize;
+    CHAR     szDeviceType[ RAS_MaxDeviceType + 1 ];
+    CHAR     szDeviceName[ RAS_MaxDeviceName + 1 ];
+} RASDEVINFOA, *LPRASDEVINFOA;
+
+typedef struct tagRASDEVINFOW {
+    DWORD    dwSize;
+    WCHAR    szDeviceType[ RAS_MaxDeviceType + 1 ];
+    WCHAR    szDeviceName[ RAS_MaxDeviceName + 1 ];
+} RASDEVINFOW, *LPRASDEVINFOW;
+
+DECL_WINELIB_TYPE_AW(RASDEVINFO)
+DECL_WINELIB_TYPE_AW(LPRASDEVINFO)
+
 typedef struct tagRASCONNA {
     DWORD    dwSize;
     HRASCONN hRasConn;
@@ -98,6 +128,190 @@
 DECL_WINELIB_TYPE_AW(RASDIALPARAMS)
 DECL_WINELIB_TYPE_AW(LPRASDIALPARAMS)
 
+typedef struct tagRASIPADDR {
+	BYTE classA,classB,classC,classD;
+} RASIPADDR;
+
+#define RASEO_UseCountryAndAreaCodes	0x0001
+#define RASEO_SpecificIpAddr		0x0002
+#define RASEO_SpecificNameServers	0x0004
+#define RASEO_IpHeaderCompression	0x0008
+#define RASEO_RemoteDefaultGateway	0x0010
+#define RASEO_DisableLcpExtensions	0x0020
+#define RASEO_TerminalBeforeDial	0x0040
+#define RASEO_TerminalAfterDial		0x0080
+#define RASEO_ModemLights		0x0100
+#define RASEO_SwCompression		0x0200
+#define RASEO_RequireEncryptedPw	0x0400
+#define RASEO_RequireMsEncryptedPw	0x0800
+#define RASEO_RequireDataEncryption	0x1000
+#define RASEO_NetworkLogon		0x2000
+#define RASEO_UseLogonCredentials	0x4000
+#define RASEO_PromoteAlternates		0x8000
+typedef struct tagRASENTRYA {
+    DWORD dwSize;
+    DWORD dwfOptions;
+
+    /* Location */
+
+    DWORD dwCountryID;
+    DWORD dwCountryCode;
+    CHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
+    CHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
+    DWORD dwAlternateOffset;
+
+    /* IP related stuff */
+
+    RASIPADDR ipaddr;
+    RASIPADDR ipaddrDns;
+    RASIPADDR ipaddrDnsAlt;
+    RASIPADDR ipaddrWins;
+    RASIPADDR ipaddrWinsAlt;
+
+    /* Framing (for ppp/isdn etc...) */
+
+    DWORD dwFrameSize;
+    DWORD dwfNetProtocols;
+    DWORD dwFramingProtocol;
+
+    CHAR szScript[ MAX_PATH ];
+
+    CHAR szAutodialDll[ MAX_PATH ];
+    CHAR szAutodialFunc[ MAX_PATH ];
+
+    CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
+    CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
+
+    /* x25 only */
+
+    CHAR szX25PadType[ RAS_MaxPadType + 1 ];
+    CHAR szX25Address[ RAS_MaxX25Address + 1 ];
+    CHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
+    CHAR szX25UserData[ RAS_MaxUserData + 1 ];
+    DWORD dwChannels;
+
+    DWORD dwReserved1;
+    DWORD dwReserved2;
+
+#if (WINVER >= 0x401)
+
+    /* Multilink and BAP */
+
+    DWORD dwSubEntries;
+    DWORD dwDialMode;
+    DWORD dwDialExtraPercent;
+    DWORD dwDialExtraSampleSeconds;
+    DWORD dwHangUpExtraPercent;
+    DWORD dwHangUpExtraSampleSeconds;
+
+    /* Idle time out */
+    DWORD dwIdleDisconnectSeconds;
+
+#endif
+#if (WINVER >= 0x500)
+
+    DWORD dwType;		/* entry type */
+    DWORD dwEncryptionType;	/* type of encryption to use */
+    DWORD dwCustomAuthKey;	/* authentication key for EAP */
+    GUID guidId;		/* guid that represents the phone-book entry  */
+    CHAR szCustomDialDll[MAX_PATH];    /* DLL for custom dialing  */
+    DWORD dwVpnStrategy;         /* specifies type of VPN protocol */
+#endif
+#if (WINVER >= 0x501)
+    DWORD dwfOptions2;
+    DWORD dwfOptions3;
+    CHAR szDnsSuffix[RAS_MaxDnsSuffix];
+    DWORD dwTcpWindowSize;
+    CHAR szPrerequisitePbk[MAX_PATH];
+    CHAR szPrerequisiteEntry[RAS_MaxEntryName + 1];
+    DWORD dwRedialCount;
+    DWORD dwRedialPause;
+#endif
+} RASENTRYA, *LPRASENTRYA;
+
+typedef struct tagRASENTRYW {
+    DWORD dwSize;
+    DWORD dwfOptions;
+
+    /* Location */
+
+    DWORD dwCountryID;
+    DWORD dwCountryCode;
+    WCHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
+    WCHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
+    DWORD dwAlternateOffset;
+
+    /* IP related stuff */
+
+    RASIPADDR ipaddr;
+    RASIPADDR ipaddrDns;
+    RASIPADDR ipaddrDnsAlt;
+    RASIPADDR ipaddrWins;
+    RASIPADDR ipaddrWinsAlt;
+
+    /* Framing (for ppp/isdn etc...) */
+
+    DWORD dwFrameSize;
+    DWORD dwfNetProtocols;
+    DWORD dwFramingProtocol;
+
+    WCHAR szScript[ MAX_PATH ];
+
+    WCHAR szAutodialDll[ MAX_PATH ];
+    WCHAR szAutodialFunc[ MAX_PATH ];
+
+    WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
+    WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
+
+    /* x25 only */
+
+    WCHAR szX25PadType[ RAS_MaxPadType + 1 ];
+    WCHAR szX25Address[ RAS_MaxX25Address + 1 ];
+    WCHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
+    WCHAR szX25UserData[ RAS_MaxUserData + 1 ];
+    DWORD dwChannels;
+
+    DWORD dwReserved1;
+    DWORD dwReserved2;
+
+#if (WINVER >= 0x401)
+
+    /* Multilink and BAP */
+
+    DWORD dwSubEntries;
+    DWORD dwDialMode;
+    DWORD dwDialExtraPercent;
+    DWORD dwDialExtraSampleSeconds;
+    DWORD dwHangUpExtraPercent;
+    DWORD dwHangUpExtraSampleSeconds;
+
+    /* Idle time out */
+    DWORD dwIdleDisconnectSeconds;
+
+#endif
+#if (WINVER >= 0x500)
+
+    DWORD dwType;		/* entry type */
+    DWORD dwEncryptionType;	/* type of encryption to use */
+    DWORD dwCustomAuthKey;	/* authentication key for EAP */
+    GUID guidId;		/* guid that represents the phone-book entry  */
+    WCHAR szCustomDialDll[MAX_PATH];    /* DLL for custom dialing  */
+    DWORD dwVpnStrategy;         /* specifies type of VPN protocol */
+#endif
+#if (WINVER >= 0x501)
+    DWORD dwfOptions2;
+    DWORD dwfOptions3;
+    WCHAR szDnsSuffix[RAS_MaxDnsSuffix];
+    DWORD dwTcpWindowSize;
+    WCHAR szPrerequisitePbk[MAX_PATH];
+    WCHAR szPrerequisiteEntry[RAS_MaxEntryName + 1];
+    DWORD dwRedialCount;
+    DWORD dwRedialPause;
+#endif
+} RASENTRYW, *LPRASENTRYW;
+
+DECL_WINELIB_TYPE_AW(RASENTRY)
+
 
 DWORD WINAPI RasEnumConnectionsA(LPRASCONNA,LPDWORD,LPDWORD);
 DWORD WINAPI RasEnumConnectionsW(LPRASCONNW,LPDWORD,LPDWORD);
@@ -111,6 +325,22 @@
 DWORD WINAPI RasHangUpA(HRASCONN);
 DWORD WINAPI RasHangUpW(HRASCONN);
 #define      RasHangUp WINELIB_NAME_AW(RasHangUp)
+DWORD WINAPI RasValidateEntryNameA(LPCSTR  lpszPhonebook, LPCSTR  lpszEntry);
+DWORD WINAPI RasValidateEntryNameW(LPCWSTR lpszPhonebook, LPCWSTR lpszEntry);
+#define RasValidateEntryName WINELIB_NAME_AW(RasValidateEntryName)
+DWORD WINAPI RasSetEntryPropertiesA(LPCSTR lpszPhonebook, LPCSTR lpszEntry,
+        LPRASENTRYA lpRasEntry, DWORD dwEntryInfoSize, LPBYTE lpbDeviceInfo,
+	DWORD dwDeviceInfoSize);
+DWORD WINAPI RasSetEntryPropertiesW(LPCWSTR lpszPhonebook, LPCWSTR lpszEntry,
+        LPRASENTRYW lpRasEntry, DWORD dwEntryInfoSize, LPBYTE lpbDeviceInfo,
+	DWORD dwDeviceInfoSize);
+#define RasSetEntryProperties WINELIB_NAME_AW(RasSetEntryProperties)
+DWORD WINAPI RasGetAutodialParamA(DWORD dwKey, LPVOID lpvValue, LPDWORD lpdwcbValue);
+DWORD WINAPI RasGetAutodialParamW(DWORD dwKey, LPVOID lpvValue, LPDWORD lpdwcbValue);
+#define RasGetAutodialParam WINELIB_NAME_AW(RasGetAutodialParam)
+DWORD WINAPI RasSetAutodialEnableA(DWORD dwDialingLocation, BOOL fEnabled);
+DWORD WINAPI RasSetAutodialEnableW(DWORD dwDialingLocation, BOOL fEnabled);
+#define RasSetAutodialEnable WINELIB_NAME_AW(RasSetAutodialEnable)
 
 #include "poppack.h"
 #ifdef __cplusplus
Index: dlls/rasapi32/rasapi.c
===================================================================
RCS file: /home/wine/wine/dlls/rasapi32/rasapi.c,v
retrieving revision 1.20
diff -u -r1.20 rasapi.c
--- dlls/rasapi32/rasapi.c	6 Nov 2002 19:52:48 -0000	1.20
+++ dlls/rasapi32/rasapi.c	7 Nov 2002 15:03:28 -0000
@@ -1,7 +1,7 @@
 /*
  * RASAPI32
  *
- * Copyright 1998 Marcus Meissner
+ * Copyright 1998,2001 Marcus Meissner
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -64,9 +64,9 @@
 /**************************************************************************
  *                 RasGetEntryDialParamsA			[RASAPI32.550]
  */
-DWORD WINAPI RasGetEntryDialParamsA( LPCSTR lpszPhoneBook,
-        LPRASDIALPARAMSA lpRasDialParams,
-        LPBOOL lpfPassword)
+DWORD WINAPI RasGetEntryDialParamsA(
+	LPCSTR lpszPhoneBook, LPRASDIALPARAMSA lpRasDialParams,
+	LPBOOL lpfPassword)
 {
 	FIXME("(%s,%p,%p),stub!\n",debugstr_a(lpszPhoneBook),
             lpRasDialParams,lpfPassword);
@@ -118,17 +118,25 @@
 	return 0;
 }
 
-typedef LPVOID LPRASDEVINFOA;
-typedef LPVOID LPRASDEVINFOW;
 typedef LPVOID LPRASAUTODIALENTRYA;
 typedef LPVOID LPRASAUTODIALENTRYW;
 
 /**************************************************************************
  *                 RasEnumDevicesA		[RASAPI32.19]
+ *
+ * Just return a virtual modem too see what other APIs programs will
+ * call with it.
  */
-DWORD WINAPI RasEnumDevicesA(LPRASDEVINFOA a, LPDWORD b, LPDWORD c)
+DWORD WINAPI RasEnumDevicesA(LPRASDEVINFOA lpRasDevinfo, LPDWORD lpcb, LPDWORD lpcDevices)
 {
-	FIXME("(%p,%p,%p),stub!\n",a,b,c);
+	FIXME("(%p,%p,%p),stub!\n",lpRasDevinfo,lpcb,lpcDevices);
+	if (*lpcb < sizeof(RASDEVINFOA)) {
+		*lpcb = sizeof(RASDEVINFOA);
+		return ERROR_BUFFER_TOO_SMALL;
+	}
+	/* honor dwSize ? */
+	strcpy(lpRasDevinfo->szDeviceType, RASDT_Modem);
+	strcpy(lpRasDevinfo->szDeviceName, "WINE virtmodem");
 	return 0;
 }
 
@@ -182,18 +190,18 @@
 /**************************************************************************
  *                 RasGetAutodialParamA		[RASAPI32.28]
  */
-DWORD WINAPI RasGetAutodialParamA(DWORD a, LPVOID b, LPDWORD c)
+DWORD WINAPI RasGetAutodialParamA(DWORD dwKey, LPVOID lpvValue, LPDWORD lpdwcbValue)
 {
-	FIXME("(%lx,%p,%p),stub!\n",a,b,c);
+	FIXME("(%lx,%p,%p),stub!\n",dwKey,lpvValue,lpdwcbValue);
 	return 0;
 }
 
 /**************************************************************************
  *                 RasGetAutodialParamW		[RASAPI32.29]
  */
-DWORD WINAPI RasGetAutodialParamW(DWORD a, LPVOID b, LPDWORD c)
+DWORD WINAPI RasGetAutodialParamW(DWORD dwKey, LPVOID lpvValue, LPDWORD lpdwcbValue)
 {
-	FIXME("(%lx,%p,%p),stub!\n",a,b,c);
+	FIXME("(%lx,%p,%p),stub!\n",dwKey,lpvValue,lpdwcbValue);
 	return 0;
 }
 
@@ -220,18 +228,18 @@
 /**************************************************************************
  *                 RasSetAutodialEnableA	[RASAPI32.59]
  */
-DWORD WINAPI RasSetAutodialEnableA(DWORD a, BOOL b)
+DWORD WINAPI RasSetAutodialEnableA(DWORD dwDialingLocation, BOOL fEnabled)
 {
-	FIXME("(%lx,%x),stub!\n",a,b);
+	FIXME("(%lx,%x),stub!\n",dwDialingLocation,fEnabled);
 	return 0;
 }
 
 /**************************************************************************
  *                 RasSetAutodialEnableW	[RASAPI32.60]
  */
-DWORD WINAPI RasSetAutodialEnableW(DWORD a, BOOL b)
+DWORD WINAPI RasSetAutodialEnableW(DWORD dwDialingLocation, BOOL fEnabled)
 {
-	FIXME("(%lx,%x),stub!\n",a,b);
+	FIXME("(%lx,%x),stub!\n",dwDialingLocation,fEnabled);
 	return 0;
 }
 
@@ -254,9 +262,49 @@
 }
 
 /**************************************************************************
+ *                 RasSetEntryPropertiesA	[RASAPI32.67]
+ */
+DWORD WINAPI RasSetEntryPropertiesA(LPCSTR lpszPhonebook, LPCSTR lpszEntry,
+	LPRASENTRYA lpRasEntry, DWORD dwEntryInfoSize, LPBYTE lpbDeviceInfo,
+	DWORD dwDeviceInfoSize
+) {
+	FIXME("(%s,%s,%p,%ld,%p,%ld), stub!\n",
+		debugstr_a(lpszPhonebook),debugstr_a(lpszEntry),
+		lpRasEntry,dwEntryInfoSize,lpbDeviceInfo,dwDeviceInfoSize
+	);
+	FIXME("Rasentry:\n");
+	FIXME("\tdwfOptions %lx\n",lpRasEntry->dwfOptions);
+	FIXME("\tszLocalPhoneNumber %s\n",debugstr_a(lpRasEntry->szLocalPhoneNumber));
+	return 0;
+}
+
+/**************************************************************************
+ *                 RasSetEntryPropertiesW	[RASAPI32.68]
+ */
+DWORD WINAPI RasSetEntryPropertiesW(LPCWSTR lpszPhonebook, LPCWSTR lpszEntry,
+	LPRASENTRYW lpRasEntry, DWORD dwEntryInfoSize, LPBYTE lpbDeviceInfo,
+	DWORD dwDeviceInfoSize
+) {
+	FIXME("(%s,%s,%p,%ld,%p,%ld), stub!\n",
+		debugstr_w(lpszPhonebook),debugstr_w(lpszEntry),
+		lpRasEntry,dwEntryInfoSize,lpbDeviceInfo,dwDeviceInfoSize
+	);
+	return 0;
+}
+
+/**************************************************************************
  *                 RasValidateEntryNameA	[RASAPI32.72]
  */
-DWORD WINAPI RasValidateEntryNameA(LPSTR lpszPhonebook, LPSTR lpszEntry) {
-	FIXME("(%s,%s), stub!\n",lpszPhonebook,lpszEntry);
+DWORD WINAPI RasValidateEntryNameA(LPCSTR lpszPhonebook, LPCSTR lpszEntry) {
+	FIXME("(%s,%s), stub!\n",debugstr_a(lpszPhonebook),debugstr_a(lpszEntry));
+	return 0;
+}
+
+/**************************************************************************
+ *                 RasValidateEntryNameW	[RASAPI32.73]
+ */
+DWORD WINAPI RasValidateEntryNameW(LPCWSTR lpszPhonebook, LPCWSTR lpszEntry) {
+	FIXME("(%s,%s), stub!\n",debugstr_w(lpszPhonebook),debugstr_w(lpszEntry));
 	return 0;
 }
+
Index: dlls/rasapi32/rasapi32.spec
===================================================================
RCS file: /home/wine/wine/dlls/rasapi32/rasapi32.spec,v
retrieving revision 1.12
diff -u -r1.12 rasapi32.spec
--- dlls/rasapi32/rasapi32.spec	6 Nov 2002 19:52:48 -0000	1.12
+++ dlls/rasapi32/rasapi32.spec	7 Nov 2002 15:03:28 -0000
@@ -36,8 +36,8 @@
 62  stdcall RasSetAutodialParamW(long ptr long) RasSetAutodialParamW
 63  stub RasSetCredentialsA
 64  stub RasSetCredentialsW
-67  stub RasSetEntryPropertiesA
-68  stub RasSetEntryPropertiesW
+67  stdcall RasSetEntryPropertiesA( str  str ptr long ptr long) RasSetEntryPropertiesA
+68  stdcall RasSetEntryPropertiesW(wstr wstr ptr long ptr long) RasSetEntryPropertiesW
 69  stub RasSetOldPassword
 70  stub RasSetSubEntryPropertiesA
 71  stub RasSetSubEntryPropertiesW


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux