📄 ras.h
字号:
/* Describes the results of a PPP IP (Internet) projection.
*/
#define RASPPPIPW struct tagRASPPPIPW
RASPPPIPW
{
DWORD dwSize;
DWORD dwError;
WCHAR szIpAddress[ RAS_MaxIpAddress + 1 ];
#ifndef WINNT35COMPATIBLE
/* This field was added between Windows NT 3.51 beta and Windows NT 3.51
** final, and between Windows 95 M8 beta and Windows 95 final. If you do
** not require the server address and wish to retrieve PPP IP information
** from Windows NT 3.5 or early Windows NT 3.51 betas, or on early Windows
** 95 betas, define WINNT35COMPATIBLE.
**
** The server IP address is not provided by all PPP implementations,
** though Windows NT server's do provide it.
*/
WCHAR szServerIpAddress[ RAS_MaxIpAddress + 1 ];
#endif
};
#define RASPPPIPA struct tagRASPPPIPA
RASPPPIPA
{
DWORD dwSize;
DWORD dwError;
CHAR szIpAddress[ RAS_MaxIpAddress + 1 ];
#ifndef WINNT35COMPATIBLE
/* See RASPPPIPW comment.
*/
CHAR szServerIpAddress[ RAS_MaxIpAddress + 1 ];
#endif
};
#ifdef UNICODE
#define RASPPPIP RASPPPIPW
#else
#define RASPPPIP RASPPPIPA
#endif
#define LPRASPPPIPW RASPPPIPW*
#define LPRASPPPIPA RASPPPIPA*
#define LPRASPPPIP RASPPPIP*
/* Describes the results of a PPP LCP/multi-link negotiation.
*/
#define RASPPPLCP struct tagRASPPPLCP
RASPPPLCP
{
DWORD dwSize;
BOOL fBundled;
};
#define LPRASPPPLCP RASPPPLCP*
/* Describes the results of a SLIP (Serial Line IP) projection.
*/
#define RASSLIPW struct tagRASSLIPW
RASSLIPW
{
DWORD dwSize;
DWORD dwError;
WCHAR szIpAddress[ RAS_MaxIpAddress + 1 ];
};
#define RASSLIPA struct tagRASSLIPA
RASSLIPA
{
DWORD dwSize;
DWORD dwError;
CHAR szIpAddress[ RAS_MaxIpAddress + 1 ];
};
#ifdef UNICODE
#define RASSLIP RASSLIPW
#else
#define RASSLIP RASSLIPA
#endif
#define LPRASSLIPW RASSLIPW*
#define LPRASSLIPA RASSLIPA*
#define LPRASSLIP RASSLIP*
/* If using RasDial message notifications, get the notification message code
** by passing this string to the RegisterWindowMessageA() API.
** WM_RASDIALEVENT is used only if a unique message cannot be registered.
*/
#define RASDIALEVENT "RasDialEvent"
#define WM_RASDIALEVENT 0xCCCD
/* Prototypes for caller's RasDial callback handler. Arguments are the
** message ID (currently always WM_RASDIALEVENT), the current RASCONNSTATE and
** the error that has occurred (or 0 if none). Extended arguments are the
** handle of the RAS connection and an extended error code.
**
** For RASDIALFUNC2, subsequent callback notifications for all
** subentries can be cancelled by returning FALSE.
*/
typedef VOID (WINAPI *RASDIALFUNC)( UINT, RASCONNSTATE, DWORD );
typedef VOID (WINAPI *RASDIALFUNC1)( HRASCONN, UINT, RASCONNSTATE, DWORD, DWORD );
typedef DWORD (WINAPI *RASDIALFUNC2)( DWORD, DWORD, HRASCONN, UINT, RASCONNSTATE, DWORD, DWORD );
/* Information describing a RAS-capable device.
*/
#define RASDEVINFOW struct tagRASDEVINFOW
RASDEVINFOW
{
DWORD dwSize;
WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
};
#define RASDEVINFOA struct tagRASDEVINFOA
RASDEVINFOA
{
DWORD dwSize;
CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
};
#ifdef UNICODE
#define RASDEVINFO RASDEVINFOW
#else
#define RASDEVINFO RASDEVINFOA
#endif
#define LPRASDEVINFOW RASDEVINFOW*
#define LPRASDEVINFOA RASDEVINFOA*
#define LPRASDEVINFO RASDEVINFO*
/* RAS country information (currently retrieved from TAPI).
*/
#define RASCTRYINFO struct RASCTRYINFO
RASCTRYINFO
{
DWORD dwSize;
DWORD dwCountryID;
DWORD dwNextCountryID;
DWORD dwCountryCode;
DWORD dwCountryNameOffset;
};
/* There is currently no difference between
** RASCTRYINFOA and RASCTRYINFOW. This may
** change in the future.
*/
#define RASCTRYINFOW RASCTRYINFO
#define RASCTRYINFOA RASCTRYINFO
#define LPRASCTRYINFOW RASCTRYINFOW*
#define LPRASCTRYINFOA RASCTRYINFOW*
#define LPRASCTRYINFO RASCTRYINFO*
/* A RAS IP address.
*/
#define RASIPADDR struct RASIPADDR
RASIPADDR
{
BYTE a;
BYTE b;
BYTE c;
BYTE d;
};
/* A RAS phone book entry.
*/
#define RASENTRYA struct tagRASENTRYA
RASENTRYA
{
DWORD dwSize;
DWORD dwfOptions;
//
// Location/phone number.
//
DWORD dwCountryID;
DWORD dwCountryCode;
CHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
CHAR 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
//
CHAR szScript[ MAX_PATH ];
//
// AutoDial
//
CHAR szAutodialDll[ MAX_PATH ];
CHAR szAutodialFunc[ MAX_PATH ];
//
// Device
//
CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
//
// X.25
//
CHAR szX25PadType[ RAS_MaxPadType + 1 ];
CHAR szX25Address[ RAS_MaxX25Address + 1 ];
CHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
CHAR 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)
//
// Port Name
//
CHAR szPortName[ RAS_MaxDeviceName + 1 ];
#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)
//
// Port Name
//
WCHAR szPortName[ RAS_MaxDeviceName + 1 ];
#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
/* 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")
/* 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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -