📄 ras.h
字号:
DWORD dwSubEntries;
DWORD dwDialMode;
DWORD dwDialExtraPercent;
DWORD dwDialExtraSampleSeconds;
DWORD dwHangUpExtraPercent;
DWORD dwHangUpExtraSampleSeconds;
//
// Idle timeout
//
DWORD dwIdleDisconnectSeconds;
#endif
#if (WINVER >= 0x500)
//
// Entry Type
//
DWORD dwType;
//
// Encryption type
//
DWORD dwEncryptionType;
//
// CustomAuthKey to be used for EAP
//
DWORD dwCustomAuthKey;
//
// Guid of the connection
//
GUID guidId;
//
// Custom Dial Dll
//
CHAR szCustomDialDll[MAX_PATH];
//
// DwVpnStrategy
//
DWORD dwVpnStrategy;
#endif
};
#define RASENTRYW struct tagRASENTRYW
RASENTRYW
{
DWORD dwSize;
DWORD dwfOptions;
//
// Location/phone number
//
DWORD dwCountryID;
DWORD dwCountryCode;
WCHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
WCHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
DWORD dwAlternateOffset;
//
// PPP/Ip
//
RASIPADDR ipaddr;
RASIPADDR ipaddrDns;
RASIPADDR ipaddrDnsAlt;
RASIPADDR ipaddrWins;
RASIPADDR ipaddrWinsAlt;
//
// Framing
//
DWORD dwFrameSize;
DWORD dwfNetProtocols;
DWORD dwFramingProtocol;
//
// Scripting
//
WCHAR szScript[ MAX_PATH ];
//
// AutoDial
//
WCHAR szAutodialDll[ MAX_PATH ];
WCHAR szAutodialFunc[ MAX_PATH ];
//
// Device
//
WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
//
// X.25
//
WCHAR szX25PadType[ RAS_MaxPadType + 1 ];
WCHAR szX25Address[ RAS_MaxX25Address + 1 ];
WCHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
WCHAR szX25UserData[ RAS_MaxUserData + 1 ];
DWORD dwChannels;
//
// Reserved
//
DWORD dwReserved1;
DWORD dwReserved2;
#if (WINVER >= 0x401)
//
// Multilink
//
DWORD dwSubEntries;
DWORD dwDialMode;
DWORD dwDialExtraPercent;
DWORD dwDialExtraSampleSeconds;
DWORD dwHangUpExtraPercent;
DWORD dwHangUpExtraSampleSeconds;
//
// Idle timeout
//
DWORD dwIdleDisconnectSeconds;
#endif
#if (WINVER >= 0x500)
//
// Entry Type
//
DWORD dwType;
//
// EncryptionType
//
DWORD dwEncryptionType;
//
// CustomAuthKey to be used for EAP
//
DWORD dwCustomAuthKey;
//
// Guid of the connection
//
GUID guidId;
//
// Custom Dial Dll
//
WCHAR szCustomDialDll[MAX_PATH];
//
// Vpn Strategy
//
DWORD dwVpnStrategy;
#endif
};
#ifdef UNICODE
#define RASENTRY RASENTRYW
#else
#define RASENTRY RASENTRYA
#endif
#define LPRASENTRYW RASENTRYW*
#define LPRASENTRYA RASENTRYA*
#define LPRASENTRY RASENTRY*
/* RASENTRY 'dwfOptions' bit flags.
*/
#define RASEO_UseCountryAndAreaCodes 0x00000001
#define RASEO_SpecificIpAddr 0x00000002
#define RASEO_SpecificNameServers 0x00000004
#define RASEO_IpHeaderCompression 0x00000008
#define RASEO_RemoteDefaultGateway 0x00000010
#define RASEO_DisableLcpExtensions 0x00000020
#define RASEO_TerminalBeforeDial 0x00000040
#define RASEO_TerminalAfterDial 0x00000080
#define RASEO_ModemLights 0x00000100
#define RASEO_SwCompression 0x00000200
#define RASEO_RequireEncryptedPw 0x00000400
#define RASEO_RequireMsEncryptedPw 0x00000800
#define RASEO_RequireDataEncryption 0x00001000
#define RASEO_NetworkLogon 0x00002000
#define RASEO_UseLogonCredentials 0x00004000
#define RASEO_PromoteAlternates 0x00008000
#if (WINVER >= 0x401)
#define RASEO_SecureLocalFiles 0x00010000
#endif
#if (WINVER >= 0x500)
#define RASEO_RequireEAP 0x00020000
#define RASEO_RequirePAP 0x00040000
#define RASEO_RequireSPAP 0x00080000
#define RASEO_Custom 0x00100000
#define RASEO_PreviewPhoneNumber 0x00200000
#define RASEO_SharedPhoneNumbers 0x00800000
#define RASEO_PreviewUserPw 0x01000000
#define RASEO_PreviewDomain 0x02000000
#define RASEO_ShowDialingProgress 0x04000000
#define RASEO_RequireCHAP 0x08000000
#define RASEO_RequireMsCHAP 0x10000000
#define RASEO_RequireMsCHAP2 0x20000000
#define RASEO_RequireW95MSCHAP 0x40000000
#define RASEO_CustomScript 0x80000000
#endif
/* RASENTRY 'dwProtocols' bit flags.
*/
#define RASNP_NetBEUI 0x00000001
#define RASNP_Ipx 0x00000002
#define RASNP_Ip 0x00000004
/* RASENTRY 'dwFramingProtocols' bit flags.
*/
#define RASFP_Ppp 0x00000001
#define RASFP_Slip 0x00000002
#define RASFP_Ras 0x00000004
/* RASENTRY 'szDeviceType' default strings.
*/
#define RASDT_Modem TEXT("modem")
#define RASDT_Isdn TEXT("isdn")
#define RASDT_X25 TEXT("x25")
#define RASDT_Vpn TEXT("vpn")
#define RASDT_Pad TEXT("pad")
#define RASDT_Generic TEXT("GENERIC")
#define RASDT_Serial TEXT("SERIAL")
#define RASDT_FrameRelay TEXT("FRAMERELAY")
#define RASDT_Atm TEXT("ATM")
#define RASDT_Sonet TEXT("SONET")
#define RASDT_SW56 TEXT("SW56")
#define RASDT_Irda TEXT("IRDA")
#define RASDT_Parallel TEXT("PARALLEL")
// The entry type used to determine which UI properties
// are to be presented to user. This generally corresponds
// to a Connections "add" wizard selection.
//
#define RASET_Phone 1 // Phone lines: modem, ISDN, X.25, etc
#define RASET_Vpn 2 // Virtual private network
#define RASET_Direct 3 // Direct connect: serial, parallel
#define RASET_Internet 4 // BaseCamp internet
/* Old AutoDial DLL function prototype.
**
** This prototype is documented for backward-compatibility
** purposes only. It is superceded by the RASADFUNCA
** and RASADFUNCW definitions below. DO NOT USE THIS
** PROTOTYPE IN NEW CODE. SUPPORT FOR IT MAY BE REMOVED
** IN FUTURE VERSIONS OF RAS.
*/
typedef BOOL (WINAPI *ORASADFUNC)( HWND, LPSTR, DWORD, LPDWORD );
#if (WINVER >= 0x401)
/* Flags for RasConnectionNotification().
*/
#define RASCN_Connection 0x00000001
#define RASCN_Disconnection 0x00000002
#define RASCN_BandwidthAdded 0x00000004
#define RASCN_BandwidthRemoved 0x00000008
/* RASENTRY 'dwDialMode' values.
*/
#define RASEDM_DialAll 1
#define RASEDM_DialAsNeeded 2
/* RASENTRY 'dwIdleDisconnectSeconds' constants.
*/
#define RASIDS_Disabled 0xffffffff
#define RASIDS_UseGlobalValue 0
/* AutoDial DLL function parameter block.
*/
#define RASADPARAMS struct tagRASADPARAMS
RASADPARAMS
{
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
LONG xDlg;
LONG yDlg;
};
#define LPRASADPARAMS RASADPARAMS*
/* AutoDial DLL function parameter block 'dwFlags.'
*/
#define RASADFLG_PositionDlg 0x00000001
/* Prototype AutoDial DLL function.
*/
typedef BOOL (WINAPI *RASADFUNCA)( LPSTR, LPSTR, LPRASADPARAMS, LPDWORD );
typedef BOOL (WINAPI *RASADFUNCW)( LPWSTR, LPWSTR, LPRASADPARAMS, LPDWORD );
#ifdef UNICODE
#define RASADFUNC RASADFUNCW
#else
#define RASADFUNC RASADFUNCA
#endif
/* A RAS phone book multilinked sub-entry.
*/
#define RASSUBENTRYA struct tagRASSUBENTRYA
RASSUBENTRYA
{
DWORD dwSize;
DWORD dwfFlags;
//
// Device
//
CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
//
// Phone numbers
//
CHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
DWORD dwAlternateOffset;
};
#define RASSUBENTRYW struct tagRASSUBENTRYW
RASSUBENTRYW
{
DWORD dwSize;
DWORD dwfFlags;
//
// Device
//
WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
//
// Phone numbers
//
WCHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
DWORD dwAlternateOffset;
};
#ifdef UNICODE
#define RASSUBENTRY RASSUBENTRYW
#else
#define RASSUBENTRY RASSUBENTRYA
#endif
#define LPRASSUBENTRYW RASSUBENTRYW*
#define LPRASSUBENTRYA RASSUBENTRYA*
#define LPRASSUBENTRY RASSUBENTRY*
/* Ras{Get,Set}Credentials structure. These calls
** supercede Ras{Get,Set}EntryDialParams.
*/
#define RASCREDENTIALSA struct tagRASCREDENTIALSA
RASCREDENTIALSA
{
DWORD dwSize;
DWORD dwMask;
CHAR szUserName[ UNLEN + 1 ];
CHAR szPassword[ PWLEN + 1 ];
CHAR szDomain[ DNLEN + 1 ];
};
#define RASCREDENTIALSW struct tagRASCREDENTIALSW
RASCREDENTIALSW
{
DWORD dwSize;
DWORD dwMask;
WCHAR szUserName[ UNLEN + 1 ];
WCHAR szPassword[ PWLEN + 1 ];
WCHAR szDomain[ DNLEN + 1 ];
};
#ifdef UNICODE
#define RASCREDENTIALS RASCREDENTIALSW
#else
#define RASCREDENTIALS RASCREDENTIALSA
#endif
#define LPRASCREDENTIALSW RASCREDENTIALSW*
#define LPRASCREDENTIALSA RASCREDENTIALSA*
#define LPRASCREDENTIALS RASCREDENTIALS*
/* RASCREDENTIALS 'dwMask' values.
*/
#define RASCM_UserName 0x00000001
#define RASCM_Password 0x00000002
#define RASCM_Domain 0x00000004
/* AutoDial address properties.
*/
#define RASAUTODIALENTRYA struct tagRASAUTODIALENTRYA
RASAUTODIALENTRYA
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwDialingLocation;
CHAR szEntry[ RAS_MaxEntryName + 1];
};
#define RASAUTODIALENTRYW struct tagRASAUTODIALENTRYW
RASAUTODIALENTRYW
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwDialingLocation;
WCHAR szEntry[ RAS_MaxEntryName + 1];
};
#ifdef UNICODE
#define RASAUTODIALENTRY RASAUTODIALENTRYW
#else
#define RASAUTODIALENTRY RASAUTODIALENTRYA
#endif
#define LPRASAUTODIALENTRYW RASAUTODIALENTRYW*
#define LPRASAUTODIALENTRYA RASAUTODIALENTRYA*
#define LPRASAUTODIALENTRY RASAUTODIALENTRY*
/* AutoDial control parameter values for
** Ras{Get,Set}AutodialParam.
*/
#define RASADP_DisableConnectionQuery 0
#define RASADP_LoginSessionDisable 1
#define RASADP_SavedAddressesLimit 2
#define RASADP_FailedConnectionTimeout 3
#define RASADP_ConnectionQueryTimeout 4
#endif // (WINVER >= 0x401)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -