📄 ras.h
字号:
/* Copyright (c) 1992-1997, Microsoft Corporation, all rights reserved
**
** ras.h
** Remote Access external API
** Public header for external API clients
**
** WINVER values in this file:
** WINVER < 0x400 = Windows NT 3.5, Windows NT 3.51
** WINVER = 0x400 = Windows 95, Windows NT SUR (default)
** WINVER > 0x400 = Windows NT SUR enhancements
*/
#ifndef _RAS_H_
#define _RAS_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifndef UNLEN
#include <lmcons.h>
#endif
#include <pshpack4.h>
#define RAS_MaxDeviceType 16
#define RAS_MaxPhoneNumber 128
#define RAS_MaxIpAddress 15
#define RAS_MaxIpxAddress 21
#if (WINVER >= 0x400)
#define RAS_MaxEntryName 256
#define RAS_MaxDeviceName 128
#define RAS_MaxCallbackNumber RAS_MaxPhoneNumber
#else
#define RAS_MaxEntryName 20
#define RAS_MaxDeviceName 32
#define RAS_MaxCallbackNumber 48
#endif
#define RAS_MaxAreaCode 10
#define RAS_MaxPadType 32
#define RAS_MaxX25Address 200
#define RAS_MaxFacilities 200
#define RAS_MaxUserData 200
DECLARE_HANDLE( HRASCONN );
#define LPHRASCONN HRASCONN*
/* Identifies an active RAS connection. (See RasEnumConnections)
*/
#define RASCONNW struct tagRASCONNW
RASCONNW
{
DWORD dwSize;
HRASCONN hrasconn;
WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
#if (WINVER >= 0x400)
WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
#endif
#if (WINVER >= 0x401)
WCHAR szPhonebook [ MAX_PATH ];
DWORD dwSubEntry;
#endif
};
#define RASCONNA struct tagRASCONNA
RASCONNA
{
DWORD dwSize;
HRASCONN hrasconn;
CHAR szEntryName[ RAS_MaxEntryName + 1 ];
#if (WINVER >= 0x400)
CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
#endif
#if (WINVER >= 0x401)
CHAR szPhonebook [ MAX_PATH ];
DWORD dwSubEntry;
#endif
};
#ifdef UNICODE
#define RASCONN RASCONNW
#else
#define RASCONN RASCONNA
#endif
#define LPRASCONNW RASCONNW*
#define LPRASCONNA RASCONNA*
#define LPRASCONN RASCONN*
/* Enumerates intermediate states to a connection. (See RasDial)
*/
#define RASCS_PAUSED 0x1000
#define RASCS_DONE 0x2000
#define RASCONNSTATE enum tagRASCONNSTATE
RASCONNSTATE
{
RASCS_OpenPort = 0,
RASCS_PortOpened,
RASCS_ConnectDevice,
RASCS_DeviceConnected,
RASCS_AllDevicesConnected,
RASCS_Authenticate,
RASCS_AuthNotify,
RASCS_AuthRetry,
RASCS_AuthCallback,
RASCS_AuthChangePassword,
RASCS_AuthProject,
RASCS_AuthLinkSpeed,
RASCS_AuthAck,
RASCS_ReAuthenticate,
RASCS_Authenticated,
RASCS_PrepareForCallback,
RASCS_WaitForModemReset,
RASCS_WaitForCallback,
RASCS_Projected,
#if (WINVER >= 0x400)
RASCS_StartAuthentication,
RASCS_CallbackComplete,
RASCS_LogonNetwork,
#endif
RASCS_SubEntryConnected,
RASCS_SubEntryDisconnected,
RASCS_Interactive = RASCS_PAUSED,
RASCS_RetryAuthentication,
RASCS_CallbackSetByCaller,
RASCS_PasswordExpired,
#if (WINVER >= 0x500)
RASCS_InvokeEapUI,
#endif
RASCS_Connected = RASCS_DONE,
RASCS_Disconnected
};
#define LPRASCONNSTATE RASCONNSTATE*
/* Describes the status of a RAS connection. (See RasConnectionStatus)
*/
#define RASCONNSTATUSW struct tagRASCONNSTATUSW
RASCONNSTATUSW
{
DWORD dwSize;
RASCONNSTATE rasconnstate;
DWORD dwError;
WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
#if (WINVER >= 0x401)
WCHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
#endif
};
#define RASCONNSTATUSA struct tagRASCONNSTATUSA
RASCONNSTATUSA
{
DWORD dwSize;
RASCONNSTATE rasconnstate;
DWORD dwError;
CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
#if (WINVER >= 0x401)
CHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
#endif
};
#ifdef UNICODE
#define RASCONNSTATUS RASCONNSTATUSW
#else
#define RASCONNSTATUS RASCONNSTATUSA
#endif
#define LPRASCONNSTATUSW RASCONNSTATUSW*
#define LPRASCONNSTATUSA RASCONNSTATUSA*
#define LPRASCONNSTATUS RASCONNSTATUS*
/* Describes connection establishment parameters. (See RasDial)
*/
#define RASDIALPARAMSW struct tagRASDIALPARAMSW
RASDIALPARAMSW
{
DWORD dwSize;
WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
WCHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
WCHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
WCHAR szUserName[ UNLEN + 1 ];
WCHAR szPassword[ PWLEN + 1 ];
WCHAR szDomain[ DNLEN + 1 ];
#if (WINVER >= 0x401)
DWORD dwSubEntry;
DWORD dwCallbackId;
#endif
};
#define RASDIALPARAMSA struct tagRASDIALPARAMSA
RASDIALPARAMSA
{
DWORD dwSize;
CHAR szEntryName[ RAS_MaxEntryName + 1 ];
CHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
CHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
CHAR szUserName[ UNLEN + 1 ];
CHAR szPassword[ PWLEN + 1 ];
CHAR szDomain[ DNLEN + 1 ];
#if (WINVER >= 0x401)
DWORD dwSubEntry;
DWORD dwCallbackId;
#endif
};
#ifdef UNICODE
#define RASDIALPARAMS RASDIALPARAMSW
#else
#define RASDIALPARAMS RASDIALPARAMSA
#endif
#define LPRASDIALPARAMSW RASDIALPARAMSW*
#define LPRASDIALPARAMSA RASDIALPARAMSA*
#define LPRASDIALPARAMS RASDIALPARAMS*
/* Describes extended connection establishment options. (See RasDial)
*/
#define RASDIALEXTENSIONS struct tagRASDIALEXTENSIONS
RASDIALEXTENSIONS
{
DWORD dwSize;
DWORD dwfOptions;
HWND hwndParent;
DWORD reserved;
#if (WINVER >= 0x500)
DWORD reserved1;
#endif
};
#define LPRASDIALEXTENSIONS RASDIALEXTENSIONS*
/* 'dwfOptions' bit flags.
*/
#define RDEOPT_UsePrefixSuffix 0x00000001
#define RDEOPT_PausedStates 0x00000002
#define RDEOPT_IgnoreModemSpeaker 0x00000004
#define RDEOPT_SetModemSpeaker 0x00000008
#define RDEOPT_IgnoreSoftwareCompression 0x00000010
#define RDEOPT_SetSoftwareCompression 0x00000020
#define RDEOPT_DisableConnectedUI 0x00000040
#define RDEOPT_DisableReconnectUI 0x00000080
#define RDEOPT_DisableReconnect 0x00000100
#define RDEOPT_NoUser 0x00000200
#define RDEOPT_PauseOnScript 0x00000400
#define RDEOPT_Router 0x00000800
/* Describes an enumerated RAS phone book entry name. (See RasEntryEnum)
*/
#define RASENTRYNAMEW struct tagRASENTRYNAMEW
RASENTRYNAMEW
{
DWORD dwSize;
WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
};
#define RASENTRYNAMEA struct tagRASENTRYNAMEA
RASENTRYNAMEA
{
DWORD dwSize;
CHAR szEntryName[ RAS_MaxEntryName + 1 ];
};
#ifdef UNICODE
#define RASENTRYNAME RASENTRYNAMEW
#else
#define RASENTRYNAME RASENTRYNAMEA
#endif
#define LPRASENTRYNAMEW RASENTRYNAMEW*
#define LPRASENTRYNAMEA RASENTRYNAMEA*
#define LPRASENTRYNAME RASENTRYNAME*
/* Protocol code to projection data structure mapping.
*/
#define RASPROJECTION enum tagRASPROJECTION
RASPROJECTION
{
RASP_Amb = 0x10000,
RASP_PppNbf = 0x803F,
RASP_PppIpx = 0x802B,
RASP_PppIp = 0x8021,
RASP_PppLcp = 0xC021,
RASP_Slip = 0x20000
};
#define LPRASPROJECTION RASPROJECTION*
/* Describes the result of a RAS AMB (Authentication Message Block)
** projection. This protocol is used with NT 3.1 and OS/2 1.3 downlevel
** RAS servers.
*/
#define RASAMBW struct tagRASAMBW
RASAMBW
{
DWORD dwSize;
DWORD dwError;
WCHAR szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
BYTE bLana;
};
#define RASAMBA struct tagRASAMBA
RASAMBA
{
DWORD dwSize;
DWORD dwError;
CHAR szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
BYTE bLana;
};
#ifdef UNICODE
#define RASAMB RASAMBW
#else
#define RASAMB RASAMBA
#endif
#define LPRASAMBW RASAMBW*
#define LPRASAMBA RASAMBA*
#define LPRASAMB RASAMB*
/* Describes the result of a PPP NBF (NetBEUI) projection.
*/
#define RASPPPNBFW struct tagRASPPPNBFW
RASPPPNBFW
{
DWORD dwSize;
DWORD dwError;
DWORD dwNetBiosError;
WCHAR szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
WCHAR szWorkstationName[ NETBIOS_NAME_LEN + 1 ];
BYTE bLana;
};
#define RASPPPNBFA struct tagRASPPPNBFA
RASPPPNBFA
{
DWORD dwSize;
DWORD dwError;
DWORD dwNetBiosError;
CHAR szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
CHAR szWorkstationName[ NETBIOS_NAME_LEN + 1 ];
BYTE bLana;
};
#ifdef UNICODE
#define RASPPPNBF RASPPPNBFW
#else
#define RASPPPNBF RASPPPNBFA
#endif
#define LPRASPPPNBFW RASPPPNBFW*
#define LPRASPPPNBFA RASPPPNBFA*
#define LPRASPPPNBF RASPPPNBF*
/* Describes the results of a PPP IPX (Internetwork Packet Exchange)
** projection.
*/
#define RASPPPIPXW struct tagRASIPXW
RASPPPIPXW
{
DWORD dwSize;
DWORD dwError;
WCHAR szIpxAddress[ RAS_MaxIpxAddress + 1 ];
};
#define RASPPPIPXA struct tagRASPPPIPXA
RASPPPIPXA
{
DWORD dwSize;
DWORD dwError;
CHAR szIpxAddress[ RAS_MaxIpxAddress + 1 ];
};
#ifdef UNICODE
#define RASPPPIPX RASPPPIPXW
#else
#define RASPPPIPX RASPPPIPXA
#endif
#define LPRASPPPIPXW RASPPPIPXW*
#define LPRASPPPIPXA RASPPPIPXA*
#define LPRASPPPIPX RASPPPIPX*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -