- Fix formatting for ras.h, rasdlg.h and rasapi.h

- Add raseapif.h header file

svn path=/trunk/; revision=32160
This commit is contained in:
Dmitry Chapyshev 2008-02-06 15:29:45 +00:00
parent 8d342df2a5
commit a0841bec8b
4 changed files with 430 additions and 170 deletions

View file

@ -37,8 +37,8 @@ typedef unsigned long ULONG_PTR, *PULONG_PTR;
#define RAS_MaxReplyMessage 1024
#define RAS_MaxDnsSuffix 256
#if (WINVER >= 0x501)
#define RASCF_AllUsers 0x00000001
#define RASCF_GlobalCreds 0x00000002
#define RASCF_AllUsers 0x00000001
#define RASCF_GlobalCreds 0x00000002
#endif /*(WINVER >= 0x501)*/
#define RDEOPT_UsePrefixSuffix 0x00000001
#define RDEOPT_PausedStates 0x00000002
@ -54,11 +54,11 @@ typedef unsigned long ULONG_PTR, *PULONG_PTR;
#define RDEOPT_Router 0x00000800
#define REN_User 0x00000000
#define REN_AllUsers 0x00000001
#define VS_Default 0
#define VS_PptpOnly 1
#define VS_PptpFirst 2
#define VS_L2tpOnly 3
#define VS_L2tpFirst 4
#define VS_Default 0
#define VS_PptpOnly 1
#define VS_PptpFirst 2
#define VS_L2tpOnly 3
#define VS_L2tpFirst 4
#define RASDIALEVENT "RasDialEvent"
#define WM_RASDIALEVENT 0xCCCD
#define RASEO_UseCountryAndAreaCodes 0x00000001
@ -90,7 +90,7 @@ typedef unsigned long ULONG_PTR, *PULONG_PTR;
#define RASDT_Vpn TEXT("vpn")
#define RASDT_Pad TEXT("pad")
#define RASDT_Generic TEXT("GENERIC")
#define RASDT_Serial TEXT("SERIAL")
#define RASDT_Serial TEXT("SERIAL")
#define RASDT_FrameRelay TEXT("FRAMERELAY")
#define RASDT_Atm TEXT("ATM")
#define RASDT_Sonet TEXT("SONET")
@ -578,14 +578,14 @@ typedef struct tagRASENTRYW {
DWORD dwVpnStrategy;
#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;
DWORD dwfOptions2;
DWORD dwfOptions3;
WCHAR szDnsSuffix[RAS_MaxDnsSuffix];
DWORD dwTcpWindowSize;
WCHAR szPrerequisitePbk[MAX_PATH];
WCHAR szPrerequisiteEntry[RAS_MaxEntryName + 1];
DWORD dwRedialCount;
DWORD dwRedialPause;
#endif /*(WINVER >= 0x501)*/
} RASENTRYW, *LPRASENTRYW;
@ -635,14 +635,14 @@ typedef struct tagRASENTRYA {
DWORD dwVpnStrategy;
#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;
DWORD dwfOptions2;
DWORD dwfOptions3;
CHAR szDnsSuffix[RAS_MaxDnsSuffix];
DWORD dwTcpWindowSize;
CHAR szPrerequisitePbk[MAX_PATH];
CHAR szPrerequisiteEntry[RAS_MaxEntryName + 1];
DWORD dwRedialCount;
DWORD dwRedialPause;
#endif /*(WINVER >= 0x501)*/
} RASENTRYA, *LPRASENTRYA;
@ -822,32 +822,24 @@ typedef RASEAPUSERIDENTITYA RASEAPUSERIDENTITY, *LPRASEAPUSERIDENTITY;
/* Callback prototypes */
typedef BOOL (WINAPI * ORASADFUNC) (HWND, LPSTR, DWORD, LPDWORD); /* deprecated */
typedef VOID (WINAPI * RASDIALFUNC) (UINT, RASCONNSTATE, DWORD);
typedef VOID (WINAPI * RASDIALFUNC1) (HRASCONN, UINT, RASCONNSTATE, DWORD,
DWORD);
typedef DWORD (WINAPI * RASDIALFUNC2) (ULONG_PTR, DWORD, HRASCONN, UINT,
RASCONNSTATE, DWORD, DWORD);
typedef VOID (WINAPI * RASDIALFUNC1) (HRASCONN, UINT, RASCONNSTATE, DWORD, DWORD);
typedef DWORD (WINAPI * RASDIALFUNC2) (ULONG_PTR, DWORD, HRASCONN, UINT, RASCONNSTATE, DWORD, DWORD);
/* External functions */
DWORD APIENTRY RasDialA (LPRASDIALEXTENSIONS, LPCSTR, LPRASDIALPARAMSA,
DWORD, LPVOID, LPHRASCONN);
DWORD APIENTRY RasDialW (LPRASDIALEXTENSIONS, LPCWSTR, LPRASDIALPARAMSW,
DWORD, LPVOID, LPHRASCONN);
DWORD APIENTRY RasDialA (LPRASDIALEXTENSIONS, LPCSTR, LPRASDIALPARAMSA, DWORD, LPVOID, LPHRASCONN);
DWORD APIENTRY RasDialW (LPRASDIALEXTENSIONS, LPCWSTR, LPRASDIALPARAMSW, DWORD, LPVOID, LPHRASCONN);
DWORD APIENTRY RasEnumConnectionsA (LPRASCONNA, LPDWORD, LPDWORD);
DWORD APIENTRY RasEnumConnectionsW (LPRASCONNW, LPDWORD, LPDWORD);
DWORD APIENTRY RasEnumEntriesA (LPCSTR, LPCSTR, LPRASENTRYNAMEA, LPDWORD,
LPDWORD);
DWORD APIENTRY RasEnumEntriesW (LPCWSTR, LPCWSTR, LPRASENTRYNAMEW, LPDWORD,
LPDWORD);
DWORD APIENTRY RasEnumEntriesA (LPCSTR, LPCSTR, LPRASENTRYNAMEA, LPDWORD, LPDWORD);
DWORD APIENTRY RasEnumEntriesW (LPCWSTR, LPCWSTR, LPRASENTRYNAMEW, LPDWORD, LPDWORD);
DWORD APIENTRY RasGetConnectStatusA (HRASCONN, LPRASCONNSTATUSA);
DWORD APIENTRY RasGetConnectStatusW (HRASCONN, LPRASCONNSTATUSW);
DWORD APIENTRY RasGetErrorStringA (UINT, LPSTR, DWORD);
DWORD APIENTRY RasGetErrorStringW (UINT, LPWSTR, DWORD);
DWORD APIENTRY RasHangUpA (HRASCONN);
DWORD APIENTRY RasHangUpW (HRASCONN);
DWORD APIENTRY RasGetProjectionInfoA (HRASCONN, RASPROJECTION, LPVOID,
LPDWORD);
DWORD APIENTRY RasGetProjectionInfoW (HRASCONN, RASPROJECTION, LPVOID,
LPDWORD);
DWORD APIENTRY RasGetProjectionInfoA (HRASCONN, RASPROJECTION, LPVOID, LPDWORD);
DWORD APIENTRY RasGetProjectionInfoW (HRASCONN, RASPROJECTION, LPVOID, LPDWORD);
DWORD APIENTRY RasCreatePhonebookEntryA (HWND, LPCSTR);
DWORD APIENTRY RasCreatePhonebookEntryW (HWND, LPCWSTR);
DWORD APIENTRY RasEditPhonebookEntryA (HWND, LPCSTR, LPCSTR);
@ -860,14 +852,10 @@ DWORD APIENTRY RasEnumDevicesA (LPRASDEVINFOA, LPDWORD, LPDWORD);
DWORD APIENTRY RasEnumDevicesW (LPRASDEVINFOW, LPDWORD, LPDWORD);
DWORD APIENTRY RasGetCountryInfoA (LPRASCTRYINFOA, LPDWORD);
DWORD APIENTRY RasGetCountryInfoW (LPRASCTRYINFOW, LPDWORD);
DWORD APIENTRY RasGetEntryPropertiesA (LPCSTR, LPCSTR, LPRASENTRYA, LPDWORD,
LPBYTE, LPDWORD);
DWORD APIENTRY RasGetEntryPropertiesW (LPCWSTR, LPCWSTR, LPRASENTRYW,
LPDWORD, LPBYTE, LPDWORD);
DWORD APIENTRY RasSetEntryPropertiesA (LPCSTR, LPCSTR, LPRASENTRYA, DWORD,
LPBYTE, DWORD);
DWORD APIENTRY RasSetEntryPropertiesW (LPCWSTR, LPCWSTR, LPRASENTRYW, DWORD,
LPBYTE, DWORD);
DWORD APIENTRY RasGetEntryPropertiesA (LPCSTR, LPCSTR, LPRASENTRYA, LPDWORD, LPBYTE, LPDWORD);
DWORD APIENTRY RasGetEntryPropertiesW (LPCWSTR, LPCWSTR, LPRASENTRYW, LPDWORD, LPBYTE, LPDWORD);
DWORD APIENTRY RasSetEntryPropertiesA (LPCSTR, LPCSTR, LPRASENTRYA, DWORD, LPBYTE, DWORD);
DWORD APIENTRY RasSetEntryPropertiesW (LPCWSTR, LPCWSTR, LPRASENTRYW, DWORD, LPBYTE, DWORD);
DWORD APIENTRY RasRenameEntryA (LPCSTR, LPCSTR, LPCSTR);
DWORD APIENTRY RasRenameEntryW (LPCWSTR, LPCWSTR, LPCWSTR);
DWORD APIENTRY RasDeleteEntryA (LPCSTR, LPCSTR);
@ -888,21 +876,21 @@ DWORD APIENTRY RasSetCredentialsW (LPCWSTR, LPCWSTR, LPRASCREDENTIALSW, BOOL);
DWORD APIENTRY RasConnectionNotificationA (HRASCONN, HANDLE, DWORD);
DWORD APIENTRY RasConnectionNotificationW (HRASCONN, HANDLE, DWORD);
DWORD APIENTRY RasGetSubEntryPropertiesA (LPCSTR, LPCSTR, DWORD,
LPRASSUBENTRYA, LPDWORD, LPBYTE, LPDWORD);
LPRASSUBENTRYA, LPDWORD, LPBYTE, LPDWORD);
DWORD APIENTRY RasGetSubEntryPropertiesW (LPCWSTR, LPCWSTR, DWORD,
LPRASSUBENTRYW, LPDWORD, LPBYTE, LPDWORD);
LPRASSUBENTRYW, LPDWORD, LPBYTE, LPDWORD);
DWORD APIENTRY RasSetSubEntryPropertiesA (LPCSTR, LPCSTR, DWORD,
LPRASSUBENTRYA, DWORD, LPBYTE, DWORD);
LPRASSUBENTRYA, DWORD, LPBYTE, DWORD);
DWORD APIENTRY RasSetSubEntryPropertiesW (LPCWSTR, LPCWSTR, DWORD,
LPRASSUBENTRYW, DWORD, LPBYTE, DWORD);
LPRASSUBENTRYW, DWORD, LPBYTE, DWORD);
DWORD APIENTRY RasGetAutodialAddressA (LPCSTR, LPDWORD, LPRASAUTODIALENTRYA,
LPDWORD, LPDWORD);
LPDWORD, LPDWORD);
DWORD APIENTRY RasGetAutodialAddressW (LPCWSTR, LPDWORD,
LPRASAUTODIALENTRYW, LPDWORD, LPDWORD);
LPRASAUTODIALENTRYW, LPDWORD, LPDWORD);
DWORD APIENTRY RasSetAutodialAddressA (LPCSTR, DWORD, LPRASAUTODIALENTRYA,
DWORD, DWORD);
DWORD, DWORD);
DWORD APIENTRY RasSetAutodialAddressW (LPCWSTR, DWORD, LPRASAUTODIALENTRYW,
DWORD, DWORD);
DWORD, DWORD);
DWORD APIENTRY RasEnumAutodialAddressesA (LPSTR *, LPDWORD, LPDWORD);
DWORD APIENTRY RasEnumAutodialAddressesW (LPWSTR *, LPDWORD, LPDWORD);
DWORD APIENTRY RasGetAutodialEnableA (DWORD, LPBOOL);
@ -917,9 +905,9 @@ DWORD APIENTRY RasSetAutodialParamW (DWORD, LPVOID, DWORD);
#if (WINVER >= 0x500)
typedef DWORD (WINAPI * RasCustomHangUpFn) (HRASCONN);
typedef DWORD (WINAPI * RasCustomDeleteEntryNotifyFn) (LPCTSTR, LPCTSTR, DWORD);
typedef DWORD (WINAPI * RasCustomDeleteEntryNotifyFn) (LPCTSTR, LPCTSTR, DWORD);
typedef DWORD (WINAPI * RasCustomDialFn) (HINSTANCE, LPRASDIALEXTENSIONS,
LPCTSTR, LPRASDIALPARAMS, DWORD, LPVOID, LPHRASCONN, DWORD);
LPCTSTR, LPRASDIALPARAMS, DWORD, LPVOID, LPHRASCONN, DWORD);
DWORD APIENTRY RasInvokeEapUI (HRASCONN, DWORD, LPRASDIALEXTENSIONS, HWND);
DWORD APIENTRY RasGetLinkStatistics (HRASCONN, DWORD, RAS_STATS*);
@ -930,9 +918,9 @@ DWORD APIENTRY RasGetEapUserDataA (HANDLE, LPCSTR, LPCSTR, BYTE*, DWORD*);
DWORD APIENTRY RasGetEapUserDataW (HANDLE, LPCWSTR, LPCWSTR, BYTE*, DWORD*);
DWORD APIENTRY RasSetEapUserDataA (HANDLE, LPCSTR, LPCSTR, BYTE*, DWORD);
DWORD APIENTRY RasSetEapUserDataW (HANDLE, LPCWSTR, LPCWSTR, BYTE*, DWORD);
DWORD APIENTRY RasGetCustomAuthDataA (LPCSTR, LPCSTR, BYTE*, DWORD*);
DWORD APIENTRY RasGetCustomAuthDataA (LPCSTR, LPCSTR, BYTE*, DWORD*);
DWORD APIENTRY RasGetCustomAuthDataW (LPCWSTR, LPCWSTR, BYTE*, DWORD*);
DWORD APIENTRY RasSetCustomAuthDataA (LPCSTR, LPCSTR, BYTE*, DWORD);
DWORD APIENTRY RasSetCustomAuthDataA (LPCSTR, LPCSTR, BYTE*, DWORD);
DWORD APIENTRY RasSetCustomAuthDataW (LPCWSTR, LPCWSTR, BYTE*, DWORD);
DWORD APIENTRY RasGetEapUserIdentityW (LPCWSTR, LPCWSTR, DWORD, HWND, LPRASEAPUSERIDENTITYW*);
DWORD APIENTRY RasGetEapUserIdentityA (LPCSTR, LPCSTR, DWORD, HWND, LPRASEAPUSERIDENTITYA*);

View file

@ -6,64 +6,64 @@ extern "C" {
#include <ras.h>
#define RASPBDEVENT_AddEntry 1
#define RASPBDEVENT_EditEntry 2
#define RASPBDEVENT_RemoveEntry 3
#define RASPBDEVENT_DialEntry 4
#define RASPBDEVENT_EditGlobals 5
#define RASPBDEVENT_NoUser 6
#define RASPBDEVENT_NoUserEdit 7
#define RASPBDEVENT_AddEntry 1
#define RASPBDEVENT_EditEntry 2
#define RASPBDEVENT_RemoveEntry 3
#define RASPBDEVENT_DialEntry 4
#define RASPBDEVENT_EditGlobals 5
#define RASPBDEVENT_NoUser 6
#define RASPBDEVENT_NoUserEdit 7
#define RASPBDFLAG_PositionDlg 0x00000001
#define RASPBDFLAG_ForceCloseOnDial 0x00000002
#define RASPBDFLAG_ForceCloseOnDial 0x00000002
#define RASPBDFLAG_NoUser 0x00000010
#define RASPBDFLAG_UpdateDefaults 0x80000000
#define RASEDFLAG_PositionDlg 1
#define RASEDFLAG_NewEntry 2
#define RASEDFLAG_CloneEntry 4
#define RASEDFLAG_PositionDlg 1
#define RASEDFLAG_NewEntry 2
#define RASEDFLAG_CloneEntry 4
#define RASDDFLAG_PositionDlg 1
#define RASDDFLAG_PositionDlg 1
#ifndef RC_INVOKED
#include <pshpack4.h>
typedef struct tagRASENTRYDLGA
{
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
LONG xDlg;
LONG yDlg;
CHAR szEntry[RAS_MaxEntryName + 1];
DWORD dwError;
ULONG_PTR reserved;
ULONG_PTR reserved2;
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
LONG xDlg;
LONG yDlg;
CHAR szEntry[RAS_MaxEntryName + 1];
DWORD dwError;
ULONG_PTR reserved;
ULONG_PTR reserved2;
} RASENTRYDLGA, *LPRASENTRYDLGA;
typedef struct tagRASENTRYDLGW
{
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
LONG xDlg;
LONG yDlg;
WCHAR szEntry[RAS_MaxEntryName + 1];
DWORD dwError;
ULONG_PTR reserved;
ULONG_PTR reserved2;
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
LONG xDlg;
LONG yDlg;
WCHAR szEntry[RAS_MaxEntryName + 1];
DWORD dwError;
ULONG_PTR reserved;
ULONG_PTR reserved2;
} RASENTRYDLGW, *LPRASENTRYDLGW;
typedef struct tagRASDIALDLG
{
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
LONG xDlg;
LONG yDlg;
DWORD dwSubEntry;
DWORD dwError;
ULONG_PTR reserved;
ULONG_PTR reserved2;
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
LONG xDlg;
LONG yDlg;
DWORD dwSubEntry;
DWORD dwError;
ULONG_PTR reserved;
ULONG_PTR reserved2;
} RASDIALDLG, *LPRASDIALDLG;
/* Application-defined callback functions */
@ -72,61 +72,61 @@ typedef VOID (WINAPI* RASPBDLGFUNCA)(DWORD, DWORD, LPSTR, LPVOID);
typedef struct tagRASPBDLGA
{
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
LONG xDlg;
LONG yDlg;
ULONG_PTR dwCallbackId;
RASPBDLGFUNCA pCallback;
DWORD dwError;
ULONG_PTR reserved;
ULONG_PTR reserved2;
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
LONG xDlg;
LONG yDlg;
ULONG_PTR dwCallbackId;
RASPBDLGFUNCA pCallback;
DWORD dwError;
ULONG_PTR reserved;
ULONG_PTR reserved2;
} RASPBDLGA, *LPRASPBDLGA;
typedef struct tagRASPBDLGW
{
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
LONG xDlg;
LONG yDlg;
ULONG_PTR dwCallbackId;
RASPBDLGFUNCW pCallback;
DWORD dwError;
ULONG_PTR reserved;
ULONG_PTR reserved2;
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
LONG xDlg;
LONG yDlg;
ULONG_PTR dwCallbackId;
RASPBDLGFUNCW pCallback;
DWORD dwError;
ULONG_PTR reserved;
ULONG_PTR reserved2;
} RASPBDLGW, *LPRASPBDLGW;
typedef struct tagRASMONITORDLG
{
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
DWORD dwStartPage;
LONG xDlg;
LONG yDlg;
OUT DWORD dwError;
ULONG_PTR reserved;
ULONG_PTR reserved2;
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
DWORD dwStartPage;
LONG xDlg;
LONG yDlg;
OUT DWORD dwError;
ULONG_PTR reserved;
ULONG_PTR reserved2;
} RASMONITORDLG, *LPRASMONITORDLG;
typedef struct tagRASNOUSERA
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwTimeoutMs;
CHAR szUserName[UNLEN + 1];
CHAR szPassword[PWLEN + 1];
CHAR szDomain[DNLEN + 1];
DWORD dwSize;
DWORD dwFlags;
DWORD dwTimeoutMs;
CHAR szUserName[UNLEN + 1];
CHAR szPassword[PWLEN + 1];
CHAR szDomain[DNLEN + 1];
} RASNOUSERA, *LPRASNOUSERA;
typedef struct tagRASNOUSERW
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwTimeoutMs;
WCHAR szUserName[UNLEN + 1];
WCHAR szPassword[PWLEN + 1];
WCHAR szDomain[DNLEN + 1];
DWORD dwSize;
DWORD dwFlags;
DWORD dwTimeoutMs;
WCHAR szUserName[UNLEN + 1];
WCHAR szPassword[PWLEN + 1];
WCHAR szDomain[DNLEN + 1];
} RASNOUSERW, *LPRASNOUSERW ;
#include <poppack.h>
@ -143,25 +143,25 @@ BOOL APIENTRY RasMonitorDlgW(LPWSTR, LPRASMONITORDLG);
#endif /*(WINVER <= 0x500)*/
#ifdef UNICODE
typedef RASENTRYDLGW RASENTRYDLG, *LPRASENTRYDLG;
typedef RASPBDLGW RASPBDLG, *LPRASPBDLG;
typedef RASNOUSERW RASNOUSER, *LPRASNOUSER;
#define RasDialDlg RasDialDlgW
#define RasEntryDlg RasEntryDlgW
typedef RASENTRYDLGW RASENTRYDLG, *LPRASENTRYDLG;
typedef RASPBDLGW RASPBDLG, *LPRASPBDLG;
typedef RASNOUSERW RASNOUSER, *LPRASNOUSER;
#define RasDialDlg RasDialDlgW
#define RasEntryDlg RasEntryDlgW
#if (WINVER <= 0x500)
#define RasMonitorDlg RasMonitorDlgW
#endif /*(WINVER <= 0x500)*/
#define RasPhonebookDlg RasPhonebookDlgW
#define RasPhonebookDlg RasPhonebookDlgW
#else
typedef RASENTRYDLGA RASENTRYDLG, *LPRASENTRYDLG;
typedef RASPBDLGA RASPBDLG, *LPRASPBDLG;
typedef RASNOUSERA RASNOUSER, *LPRASNOUSER;
#define RasDialDlg RasDialDlgA
#define RasEntryDlg RasEntryDlgA
typedef RASENTRYDLGA RASENTRYDLG, *LPRASENTRYDLG;
typedef RASPBDLGA RASPBDLG, *LPRASPBDLG;
typedef RASNOUSERA RASNOUSER, *LPRASNOUSER;
#define RasDialDlg RasDialDlgA
#define RasEntryDlg RasEntryDlgA
#if (WINVER <= 0x500)
#define RasMonitorDlg RasMonitorDlgA
#endif /*(WINVER <= 0x500)*/
#define RasPhonebookDlg RasPhonebookDlgA
#define RasPhonebookDlg RasPhonebookDlgA
#endif /* UNICODE */
#endif /* RC_INVOKED */

View file

@ -0,0 +1,272 @@
#ifndef _RASEAPIF_
#define _RASEAPIF_
#ifdef __cplusplus
extern "C" {
#endif
#if(WINVER >= 0x0500)
#define RAS_EAP_REGISTRY_LOCATION TEXT("SYSTEM\\CurrentControlSet\\Services\\Rasman\\PPP\\EAP")
#define RAS_EAP_VALUENAME_PATH TEXT("Path")
#define RAS_EAP_VALUENAME_CONFIGUI TEXT("ConfigUIPath")
#define RAS_EAP_VALUENAME_INTERACTIVEUI TEXT("InteractiveUIPath")
#define RAS_EAP_VALUENAME_IDENTITY TEXT("IdentityPath")
#define RAS_EAP_VALUENAME_FRIENDLY_NAME TEXT("FriendlyName")
#define RAS_EAP_VALUENAME_DEFAULT_DATA TEXT("ConfigData")
#define RAS_EAP_VALUENAME_REQUIRE_CONFIGUI TEXT("RequireConfigUI")
#define RAS_EAP_VALUENAME_ENCRYPTION TEXT("MPPEEncryptionSupported")
#define RAS_EAP_VALUENAME_INVOKE_NAMEDLG TEXT("InvokeUsernameDialog")
#define RAS_EAP_VALUENAME_INVOKE_PWDDLG TEXT("InvokePasswordDialog")
#define RAS_EAP_VALUENAME_CONFIG_CLSID TEXT("ConfigCLSID")
#define RAS_EAP_VALUENAME_STANDALONE_SUPPORTED TEXT("StandaloneSupported")
#define RAS_EAP_VALUENAME_ROLES_SUPPORTED TEXT("RolesSupported")
#define RAS_EAP_VALUENAME_PER_POLICY_CONFIG TEXT("PerPolicyConfig")
#define RAS_EAP_ROLE_AUTHENTICATOR 0x00000001
#define RAS_EAP_ROLE_AUTHENTICATEE 0x00000002
#define RAS_EAP_ROLE_EXCLUDE_IN_EAP 0x00000004
#define RAS_EAP_ROLE_EXCLUDE_IN_PEAP 0x00000008
#define RAS_EAP_ROLE_EXCLUDE_IN_VPN 0x00000010
#define raatARAPChallenge 33
#define raatARAPOldPassword 19
#define raatARAPNewPassword 20
#define raatARAPPasswordChangeReason 21
#define EAPCODE_Request 1
#define EAPCODE_Response 2
#define EAPCODE_Success 3
#define EAPCODE_Failure 4
#define MAXEAPCODE 4
#define RAS_EAP_FLAG_ROUTER 0x00000001
#define RAS_EAP_FLAG_NON_INTERACTIVE 0x00000002
#define RAS_EAP_FLAG_LOGON 0x00000004
#define RAS_EAP_FLAG_PREVIEW 0x00000008
#define RAS_EAP_FLAG_FIRST_LINK 0x00000010
#define RAS_EAP_FLAG_MACHINE_AUTH 0x00000020
#define RAS_EAP_FLAG_GUEST_ACCESS 0x00000040
#define RAS_EAP_FLAG_8021X_AUTH 0x00000080
#define RAS_EAP_FLAG_HOSTED_IN_PEAP 0x00000100
#define RAS_EAP_FLAG_RESUME_FROM_HIBERNATE 0x00000200
#define RAS_EAP_FLAG_PEAP_UPFRONT 0x00000400
#define RAS_EAP_FLAG_ALTERNATIVE_USER_DB 0x00000800
typedef enum _RAS_AUTH_ATTRIBUTE_TYPE_
{
raatMinimum = 0,
raatUserName,
raatUserPassword,
raatMD5CHAPPassword,
raatNASIPAddress,
raatNASPort,
raatServiceType,
raatFramedProtocol,
raatFramedIPAddress,
raatFramedIPNetmask,
raatFramedRouting = 10,
raatFilterId,
raatFramedMTU,
raatFramedCompression,
raatLoginIPHost,
raatLoginService,
raatLoginTCPPort,
raatUnassigned17,
raatReplyMessage,
raatCallbackNumber,
raatCallbackId =20,
raatUnassigned21,
raatFramedRoute,
raatFramedIPXNetwork,
raatState,
raatClass,
raatVendorSpecific,
raatSessionTimeout,
raatIdleTimeout,
raatTerminationAction,
raatCalledStationId = 30,
raatCallingStationId,
raatNASIdentifier,
raatProxyState,
raatLoginLATService,
raatLoginLATNode,
raatLoginLATGroup,
raatFramedAppleTalkLink,
raatFramedAppleTalkNetwork,
raatFramedAppleTalkZone,
raatAcctStatusType = 40,
raatAcctDelayTime,
raatAcctInputOctets,
raatAcctOutputOctets,
raatAcctSessionId,
raatAcctAuthentic,
raatAcctSessionTime,
raatAcctInputPackets,
raatAcctOutputPackets,
raatAcctTerminateCause,
raatAcctMultiSessionId = 50,
raatAcctLinkCount,
raatAcctEventTimeStamp = 55,
raatMD5CHAPChallenge = 60,
raatNASPortType,
raatPortLimit,
raatLoginLATPort,
raatTunnelType,
raatTunnelMediumType,
raatTunnelClientEndpoint,
raatTunnelServerEndpoint,
raatARAPPassword = 70,
raatARAPFeatures,
raatARAPZoneAccess,
raatARAPSecurity,
raatARAPSecurityData,
raatPasswordRetry,
raatPrompt,
raatConnectInfo,
raatConfigurationToken,
raatEAPMessage,
raatSignature = 80,
raatARAPChallengeResponse = 84,
raatAcctInterimInterval = 85,
raatARAPGuestLogon = 8096,
raatCertificateOID,
raatEAPConfiguration,
raatPEAPEmbeddedEAPTypeId,
raatPEAPFastRoamedSession,
raatEAPTLV = 8102,
raatReserved = 0xFFFFFFFF
}RAS_AUTH_ATTRIBUTE_TYPE;
typedef struct _RAS_AUTH_ATTRIBUTE
{
RAS_AUTH_ATTRIBUTE_TYPE raaType;
DWORD dwLength;
PVOID Value;
}RAS_AUTH_ATTRIBUTE, *PRAS_AUTH_ATTRIBUTE;
typedef struct _PPP_EAP_PACKET
{
BYTE Code;
BYTE Id;
BYTE Length[2];
BYTE Data[1];
}PPP_EAP_PACKET, *PPPP_EAP_PACKET;
#define PPP_EAP_PACKET_HDR_LEN (sizeof(PPP_EAP_PACKET) - 1)
typedef struct _PPP_EAP_INPUT
{
DWORD dwSizeInBytes;
DWORD fFlags;
BOOL fAuthenticator;
WCHAR* pwszIdentity;
WCHAR* pwszPassword;
BYTE bInitialId;
RAS_AUTH_ATTRIBUTE* pUserAttributes;
BOOL fAuthenticationComplete;
DWORD dwAuthResultCode;
OPTIONAL HANDLE hTokenImpersonateUser;
BOOL fSuccessPacketReceived;
BOOL fDataReceivedFromInteractiveUI;
OPTIONAL PBYTE pDataFromInteractiveUI;
DWORD dwSizeOfDataFromInteractiveUI;
OPTIONAL PBYTE pConnectionData;
DWORD dwSizeOfConnectionData;
OPTIONAL PBYTE pUserData;
DWORD dwSizeOfUserData;
HANDLE hReserved;
}PPP_EAP_INPUT, *PPPP_EAP_INPUT;
typedef enum _PPP_EAP_ACTION
{
EAPACTION_NoAction,
EAPACTION_Authenticate,
EAPACTION_Done,
EAPACTION_SendAndDone,
EAPACTION_Send,
EAPACTION_SendWithTimeout,
EAPACTION_SendWithTimeoutInteractive,
EAPACTION_IndicateTLV,
EAPACTION_IndicateIdentity
}PPP_EAP_ACTION;
typedef struct _PPP_EAP_OUTPUT
{
DWORD dwSizeInBytes;
PPP_EAP_ACTION Action;
DWORD dwAuthResultCode;
OPTIONAL RAS_AUTH_ATTRIBUTE* pUserAttributes;
BOOL fInvokeInteractiveUI;
OPTIONAL PBYTE pUIContextData;
DWORD dwSizeOfUIContextData;
BOOL fSaveConnectionData;
OPTIONAL PBYTE pConnectionData;
DWORD dwSizeOfConnectionData;
BOOL fSaveUserData;
OPTIONAL PBYTE pUserData;
DWORD dwSizeOfUserData;
}PPP_EAP_OUTPUT, *PPPP_EAP_OUTPUT;
typedef struct _PPP_EAP_INFO
{
DWORD dwSizeInBytes;
DWORD dwEapTypeId;
DWORD (APIENTRY *RasEapInitialize)(IN BOOL fInitialize );
DWORD (APIENTRY *RasEapBegin)(OUT VOID** ppWorkBuffer, IN PPP_EAP_INPUT* pPppEapInput);
DWORD (APIENTRY *RasEapEnd)(IN VOID* pWorkBuffer);
DWORD (APIENTRY *RasEapMakeMessage)(IN VOID* pWorkBuf, IN PPP_EAP_PACKET* pReceivePacket, OUT PPP_EAP_PACKET* pSendPacket, IN DWORD cbSendPacket, OUT PPP_EAP_OUTPUT* pEapOutput, IN PPP_EAP_INPUT* pEapInput);
}PPP_EAP_INFO, *PPPP_EAP_INFO;
DWORD APIENTRY
RasEapGetInfo(IN DWORD dwEapTypeId,
OUT PPP_EAP_INFO* pEapInfo);
DWORD APIENTRY
RasEapFreeMemory(IN BYTE* pMemory);
DWORD APIENTRY
RasEapInvokeInteractiveUI(IN DWORD dwEapTypeId,
IN HWND hwndParent,
IN BYTE* pUIContextData,
IN DWORD dwSizeOfUIContextData,
OUT BYTE** ppDataFromInteractiveUI,
OUT DWORD* pdwSizeOfDataFromInteractiveUI);
DWORD APIENTRY
RasEapInvokeConfigUI(IN DWORD dwEapTypeId,
IN HWND hwndParent,
IN DWORD dwFlags,
IN BYTE* pConnectionDataIn,
IN DWORD dwSizeOfConnectionDataIn,
OUT BYTE** ppConnectionDataOut,
OUT DWORD* pdwSizeOfConnectionDataOut);
DWORD APIENTRY
RasEapGetIdentity(IN DWORD dwEapTypeId,
IN HWND hwndParent,
IN DWORD dwFlags,
IN const WCHAR* pwszPhonebook,
IN const WCHAR* pwszEntry,
IN BYTE* pConnectionDataIn,
IN DWORD dwSizeOfConnectionDataIn,
IN BYTE* pUserDataIn,
IN DWORD dwSizeOfUserDataIn,
OUT BYTE** ppUserDataOut,
OUT DWORD* pdwSizeOfUserDataOut,
OUT WCHAR** ppwszIdentity
);
#endif /* WINVER >= 0x0500 */
#ifdef __cplusplus
}
#endif
#endif /* _RASEAPIF_ */

