1 /***********************************************************************\
2 *                                 ras.d                                 *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                                                                       *
8 *                       Placed into public domain                       *
9 \***********************************************************************/
10 module win32.ras;
11 pragma(lib, "rasapi32.lib");
12 
13 private import win32.basetyps, win32.lmcons, win32.w32api, win32.windef;
14 
15 align(4):
16 
17 const RAS_MaxDeviceType = 16;
18 const RAS_MaxPhoneNumber = 128;
19 const RAS_MaxIpAddress = 15;
20 const RAS_MaxIpxAddress = 21;
21 const RAS_MaxEntryName = 256;
22 const RAS_MaxDeviceName = 128;
23 const RAS_MaxCallbackNumber = RAS_MaxPhoneNumber;
24 const RAS_MaxAreaCode = 10;
25 const RAS_MaxPadType = 32;
26 const RAS_MaxX25Address = 200;
27 const RAS_MaxFacilities = 200;
28 const RAS_MaxUserData = 200;
29 const RAS_MaxReplyMessage = 1024;
30 
31 const RDEOPT_UsePrefixSuffix           = 0x00000001;
32 const RDEOPT_PausedStates              = 0x00000002;
33 const RDEOPT_IgnoreModemSpeaker        = 0x00000004;
34 const RDEOPT_SetModemSpeaker           = 0x00000008;
35 const RDEOPT_IgnoreSoftwareCompression = 0x00000010;
36 const RDEOPT_SetSoftwareCompression    = 0x00000020;
37 const RDEOPT_DisableConnectedUI        = 0x00000040;
38 const RDEOPT_DisableReconnectUI        = 0x00000080;
39 const RDEOPT_DisableReconnect          = 0x00000100;
40 const RDEOPT_NoUser                    = 0x00000200;
41 const RDEOPT_PauseOnScript             = 0x00000400;
42 const RDEOPT_Router                    = 0x00000800;
43 
44 const REN_User = 0x00000000;
45 const REN_AllUsers = 0x00000001;
46 const VS_Default = 0;
47 const VS_PptpOnly = 1;
48 const VS_PptpFirst = 2;
49 const VS_L2tpOnly = 3;
50 const VS_L2tpFirst = 4;
51 
52 const RASDIALEVENT = "RasDialEvent";
53 const WM_RASDIALEVENT = 0xCCCD;
54 
55 const RASEO_UseCountryAndAreaCodes = 0x00000001;
56 const RASEO_SpecificIpAddr = 0x00000002;
57 const RASEO_SpecificNameServers = 0x00000004;
58 const RASEO_IpHeaderCompression = 0x00000008;
59 const RASEO_RemoteDefaultGateway = 0x00000010;
60 const RASEO_DisableLcpExtensions = 0x00000020;
61 const RASEO_TerminalBeforeDial = 0x00000040;
62 const RASEO_TerminalAfterDial = 0x00000080;
63 const RASEO_ModemLights = 0x00000100;
64 const RASEO_SwCompression = 0x00000200;
65 const RASEO_RequireEncryptedPw = 0x00000400;
66 const RASEO_RequireMsEncryptedPw = 0x00000800;
67 const RASEO_RequireDataEncryption = 0x00001000;
68 const RASEO_NetworkLogon = 0x00002000;
69 const RASEO_UseLogonCredentials = 0x00004000;
70 const RASEO_PromoteAlternates = 0x00008000;
71 const RASNP_NetBEUI = 0x00000001;
72 const RASNP_Ipx = 0x00000002;
73 const RASNP_Ip = 0x00000004;
74 const RASFP_Ppp = 0x00000001;
75 const RASFP_Slip = 0x00000002;
76 const RASFP_Ras = 0x00000004;
77 
78 const TCHAR[]
79 	RASDT_Modem = "modem",
80 	RASDT_Isdn = "isdn",
81 	RASDT_X25 = "x25",
82 	RASDT_Vpn = "vpn",
83 	RASDT_Pad = "pad",
84 	RASDT_Generic = "GENERIC",
85 	RASDT_Serial = "SERIAL",
86 	RASDT_FrameRelay = "FRAMERELAY",
87 	RASDT_Atm = "ATM",
88 	RASDT_Sonet = "SONET",
89 	RASDT_SW56 = "SW56",
90 	RASDT_Irda = "IRDA",
91 	RASDT_Parallel = "PARALLEL";
92 
93 const RASET_Phone = 1;
94 const RASET_Vpn = 2;
95 const RASET_Direct = 3;
96 const RASET_Internet = 4;
97 
98 static if (WINVER >= 0x0401) {
99 	const RASEO_SecureLocalFiles = 0x00010000;
100 	const RASCN_Connection = 0x00000001;
101 	const RASCN_Disconnection = 0x00000002;
102 	const RASCN_BandwidthAdded = 0x00000004;
103 	const RASCN_BandwidthRemoved = 0x00000008;
104 	const RASEDM_DialAll = 1;
105 	const RASEDM_DialAsNeeded = 2;
106 	const RASIDS_Disabled = 0xffffffff;
107 	const RASIDS_UseGlobalValue = 0;
108 	const RASADFLG_PositionDlg = 0x00000001;
109 	const RASCM_UserName = 0x00000001;
110 	const RASCM_Password = 0x00000002;
111 	const RASCM_Domain = 0x00000004;
112 	const RASADP_DisableConnectionQuery = 0;
113 	const RASADP_LoginSessionDisable = 1;
114 	const RASADP_SavedAddressesLimit = 2;
115 	const RASADP_FailedConnectionTimeout = 3;
116 	const RASADP_ConnectionQueryTimeout = 4;
117 }
118 static if (WINVER >= 0x0500) {
119 	const RDEOPT_CustomDial = 0x00001000;
120 	const RASLCPAP_PAP = 0xC023;
121 	const RASLCPAP_SPAP = 0xC027;
122 	const RASLCPAP_CHAP = 0xC223;
123 	const RASLCPAP_EAP = 0xC227;
124 	const RASLCPAD_CHAP_MD5 = 0x05;
125 	const RASLCPAD_CHAP_MS = 0x80;
126 	const RASLCPAD_CHAP_MSV2 = 0x81;
127 	const RASLCPO_PFC    = 0x00000001;
128 	const RASLCPO_ACFC   = 0x00000002;
129 	const RASLCPO_SSHF   = 0x00000004;
130 	const RASLCPO_DES_56 = 0x00000008;
131 	const RASLCPO_3_DES  = 0x00000010;
132 
133 	const RASCCPCA_MPPC = 0x00000006;
134 	const RASCCPCA_STAC = 0x00000005;
135 
136 	const RASCCPO_Compression      = 0x00000001;
137 	const RASCCPO_HistoryLess      = 0x00000002;
138 	const RASCCPO_Encryption56bit  = 0x00000010;
139 	const RASCCPO_Encryption40bit  = 0x00000020;
140 	const RASCCPO_Encryption128bit = 0x00000040;
141 
142 	const RASEO_RequireEAP          = 0x00020000;
143 	const RASEO_RequirePAP          = 0x00040000;
144 	const RASEO_RequireSPAP         = 0x00080000;
145 	const RASEO_Custom              = 0x00100000;
146 	const RASEO_PreviewPhoneNumber  = 0x00200000;
147 	const RASEO_SharedPhoneNumbers  = 0x00800000;
148 	const RASEO_PreviewUserPw       = 0x01000000;
149 	const RASEO_PreviewDomain       = 0x02000000;
150 	const RASEO_ShowDialingProgress = 0x04000000;
151 	const RASEO_RequireCHAP         = 0x08000000;
152 	const RASEO_RequireMsCHAP       = 0x10000000;
153 	const RASEO_RequireMsCHAP2      = 0x20000000;
154 	const RASEO_RequireW95MSCHAP    = 0x40000000;
155 	const RASEO_CustomScript        = 0x80000000;
156 
157 	const RASIPO_VJ = 0x00000001;
158 	const RCD_SingleUser = 0;
159 	const RCD_AllUsers = 0x00000001;
160 	const RCD_Eap = 0x00000002;
161 	const RASEAPF_NonInteractive = 0x00000002;
162 	const RASEAPF_Logon = 0x00000004;
163 	const RASEAPF_Preview = 0x00000008;
164 	const ET_40Bit = 1;
165 	const ET_128Bit = 2;
166 	const ET_None = 0;
167 	const ET_Require = 1;
168 	const ET_RequireMax = 2;
169 	const ET_Optional = 3;
170 }
171 
172 const RASCS_PAUSED = 0x1000;
173 const RASCS_DONE = 0x2000;
174 enum RASCONNSTATE {
175 	RASCS_OpenPort = 0,
176 	RASCS_PortOpened,
177 	RASCS_ConnectDevice,
178 	RASCS_DeviceConnected,
179 	RASCS_AllDevicesConnected,
180 	RASCS_Authenticate,
181 	RASCS_AuthNotify,
182 	RASCS_AuthRetry,
183 	RASCS_AuthCallback,
184 	RASCS_AuthChangePassword,
185 	RASCS_AuthProject,
186 	RASCS_AuthLinkSpeed,
187 	RASCS_AuthAck,
188 	RASCS_ReAuthenticate,
189 	RASCS_Authenticated,
190 	RASCS_PrepareForCallback,
191 	RASCS_WaitForModemReset,
192 	RASCS_WaitForCallback,
193 	RASCS_Projected,
194 	RASCS_StartAuthentication,
195 	RASCS_CallbackComplete,
196 	RASCS_LogonNetwork,
197 	RASCS_SubEntryConnected,
198 	RASCS_SubEntryDisconnected,
199 	RASCS_Interactive = RASCS_PAUSED,
200 	RASCS_RetryAuthentication,
201 	RASCS_CallbackSetByCaller,
202 	RASCS_PasswordExpired,
203 //	static if (WINVER >= 0x0500) {
204 		RASCS_InvokeEapUI,
205 //	}
206 	RASCS_Connected = RASCS_DONE,
207 	RASCS_Disconnected
208 }
209 alias RASCONNSTATE* LPRASCONNSTATE;
210 
211 enum RASPROJECTION {
212 	RASP_Amb =      0x10000,
213 	RASP_PppNbf =   0x803F,
214 	RASP_PppIpx =   0x802B,
215 	RASP_PppIp =    0x8021,
216 //	static if (WINVER >= 0x0500) {
217 		RASP_PppCcp =   0x80FD,
218 //	}
219 	RASP_PppLcp =   0xC021,
220 	RASP_Slip =     0x20000
221 }
222 alias RASPROJECTION* LPRASPROJECTION;
223 
224 alias HANDLE HRASCONN;
225 alias HRASCONN* LPHRASCONN;
226 
227 struct RASCONNW {
228 	DWORD dwSize;
229 	HRASCONN hrasconn;
230 	WCHAR szEntryName[RAS_MaxEntryName + 1];
231 	static if (WINVER >= 0x0400) {
232 		WCHAR szDeviceType[RAS_MaxDeviceType + 1];
233 		WCHAR szDeviceName[RAS_MaxDeviceName + 1];
234 	}
235 	static if (WINVER >= 0x0401) {
236 		WCHAR szPhonebook[MAX_PATH];
237 		DWORD dwSubEntry;
238 	}
239 	static if (WINVER >= 0x0500) {
240 		GUID guidEntry;
241 	}
242 	static if (WINVER >= 0x0501) {
243 		DWORD dwFlags;
244 		LUID luid;
245 	}
246 }
247 alias RASCONNW* LPRASCONNW;
248 
249 struct RASCONNA {
250 	DWORD dwSize;
251 	HRASCONN hrasconn;
252 	CHAR szEntryName[RAS_MaxEntryName + 1];
253 	static if (WINVER >= 0x0400) {
254 		CHAR szDeviceType[RAS_MaxDeviceType + 1];
255 		CHAR szDeviceName[RAS_MaxDeviceName + 1];
256 	}
257 	static if (WINVER >= 0x0401) {
258 		CHAR szPhonebook[MAX_PATH];
259 		DWORD dwSubEntry;
260 	}
261 	static if (WINVER >= 0x0500) {
262 		GUID guidEntry;
263 	}
264 	static if (WINVER >= 0x0501) {
265 		DWORD dwFlags;
266 		LUID luid;
267 	}
268 }
269 alias RASCONNA* LPRASCONNA;
270 
271 struct RASCONNSTATUSW {
272 	DWORD dwSize;
273 	RASCONNSTATE rasconnstate;
274 	DWORD dwError;
275 	WCHAR szDeviceType[RAS_MaxDeviceType + 1];
276 	WCHAR szDeviceName[RAS_MaxDeviceName + 1];
277 	static if (WINVER >= 0x0401) {
278 		WCHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
279 	}
280 }
281 alias RASCONNSTATUSW* LPRASCONNSTATUSW;
282 
283 struct RASCONNSTATUSA {
284 	DWORD dwSize;
285 	RASCONNSTATE rasconnstate;
286 	DWORD dwError;
287 	CHAR szDeviceType[RAS_MaxDeviceType + 1];
288 	CHAR szDeviceName[RAS_MaxDeviceName + 1];
289 	static if (WINVER >= 0x0401) {
290 		CHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
291 	}
292 }
293 alias RASCONNSTATUSA* LPRASCONNSTATUSA;
294 
295 struct RASDIALPARAMSW {
296 	DWORD dwSize;
297 	WCHAR szEntryName[RAS_MaxEntryName + 1];
298 	WCHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
299 	WCHAR szCallbackNumber[RAS_MaxCallbackNumber + 1];
300 	WCHAR szUserName[UNLEN + 1];
301 	WCHAR szPassword[PWLEN + 1];
302 	WCHAR szDomain[DNLEN + 1];
303 	static if (WINVER >= 0x0401) {
304 		DWORD dwSubEntry;
305 		ULONG_PTR dwCallbackId;
306 	}
307 }
308 alias RASDIALPARAMSW* LPRASDIALPARAMSW;
309 
310 struct RASDIALPARAMSA{
311 	DWORD dwSize;
312 	CHAR szEntryName[RAS_MaxEntryName + 1];
313 	CHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
314 	CHAR szCallbackNumber[RAS_MaxCallbackNumber + 1];
315 	CHAR szUserName[UNLEN + 1];
316 	CHAR szPassword[PWLEN + 1];
317 	CHAR szDomain[DNLEN + 1];
318 	static if (WINVER >= 0x0401) {
319 		DWORD dwSubEntry;
320 		ULONG_PTR dwCallbackId;
321 	}
322 }
323 alias RASDIALPARAMSA* LPRASDIALPARAMSA;
324 
325 static if (WINVER >= 0x0500) {
326 	struct RASEAPINFO {
327 		DWORD dwSizeofEapInfo;
328 		BYTE *pbEapInfo;
329 	}
330 }
331 
332 struct RASDIALEXTENSIONS {
333 	DWORD dwSize;
334 	DWORD dwfOptions;
335 	HWND hwndParent;
336 	ULONG_PTR reserved;
337 	static if (WINVER >= 0x0500) {
338 		ULONG_PTR reserved1;
339 		RASEAPINFO RasEapInfo;
340 	}
341 }
342 alias RASDIALEXTENSIONS* LPRASDIALEXTENSIONS;
343 
344 struct RASENTRYNAMEW {
345 	DWORD dwSize;
346 	WCHAR szEntryName[RAS_MaxEntryName + 1];
347 	static if (WINVER >= 0x0500) {
348 		DWORD dwFlags;
349 		WCHAR szPhonebookPath[MAX_PATH + 1];
350 	}
351 }
352 alias RASENTRYNAMEW* LPRASENTRYNAMEW;
353 
354 struct RASENTRYNAMEA{
355 	DWORD dwSize;
356 	CHAR szEntryName[RAS_MaxEntryName + 1];
357 	static if (WINVER >= 0x0500) {
358 		DWORD dwFlags;
359 		CHAR szPhonebookPath[MAX_PATH + 1];
360 	}
361 }
362 alias RASENTRYNAMEA* LPRASENTRYNAMEA;
363 
364 struct RASAMBW{
365 	DWORD dwSize;
366 	DWORD dwError;
367 	WCHAR szNetBiosError[NETBIOS_NAME_LEN + 1];
368 	BYTE bLana;
369 }
370 alias RASAMBW* LPRASAMBW;
371 
372 struct RASAMBA{
373 	DWORD dwSize;
374 	DWORD dwError;
375 	CHAR szNetBiosError[NETBIOS_NAME_LEN + 1];
376 	BYTE bLana;
377 }
378 alias RASAMBA* LPRASAMBA;
379 
380 struct RASPPPNBFW{
381 	DWORD dwSize;
382 	DWORD dwError;
383 	DWORD dwNetBiosError;
384 	WCHAR szNetBiosError[NETBIOS_NAME_LEN + 1];
385 	WCHAR szWorkstationName[NETBIOS_NAME_LEN + 1];
386 	BYTE bLana;
387 }
388 alias RASPPPNBFW* LPRASPPPNBFW;
389 
390 struct RASPPPNBFA{
391 	DWORD dwSize;
392 	DWORD dwError;
393 	DWORD dwNetBiosError;
394 	CHAR szNetBiosError[NETBIOS_NAME_LEN + 1];
395 	CHAR szWorkstationName[NETBIOS_NAME_LEN + 1];
396 	BYTE bLana;
397 }
398 alias RASPPPNBFA* LPRASPPPNBFA;
399 
400 struct RASPPPIPXW {
401 	DWORD dwSize;
402 	DWORD dwError;
403 	WCHAR szIpxAddress[RAS_MaxIpxAddress + 1];
404 }
405 alias RASPPPIPXW* LPRASPPPIPXW;
406 
407 struct RASPPPIPXA {
408 	DWORD dwSize;
409 	DWORD dwError;
410 	CHAR szIpxAddress[RAS_MaxIpxAddress + 1];
411 }
412 alias RASPPPIPXA* LPRASPPPIPXA;
413 
414 struct RASPPPIPW{
415 	DWORD dwSize;
416 	DWORD dwError;
417 	WCHAR szIpAddress[RAS_MaxIpAddress + 1];
418 	//#ifndef WINNT35COMPATIBLE
419 	WCHAR szServerIpAddress[RAS_MaxIpAddress + 1];
420 	//#endif
421 	static if (WINVER >= 0x0500) {
422 		DWORD dwOptions;
423 		DWORD dwServerOptions;
424 	}
425 }
426 alias RASPPPIPW* LPRASPPPIPW;
427 
428 struct RASPPPIPA{
429 	DWORD dwSize;
430 	DWORD dwError;
431 	CHAR szIpAddress[RAS_MaxIpAddress + 1];
432 	//#ifndef WINNT35COMPATIBLE
433 	CHAR szServerIpAddress[RAS_MaxIpAddress + 1];
434 	//#endif
435 	static if (WINVER >= 0x0500) {
436 		DWORD dwOptions;
437 		DWORD dwServerOptions;
438 	}
439 }
440 alias RASPPPIPA* LPRASPPPIPA;
441 
442 struct RASPPPLCPW{
443 	DWORD dwSize;
444 	BOOL fBundled;
445 	static if (WINVER >= 0x0500) {
446 		DWORD dwError;
447 		DWORD dwAuthenticationProtocol;
448 		DWORD dwAuthenticationData;
449 		DWORD dwEapTypeId;
450 		DWORD dwServerAuthenticationProtocol;
451 		DWORD dwServerAuthenticationData;
452 		DWORD dwServerEapTypeId;
453 		BOOL fMultilink;
454 		DWORD dwTerminateReason;
455 		DWORD dwServerTerminateReason;
456 		WCHAR szReplyMessage[RAS_MaxReplyMessage];
457 		DWORD dwOptions;
458 		DWORD dwServerOptions;
459 	}
460 }
461 alias RASPPPLCPW* LPRASPPPLCPW;
462 
463 struct RASPPPLCPA{
464 	DWORD dwSize;
465 	BOOL fBundled;
466 	static if (WINVER >= 0x0500) {
467 		DWORD dwError;
468 		DWORD dwAuthenticationProtocol;
469 		DWORD dwAuthenticationData;
470 		DWORD dwEapTypeId;
471 		DWORD dwServerAuthenticationProtocol;
472 		DWORD dwServerAuthenticationData;
473 		DWORD dwServerEapTypeId;
474 		BOOL fMultilink;
475 		DWORD dwTerminateReason;
476 		DWORD dwServerTerminateReason;
477 		CHAR szReplyMessage[RAS_MaxReplyMessage];
478 		DWORD dwOptions;
479 		DWORD dwServerOptions;
480 	}
481 }
482 alias RASPPPLCPA* LPRASPPPLCPA;
483 
484 struct RASSLIPW{
485 	DWORD dwSize;
486 	DWORD dwError;
487 	WCHAR szIpAddress[RAS_MaxIpAddress + 1];
488 }
489 alias RASSLIPW* LPRASSLIPW;
490 
491 struct RASSLIPA{
492 	DWORD dwSize;
493 	DWORD dwError;
494 	CHAR szIpAddress[RAS_MaxIpAddress + 1];
495 }
496 alias RASSLIPA* LPRASSLIPA;
497 
498 struct RASDEVINFOW{
499 	DWORD dwSize;
500 	WCHAR szDeviceType[RAS_MaxDeviceType + 1];
501 	WCHAR szDeviceName[RAS_MaxDeviceName + 1];
502 }
503 alias RASDEVINFOW* LPRASDEVINFOW;
504 
505 struct RASDEVINFOA{
506 	DWORD dwSize;
507 	CHAR szDeviceType[RAS_MaxDeviceType + 1];
508 	CHAR szDeviceName[RAS_MaxDeviceName + 1];
509 }
510 alias RASDEVINFOA* LPRASDEVINFOA;
511 
512 struct RASCTRYINFO {
513 	DWORD dwSize;
514 	DWORD dwCountryID;
515 	DWORD dwNextCountryID;
516 	DWORD dwCountryCode;
517 	DWORD dwCountryNameOffset;
518 }
519 alias RASCTRYINFO* LPRASCTRYINFO;
520 alias RASCTRYINFO  RASCTRYINFOW, RASCTRYINFOA;
521 alias RASCTRYINFOW* LPRASCTRYINFOW;
522 alias RASCTRYINFOA* LPRASCTRYINFOA;
523 
524 struct RASIPADDR {
525 	BYTE a;
526 	BYTE b;
527 	BYTE c;
528 	BYTE d;
529 }
530 
531 struct RASENTRYW {
532 	DWORD dwSize;
533 	DWORD dwfOptions;
534 	DWORD dwCountryID;
535 	DWORD dwCountryCode;
536 	WCHAR szAreaCode[RAS_MaxAreaCode + 1];
537 	WCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
538 	DWORD dwAlternateOffset;
539 	RASIPADDR ipaddr;
540 	RASIPADDR ipaddrDns;
541 	RASIPADDR ipaddrDnsAlt;
542 	RASIPADDR ipaddrWins;
543 	RASIPADDR ipaddrWinsAlt;
544 	DWORD dwFrameSize;
545 	DWORD dwfNetProtocols;
546 	DWORD dwFramingProtocol;
547 	WCHAR szScript[MAX_PATH];
548 	WCHAR szAutodialDll[MAX_PATH];
549 	WCHAR szAutodialFunc[MAX_PATH];
550 	WCHAR szDeviceType[RAS_MaxDeviceType + 1];
551 	WCHAR szDeviceName[RAS_MaxDeviceName + 1];
552 	WCHAR szX25PadType[RAS_MaxPadType + 1];
553 	WCHAR szX25Address[RAS_MaxX25Address + 1];
554 	WCHAR szX25Facilities[RAS_MaxFacilities + 1];
555 	WCHAR szX25UserData[RAS_MaxUserData + 1];
556 	DWORD dwChannels;
557 	DWORD dwReserved1;
558 	DWORD dwReserved2;
559 	static if (WINVER >= 0x0401) {
560 		DWORD dwSubEntries;
561 		DWORD dwDialMode;
562 		DWORD dwDialExtraPercent;
563 		DWORD dwDialExtraSampleSeconds;
564 		DWORD dwHangUpExtraPercent;
565 		DWORD dwHangUpExtraSampleSeconds;
566 		DWORD dwIdleDisconnectSeconds;
567 	}
568 	static if (WINVER >= 0x0500) {
569 		DWORD dwType;
570 		DWORD dwEncryptionType;
571 		DWORD dwCustomAuthKey;
572 		GUID guidId;
573 		WCHAR szCustomDialDll[MAX_PATH];
574 		DWORD dwVpnStrategy;
575 	}
576 }
577 alias RASENTRYW* LPRASENTRYW;
578 
579 struct RASENTRYA {
580 	DWORD dwSize;
581 	DWORD dwfOptions;
582 	DWORD dwCountryID;
583 	DWORD dwCountryCode;
584 	CHAR szAreaCode[RAS_MaxAreaCode + 1];
585 	CHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
586 	DWORD dwAlternateOffset;
587 	RASIPADDR ipaddr;
588 	RASIPADDR ipaddrDns;
589 	RASIPADDR ipaddrDnsAlt;
590 	RASIPADDR ipaddrWins;
591 	RASIPADDR ipaddrWinsAlt;
592 	DWORD dwFrameSize;
593 	DWORD dwfNetProtocols;
594 	DWORD dwFramingProtocol;
595 	CHAR szScript[MAX_PATH];
596 	CHAR szAutodialDll[MAX_PATH];
597 	CHAR szAutodialFunc[MAX_PATH];
598 	CHAR szDeviceType[RAS_MaxDeviceType + 1];
599 	CHAR szDeviceName[RAS_MaxDeviceName + 1];
600 	CHAR szX25PadType[RAS_MaxPadType + 1];
601 	CHAR szX25Address[RAS_MaxX25Address + 1];
602 	CHAR szX25Facilities[RAS_MaxFacilities + 1];
603 	CHAR szX25UserData[RAS_MaxUserData + 1];
604 	DWORD dwChannels;
605 	DWORD dwReserved1;
606 	DWORD dwReserved2;
607 	static if (WINVER >= 0x0401) {
608 		DWORD dwSubEntries;
609 		DWORD dwDialMode;
610 		DWORD dwDialExtraPercent;
611 		DWORD dwDialExtraSampleSeconds;
612 		DWORD dwHangUpExtraPercent;
613 		DWORD dwHangUpExtraSampleSeconds;
614 		DWORD dwIdleDisconnectSeconds;
615 	}
616 	static if (WINVER >= 0x0500) {
617 		DWORD dwType;
618 		DWORD dwEncryptionType;
619 		DWORD dwCustomAuthKey;
620 		GUID guidId;
621 		CHAR szCustomDialDll[MAX_PATH];
622 		DWORD dwVpnStrategy;
623 	}
624 }
625 alias RASENTRYA* LPRASENTRYA;
626 
627 
628 static if (WINVER >= 0x0401) {
629 	struct RASADPARAMS {
630 		DWORD dwSize;
631 		HWND hwndOwner;
632 		DWORD dwFlags;
633 		LONG xDlg;
634 		LONG yDlg;
635 	}
636 	alias RASADPARAMS* LPRASADPARAMS;
637 
638 	struct RASSUBENTRYW{
639 		DWORD dwSize;
640 		DWORD dwfFlags;
641 		WCHAR szDeviceType[RAS_MaxDeviceType + 1];
642 		WCHAR szDeviceName[RAS_MaxDeviceName + 1];
643 		WCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
644 		DWORD dwAlternateOffset;
645 	}
646 	alias RASSUBENTRYW* LPRASSUBENTRYW;
647 
648 	struct RASSUBENTRYA{
649 		DWORD dwSize;
650 		DWORD dwfFlags;
651 		CHAR szDeviceType[RAS_MaxDeviceType + 1];
652 		CHAR szDeviceName[RAS_MaxDeviceName + 1];
653 		CHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
654 		DWORD dwAlternateOffset;
655 	}
656 	alias RASSUBENTRYA* LPRASSUBENTRYA;
657 
658 	struct RASCREDENTIALSW{
659 		DWORD dwSize;
660 		DWORD dwMask;
661 		WCHAR szUserName[UNLEN + 1];
662 		WCHAR szPassword[PWLEN + 1];
663 		WCHAR szDomain[DNLEN + 1];
664 	}
665 	alias RASCREDENTIALSW* LPRASCREDENTIALSW;
666 
667 	struct RASCREDENTIALSA{
668 		DWORD dwSize;
669 		DWORD dwMask;
670 		CHAR szUserName[UNLEN + 1];
671 		CHAR szPassword[PWLEN + 1];
672 		CHAR szDomain[DNLEN + 1];
673 	}
674 	alias RASCREDENTIALSA* LPRASCREDENTIALSA;
675 
676 	struct RASAUTODIALENTRYW{
677 		DWORD dwSize;
678 		DWORD dwFlags;
679 		DWORD dwDialingLocation;
680 		WCHAR szEntry[RAS_MaxEntryName + 1];
681 	}
682 	alias RASAUTODIALENTRYW* LPRASAUTODIALENTRYW;
683 
684 	struct RASAUTODIALENTRYA{
685 		DWORD dwSize;
686 		DWORD dwFlags;
687 		DWORD dwDialingLocation;
688 		CHAR szEntry[RAS_MaxEntryName + 1];
689 	}
690 	alias RASAUTODIALENTRYA* LPRASAUTODIALENTRYA;
691 }
692 
693 static if (WINVER >= 0x0500) {
694 	struct RASPPPCCP{
695 		DWORD dwSize;
696 		DWORD dwError;
697 		DWORD dwCompressionAlgorithm;
698 		DWORD dwOptions;
699 		DWORD dwServerCompressionAlgorithm;
700 		DWORD dwServerOptions;
701 	}
702 	alias RASPPPCCP* LPRASPPPCCP;
703 
704 	struct RASEAPUSERIDENTITYW{
705 		WCHAR szUserName[UNLEN + 1];
706 		DWORD dwSizeofEapInfo;
707 		BYTE pbEapInfo[1];
708 	}
709 	alias RASEAPUSERIDENTITYW* LPRASEAPUSERIDENTITYW;
710 
711 	struct RASEAPUSERIDENTITYA{
712 		CHAR szUserName[UNLEN + 1];
713 		DWORD dwSizeofEapInfo;
714 		BYTE pbEapInfo[1];
715 	}
716 	alias RASEAPUSERIDENTITYA* LPRASEAPUSERIDENTITYA;
717 
718 	struct RAS_STATS{
719 		DWORD dwSize;
720 		DWORD dwBytesXmited;
721 		DWORD dwBytesRcved;
722 		DWORD dwFramesXmited;
723 		DWORD dwFramesRcved;
724 		DWORD dwCrcErr;
725 		DWORD dwTimeoutErr;
726 		DWORD dwAlignmentErr;
727 		DWORD dwHardwareOverrunErr;
728 		DWORD dwFramingErr;
729 		DWORD dwBufferOverrunErr;
730 		DWORD dwCompressionRatioIn;
731 		DWORD dwCompressionRatioOut;
732 		DWORD dwBps;
733 		DWORD dwConnectDuration;
734 	}
735 	alias RAS_STATS* PRAS_STATS;
736 }
737 
738 
739 /* UNICODE typedefs for structures*/
740 version (Unicode) {
741 	alias RASCONNW RASCONN;
742 	alias RASENTRYW RASENTRY;
743 	alias RASCONNSTATUSW RASCONNSTATUS;
744 	alias RASDIALPARAMSW RASDIALPARAMS;
745 	alias RASAMBW RASAMB;
746 	alias RASPPPNBFW RASPPPNBF;
747 	alias RASPPPIPXW RASPPPIPX;
748 	alias RASPPPIPW RASPPPIP;
749 	alias RASPPPLCPW RASPPPLCP;
750 	alias RASSLIPW RASSLIP;
751 	alias RASDEVINFOW RASDEVINFO;
752 	alias RASENTRYNAMEW RASENTRYNAME;
753 
754 	static if (WINVER >= 0x0401) {
755 		alias RASSUBENTRYW RASSUBENTRY;
756 		alias RASCREDENTIALSW RASCREDENTIALS;
757 		alias RASAUTODIALENTRYW RASAUTODIALENTRY;
758 	}
759 
760 	static if (WINVER >= 0x0500) {
761 		alias RASEAPUSERIDENTITYW RASEAPUSERIDENTITY;
762 	}
763 
764 } else { // ! defined UNICODE
765 
766 	alias RASCONNA RASCONN;
767 	alias RASENTRYA  RASENTRY;
768 	alias RASCONNSTATUSA RASCONNSTATUS;
769 	alias RASDIALPARAMSA RASDIALPARAMS;
770 	alias RASAMBA RASAMB;
771 	alias RASPPPNBFA RASPPPNBF;
772 	alias RASPPPIPXA RASPPPIPX;
773 	alias RASPPPIPA RASPPPIP;
774 	alias RASPPPLCPA RASPPPLCP;
775 	alias RASSLIPA RASSLIP;
776 	alias RASDEVINFOA  RASDEVINFO;
777 	alias RASENTRYNAMEA RASENTRYNAME;
778 
779 	static if (WINVER >= 0x0401) {
780 		alias RASSUBENTRYA RASSUBENTRY;
781 		alias RASCREDENTIALSA RASCREDENTIALS;
782 		alias RASAUTODIALENTRYA RASAUTODIALENTRY;
783 	}
784 	static if (WINVER >= 0x0500) {
785 		alias RASEAPUSERIDENTITYA RASEAPUSERIDENTITY;
786 	}
787 }// ! UNICODE
788 
789 
790 alias RASCONN* LPRASCONN;
791 alias RASENTRY* LPRASENTRY;
792 alias RASCONNSTATUS* LPRASCONNSTATUS;
793 alias RASDIALPARAMS* LPRASDIALPARAMS;
794 alias RASAMB* LPRASAM;
795 alias RASPPPNBF* LPRASPPPNBF;
796 alias RASPPPIPX* LPRASPPPIPX;
797 alias RASPPPIP* LPRASPPPIP;
798 alias RASPPPLCP* LPRASPPPLCP;
799 alias RASSLIP* LPRASSLIP;
800 alias RASDEVINFO* LPRASDEVINFO;
801 alias RASENTRYNAME* LPRASENTRYNAME;
802 
803 static if (WINVER >= 0x0401) {
804 	alias RASSUBENTRY* LPRASSUBENTRY;
805 	alias RASCREDENTIALS* LPRASCREDENTIALS;
806 	alias RASAUTODIALENTRY* LPRASAUTODIALENTRY;
807 }
808 static if (WINVER >= 0x0500) {
809 	alias RASEAPUSERIDENTITY* LPRASEAPUSERIDENTITY;
810 }
811 
812 /* Callback prototypes */
813 deprecated {
814 	alias BOOL function (HWND, LPSTR, DWORD, LPDWORD) ORASADFUNC;
815 }
816 
817 alias void function (UINT, RASCONNSTATE, DWORD) RASDIALFUNC;
818 alias void function(HRASCONN, UINT, RASCONNSTATE, DWORD,
819 DWORD) RASDIALFUNC1;
820 alias DWORD function (ULONG_PTR, DWORD, HRASCONN, UINT,
821 RASCONNSTATE, DWORD, DWORD) RASDIALFUNC2;
822 
823 /* External functions */
824 DWORD RasDialA (LPRASDIALEXTENSIONS, LPCSTR, LPRASDIALPARAMSA,
825 DWORD, LPVOID, LPHRASCONN);
826 DWORD RasDialW (LPRASDIALEXTENSIONS, LPCWSTR, LPRASDIALPARAMSW,
827 DWORD, LPVOID, LPHRASCONN);
828 DWORD RasEnumConnectionsA (LPRASCONNA, LPDWORD, LPDWORD);
829 DWORD RasEnumConnectionsW (LPRASCONNW, LPDWORD, LPDWORD);
830 DWORD RasEnumEntriesA (LPCSTR, LPCSTR, LPRASENTRYNAMEA, LPDWORD,
831 LPDWORD);
832 DWORD RasEnumEntriesW (LPCWSTR, LPCWSTR, LPRASENTRYNAMEW, LPDWORD,
833 LPDWORD);
834 DWORD RasGetConnectStatusA (HRASCONN, LPRASCONNSTATUSA);
835 DWORD RasGetConnectStatusW (HRASCONN, LPRASCONNSTATUSW);
836 DWORD RasGetErrorStringA (UINT, LPSTR, DWORD);
837 DWORD RasGetErrorStringW (UINT, LPWSTR, DWORD);
838 DWORD RasHangUpA (HRASCONN);
839 DWORD RasHangUpW (HRASCONN);
840 DWORD RasGetProjectionInfoA (HRASCONN, RASPROJECTION, LPVOID,
841 LPDWORD);
842 DWORD RasGetProjectionInfoW (HRASCONN, RASPROJECTION, LPVOID,
843 LPDWORD);
844 DWORD RasCreatePhonebookEntryA (HWND, LPCSTR);
845 DWORD RasCreatePhonebookEntryW (HWND, LPCWSTR);
846 DWORD RasEditPhonebookEntryA (HWND, LPCSTR, LPCSTR);
847 DWORD RasEditPhonebookEntryW (HWND, LPCWSTR, LPCWSTR);
848 DWORD RasSetEntryDialParamsA (LPCSTR, LPRASDIALPARAMSA, BOOL);
849 DWORD RasSetEntryDialParamsW (LPCWSTR, LPRASDIALPARAMSW, BOOL);
850 DWORD RasGetEntryDialParamsA (LPCSTR, LPRASDIALPARAMSA, LPBOOL);
851 DWORD RasGetEntryDialParamsW (LPCWSTR, LPRASDIALPARAMSW, LPBOOL);
852 DWORD RasEnumDevicesA (LPRASDEVINFOA, LPDWORD, LPDWORD);
853 DWORD RasEnumDevicesW (LPRASDEVINFOW, LPDWORD, LPDWORD);
854 DWORD RasGetCountryInfoA (LPRASCTRYINFOA, LPDWORD);
855 DWORD RasGetCountryInfoW (LPRASCTRYINFOW, LPDWORD);
856 DWORD RasGetEntryPropertiesA (LPCSTR, LPCSTR, LPRASENTRYA, LPDWORD,
857 LPBYTE, LPDWORD);
858 DWORD RasGetEntryPropertiesW (LPCWSTR, LPCWSTR, LPRASENTRYW,
859 LPDWORD, LPBYTE, LPDWORD);
860 DWORD RasSetEntryPropertiesA (LPCSTR, LPCSTR, LPRASENTRYA, DWORD,
861 LPBYTE, DWORD);
862 DWORD RasSetEntryPropertiesW (LPCWSTR, LPCWSTR, LPRASENTRYW, DWORD,
863 LPBYTE, DWORD);
864 DWORD RasRenameEntryA (LPCSTR, LPCSTR, LPCSTR);
865 DWORD RasRenameEntryW (LPCWSTR, LPCWSTR, LPCWSTR);
866 DWORD RasDeleteEntryA (LPCSTR, LPCSTR);
867 DWORD RasDeleteEntryW (LPCWSTR, LPCWSTR);
868 DWORD RasValidateEntryNameA (LPCSTR, LPCSTR);
869 DWORD RasValidateEntryNameW (LPCWSTR, LPCWSTR);
870 
871 static if (WINVER >= 0x0401) {
872 	alias BOOL function (LPSTR, LPSTR, LPRASADPARAMS, LPDWORD) RASADFUNCA;
873 	alias BOOL function (LPWSTR, LPWSTR, LPRASADPARAMS, LPDWORD) RASADFUNCW;
874 
875 	DWORD RasGetSubEntryHandleA (HRASCONN, DWORD, LPHRASCONN);
876 	DWORD RasGetSubEntryHandleW (HRASCONN, DWORD, LPHRASCONN);
877 	DWORD RasGetCredentialsA (LPCSTR, LPCSTR, LPRASCREDENTIALSA);
878 	DWORD RasGetCredentialsW (LPCWSTR, LPCWSTR, LPRASCREDENTIALSW);
879 	DWORD RasSetCredentialsA (LPCSTR, LPCSTR, LPRASCREDENTIALSA, BOOL);
880 	DWORD RasSetCredentialsW (LPCWSTR, LPCWSTR, LPRASCREDENTIALSW, BOOL);
881 	DWORD RasConnectionNotificationA (HRASCONN, HANDLE, DWORD);
882 	DWORD RasConnectionNotificationW (HRASCONN, HANDLE, DWORD);
883 	DWORD RasGetSubEntryPropertiesA (LPCSTR, LPCSTR, DWORD,
884 	LPRASSUBENTRYA, LPDWORD, LPBYTE, LPDWORD);
885 	DWORD RasGetSubEntryPropertiesW (LPCWSTR, LPCWSTR, DWORD,
886 	LPRASSUBENTRYW, LPDWORD, LPBYTE, LPDWORD);
887 	DWORD RasSetSubEntryPropertiesA (LPCSTR, LPCSTR, DWORD,
888 	LPRASSUBENTRYA, DWORD, LPBYTE, DWORD);
889 	DWORD RasSetSubEntryPropertiesW (LPCWSTR, LPCWSTR, DWORD,
890 	LPRASSUBENTRYW, DWORD, LPBYTE, DWORD);
891 	DWORD RasGetAutodialAddressA (LPCSTR, LPDWORD, LPRASAUTODIALENTRYA,
892 	LPDWORD, LPDWORD);
893 	DWORD RasGetAutodialAddressW (LPCWSTR, LPDWORD,
894 	LPRASAUTODIALENTRYW, LPDWORD, LPDWORD);
895 	DWORD RasSetAutodialAddressA (LPCSTR, DWORD, LPRASAUTODIALENTRYA,
896 	DWORD, DWORD);
897 	DWORD RasSetAutodialAddressW (LPCWSTR, DWORD, LPRASAUTODIALENTRYW,
898 	DWORD, DWORD);
899 	DWORD RasEnumAutodialAddressesA (LPSTR *, LPDWORD, LPDWORD);
900 	DWORD RasEnumAutodialAddressesW (LPWSTR *, LPDWORD, LPDWORD);
901 	DWORD RasGetAutodialEnableA (DWORD, LPBOOL);
902 	DWORD RasGetAutodialEnableW (DWORD, LPBOOL);
903 	DWORD RasSetAutodialEnableA (DWORD, BOOL);
904 	DWORD RasSetAutodialEnableW (DWORD, BOOL);
905 	DWORD RasGetAutodialParamA (DWORD, LPVOID, LPDWORD);
906 	DWORD RasGetAutodialParamW (DWORD, LPVOID, LPDWORD);
907 	DWORD RasSetAutodialParamA (DWORD, LPVOID, DWORD);
908 	DWORD RasSetAutodialParamW (DWORD, LPVOID, DWORD);
909 }
910 
911 static if (WINVER >= 0x0500) {
912 	alias DWORD function (HRASCONN) RasCustomHangUpFn;
913 	alias DWORD function (LPCTSTR,	LPCTSTR, DWORD) RasCustomDeleteEntryNotifyFn;
914 	alias DWORD function (HINSTANCE, LPRASDIALEXTENSIONS,
915 	LPCTSTR, LPRASDIALPARAMS, DWORD, LPVOID, LPHRASCONN, DWORD) RasCustomDialFn;
916 
917 	DWORD RasInvokeEapUI (HRASCONN, DWORD, LPRASDIALEXTENSIONS, HWND);
918 	DWORD RasGetLinkStatistics (HRASCONN, DWORD, RAS_STATS*);
919 	DWORD RasGetConnectionStatistics (HRASCONN, RAS_STATS*);
920 	DWORD RasClearLinkStatistics (HRASCONN, DWORD);
921 	DWORD RasClearConnectionStatistics (HRASCONN);
922 	DWORD RasGetEapUserDataA (HANDLE, LPCSTR, LPCSTR, BYTE*, DWORD*);
923 	DWORD RasGetEapUserDataW (HANDLE, LPCWSTR, LPCWSTR, BYTE*, DWORD*);
924 	DWORD RasSetEapUserDataA (HANDLE, LPCSTR, LPCSTR, BYTE*, DWORD);
925 	DWORD RasSetEapUserDataW (HANDLE, LPCWSTR, LPCWSTR, BYTE*, DWORD);
926 	DWORD RasGetCustomAuthDataA (LPCSTR,	LPCSTR,	BYTE*,	DWORD*);
927 	DWORD RasGetCustomAuthDataW (LPCWSTR, LPCWSTR, BYTE*, DWORD*);
928 	DWORD RasSetCustomAuthDataA (LPCSTR,	LPCSTR,	BYTE*,	DWORD);
929 	DWORD RasSetCustomAuthDataW (LPCWSTR, LPCWSTR, BYTE*, DWORD);
930 	DWORD RasGetEapUserIdentityW (LPCWSTR, LPCWSTR, DWORD, HWND, LPRASEAPUSERIDENTITYW*);
931 	DWORD RasGetEapUserIdentityA (LPCSTR, LPCSTR, DWORD, HWND, LPRASEAPUSERIDENTITYA*);
932 	void RasFreeEapUserIdentityW (LPRASEAPUSERIDENTITYW);
933 	void RasFreeEapUserIdentityA (LPRASEAPUSERIDENTITYA);
934 }
935 
936 
937 /* UNICODE defines for functions */
938 version(Unicode) {
939 	alias RasDialW RasDial;
940 	alias RasEnumConnectionsW RasEnumConnections;
941 	alias RasEnumEntriesW RasEnumEntries;
942 	alias RasGetConnectStatusW RasGetConnectStatus;
943 	alias RasGetErrorStringW RasGetErrorString;
944 	alias RasHangUpW RasHangUp;
945 	alias RasGetProjectionInfoW RasGetProjectionInfo;
946 	alias RasCreatePhonebookEntryW RasCreatePhonebookEntry;
947 	alias RasEditPhonebookEntryW RasEditPhonebookEntry;
948 	alias RasSetEntryDialParamsW RasSetEntryDialParams;
949 	alias RasGetEntryDialParamsW RasGetEntryDialParams;
950 	alias RasEnumDevicesW RasEnumDevices;
951 	alias RasGetCountryInfoW RasGetCountryInfo;
952 	alias RasGetEntryPropertiesW RasGetEntryProperties;
953 	alias RasSetEntryPropertiesW RasSetEntryProperties;
954 	alias RasRenameEntryW RasRenameEntry;
955 	alias RasDeleteEntryW RasDeleteEntry;
956 	alias RasValidateEntryNameW RasValidateEntryName;
957 
958 	static if (WINVER >= 0x0401) {
959 		alias RASADFUNCW RASADFUNC;
960 		alias RasGetSubEntryHandleW RasGetSubEntryHandle;
961 		alias RasConnectionNotificationW RasConnectionNotification;
962 		alias RasGetSubEntryPropertiesW RasGetSubEntryProperties;
963 		alias RasSetSubEntryPropertiesW RasSetSubEntryProperties;
964 		alias RasGetCredentialsW RasGetCredentials;
965 		alias RasSetCredentialsW RasSetCredentials;
966 		alias RasGetAutodialAddressW RasGetAutodialAddress;
967 		alias RasSetAutodialAddressW RasSetAutodialAddress;
968 		alias RasEnumAutodialAddressesW RasEnumAutodialAddresses;
969 		alias RasGetAutodialEnableW RasGetAutodialEnable;
970 		alias RasSetAutodialEnableW RasSetAutodialEnable;
971 		alias RasGetAutodialParamW RasGetAutodialParam;
972 		alias RasSetAutodialParamW RasSetAutodialParam;
973 	}
974 
975 	static if (WINVER >= 0x0500) {
976 		alias RasGetEapUserDataW RasGetEapUserData;
977 		alias RasSetEapUserDataW RasSetEapUserData;
978 		alias RasGetCustomAuthDataW RasGetCustomAuthData;
979 		alias RasSetCustomAuthDataW RasSetCustomAuthData;
980 		alias RasGetEapUserIdentityW RasGetEapUserIdentity;
981 		alias RasFreeEapUserIdentityW RasFreeEapUserIdentity;
982 	}
983 
984 } else { // ! defined UNICODE
985 	alias RasDialA RasDial;
986 	alias RasEnumConnectionsA RasEnumConnections;
987 	alias RasEnumEntriesA RasEnumEntries;
988 	alias RasGetConnectStatusA RasGetConnectStatus;
989 	alias RasGetErrorStringA RasGetErrorString;
990 	alias RasHangUpA RasHangUp;
991 	alias RasGetProjectionInfoA RasGetProjectionInfo;
992 	alias RasCreatePhonebookEntryA RasCreatePhonebookEntry;
993 	alias RasEditPhonebookEntryA RasEditPhonebookEntry;
994 	alias RasSetEntryDialParamsA RasSetEntryDialParams;
995 	alias RasGetEntryDialParamsA RasGetEntryDialParams;
996 	alias RasEnumDevicesA RasEnumDevices;
997 	alias RasGetCountryInfoA RasGetCountryInfo;
998 	alias RasGetEntryPropertiesA RasGetEntryProperties;
999 	alias RasSetEntryPropertiesA RasSetEntryProperties;
1000 	alias RasRenameEntryA RasRenameEntry;
1001 	alias RasDeleteEntryA RasDeleteEntry;
1002 	alias RasValidateEntryNameA RasValidateEntryName;
1003 
1004 	static if (WINVER >= 0x0401) {
1005 		alias RASADFUNCA RASADFUNC;
1006 		alias RasGetSubEntryHandleA RasGetSubEntryHandle;
1007 		alias RasConnectionNotificationA RasConnectionNotification;
1008 		alias RasGetSubEntryPropertiesA RasGetSubEntryProperties;
1009 		alias RasSetSubEntryPropertiesA RasSetSubEntryProperties;
1010 		alias RasGetCredentialsA RasGetCredentials;
1011 		alias RasSetCredentialsA RasSetCredentials;
1012 		alias RasGetAutodialAddressA RasGetAutodialAddress;
1013 		alias RasSetAutodialAddressA RasSetAutodialAddress;
1014 		alias RasEnumAutodialAddressesA RasEnumAutodialAddresses;
1015 		alias RasGetAutodialEnableA RasGetAutodialEnable;
1016 		alias RasSetAutodialEnableA RasSetAutodialEnable;
1017 		alias RasGetAutodialParamA RasGetAutodialParam;
1018 		alias RasSetAutodialParamA RasSetAutodialParam;
1019 	}
1020 
1021 	static if (WINVER >= 0x0500) {
1022 		alias RasGetEapUserDataA RasGetEapUserData;
1023 		alias RasSetEapUserDataA RasSetEapUserData;
1024 		alias RasGetCustomAuthDataA RasGetCustomAuthData;
1025 		alias RasSetCustomAuthDataA RasSetCustomAuthData;
1026 		alias RasGetEapUserIdentityA RasGetEapUserIdentity;
1027 		alias RasFreeEapUserIdentityA RasFreeEapUserIdentity;
1028 	}
1029 } //#endif // ! UNICODE