14 include <basetsd.h> from winnt.h so that this typedef is not necessary
17 typedef unsigned long ULONG_PTR
, *PULONG_PTR
;
22 #define RAS_MaxDeviceType 16
23 #define RAS_MaxPhoneNumber 128
24 #define RAS_MaxIpAddress 15
25 #define RAS_MaxIpxAddress 21
26 #define RAS_MaxEntryName 256
27 #define RAS_MaxDeviceName 128
28 #define RAS_MaxCallbackNumber RAS_MaxPhoneNumber
29 #define RAS_MaxAreaCode 10
30 #define RAS_MaxPadType 32
31 #define RAS_MaxX25Address 200
32 #define RAS_MaxFacilities 200
33 #define RAS_MaxUserData 200
34 #define RAS_MaxReplyMessage 1024
35 #define RDEOPT_UsePrefixSuffix 0x00000001
36 #define RDEOPT_PausedStates 0x00000002
37 #define RDEOPT_IgnoreModemSpeaker 0x00000004
38 #define RDEOPT_SetModemSpeaker 0x00000008
39 #define RDEOPT_IgnoreSoftwareCompression 0x00000010
40 #define RDEOPT_SetSoftwareCompression 0x00000020
41 #define RDEOPT_DisableConnectedUI 0x00000040
42 #define RDEOPT_DisableReconnectUI 0x00000080
43 #define RDEOPT_DisableReconnect 0x00000100
44 #define RDEOPT_NoUser 0x00000200
45 #define RDEOPT_PauseOnScript 0x00000400
46 #define RDEOPT_Router 0x00000800
47 #define REN_User 0x00000000
48 #define REN_AllUsers 0x00000001
51 #define VS_PptpFirst 2
53 #define VS_L2tpFirst 4
54 #define RASDIALEVENT "RasDialEvent"
55 #define WM_RASDIALEVENT 0xCCCD
56 #define RASEO_UseCountryAndAreaCodes 0x00000001
57 #define RASEO_SpecificIpAddr 0x00000002
58 #define RASEO_SpecificNameServers 0x00000004
59 #define RASEO_IpHeaderCompression 0x00000008
60 #define RASEO_RemoteDefaultGateway 0x00000010
61 #define RASEO_DisableLcpExtensions 0x00000020
62 #define RASEO_TerminalBeforeDial 0x00000040
63 #define RASEO_TerminalAfterDial 0x00000080
64 #define RASEO_ModemLights 0x00000100
65 #define RASEO_SwCompression 0x00000200
66 #define RASEO_RequireEncryptedPw 0x00000400
67 #define RASEO_RequireMsEncryptedPw 0x00000800
68 #define RASEO_RequireDataEncryption 0x00001000
69 #define RASEO_NetworkLogon 0x00002000
70 #define RASEO_UseLogonCredentials 0x00004000
71 #define RASEO_PromoteAlternates 0x00008000
72 #define RASNP_NetBEUI 0x00000001
73 #define RASNP_Ipx 0x00000002
74 #define RASNP_Ip 0x00000004
75 #define RASFP_Ppp 0x00000001
76 #define RASFP_Slip 0x00000002
77 #define RASFP_Ras 0x00000004
78 #define RASDT_Modem TEXT("modem")
79 #define RASDT_Isdn TEXT("isdn")
80 #define RASDT_X25 TEXT("x25")
81 #define RASDT_Vpn TEXT("vpn")
82 #define RASDT_Pad TEXT("pad")
83 #define RASDT_Generic TEXT("GENERIC")
84 #define RASDT_Serial TEXT("SERIAL")
85 #define RASDT_FrameRelay TEXT("FRAMERELAY")
86 #define RASDT_Atm TEXT("ATM")
87 #define RASDT_Sonet TEXT("SONET")
88 #define RASDT_SW56 TEXT("SW56")
89 #define RASDT_Irda TEXT("IRDA")
90 #define RASDT_Parallel TEXT("PARALLEL")
93 #define RASET_Direct 3
94 #define RASET_Internet 4
96 #define RASEO_SecureLocalFiles 0x00010000
97 #define RASCN_Connection 0x00000001
98 #define RASCN_Disconnection 0x00000002
99 #define RASCN_BandwidthAdded 0x00000004
100 #define RASCN_BandwidthRemoved 0x00000008
101 #define RASEDM_DialAll 1
102 #define RASEDM_DialAsNeeded 2
103 #define RASIDS_Disabled 0xffffffff
104 #define RASIDS_UseGlobalValue 0
105 #define RASADFLG_PositionDlg 0x00000001
106 #define RASCM_UserName 0x00000001
107 #define RASCM_Password 0x00000002
108 #define RASCM_Domain 0x00000004
109 #define RASADP_DisableConnectionQuery 0
110 #define RASADP_LoginSessionDisable 1
111 #define RASADP_SavedAddressesLimit 2
112 #define RASADP_FailedConnectionTimeout 3
113 #define RASADP_ConnectionQueryTimeout 4
114 #endif /* (WINVER >= 0x401) */
115 #if (WINVER >= 0x500)
116 #define RDEOPT_CustomDial 0x00001000
117 #define RASLCPAP_PAP 0xC023
118 #define RASLCPAP_SPAP 0xC027
119 #define RASLCPAP_CHAP 0xC223
120 #define RASLCPAP_EAP 0xC227
121 #define RASLCPAD_CHAP_MD5 0x05
122 #define RASLCPAD_CHAP_MS 0x80
123 #define RASLCPAD_CHAP_MSV2 0x81
124 #define RASLCPO_PFC 0x00000001
125 #define RASLCPO_ACFC 0x00000002
126 #define RASLCPO_SSHF 0x00000004
127 #define RASLCPO_DES_56 0x00000008
128 #define RASLCPO_3_DES 0x00000010
129 #define RASCCPCA_MPPC 0x00000006
130 #define RASCCPCA_STAC 0x00000005
131 #define RASCCPO_Compression 0x00000001
132 #define RASCCPO_HistoryLess 0x00000002
133 #define RASCCPO_Encryption56bit 0x00000010
134 #define RASCCPO_Encryption40bit 0x00000020
135 #define RASCCPO_Encryption128bit 0x00000040
136 #define RASEO_RequireEAP 0x00020000
137 #define RASEO_RequirePAP 0x00040000
138 #define RASEO_RequireSPAP 0x00080000
139 #define RASEO_Custom 0x00100000
140 #define RASEO_PreviewPhoneNumber 0x00200000
141 #define RASEO_SharedPhoneNumbers 0x00800000
142 #define RASEO_PreviewUserPw 0x01000000
143 #define RASEO_PreviewDomain 0x02000000
144 #define RASEO_ShowDialingProgress 0x04000000
145 #define RASEO_RequireCHAP 0x08000000
146 #define RASEO_RequireMsCHAP 0x10000000
147 #define RASEO_RequireMsCHAP2 0x20000000
148 #define RASEO_RequireW95MSCHAP 0x40000000
149 #define RASEO_CustomScript 0x80000000
150 #define RASIPO_VJ 0x00000001
151 #define RCD_SingleUser 0
152 #define RCD_AllUsers 0x00000001
153 #define RCD_Eap 0x00000002
154 #define RASEAPF_NonInteractive 0x00000002
155 #define RASEAPF_Logon 0x00000004
156 #define RASEAPF_Preview 0x00000008
161 #define ET_RequireMax 2
162 #define ET_Optional 3
163 #endif /* (WINVER >= 0x500) */
165 #define RASCS_PAUSED 0x1000
166 #define RASCS_DONE 0x2000
167 typedef enum tagRASCONNSTATE
{
171 RASCS_DeviceConnected
,
172 RASCS_AllDevicesConnected
,
177 RASCS_AuthChangePassword
,
181 RASCS_ReAuthenticate
,
183 RASCS_PrepareForCallback
,
184 RASCS_WaitForModemReset
,
185 RASCS_WaitForCallback
,
187 RASCS_StartAuthentication
,
188 RASCS_CallbackComplete
,
190 RASCS_SubEntryConnected
,
191 RASCS_SubEntryDisconnected
,
192 RASCS_Interactive
= RASCS_PAUSED
,
193 RASCS_RetryAuthentication
,
194 RASCS_CallbackSetByCaller
,
195 RASCS_PasswordExpired
,
196 #if (WINVER >= 0x500)
199 RASCS_Connected
= RASCS_DONE
,
201 } RASCONNSTATE
, *LPRASCONNSTATE
;
203 typedef enum tagRASPROJECTION
{
205 RASP_PppNbf
= 0x803F,
206 RASP_PppIpx
= 0x802B,
208 #if (WINVER >= 0x500)
209 RASP_PppCcp
= 0x80FD,
211 RASP_PppLcp
= 0xC021,
213 } RASPROJECTION
, *LPRASPROJECTION
;
215 DECLARE_HANDLE (HRASCONN
);
216 typedef HRASCONN
* LPHRASCONN
;
218 typedef struct tagRASCONNW
{
221 WCHAR szEntryName
[RAS_MaxEntryName
+ 1];
222 WCHAR szDeviceType
[RAS_MaxDeviceType
+ 1];
223 WCHAR szDeviceName
[RAS_MaxDeviceName
+ 1];
224 #if (WINVER >= 0x401)
225 WCHAR szPhonebook
[MAX_PATH
];
228 #if (WINVER >= 0x500)
231 } RASCONNW
, *LPRASCONNW
;
233 typedef struct tagRASCONNA
{
236 CHAR szEntryName
[RAS_MaxEntryName
+ 1];
237 CHAR szDeviceType
[RAS_MaxDeviceType
+ 1];
238 CHAR szDeviceName
[RAS_MaxDeviceName
+ 1];
239 #if (WINVER >= 0x401)
240 CHAR szPhonebook
[MAX_PATH
];
243 #if (WINVER >= 0x500)
246 } RASCONNA
, *LPRASCONNA
;
248 typedef struct tagRASCONNSTATUSW
{
250 RASCONNSTATE rasconnstate
;
252 WCHAR szDeviceType
[RAS_MaxDeviceType
+ 1];
253 WCHAR szDeviceName
[RAS_MaxDeviceName
+ 1];
254 #if (WINVER >= 0x401)
255 WCHAR szPhoneNumber
[RAS_MaxPhoneNumber
+ 1];
257 } RASCONNSTATUSW
, *LPRASCONNSTATUSW
;
259 typedef struct tagRASCONNSTATUSA
{
261 RASCONNSTATE rasconnstate
;
263 CHAR szDeviceType
[RAS_MaxDeviceType
+ 1];
264 CHAR szDeviceName
[RAS_MaxDeviceName
+ 1];
265 #if (WINVER >= 0x401)
266 CHAR szPhoneNumber
[RAS_MaxPhoneNumber
+ 1];
268 } RASCONNSTATUSA
, *LPRASCONNSTATUSA
;
270 typedef struct tagRASDIALPARAMSW
{
272 WCHAR szEntryName
[RAS_MaxEntryName
+ 1];
273 WCHAR szPhoneNumber
[RAS_MaxPhoneNumber
+ 1];
274 WCHAR szCallbackNumber
[RAS_MaxCallbackNumber
+ 1];
275 WCHAR szUserName
[UNLEN
+ 1];
276 WCHAR szPassword
[PWLEN
+ 1];
277 WCHAR szDomain
[DNLEN
+ 1];
278 #if (WINVER >= 0x401)
280 ULONG_PTR dwCallbackId
;
282 } RASDIALPARAMSW
, *LPRASDIALPARAMSW
;
284 typedef struct tagRASDIALPARAMSA
{
286 CHAR szEntryName
[RAS_MaxEntryName
+ 1];
287 CHAR szPhoneNumber
[RAS_MaxPhoneNumber
+ 1];
288 CHAR szCallbackNumber
[RAS_MaxCallbackNumber
+ 1];
289 CHAR szUserName
[UNLEN
+ 1];
290 CHAR szPassword
[PWLEN
+ 1];
291 CHAR szDomain
[DNLEN
+ 1];
292 #if (WINVER >= 0x401)
294 ULONG_PTR dwCallbackId
;
296 } RASDIALPARAMSA
, *LPRASDIALPARAMSA
;
298 #if (WINVER >= 0x500)
299 typedef struct tagRASEAPINFO
{
300 DWORD dwSizeofEapInfo
;
305 typedef struct tagRASDIALEXTENSIONS
{
310 #if (WINVER >= 0x500)
312 RASEAPINFO RasEapInfo
;
314 } RASDIALEXTENSIONS
, *LPRASDIALEXTENSIONS
;
316 typedef struct tagRASENTRYNAMEW
{
318 WCHAR szEntryName
[RAS_MaxEntryName
+ 1];
319 #if (WINVER >= 0x500)
321 WCHAR szPhonebookPath
[MAX_PATH
+ 1];
323 } RASENTRYNAMEW
, *LPRASENTRYNAMEW
;
325 typedef struct tagRASENTRYNAMEA
{
327 CHAR szEntryName
[RAS_MaxEntryName
+ 1];
328 #if (WINVER >= 0x500)
330 CHAR szPhonebookPath
[MAX_PATH
+ 1];
332 } RASENTRYNAMEA
, *LPRASENTRYNAMEA
;
334 typedef struct tagRASAMBW
{
337 WCHAR szNetBiosError
[NETBIOS_NAME_LEN
+ 1];
339 } RASAMBW
, *LPRASAMBW
;
341 typedef struct tagRASAMBA
{
344 CHAR szNetBiosError
[NETBIOS_NAME_LEN
+ 1];
346 } RASAMBA
, *LPRASAMBA
;
348 typedef struct tagRASPPPNBFW
{
351 DWORD dwNetBiosError
;
352 WCHAR szNetBiosError
[NETBIOS_NAME_LEN
+ 1];
353 WCHAR szWorkstationName
[NETBIOS_NAME_LEN
+ 1];
355 } RASPPPNBFW
, *LPRASPPPNBFW
;
357 typedef struct tagRASPPPNBFA
{
360 DWORD dwNetBiosError
;
361 CHAR szNetBiosError
[NETBIOS_NAME_LEN
+ 1];
362 CHAR szWorkstationName
[NETBIOS_NAME_LEN
+ 1];
364 } RASPPPNBFA
, *LPRASPPPNBFA
;
366 typedef struct tagRASIPXW
{
369 WCHAR szIpxAddress
[RAS_MaxIpxAddress
+ 1];
370 } RASPPPIPXW
, *LPRASPPPIPXW
;
372 typedef struct tagRASIPXA
{
375 CHAR szIpxAddress
[RAS_MaxIpxAddress
+ 1];
376 } RASPPPIPXA
, *LPRASPPPIPXA
;
378 typedef struct tagRASPPPIPW
{
381 WCHAR szIpAddress
[RAS_MaxIpAddress
+ 1];
382 #ifndef WINNT35COMPATIBLE
383 WCHAR szServerIpAddress
[RAS_MaxIpAddress
+ 1];
385 #if (WINVER >= 0x500)
387 DWORD dwServerOptions
;
389 } RASPPPIPW
, *LPRASPPPIPW
;
391 typedef struct tagRASPPPIPA
{
394 CHAR szIpAddress
[RAS_MaxIpAddress
+ 1];
395 #ifndef WINNT35COMPATIBLE
396 CHAR szServerIpAddress
[RAS_MaxIpAddress
+ 1];
398 #if (WINVER >= 0x500)
400 DWORD dwServerOptions
;
402 } RASPPPIPA
, *LPRASPPPIPA
;
404 typedef struct tagRASPPPLCPW
{
407 #if (WINVER >= 0x500)
409 DWORD dwAuthenticationProtocol
;
410 DWORD dwAuthenticationData
;
412 DWORD dwServerAuthenticationProtocol
;
413 DWORD dwServerAuthenticationData
;
414 DWORD dwServerEapTypeId
;
416 DWORD dwTerminateReason
;
417 DWORD dwServerTerminateReason
;
418 WCHAR szReplyMessage
[RAS_MaxReplyMessage
];
420 DWORD dwServerOptions
;
422 } RASPPPLCPW
, *LPRASPPPLCPW
;
424 typedef struct tagRASPPPLCPA
{
427 #if (WINVER >= 0x500)
429 DWORD dwAuthenticationProtocol
;
430 DWORD dwAuthenticationData
;
432 DWORD dwServerAuthenticationProtocol
;
433 DWORD dwServerAuthenticationData
;
434 DWORD dwServerEapTypeId
;
436 DWORD dwTerminateReason
;
437 DWORD dwServerTerminateReason
;
438 CHAR szReplyMessage
[RAS_MaxReplyMessage
];
440 DWORD dwServerOptions
;
442 } RASPPPLCPA
, *LPRASPPPLCPA
;
444 typedef struct tagRASSLIPW
{
447 WCHAR szIpAddress
[RAS_MaxIpAddress
+ 1];
448 } RASSLIPW
, *LPRASSLIPW
;
451 typedef struct tagRASSLIPA
{
454 CHAR szIpAddress
[RAS_MaxIpAddress
+ 1];
455 } RASSLIPA
, *LPRASSLIPA
;
457 typedef struct tagRASDEVINFOW
{
459 WCHAR szDeviceType
[RAS_MaxDeviceType
+ 1];
460 WCHAR szDeviceName
[RAS_MaxDeviceName
+ 1];
461 } RASDEVINFOW
, *LPRASDEVINFOW
;
463 typedef struct tagRASDEVINFOA
{
465 CHAR szDeviceType
[RAS_MaxDeviceType
+ 1];
466 CHAR szDeviceName
[RAS_MaxDeviceName
+ 1];
467 } RASDEVINFOA
, *LPRASDEVINFOA
;
469 typedef struct tagRASCTRYINFO
{
472 DWORD dwNextCountryID
;
474 DWORD dwCountryNameOffset
;
475 } RASCTRYINFO
, *LPRASCTRYINFO
;
477 typedef RASCTRYINFO RASCTRYINFOW
, *LPRASCTRYINFOW
;
478 typedef RASCTRYINFO RASCTRYINFOA
, *LPRASCTRYINFOA
;
480 typedef struct tagRASIPADDR
{
487 typedef struct tagRASENTRYW
{
492 WCHAR szAreaCode
[RAS_MaxAreaCode
+ 1];
493 WCHAR szLocalPhoneNumber
[RAS_MaxPhoneNumber
+ 1];
494 DWORD dwAlternateOffset
;
497 RASIPADDR ipaddrDnsAlt
;
498 RASIPADDR ipaddrWins
;
499 RASIPADDR ipaddrWinsAlt
;
501 DWORD dwfNetProtocols
;
502 DWORD dwFramingProtocol
;
503 WCHAR szScript
[MAX_PATH
];
504 WCHAR szAutodialDll
[MAX_PATH
];
505 WCHAR szAutodialFunc
[MAX_PATH
];
506 WCHAR szDeviceType
[RAS_MaxDeviceType
+ 1];
507 WCHAR szDeviceName
[RAS_MaxDeviceName
+ 1];
508 WCHAR szX25PadType
[RAS_MaxPadType
+ 1];
509 WCHAR szX25Address
[RAS_MaxX25Address
+ 1];
510 WCHAR szX25Facilities
[RAS_MaxFacilities
+ 1];
511 WCHAR szX25UserData
[RAS_MaxUserData
+ 1];
515 #if (WINVER >= 0x401)
518 DWORD dwDialExtraPercent
;
519 DWORD dwDialExtraSampleSeconds
;
520 DWORD dwHangUpExtraPercent
;
521 DWORD dwHangUpExtraSampleSeconds
;
522 DWORD dwIdleDisconnectSeconds
;
524 #if (WINVER >= 0x500)
526 DWORD dwEncryptionType
;
527 DWORD dwCustomAuthKey
;
529 WCHAR szCustomDialDll
[MAX_PATH
];
532 } RASENTRYW
, *LPRASENTRYW
;
534 typedef struct tagRASENTRYA
{
539 CHAR szAreaCode
[RAS_MaxAreaCode
+ 1];
540 CHAR szLocalPhoneNumber
[RAS_MaxPhoneNumber
+ 1];
541 DWORD dwAlternateOffset
;
544 RASIPADDR ipaddrDnsAlt
;
545 RASIPADDR ipaddrWins
;
546 RASIPADDR ipaddrWinsAlt
;
548 DWORD dwfNetProtocols
;
549 DWORD dwFramingProtocol
;
550 CHAR szScript
[MAX_PATH
];
551 CHAR szAutodialDll
[MAX_PATH
];
552 CHAR szAutodialFunc
[MAX_PATH
];
553 CHAR szDeviceType
[RAS_MaxDeviceType
+ 1];
554 CHAR szDeviceName
[RAS_MaxDeviceName
+ 1];
555 CHAR szX25PadType
[RAS_MaxPadType
+ 1];
556 CHAR szX25Address
[RAS_MaxX25Address
+ 1];
557 CHAR szX25Facilities
[RAS_MaxFacilities
+ 1];
558 CHAR szX25UserData
[RAS_MaxUserData
+ 1];
562 #if (WINVER >= 0x401)
565 DWORD dwDialExtraPercent
;
566 DWORD dwDialExtraSampleSeconds
;
567 DWORD dwHangUpExtraPercent
;
568 DWORD dwHangUpExtraSampleSeconds
;
569 DWORD dwIdleDisconnectSeconds
;
571 #if (WINVER >= 0x500)
573 DWORD dwEncryptionType
;
574 DWORD dwCustomAuthKey
;
576 CHAR szCustomDialDll
[MAX_PATH
];
579 } RASENTRYA
, *LPRASENTRYA
;
582 #if (WINVER >= 0x401)
583 typedef struct tagRASADPARAMS
{
589 } RASADPARAMS
, *LPRASADPARAMS
;
591 typedef struct tagRASSUBENTRYW
{
594 WCHAR szDeviceType
[RAS_MaxDeviceType
+ 1];
595 WCHAR szDeviceName
[RAS_MaxDeviceName
+ 1];
596 WCHAR szLocalPhoneNumber
[RAS_MaxPhoneNumber
+ 1];
597 DWORD dwAlternateOffset
;
598 } RASSUBENTRYW
, *LPRASSUBENTRYW
;
600 typedef struct tagRASSUBENTRYA
{
603 CHAR szDeviceType
[RAS_MaxDeviceType
+ 1];
604 CHAR szDeviceName
[RAS_MaxDeviceName
+ 1];
605 CHAR szLocalPhoneNumber
[RAS_MaxPhoneNumber
+ 1];
606 DWORD dwAlternateOffset
;
607 } RASSUBENTRYA
, *LPRASSUBENTRYA
;
609 typedef struct tagRASCREDENTIALSW
{
612 WCHAR szUserName
[UNLEN
+ 1];
613 WCHAR szPassword
[PWLEN
+ 1];
614 WCHAR szDomain
[DNLEN
+ 1];
615 } RASCREDENTIALSW
, *LPRASCREDENTIALSW
;
617 typedef struct tagRASCREDENTIALSA
{
620 CHAR szUserName
[UNLEN
+ 1];
621 CHAR szPassword
[PWLEN
+ 1];
622 CHAR szDomain
[DNLEN
+ 1];
623 } RASCREDENTIALSA
, *LPRASCREDENTIALSA
;
625 typedef struct tagRASAUTODIALENTRYW
{
628 DWORD dwDialingLocation
;
629 WCHAR szEntry
[RAS_MaxEntryName
+ 1];
630 } RASAUTODIALENTRYW
, *LPRASAUTODIALENTRYW
;
632 typedef struct tagRASAUTODIALENTRYA
{
635 DWORD dwDialingLocation
;
636 CHAR szEntry
[RAS_MaxEntryName
+ 1];
637 } RASAUTODIALENTRYA
, *LPRASAUTODIALENTRYA
;
638 #endif /* (WINVER >= 0x401) */
640 #if (WINVER >= 0x500)
641 typedef struct tagRASPPPCCP
{
644 DWORD dwCompressionAlgorithm
;
646 DWORD dwServerCompressionAlgorithm
;
647 DWORD dwServerOptions
;
648 } RASPPPCCP
, *LPRASPPPCCP
;
650 typedef struct tagRASEAPUSERIDENTITYW
{
651 WCHAR szUserName
[UNLEN
+ 1];
652 DWORD dwSizeofEapInfo
;
654 } RASEAPUSERIDENTITYW
, *LPRASEAPUSERIDENTITYW
;
656 typedef struct tagRASEAPUSERIDENTITYA
{
657 CHAR szUserName
[UNLEN
+ 1];
658 DWORD dwSizeofEapInfo
;
660 } RASEAPUSERIDENTITYA
, *LPRASEAPUSERIDENTITYA
;
662 typedef struct tagRAS_STATS
{
666 DWORD dwFramesXmited
;
670 DWORD dwAlignmentErr
;
671 DWORD dwHardwareOverrunErr
;
673 DWORD dwBufferOverrunErr
;
674 DWORD dwCompressionRatioIn
;
675 DWORD dwCompressionRatioOut
;
677 DWORD dwConnectDuration
;
678 } RAS_STATS
, *PRAS_STATS
;
679 #endif /* (WINVER >= 0x500) */
682 /* UNICODE typedefs for structures*/
684 typedef RASCONNW RASCONN
, *LPRASCONN
;
685 typedef RASENTRYW RASENTRY
, *LPRASENTRY
;
686 typedef RASCONNSTATUSW RASCONNSTATUS
, *LPRASCONNSTATUS
;
687 typedef RASDIALPARAMSW RASDIALPARAMS
, *LPRASDIALPARAMS
;
688 typedef RASAMBW RASAMB
, *LPRASAM
;
689 typedef RASPPPNBFW RASPPPNBF
, *LPRASPPPNBF
;
690 typedef RASPPPIPXW RASPPPIPX
, *LPRASPPPIPX
;
691 typedef RASPPPIPW RASPPPIP
, *LPRASPPPIP
;
692 typedef RASPPPLCPW RASPPPLCP
, *LPRASPPPLCP
;
693 typedef RASSLIPW RASSLIP
, *LPRASSLIP
;
694 typedef RASDEVINFOW RASDEVINFO
, *LPRASDEVINFO
;
695 typedef RASENTRYNAMEW RASENTRYNAME
, *LPRASENTRYNAME
;
697 #if (WINVER >= 0x401)
698 typedef RASSUBENTRYW RASSUBENTRY
, *LPRASSUBENTRY
;
699 typedef RASCREDENTIALSW RASCREDENTIALS
, *LPRASCREDENTIALS
;
700 typedef RASAUTODIALENTRYW RASAUTODIALENTRY
, *LPRASAUTODIALENTRY
;
701 #endif /* (WINVER >= 0x401) */
703 #if (WINVER >= 0x500)
704 typedef RASEAPUSERIDENTITYW RASEAPUSERIDENTITY
, *LPRASEAPUSERIDENTITY
;
705 #endif /* (WINVER >= 0x500) */
707 #else /* ! defined UNICODE */
708 typedef RASCONNA RASCONN
, *LPRASCONN
;
709 typedef RASENTRYA RASENTRY
, *LPRASENTRY
;
710 typedef RASCONNSTATUSA RASCONNSTATUS
, *LPRASCONNSTATUS
;
711 typedef RASDIALPARAMSA RASDIALPARAMS
, *LPRASDIALPARAMS
;
712 typedef RASAMBA RASAMB
, *LPRASAM
;
713 typedef RASPPPNBFA RASPPPNBF
, *LPRASPPPNBF
;
714 typedef RASPPPIPXA RASPPPIPX
, *LPRASPPPIPX
;
715 typedef RASPPPIPA RASPPPIP
, *LPRASPPPIP
;
716 typedef RASPPPLCPA RASPPPLCP
, *LPRASPPPLCP
;
717 typedef RASSLIPA RASSLIP
, *LPRASSLIP
;
718 typedef RASDEVINFOA RASDEVINFO
, *LPRASDEVINFO
;
719 typedef RASENTRYNAMEA RASENTRYNAME
, *LPRASENTRYNAME
;
721 #if (WINVER >= 0x401)
722 typedef RASSUBENTRYA RASSUBENTRY
, *LPRASSUBENTRY
;
723 typedef RASCREDENTIALSA RASCREDENTIALS
, *LPRASCREDENTIALS
;
724 typedef RASAUTODIALENTRYA RASAUTODIALENTRY
, *LPRASAUTODIALENTRY
;
725 #endif /*(WINVER >= 0x401)*/
726 #if (WINVER >= 0x500)
727 typedef RASEAPUSERIDENTITYA RASEAPUSERIDENTITY
, *LPRASEAPUSERIDENTITY
;
728 #endif /* (WINVER >= 0x500) */
729 #endif /* ! UNICODE */
731 /* Callback prototypes */
732 typedef BOOL (WINAPI
* ORASADFUNC
) (HWND
, LPSTR
, DWORD
, LPDWORD
); /* deprecated */
733 typedef VOID (WINAPI
* RASDIALFUNC
) (UINT
, RASCONNSTATE
, DWORD
);
734 typedef VOID (WINAPI
* RASDIALFUNC1
) (HRASCONN
, UINT
, RASCONNSTATE
, DWORD
,
736 typedef DWORD (WINAPI
* RASDIALFUNC2
) (ULONG_PTR
, DWORD
, HRASCONN
, UINT
,
737 RASCONNSTATE
, DWORD
, DWORD
);
739 /* External functions */
740 DWORD APIENTRY
RasDialA (LPRASDIALEXTENSIONS
, LPCSTR
, LPRASDIALPARAMSA
,
741 DWORD
, LPVOID
, LPHRASCONN
);
742 DWORD APIENTRY
RasDialW (LPRASDIALEXTENSIONS
, LPCWSTR
, LPRASDIALPARAMSW
,
743 DWORD
, LPVOID
, LPHRASCONN
);
744 DWORD APIENTRY
RasEnumConnectionsA (LPRASCONNA
, LPDWORD
, LPDWORD
);
745 DWORD APIENTRY
RasEnumConnectionsW (LPRASCONNW
, LPDWORD
, LPDWORD
);
746 DWORD APIENTRY
RasEnumEntriesA (LPCSTR
, LPCSTR
, LPRASENTRYNAMEA
, LPDWORD
,
748 DWORD APIENTRY
RasEnumEntriesW (LPCWSTR
, LPCWSTR
, LPRASENTRYNAMEW
, LPDWORD
,
750 DWORD APIENTRY
RasGetConnectStatusA (HRASCONN
, LPRASCONNSTATUSA
);
751 DWORD APIENTRY
RasGetConnectStatusW (HRASCONN
, LPRASCONNSTATUSW
);
752 DWORD APIENTRY
RasGetErrorStringA (UINT
, LPSTR
, DWORD
);
753 DWORD APIENTRY
RasGetErrorStringW (UINT
, LPWSTR
, DWORD
);
754 DWORD APIENTRY
RasHangUpA (HRASCONN
);
755 DWORD APIENTRY
RasHangUpW (HRASCONN
);
756 DWORD APIENTRY
RasGetProjectionInfoA (HRASCONN
, RASPROJECTION
, LPVOID
,
758 DWORD APIENTRY
RasGetProjectionInfoW (HRASCONN
, RASPROJECTION
, LPVOID
,
760 DWORD APIENTRY
RasCreatePhonebookEntryA (HWND
, LPCSTR
);
761 DWORD APIENTRY
RasCreatePhonebookEntryW (HWND
, LPCWSTR
);
762 DWORD APIENTRY
RasEditPhonebookEntryA (HWND
, LPCSTR
, LPCSTR
);
763 DWORD APIENTRY
RasEditPhonebookEntryW (HWND
, LPCWSTR
, LPCWSTR
);
764 DWORD APIENTRY
RasSetEntryDialParamsA (LPCSTR
, LPRASDIALPARAMSA
, BOOL
);
765 DWORD APIENTRY
RasSetEntryDialParamsW (LPCWSTR
, LPRASDIALPARAMSW
, BOOL
);
766 DWORD APIENTRY
RasGetEntryDialParamsA (LPCSTR
, LPRASDIALPARAMSA
, LPBOOL
);
767 DWORD APIENTRY
RasGetEntryDialParamsW (LPCWSTR
, LPRASDIALPARAMSW
, LPBOOL
);
768 DWORD APIENTRY
RasEnumDevicesA (LPRASDEVINFOA
, LPDWORD
, LPDWORD
);
769 DWORD APIENTRY
RasEnumDevicesW (LPRASDEVINFOW
, LPDWORD
, LPDWORD
);
770 DWORD APIENTRY
RasGetCountryInfoA (LPRASCTRYINFOA
, LPDWORD
);
771 DWORD APIENTRY
RasGetCountryInfoW (LPRASCTRYINFOW
, LPDWORD
);
772 DWORD APIENTRY
RasGetEntryPropertiesA (LPCSTR
, LPCSTR
, LPRASENTRYA
, LPDWORD
,
774 DWORD APIENTRY
RasGetEntryPropertiesW (LPCWSTR
, LPCWSTR
, LPRASENTRYW
,
775 LPDWORD
, LPBYTE
, LPDWORD
);
776 DWORD APIENTRY
RasSetEntryPropertiesA (LPCSTR
, LPCSTR
, LPRASENTRYA
, DWORD
,
778 DWORD APIENTRY
RasSetEntryPropertiesW (LPCWSTR
, LPCWSTR
, LPRASENTRYW
, DWORD
,
780 DWORD APIENTRY
RasRenameEntryA (LPCSTR
, LPCSTR
, LPCSTR
);
781 DWORD APIENTRY
RasRenameEntryW (LPCWSTR
, LPCWSTR
, LPCWSTR
);
782 DWORD APIENTRY
RasDeleteEntryA (LPCSTR
, LPCSTR
);
783 DWORD APIENTRY
RasDeleteEntryW (LPCWSTR
, LPCWSTR
);
784 DWORD APIENTRY
RasValidateEntryNameA (LPCSTR
, LPCSTR
);
785 DWORD APIENTRY
RasValidateEntryNameW (LPCWSTR
, LPCWSTR
);
787 #if (WINVER >= 0x401)
788 typedef BOOL (WINAPI
* RASADFUNCA
) (LPSTR
, LPSTR
, LPRASADPARAMS
, LPDWORD
);
789 typedef BOOL (WINAPI
* RASADFUNCW
) (LPWSTR
, LPWSTR
, LPRASADPARAMS
, LPDWORD
);
791 DWORD APIENTRY
RasGetSubEntryHandleA (HRASCONN
, DWORD
, LPHRASCONN
);
792 DWORD APIENTRY
RasGetSubEntryHandleW (HRASCONN
, DWORD
, LPHRASCONN
);
793 DWORD APIENTRY
RasGetCredentialsA (LPCSTR
, LPCSTR
, LPRASCREDENTIALSA
);
794 DWORD APIENTRY
RasGetCredentialsW (LPCWSTR
, LPCWSTR
, LPRASCREDENTIALSW
);
795 DWORD APIENTRY
RasSetCredentialsA (LPCSTR
, LPCSTR
, LPRASCREDENTIALSA
, BOOL
);
796 DWORD APIENTRY
RasSetCredentialsW (LPCWSTR
, LPCWSTR
, LPRASCREDENTIALSW
, BOOL
);
797 DWORD APIENTRY
RasConnectionNotificationA (HRASCONN
, HANDLE
, DWORD
);
798 DWORD APIENTRY
RasConnectionNotificationW (HRASCONN
, HANDLE
, DWORD
);
799 DWORD APIENTRY
RasGetSubEntryPropertiesA (LPCSTR
, LPCSTR
, DWORD
,
800 LPRASSUBENTRYA
, LPDWORD
, LPBYTE
, LPDWORD
);
801 DWORD APIENTRY
RasGetSubEntryPropertiesW (LPCWSTR
, LPCWSTR
, DWORD
,
802 LPRASSUBENTRYW
, LPDWORD
, LPBYTE
, LPDWORD
);
803 DWORD APIENTRY
RasSetSubEntryPropertiesA (LPCSTR
, LPCSTR
, DWORD
,
804 LPRASSUBENTRYA
, DWORD
, LPBYTE
, DWORD
);
805 DWORD APIENTRY
RasSetSubEntryPropertiesW (LPCWSTR
, LPCWSTR
, DWORD
,
806 LPRASSUBENTRYW
, DWORD
, LPBYTE
, DWORD
);
807 DWORD APIENTRY
RasGetAutodialAddressA (LPCSTR
, LPDWORD
, LPRASAUTODIALENTRYA
,
809 DWORD APIENTRY
RasGetAutodialAddressW (LPCWSTR
, LPDWORD
,
810 LPRASAUTODIALENTRYW
, LPDWORD
, LPDWORD
);
811 DWORD APIENTRY
RasSetAutodialAddressA (LPCSTR
, DWORD
, LPRASAUTODIALENTRYA
,
813 DWORD APIENTRY
RasSetAutodialAddressW (LPCWSTR
, DWORD
, LPRASAUTODIALENTRYW
,
815 DWORD APIENTRY
RasEnumAutodialAddressesA (LPSTR
*, LPDWORD
, LPDWORD
);
816 DWORD APIENTRY
RasEnumAutodialAddressesW (LPWSTR
*, LPDWORD
, LPDWORD
);
817 DWORD APIENTRY
RasGetAutodialEnableA (DWORD
, LPBOOL
);
818 DWORD APIENTRY
RasGetAutodialEnableW (DWORD
, LPBOOL
);
819 DWORD APIENTRY
RasSetAutodialEnableA (DWORD
, BOOL
);
820 DWORD APIENTRY
RasSetAutodialEnableW (DWORD
, BOOL
);
821 DWORD APIENTRY
RasGetAutodialParamA (DWORD
, LPVOID
, LPDWORD
);
822 DWORD APIENTRY
RasGetAutodialParamW (DWORD
, LPVOID
, LPDWORD
);
823 DWORD APIENTRY
RasSetAutodialParamA (DWORD
, LPVOID
, DWORD
);
824 DWORD APIENTRY
RasSetAutodialParamW (DWORD
, LPVOID
, DWORD
);
827 #if (WINVER >= 0x500)
828 typedef DWORD (WINAPI
* RasCustomHangUpFn
) (HRASCONN
);
829 typedef DWORD (WINAPI
* RasCustomDeleteEntryNotifyFn
) (LPCTSTR
, LPCTSTR
, DWORD
);
830 typedef DWORD (WINAPI
* RasCustomDialFn
) (HINSTANCE
, LPRASDIALEXTENSIONS
,
831 LPCTSTR
, LPRASDIALPARAMS
, DWORD
, LPVOID
, LPHRASCONN
, DWORD
);
833 DWORD APIENTRY
RasInvokeEapUI (HRASCONN
, DWORD
, LPRASDIALEXTENSIONS
, HWND
);
834 DWORD APIENTRY
RasGetLinkStatistics (HRASCONN
, DWORD
, RAS_STATS
*);
835 DWORD APIENTRY
RasGetConnectionStatistics (HRASCONN
, RAS_STATS
*);
836 DWORD APIENTRY
RasClearLinkStatistics (HRASCONN
, DWORD
);
837 DWORD APIENTRY
RasClearConnectionStatistics (HRASCONN
);
838 DWORD APIENTRY
RasGetEapUserDataA (HANDLE
, LPCSTR
, LPCSTR
, BYTE
*, DWORD
*);
839 DWORD APIENTRY
RasGetEapUserDataW (HANDLE
, LPCWSTR
, LPCWSTR
, BYTE
*, DWORD
*);
840 DWORD APIENTRY
RasSetEapUserDataA (HANDLE
, LPCSTR
, LPCSTR
, BYTE
*, DWORD
);
841 DWORD APIENTRY
RasSetEapUserDataW (HANDLE
, LPCWSTR
, LPCWSTR
, BYTE
*, DWORD
);
842 DWORD APIENTRY
RasGetCustomAuthDataA (LPCSTR
, LPCSTR
, BYTE
*, DWORD
*);
843 DWORD APIENTRY
RasGetCustomAuthDataW (LPCWSTR
, LPCWSTR
, BYTE
*, DWORD
*);
844 DWORD APIENTRY
RasSetCustomAuthDataA (LPCSTR
, LPCSTR
, BYTE
*, DWORD
);
845 DWORD APIENTRY
RasSetCustomAuthDataW (LPCWSTR
, LPCWSTR
, BYTE
*, DWORD
);
846 DWORD APIENTRY
RasGetEapUserIdentityW (LPCWSTR
, LPCWSTR
, DWORD
, HWND
, LPRASEAPUSERIDENTITYW
*);
847 DWORD APIENTRY
RasGetEapUserIdentityA (LPCSTR
, LPCSTR
, DWORD
, HWND
, LPRASEAPUSERIDENTITYA
*);
848 VOID APIENTRY
RasFreeEapUserIdentityW (LPRASEAPUSERIDENTITYW
);
849 VOID APIENTRY
RasFreeEapUserIdentityA (LPRASEAPUSERIDENTITYA
);
850 #endif /* (WINVER >= 0x500) */
853 /* UNICODE defines for functions */
855 #define RasDial RasDialW
856 #define RasEnumConnections RasEnumConnectionsW
857 #define RasEnumEntries RasEnumEntriesW
858 #define RasGetConnectStatus RasGetConnectStatusW
859 #define RasGetErrorString RasGetErrorStringW
860 #define RasHangUp RasHangUpW
861 #define RasGetProjectionInfo RasGetProjectionInfoW
862 #define RasCreatePhonebookEntry RasCreatePhonebookEntryW
863 #define RasEditPhonebookEntry RasEditPhonebookEntryW
864 #define RasSetEntryDialParams RasSetEntryDialParamsW
865 #define RasGetEntryDialParams RasGetEntryDialParamsW
866 #define RasEnumDevices RasEnumDevicesW
867 #define RasGetCountryInfo RasGetCountryInfoW
868 #define RasGetEntryProperties RasGetEntryPropertiesW
869 #define RasSetEntryProperties RasSetEntryPropertiesW
870 #define RasRenameEntry RasRenameEntryW
871 #define RasDeleteEntry RasDeleteEntryW
872 #define RasValidateEntryName RasValidateEntryNameW
873 #if (WINVER >= 0x401)
874 #define RASADFUNC RASADFUNCW
875 #define RasGetSubEntryHandle RasGetSubEntryHandleW
876 #define RasConnectionNotification RasConnectionNotificationW
877 #define RasGetSubEntryProperties RasGetSubEntryPropertiesW
878 #define RasSetSubEntryProperties RasSetSubEntryPropertiesW
879 #define RasGetCredentials RasGetCredentialsW
880 #define RasSetCredentials RasSetCredentialsW
881 #define RasGetAutodialAddress RasGetAutodialAddressW
882 #define RasSetAutodialAddress RasSetAutodialAddressW
883 #define RasEnumAutodialAddresses RasEnumAutodialAddressesW
884 #define RasGetAutodialEnable RasGetAutodialEnableW
885 #define RasSetAutodialEnable RasSetAutodialEnableW
886 #define RasGetAutodialParam RasGetAutodialParamW
887 #define RasSetAutodialParam RasSetAutodialParamW
888 #endif /* (WINVER >= 0x401) */
889 #if (WINVER >= 0x500)
890 #define RasGetEapUserData RasGetEapUserDataW
891 #define RasSetEapUserData RasSetEapUserDataW
892 #define RasGetCustomAuthData RasGetCustomAuthDataW
893 #define RasSetCustomAuthData RasSetCustomAuthDataW
894 #define RasGetEapUserIdentity RasGetEapUserIdentityW
895 #define RasFreeEapUserIdentity RasFreeEapUserIdentityW
896 #endif /* (WINVER >= 0x500) */
898 #else /* ! defined UNICODE */
899 #define RasDial RasDialA
900 #define RasEnumConnections RasEnumConnectionsA
901 #define RasEnumEntries RasEnumEntriesA
902 #define RasGetConnectStatus RasGetConnectStatusA
903 #define RasGetErrorString RasGetErrorStringA
904 #define RasHangUp RasHangUpA
905 #define RasGetProjectionInfo RasGetProjectionInfoA
906 #define RasCreatePhonebookEntry RasCreatePhonebookEntryA
907 #define RasEditPhonebookEntry RasEditPhonebookEntryA
908 #define RasSetEntryDialParams RasSetEntryDialParamsA
909 #define RasGetEntryDialParams RasGetEntryDialParamsA
910 #define RasEnumDevices RasEnumDevicesA
911 #define RasGetCountryInfo RasGetCountryInfoA
912 #define RasGetEntryProperties RasGetEntryPropertiesA
913 #define RasSetEntryProperties RasSetEntryPropertiesA
914 #define RasRenameEntry RasRenameEntryA
915 #define RasDeleteEntry RasDeleteEntryA
916 #define RasValidateEntryName RasValidateEntryNameA
918 #if (WINVER >= 0x401)
919 #define RASADFUNC RASADFUNCA
920 #define RasGetSubEntryHandle RasGetSubEntryHandleA
921 #define RasConnectionNotification RasConnectionNotificationA
922 #define RasGetSubEntryProperties RasGetSubEntryPropertiesA
923 #define RasSetSubEntryProperties RasSetSubEntryPropertiesA
924 #define RasGetCredentials RasGetCredentialsA
925 #define RasSetCredentials RasSetCredentialsA
926 #define RasGetAutodialAddress RasGetAutodialAddressA
927 #define RasSetAutodialAddress RasSetAutodialAddressA
928 #define RasEnumAutodialAddressesRasEnumAutodialAddressesA
929 #define RasGetAutodialEnable RasGetAutodialEnableA
930 #define RasSetAutodialEnable RasSetAutodialEnableA
931 #define RasGetAutodialParam RasGetAutodialParamA
932 #define RasSetAutodialParam RasSetAutodialParamA
933 #endif /*(WINVER >= 0x401)*/
935 #if (WINVER >= 0x500)
936 #define RasGetEapUserData RasGetEapUserDataA
937 #define RasSetEapUserData RasSetEapUserDataA
938 #define RasGetCustomAuthData RasGetCustomAuthDataA
939 #define RasSetCustomAuthData RasSetCustomAuthDataA
940 #define RasGetEapUserIdentity RasGetEapUserIdentityA
941 #define RasFreeEapUserIdentity RasFreeEapUserIdentityA
942 #endif /* (WINVER >= 0x500) */
943 #endif /* ! UNICODE */