View file

@ -11,8 +11,8 @@ extern "C" {
#include <lmcons.h>
#endif
#define RASSAPI_MAX_PHONENUMBER_SIZE 128
#define RASSAPI_MAX_MEDIA_NAME 16
#define RASSAPI_MAX_PORT_NAME 16
#define RASSAPI_MAX_MEDIA_NAME 16
#define RASSAPI_MAX_PORT_NAME 16
#define RASSAPI_MAX_DEVICE_NAME 128
#define RASSAPI_MAX_DEVICETYPE_NAME 16
#define RASSAPI_MAX_PARAM_KEY_SIZE 32
@ -23,18 +23,18 @@ extern "C" {
#define RASPRIV_CallbackType (RASPRIV_AdminSetCallback \
| RASPRIV_CallerSetCallback \
| RASPRIV_NoCallback)
#define RAS_MODEM_OPERATIONAL 1
#define RAS_MODEM_OPERATIONAL 1
#define RAS_MODEM_NOT_RESPONDING 2
#define RAS_MODEM_HARDWARE_FAILURE 3
#define RAS_MODEM_INCORRECT_RESPONSE 4
#define RAS_MODEM_UNKNOWN 5
#define RAS_MODEM_UNKNOWN 5
#define RAS_PORT_NON_OPERATIONAL 1
#define RAS_PORT_DISCONNECTED 2
#define RAS_PORT_CALLING_BACK 3
#define RAS_PORT_LISTENING 4
#define RAS_PORT_DISCONNECTED 2
#define RAS_PORT_CALLING_BACK 3
#define RAS_PORT_LISTENING 4
#define RAS_PORT_AUTHENTICATING 5
#define RAS_PORT_AUTHENTICATED 6
#define RAS_PORT_INITIALIZING 7
#define RAS_PORT_AUTHENTICATED 6
#define RAS_PORT_INITIALIZING 7
#define MEDIA_UNKNOWN 0
#define MEDIA_SERIAL 1
#define MEDIA_RAS10_SERIAL 2
@ -59,17 +59,17 @@ typedef enum _RAS_PARAMS_FORMAT {
ParamString = 1
} RAS_PARAMS_FORMAT;
typedef union RAS_PARAMS_VALUE {
DWORD Number;
struct {
DWORD Length;
PCHAR Data;
} String;
DWORD Number;
struct {
DWORD Length;
PCHAR Data;
} String;
} RAS_PARAMS_VALUE;
typedef struct RAS_PARAMETERS {
CHAR P_Key [RASSAPI_MAX_PARAM_KEY_SIZE];
RAS_PARAMS_FORMAT P_Type;
BYTE P_Attributes;
RAS_PARAMS_VALUE P_Value;
CHAR P_Key [RASSAPI_MAX_PARAM_KEY_SIZE];
RAS_PARAMS_FORMAT P_Type;
BYTE P_Attributes;
RAS_PARAMS_VALUE P_Value;
} RAS_PARAMETERS;
typedef struct _RAS_USER_0 {
BYTE bfPrivilege;