Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1297 lines
34 KiB

  1. /* Copyright (c) 1992-1996, Microsoft Corporation, all rights reserved
  2. **
  3. ** ras.h
  4. ** Remote Access external API
  5. ** Public header for external API clients
  6. **
  7. ** WINVER values in this file:
  8. ** WINVER < 0x400 = Windows NT 3.5, Windows NT 3.51
  9. ** WINVER = 0x400 = Windows 95, Windows NT SUR (default)
  10. ** WINVER > 0x400 = Windows NT SUR enhancements
  11. */
  12. #ifndef _RAS_H_
  13. #define _RAS_H_
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #ifndef UNLEN
  18. #include <lmcons.h>
  19. #endif
  20. #include <pshpack4.h>
  21. #define RAS_MaxDeviceType 16
  22. #define RAS_MaxPhoneNumber 128
  23. #define RAS_MaxIpAddress 15
  24. #define RAS_MaxIpxAddress 21
  25. #if (WINVER >= 0x400)
  26. #define RAS_MaxEntryName 256
  27. #define RAS_MaxDeviceName 128
  28. #define RAS_MaxCallbackNumber RAS_MaxPhoneNumber
  29. #else
  30. #define RAS_MaxEntryName 20
  31. #define RAS_MaxDeviceName 32
  32. #define RAS_MaxCallbackNumber 48
  33. #endif
  34. #define RAS_MaxAreaCode 10
  35. #define RAS_MaxPadType 32
  36. #define RAS_MaxX25Address 200
  37. #define RAS_MaxFacilities 200
  38. #define RAS_MaxUserData 200
  39. DECLARE_HANDLE( HRASCONN );
  40. #define LPHRASCONN HRASCONN*
  41. /* Identifies an active RAS connection. (See RasEnumConnections)
  42. */
  43. #define RASCONNW struct tagRASCONNW
  44. RASCONNW
  45. {
  46. DWORD dwSize;
  47. HRASCONN hrasconn;
  48. WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
  49. #if (WINVER >= 0x400)
  50. WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  51. WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  52. #endif
  53. #if (WINVER >= 0x401)
  54. WCHAR szPhonebook [ MAX_PATH ];
  55. DWORD dwSubEntry;
  56. #endif
  57. };
  58. #define RASCONNA struct tagRASCONNA
  59. RASCONNA
  60. {
  61. DWORD dwSize;
  62. HRASCONN hrasconn;
  63. CHAR szEntryName[ RAS_MaxEntryName + 1 ];
  64. #if (WINVER >= 0x400)
  65. CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  66. CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  67. #endif
  68. #if (WINVER >= 0x401)
  69. CHAR szPhonebook [ MAX_PATH ];
  70. DWORD dwSubEntry;
  71. #endif
  72. };
  73. #ifdef UNICODE
  74. #define RASCONN RASCONNW
  75. #else
  76. #define RASCONN RASCONNA
  77. #endif
  78. #define LPRASCONNW RASCONNW*
  79. #define LPRASCONNA RASCONNA*
  80. #define LPRASCONN RASCONN*
  81. /* Enumerates intermediate states to a connection. (See RasDial)
  82. */
  83. #define RASCS_PAUSED 0x1000
  84. #define RASCS_DONE 0x2000
  85. #define RASCONNSTATE enum tagRASCONNSTATE
  86. RASCONNSTATE
  87. {
  88. RASCS_OpenPort = 0,
  89. RASCS_PortOpened,
  90. RASCS_ConnectDevice,
  91. RASCS_DeviceConnected,
  92. RASCS_AllDevicesConnected,
  93. RASCS_Authenticate,
  94. RASCS_AuthNotify,
  95. RASCS_AuthRetry,
  96. RASCS_AuthCallback,
  97. RASCS_AuthChangePassword,
  98. RASCS_AuthProject,
  99. RASCS_AuthLinkSpeed,
  100. RASCS_AuthAck,
  101. RASCS_ReAuthenticate,
  102. RASCS_Authenticated,
  103. RASCS_PrepareForCallback,
  104. RASCS_WaitForModemReset,
  105. RASCS_WaitForCallback,
  106. RASCS_Projected,
  107. #if (WINVER >= 0x400)
  108. RASCS_StartAuthentication,
  109. RASCS_CallbackComplete,
  110. RASCS_LogonNetwork,
  111. #endif
  112. RASCS_SubEntryConnected,
  113. RASCS_SubEntryDisconnected,
  114. RASCS_Interactive = RASCS_PAUSED,
  115. RASCS_RetryAuthentication,
  116. RASCS_CallbackSetByCaller,
  117. RASCS_PasswordExpired,
  118. RASCS_Connected = RASCS_DONE,
  119. RASCS_Disconnected
  120. };
  121. #define LPRASCONNSTATE RASCONNSTATE*
  122. /* Describes the status of a RAS connection. (See RasConnectionStatus)
  123. */
  124. #define RASCONNSTATUSW struct tagRASCONNSTATUSW
  125. RASCONNSTATUSW
  126. {
  127. DWORD dwSize;
  128. RASCONNSTATE rasconnstate;
  129. DWORD dwError;
  130. WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  131. WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  132. #if (WINVER >= 0x401)
  133. WCHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  134. #endif
  135. };
  136. #define RASCONNSTATUSA struct tagRASCONNSTATUSA
  137. RASCONNSTATUSA
  138. {
  139. DWORD dwSize;
  140. RASCONNSTATE rasconnstate;
  141. DWORD dwError;
  142. CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  143. CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  144. #if (WINVER >= 0x401)
  145. CHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  146. #endif
  147. };
  148. #ifdef UNICODE
  149. #define RASCONNSTATUS RASCONNSTATUSW
  150. #else
  151. #define RASCONNSTATUS RASCONNSTATUSA
  152. #endif
  153. #define LPRASCONNSTATUSW RASCONNSTATUSW*
  154. #define LPRASCONNSTATUSA RASCONNSTATUSA*
  155. #define LPRASCONNSTATUS RASCONNSTATUS*
  156. /* Describes connection establishment parameters. (See RasDial)
  157. */
  158. #define RASDIALPARAMSW struct tagRASDIALPARAMSW
  159. RASDIALPARAMSW
  160. {
  161. DWORD dwSize;
  162. WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
  163. WCHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  164. WCHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
  165. WCHAR szUserName[ UNLEN + 1 ];
  166. WCHAR szPassword[ PWLEN + 1 ];
  167. WCHAR szDomain[ DNLEN + 1 ];
  168. #if (WINVER >= 0x401)
  169. DWORD dwSubEntry;
  170. DWORD dwCallbackId;
  171. #endif
  172. };
  173. #define RASDIALPARAMSA struct tagRASDIALPARAMSA
  174. RASDIALPARAMSA
  175. {
  176. DWORD dwSize;
  177. CHAR szEntryName[ RAS_MaxEntryName + 1 ];
  178. CHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  179. CHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
  180. CHAR szUserName[ UNLEN + 1 ];
  181. CHAR szPassword[ PWLEN + 1 ];
  182. CHAR szDomain[ DNLEN + 1 ];
  183. #if (WINVER >= 0x401)
  184. DWORD dwSubEntry;
  185. DWORD dwCallbackId;
  186. #endif
  187. };
  188. #ifdef UNICODE
  189. #define RASDIALPARAMS RASDIALPARAMSW
  190. #else
  191. #define RASDIALPARAMS RASDIALPARAMSA
  192. #endif
  193. #define LPRASDIALPARAMSW RASDIALPARAMSW*
  194. #define LPRASDIALPARAMSA RASDIALPARAMSA*
  195. #define LPRASDIALPARAMS RASDIALPARAMS*
  196. /* Describes extended connection establishment options. (See RasDial)
  197. */
  198. #define RASDIALEXTENSIONS struct tagRASDIALEXTENSIONS
  199. RASDIALEXTENSIONS
  200. {
  201. DWORD dwSize;
  202. DWORD dwfOptions;
  203. HWND hwndParent;
  204. DWORD reserved;
  205. };
  206. #define LPRASDIALEXTENSIONS RASDIALEXTENSIONS*
  207. /* 'dwfOptions' bit flags.
  208. */
  209. #define RDEOPT_UsePrefixSuffix 0x00000001
  210. #define RDEOPT_PausedStates 0x00000002
  211. #define RDEOPT_IgnoreModemSpeaker 0x00000004
  212. #define RDEOPT_SetModemSpeaker 0x00000008
  213. #define RDEOPT_IgnoreSoftwareCompression 0x00000010
  214. #define RDEOPT_SetSoftwareCompression 0x00000020
  215. #define RDEOPT_DisableConnectedUI 0x00000040
  216. #define RDEOPT_DisableReconnectUI 0x00000080
  217. #define RDEOPT_DisableReconnect 0x00000100
  218. #define RDEOPT_NoUser 0x00000200
  219. #define RDEOPT_PauseOnScript 0x00000400
  220. /* Describes an enumerated RAS phone book entry name. (See RasEntryEnum)
  221. */
  222. #define RASENTRYNAMEW struct tagRASENTRYNAMEW
  223. RASENTRYNAMEW
  224. {
  225. DWORD dwSize;
  226. WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
  227. };
  228. #define RASENTRYNAMEA struct tagRASENTRYNAMEA
  229. RASENTRYNAMEA
  230. {
  231. DWORD dwSize;
  232. CHAR szEntryName[ RAS_MaxEntryName + 1 ];
  233. };
  234. #ifdef UNICODE
  235. #define RASENTRYNAME RASENTRYNAMEW
  236. #else
  237. #define RASENTRYNAME RASENTRYNAMEA
  238. #endif
  239. #define LPRASENTRYNAMEW RASENTRYNAMEW*
  240. #define LPRASENTRYNAMEA RASENTRYNAMEA*
  241. #define LPRASENTRYNAME RASENTRYNAME*
  242. /* Protocol code to projection data structure mapping.
  243. */
  244. #define RASPROJECTION enum tagRASPROJECTION
  245. RASPROJECTION
  246. {
  247. RASP_Amb = 0x10000,
  248. RASP_PppNbf = 0x803F,
  249. RASP_PppIpx = 0x802B,
  250. RASP_PppIp = 0x8021,
  251. #if (WINVER >= 0x40A)
  252. RASP_PppCcp = 0x80FD,
  253. #endif
  254. RASP_PppLcp = 0xC021,
  255. RASP_Slip = 0x20000
  256. };
  257. #define LPRASPROJECTION RASPROJECTION*
  258. /* Describes the result of a RAS AMB (Authentication Message Block)
  259. ** projection. This protocol is used with NT 3.1 and OS/2 1.3 downlevel
  260. ** RAS servers.
  261. */
  262. #define RASAMBW struct tagRASAMBW
  263. RASAMBW
  264. {
  265. DWORD dwSize;
  266. DWORD dwError;
  267. WCHAR szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
  268. BYTE bLana;
  269. };
  270. #define RASAMBA struct tagRASAMBA
  271. RASAMBA
  272. {
  273. DWORD dwSize;
  274. DWORD dwError;
  275. CHAR szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
  276. BYTE bLana;
  277. };
  278. #ifdef UNICODE
  279. #define RASAMB RASAMBW
  280. #else
  281. #define RASAMB RASAMBA
  282. #endif
  283. #define LPRASAMBW RASAMBW*
  284. #define LPRASAMBA RASAMBA*
  285. #define LPRASAMB RASAMB*
  286. /* Describes the result of a PPP NBF (NetBEUI) projection.
  287. */
  288. #define RASPPPNBFW struct tagRASPPPNBFW
  289. RASPPPNBFW
  290. {
  291. DWORD dwSize;
  292. DWORD dwError;
  293. DWORD dwNetBiosError;
  294. WCHAR szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
  295. WCHAR szWorkstationName[ NETBIOS_NAME_LEN + 1 ];
  296. BYTE bLana;
  297. };
  298. #define RASPPPNBFA struct tagRASPPPNBFA
  299. RASPPPNBFA
  300. {
  301. DWORD dwSize;
  302. DWORD dwError;
  303. DWORD dwNetBiosError;
  304. CHAR szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
  305. CHAR szWorkstationName[ NETBIOS_NAME_LEN + 1 ];
  306. BYTE bLana;
  307. };
  308. #ifdef UNICODE
  309. #define RASPPPNBF RASPPPNBFW
  310. #else
  311. #define RASPPPNBF RASPPPNBFA
  312. #endif
  313. #define LPRASPPPNBFW RASPPPNBFW*
  314. #define LPRASPPPNBFA RASPPPNBFA*
  315. #define LPRASPPPNBF RASPPPNBF*
  316. /* Describes the results of a PPP IPX (Internetwork Packet Exchange)
  317. ** projection.
  318. */
  319. #define RASPPPIPXW struct tagRASIPXW
  320. RASPPPIPXW
  321. {
  322. DWORD dwSize;
  323. DWORD dwError;
  324. WCHAR szIpxAddress[ RAS_MaxIpxAddress + 1 ];
  325. };
  326. #define RASPPPIPXA struct tagRASPPPIPXA
  327. RASPPPIPXA
  328. {
  329. DWORD dwSize;
  330. DWORD dwError;
  331. CHAR szIpxAddress[ RAS_MaxIpxAddress + 1 ];
  332. };
  333. #ifdef UNICODE
  334. #define RASPPPIPX RASPPPIPXW
  335. #else
  336. #define RASPPPIPX RASPPPIPXA
  337. #endif
  338. #define LPRASPPPIPXW RASPPPIPXW*
  339. #define LPRASPPPIPXA RASPPPIPXA*
  340. #define LPRASPPPIPX RASPPPIPX*
  341. /* Describes the results of a PPP IP (Internet) projection.
  342. */
  343. #define RASPPPIPW struct tagRASPPPIPW
  344. RASPPPIPW
  345. {
  346. DWORD dwSize;
  347. DWORD dwError;
  348. WCHAR szIpAddress[ RAS_MaxIpAddress + 1 ];
  349. #ifndef WINNT35COMPATIBLE
  350. /* This field was added between Windows NT 3.51 beta and Windows NT 3.51
  351. ** final, and between Windows 95 M8 beta and Windows 95 final. If you do
  352. ** not require the server address and wish to retrieve PPP IP information
  353. ** from Windows NT 3.5 or early Windows NT 3.51 betas, or on early Windows
  354. ** 95 betas, define WINNT35COMPATIBLE.
  355. **
  356. ** The server IP address is not provided by all PPP implementations,
  357. ** though Windows NT server's do provide it.
  358. */
  359. WCHAR szServerIpAddress[ RAS_MaxIpAddress + 1 ];
  360. #endif
  361. };
  362. #define RASPPPIPA struct tagRASPPPIPA
  363. RASPPPIPA
  364. {
  365. DWORD dwSize;
  366. DWORD dwError;
  367. CHAR szIpAddress[ RAS_MaxIpAddress + 1 ];
  368. #ifndef WINNT35COMPATIBLE
  369. /* See RASPPPIPW comment.
  370. */
  371. CHAR szServerIpAddress[ RAS_MaxIpAddress + 1 ];
  372. #endif
  373. };
  374. #ifdef UNICODE
  375. #define RASPPPIP RASPPPIPW
  376. #else
  377. #define RASPPPIP RASPPPIPA
  378. #endif
  379. #define LPRASPPPIPW RASPPPIPW*
  380. #define LPRASPPPIPA RASPPPIPA*
  381. #define LPRASPPPIP RASPPPIP*
  382. #if (WINVER >= 0x40A)
  383. /* Describes the results of a PPP CCP (Compression Control Protocol) projection.
  384. */
  385. /* RASPPPCCP 'dwCompressionAlgorithm' values.
  386. */
  387. #define RASCCPCA_MPPC 0x00000012
  388. #define RASCCPCA_STAC 0x00000011
  389. /* RASPPPCCP 'dwOptions' values.
  390. */
  391. #define RASCCPO_Compression 0x00000001
  392. #define RASCCPO_Encryption1 0x00000010
  393. #define RASCCPO_Encryption2 0x00000020
  394. #define RASCCPO_Encryption3 0x00000040
  395. #define RASPPPCCPW struct tagRASCCPW
  396. RASPPPCCPW
  397. {
  398. DWORD dwSize;
  399. DWORD dwError;
  400. DWORD dwCompressionAlgorithm;
  401. DWORD dwOptions;
  402. DWORD dwServerCompressionAlgorithm;
  403. DWORD dwServerOptions;
  404. };
  405. #define RASPPPCCPA struct tagRASPPPCCPA
  406. RASPPPCCPA
  407. {
  408. DWORD dwSize;
  409. DWORD dwError;
  410. DWORD dwCompressionAlgorithm;
  411. DWORD dwOptions;
  412. DWORD dwServerCompressionAlgorithm;
  413. DWORD dwServerOptions;
  414. };
  415. #ifdef UNICODE
  416. #define RASPPPCCP RASPPPCCPW
  417. #else
  418. #define RASPPPCCP RASPPPCCPA
  419. #endif
  420. #define LPRASPPPCCPW RASPPPCCPW*
  421. #define LPRASPPPCCPA RASPPPCCPA*
  422. #define LPRASPPPCCP RASPPPCCP*
  423. /* Describes the results of a PPP LCP (Link Control Protocol) projection.
  424. */
  425. /* RASPPPLCP 'dwAuthenticatonProtocol' values.
  426. */
  427. #define RASLCPAP_PAP 0xC023
  428. #define RASLCPAP_SPAP 0xC027
  429. #define RASLCPAP_SPAP_OLD 0xC123
  430. #define RASLCPAP_CHAP 0xC223
  431. #define RASLCPAP_EAP 0xC227
  432. /* RASPPPLCP 'dwAuthenticatonData' values.
  433. */
  434. #define RASLCPAD_CHAP_MD5 0x05
  435. #define RASLCPAD_CHAP_MS 0x80
  436. #define RASPPPLCPW struct tagRASLCPW
  437. RASPPPLCPW
  438. {
  439. DWORD dwSize;
  440. DWORD dwError;
  441. DWORD dwAuthenticationProtocol;
  442. DWORD dwAuthenticationData;
  443. DWORD dwServerAuthenticationProtocol;
  444. DWORD dwServerAuthenticationData;
  445. BOOL fMultilink;
  446. };
  447. #define RASPPPLCPA struct tagRASPPPLCPA
  448. RASPPPLCPA
  449. {
  450. DWORD dwSize;
  451. DWORD dwError;
  452. DWORD dwAuthenticationProtocol;
  453. DWORD dwAuthenticationData;
  454. DWORD dwServerAuthenticationProtocol;
  455. DWORD dwServerAuthenticationData;
  456. BOOL fMultilink;
  457. };
  458. #ifdef UNICODE
  459. #define RASPPPLCP RASPPPLCPW
  460. #else
  461. #define RASPPPLCP RASPPPLCPA
  462. #endif
  463. #define LPRASPPPLCPW RASPPPLCPW*
  464. #define LPRASPPPLCPA RASPPPLCPA*
  465. #define LPRASPPPLCP RASPPPLCP*
  466. #else
  467. /* Describes the results of a PPP LCP/multi-link negotiation.
  468. */
  469. #define RASPPPLCP struct tagRASPPPLCP
  470. RASPPPLCP
  471. {
  472. DWORD dwSize;
  473. BOOL fBundled;
  474. };
  475. #define LPRASPPPLCP RASPPPLCP*
  476. #endif
  477. /* Describes the results of a SLIP (Serial Line IP) projection.
  478. */
  479. #define RASSLIPW struct tagRASSLIPW
  480. RASSLIPW
  481. {
  482. DWORD dwSize;
  483. DWORD dwError;
  484. WCHAR szIpAddress[ RAS_MaxIpAddress + 1 ];
  485. };
  486. #define RASSLIPA struct tagRASSLIPA
  487. RASSLIPA
  488. {
  489. DWORD dwSize;
  490. DWORD dwError;
  491. CHAR szIpAddress[ RAS_MaxIpAddress + 1 ];
  492. };
  493. #ifdef UNICODE
  494. #define RASSLIP RASSLIPW
  495. #else
  496. #define RASSLIP RASSLIPA
  497. #endif
  498. #define LPRASSLIPW RASSLIPW*
  499. #define LPRASSLIPA RASSLIPA*
  500. #define LPRASSLIP RASSLIP*
  501. /* If using RasDial message notifications, get the notification message code
  502. ** by passing this string to the RegisterWindowMessageA() API.
  503. ** WM_RASDIALEVENT is used only if a unique message cannot be registered.
  504. */
  505. #define RASDIALEVENT "RasDialEvent"
  506. #define WM_RASDIALEVENT 0xCCCD
  507. /* Prototypes for caller's RasDial callback handler. Arguments are the
  508. ** message ID (currently always WM_RASDIALEVENT), the current RASCONNSTATE and
  509. ** the error that has occurred (or 0 if none). Extended arguments are the
  510. ** handle of the RAS connection and an extended error code.
  511. **
  512. ** For RASDIALFUNC2, subsequent callback notifications for all
  513. ** subentries can be cancelled by returning FALSE.
  514. */
  515. typedef VOID (WINAPI *RASDIALFUNC)( UINT, RASCONNSTATE, DWORD );
  516. typedef VOID (WINAPI *RASDIALFUNC1)( HRASCONN, UINT, RASCONNSTATE, DWORD, DWORD );
  517. typedef DWORD (WINAPI *RASDIALFUNC2)( DWORD, DWORD, HRASCONN, UINT, RASCONNSTATE, DWORD, DWORD );
  518. /* Information describing a RAS-capable device.
  519. */
  520. #define RASDEVINFOW struct tagRASDEVINFOW
  521. RASDEVINFOW
  522. {
  523. DWORD dwSize;
  524. WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  525. WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  526. };
  527. #define RASDEVINFOA struct tagRASDEVINFOA
  528. RASDEVINFOA
  529. {
  530. DWORD dwSize;
  531. CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  532. CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  533. };
  534. #ifdef UNICODE
  535. #define RASDEVINFO RASDEVINFOW
  536. #else
  537. #define RASDEVINFO RASDEVINFOA
  538. #endif
  539. #define LPRASDEVINFOW RASDEVINFOW*
  540. #define LPRASDEVINFOA RASDEVINFOA*
  541. #define LPRASDEVINFO RASDEVINFO*
  542. /* RAS country information (currently retrieved from TAPI).
  543. */
  544. #define RASCTRYINFO struct RASCTRYINFO
  545. RASCTRYINFO
  546. {
  547. DWORD dwSize;
  548. DWORD dwCountryID;
  549. DWORD dwNextCountryID;
  550. DWORD dwCountryCode;
  551. DWORD dwCountryNameOffset;
  552. };
  553. /* There is currently no difference between
  554. ** RASCTRYINFOA and RASCTRYINFOW. This may
  555. ** change in the future.
  556. */
  557. #define RASCTRYINFOW RASCTRYINFO
  558. #define RASCTRYINFOA RASCTRYINFO
  559. #define LPRASCTRYINFOW RASCTRYINFOW*
  560. #define LPRASCTRYINFOA RASCTRYINFOW*
  561. #define LPRASCTRYINFO RASCTRYINFO*
  562. /* A RAS IP address.
  563. */
  564. #define RASIPADDR struct RASIPADDR
  565. RASIPADDR
  566. {
  567. BYTE a;
  568. BYTE b;
  569. BYTE c;
  570. BYTE d;
  571. };
  572. #define LPRASIPADDR RASIPADDR*
  573. /* A RAS phone book entry.
  574. */
  575. #define RASENTRYA struct tagRASENTRYA
  576. RASENTRYA
  577. {
  578. DWORD dwSize;
  579. DWORD dwfOptions;
  580. //
  581. // Location/phone number.
  582. //
  583. DWORD dwCountryID;
  584. DWORD dwCountryCode;
  585. CHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
  586. CHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  587. DWORD dwAlternateOffset;
  588. //
  589. // PPP/Ip
  590. //
  591. RASIPADDR ipaddr;
  592. RASIPADDR ipaddrDns;
  593. RASIPADDR ipaddrDnsAlt;
  594. RASIPADDR ipaddrWins;
  595. RASIPADDR ipaddrWinsAlt;
  596. //
  597. // Framing
  598. //
  599. DWORD dwFrameSize;
  600. DWORD dwfNetProtocols;
  601. DWORD dwFramingProtocol;
  602. //
  603. // Scripting
  604. //
  605. CHAR szScript[ MAX_PATH ];
  606. //
  607. // AutoDial
  608. //
  609. CHAR szAutodialDll[ MAX_PATH ];
  610. CHAR szAutodialFunc[ MAX_PATH ];
  611. //
  612. // Device
  613. //
  614. CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  615. CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  616. //
  617. // X.25
  618. //
  619. CHAR szX25PadType[ RAS_MaxPadType + 1 ];
  620. CHAR szX25Address[ RAS_MaxX25Address + 1 ];
  621. CHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
  622. CHAR szX25UserData[ RAS_MaxUserData + 1 ];
  623. DWORD dwChannels;
  624. //
  625. // Reserved
  626. //
  627. DWORD dwReserved1;
  628. DWORD dwReserved2;
  629. #if (WINVER >= 0x401)
  630. //
  631. // Multilink
  632. //
  633. DWORD dwSubEntries;
  634. DWORD dwDialMode;
  635. DWORD dwDialExtraPercent;
  636. DWORD dwDialExtraSampleSeconds;
  637. DWORD dwHangUpExtraPercent;
  638. DWORD dwHangUpExtraSampleSeconds;
  639. //
  640. // Idle timeout
  641. //
  642. DWORD dwIdleDisconnectSeconds;
  643. #endif
  644. };
  645. #define RASENTRYW struct tagRASENTRYW
  646. RASENTRYW
  647. {
  648. DWORD dwSize;
  649. DWORD dwfOptions;
  650. //
  651. // Location/phone number
  652. //
  653. DWORD dwCountryID;
  654. DWORD dwCountryCode;
  655. WCHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
  656. WCHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  657. DWORD dwAlternateOffset;
  658. //
  659. // PPP/Ip
  660. //
  661. RASIPADDR ipaddr;
  662. RASIPADDR ipaddrDns;
  663. RASIPADDR ipaddrDnsAlt;
  664. RASIPADDR ipaddrWins;
  665. RASIPADDR ipaddrWinsAlt;
  666. //
  667. // Framing
  668. //
  669. DWORD dwFrameSize;
  670. DWORD dwfNetProtocols;
  671. DWORD dwFramingProtocol;
  672. //
  673. // Scripting
  674. //
  675. WCHAR szScript[ MAX_PATH ];
  676. //
  677. // AutoDial
  678. //
  679. WCHAR szAutodialDll[ MAX_PATH ];
  680. WCHAR szAutodialFunc[ MAX_PATH ];
  681. //
  682. // Device
  683. //
  684. WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  685. WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  686. //
  687. // X.25
  688. //
  689. WCHAR szX25PadType[ RAS_MaxPadType + 1 ];
  690. WCHAR szX25Address[ RAS_MaxX25Address + 1 ];
  691. WCHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
  692. WCHAR szX25UserData[ RAS_MaxUserData + 1 ];
  693. DWORD dwChannels;
  694. //
  695. // Reserved
  696. //
  697. DWORD dwReserved1;
  698. DWORD dwReserved2;
  699. #if (WINVER >= 0x401)
  700. //
  701. // Multilink
  702. //
  703. DWORD dwSubEntries;
  704. DWORD dwDialMode;
  705. DWORD dwDialExtraPercent;
  706. DWORD dwDialExtraSampleSeconds;
  707. DWORD dwHangUpExtraPercent;
  708. DWORD dwHangUpExtraSampleSeconds;
  709. //
  710. // Idle timeout
  711. //
  712. DWORD dwIdleDisconnectSeconds;
  713. #endif
  714. };
  715. #ifdef UNICODE
  716. #define RASENTRY RASENTRYW
  717. #else
  718. #define RASENTRY RASENTRYA
  719. #endif
  720. #define LPRASENTRYW RASENTRYW*
  721. #define LPRASENTRYA RASENTRYA*
  722. #define LPRASENTRY RASENTRY*
  723. /* RASENTRY 'dwfOptions' bit flags.
  724. */
  725. #define RASEO_UseCountryAndAreaCodes 0x00000001
  726. #define RASEO_SpecificIpAddr 0x00000002
  727. #define RASEO_SpecificNameServers 0x00000004
  728. #define RASEO_IpHeaderCompression 0x00000008
  729. #define RASEO_RemoteDefaultGateway 0x00000010
  730. #define RASEO_DisableLcpExtensions 0x00000020
  731. #define RASEO_TerminalBeforeDial 0x00000040
  732. #define RASEO_TerminalAfterDial 0x00000080
  733. #define RASEO_ModemLights 0x00000100
  734. #define RASEO_SwCompression 0x00000200
  735. #define RASEO_RequireEncryptedPw 0x00000400
  736. #define RASEO_RequireMsEncryptedPw 0x00000800
  737. #define RASEO_RequireDataEncryption 0x00001000
  738. #define RASEO_NetworkLogon 0x00002000
  739. #define RASEO_UseLogonCredentials 0x00004000
  740. #define RASEO_PromoteAlternates 0x00008000
  741. #if (WINVER >= 0x401)
  742. #define RASEO_SecureLocalFiles 0x00010000
  743. #endif
  744. /* RASENTRY 'dwProtocols' bit flags.
  745. */
  746. #define RASNP_NetBEUI 0x00000001
  747. #define RASNP_Ipx 0x00000002
  748. #define RASNP_Ip 0x00000004
  749. /* RASENTRY 'dwFramingProtocols' bit flags.
  750. */
  751. #define RASFP_Ppp 0x00000001
  752. #define RASFP_Slip 0x00000002
  753. #define RASFP_Ras 0x00000004
  754. /* RASENTRY 'szDeviceType' default strings.
  755. */
  756. #define RASDT_Modem TEXT("modem")
  757. #define RASDT_Isdn TEXT("isdn")
  758. #define RASDT_X25 TEXT("x25")
  759. /* Old AutoDial DLL function prototype.
  760. **
  761. ** This prototype is documented for backward-compatibility
  762. ** purposes only. It is superceded by the RASADFUNCA
  763. ** and RASADFUNCW definitions below. DO NOT USE THIS
  764. ** PROTOTYPE IN NEW CODE. SUPPORT FOR IT MAY BE REMOVED
  765. ** IN FUTURE VERSIONS OF RAS.
  766. */
  767. typedef BOOL (WINAPI *ORASADFUNC)( HWND, LPSTR, DWORD, LPDWORD );
  768. #if (WINVER >= 0x401)
  769. /* Flags for RasConnectionNotification().
  770. */
  771. #define RASCN_Connection 0x00000001
  772. #define RASCN_Disconnection 0x00000002
  773. #define RASCN_BandwidthAdded 0x00000004
  774. #define RASCN_BandwidthRemoved 0x00000008
  775. /* RASENTRY 'dwDialMode' values.
  776. */
  777. #define RASEDM_DialAll 1
  778. #define RASEDM_DialAsNeeded 2
  779. /* RASENTRY 'dwIdleDisconnectSeconds' constants.
  780. */
  781. #define RASIDS_Disabled 0xffffffff
  782. #define RASIDS_UseGlobalValue 0
  783. /* AutoDial DLL function parameter block.
  784. */
  785. #define RASADPARAMS struct tagRASADPARAMS
  786. RASADPARAMS
  787. {
  788. DWORD dwSize;
  789. HWND hwndOwner;
  790. DWORD dwFlags;
  791. LONG xDlg;
  792. LONG yDlg;
  793. };
  794. #define LPRASADPARAMS RASADPARAMS*
  795. /* AutoDial DLL function parameter block 'dwFlags.'
  796. */
  797. #define RASADFLG_PositionDlg 0x00000001
  798. /* Prototype AutoDial DLL function.
  799. */
  800. typedef BOOL (WINAPI *RASADFUNCA)( LPSTR, LPSTR, LPRASADPARAMS, LPDWORD );
  801. typedef BOOL (WINAPI *RASADFUNCW)( LPWSTR, LPWSTR, LPRASADPARAMS, LPDWORD );
  802. #ifdef UNICODE
  803. #define RASADFUNC RASADFUNCW
  804. #else
  805. #define RASADFUNC RASADFUNCA
  806. #endif
  807. /* A RAS phone book multilinked sub-entry.
  808. */
  809. #define RASSUBENTRYA struct tagRASSUBENTRYA
  810. RASSUBENTRYA
  811. {
  812. DWORD dwSize;
  813. DWORD dwfFlags;
  814. //
  815. // Device
  816. //
  817. CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  818. CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  819. //
  820. // Phone numbers
  821. //
  822. CHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  823. DWORD dwAlternateOffset;
  824. };
  825. #define RASSUBENTRYW struct tagRASSUBENTRYW
  826. RASSUBENTRYW
  827. {
  828. DWORD dwSize;
  829. DWORD dwfFlags;
  830. //
  831. // Device
  832. //
  833. WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  834. WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  835. //
  836. // Phone numbers
  837. //
  838. WCHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  839. DWORD dwAlternateOffset;
  840. };
  841. #ifdef UNICODE
  842. #define RASSUBENTRY RASSUBENTRYW
  843. #else
  844. #define RASSUBENTRY RASSUBENTRYA
  845. #endif
  846. #define LPRASSUBENTRYW RASSUBENTRYW*
  847. #define LPRASSUBENTRYA RASSUBENTRYA*
  848. #define LPRASSUBENTRY RASSUBENTRY*
  849. /* Ras{Get,Set}Credentials structure. These calls
  850. ** supercede Ras{Get,Set}EntryDialParams.
  851. */
  852. #define RASCREDENTIALSA struct tagRASCREDENTIALSA
  853. RASCREDENTIALSA
  854. {
  855. DWORD dwSize;
  856. DWORD dwMask;
  857. CHAR szUserName[ UNLEN + 1 ];
  858. CHAR szPassword[ PWLEN + 1 ];
  859. CHAR szDomain[ DNLEN + 1 ];
  860. };
  861. #define RASCREDENTIALSW struct tagRASCREDENTIALSW
  862. RASCREDENTIALSW
  863. {
  864. DWORD dwSize;
  865. DWORD dwMask;
  866. WCHAR szUserName[ UNLEN + 1 ];
  867. WCHAR szPassword[ PWLEN + 1 ];
  868. WCHAR szDomain[ DNLEN + 1 ];
  869. };
  870. #ifdef UNICODE
  871. #define RASCREDENTIALS RASCREDENTIALSW
  872. #else
  873. #define RASCREDENTIALS RASCREDENTIALSA
  874. #endif
  875. #define LPRASCREDENTIALSW RASCREDENTIALSW*
  876. #define LPRASCREDENTIALSA RASCREDENTIALSA*
  877. #define LPRASCREDENTIALS RASCREDENTIALS*
  878. /* RASCREDENTIALS 'dwMask' values.
  879. */
  880. #define RASCM_UserName 0x00000001
  881. #define RASCM_Password 0x00000002
  882. #define RASCM_Domain 0x00000004
  883. /* AutoDial address properties.
  884. */
  885. #define RASAUTODIALENTRYA struct tagRASAUTODIALENTRYA
  886. RASAUTODIALENTRYA
  887. {
  888. DWORD dwSize;
  889. DWORD dwFlags;
  890. DWORD dwDialingLocation;
  891. CHAR szEntry[ RAS_MaxEntryName + 1];
  892. };
  893. #define RASAUTODIALENTRYW struct tagRASAUTODIALENTRYW
  894. RASAUTODIALENTRYW
  895. {
  896. DWORD dwSize;
  897. DWORD dwFlags;
  898. DWORD dwDialingLocation;
  899. WCHAR szEntry[ RAS_MaxEntryName + 1];
  900. };
  901. #ifdef UNICODE
  902. #define RASAUTODIALENTRY RASAUTODIALENTRYW
  903. #else
  904. #define RASAUTODIALENTRY RASAUTODIALENTRYA
  905. #endif
  906. #define LPRASAUTODIALENTRYW RASAUTODIALENTRYW*
  907. #define LPRASAUTODIALENTRYA RASAUTODIALENTRYA*
  908. #define LPRASAUTODIALENTRY RASAUTODIALENTRY*
  909. /* AutoDial control parameter values for
  910. ** Ras{Get,Set}AutodialParam.
  911. */
  912. #define RASADP_DisableConnectionQuery 0
  913. #define RASADP_LoginSessionDisable 1
  914. #define RASADP_SavedAddressesLimit 2
  915. #define RASADP_FailedConnectionTimeout 3
  916. #define RASADP_ConnectionQueryTimeout 4
  917. #endif // (WINVER >= 0x401)
  918. /* External RAS API function prototypes.
  919. */
  920. DWORD APIENTRY RasDialA( LPRASDIALEXTENSIONS, LPSTR, LPRASDIALPARAMSA, DWORD,
  921. LPVOID, LPHRASCONN );
  922. DWORD APIENTRY RasDialW( LPRASDIALEXTENSIONS, LPWSTR, LPRASDIALPARAMSW, DWORD,
  923. LPVOID, LPHRASCONN );
  924. DWORD APIENTRY RasEnumConnectionsA( LPRASCONNA, LPDWORD, LPDWORD );
  925. DWORD APIENTRY RasEnumConnectionsW( LPRASCONNW, LPDWORD, LPDWORD );
  926. DWORD APIENTRY RasEnumEntriesA( LPSTR, LPSTR, LPRASENTRYNAMEA, LPDWORD,
  927. LPDWORD );
  928. DWORD APIENTRY RasEnumEntriesW( LPWSTR, LPWSTR, LPRASENTRYNAMEW, LPDWORD,
  929. LPDWORD );
  930. DWORD APIENTRY RasGetConnectStatusA( HRASCONN, LPRASCONNSTATUSA );
  931. DWORD APIENTRY RasGetConnectStatusW( HRASCONN, LPRASCONNSTATUSW );
  932. DWORD APIENTRY RasGetErrorStringA( UINT, LPSTR, DWORD );
  933. DWORD APIENTRY RasGetErrorStringW( UINT, LPWSTR, DWORD );
  934. DWORD APIENTRY RasHangUpA( HRASCONN );
  935. DWORD APIENTRY RasHangUpW( HRASCONN );
  936. DWORD APIENTRY RasGetProjectionInfoA( HRASCONN, RASPROJECTION, LPVOID,
  937. LPDWORD );
  938. DWORD APIENTRY RasGetProjectionInfoW( HRASCONN, RASPROJECTION, LPVOID,
  939. LPDWORD );
  940. DWORD APIENTRY RasCreatePhonebookEntryA( HWND, LPSTR );
  941. DWORD APIENTRY RasCreatePhonebookEntryW( HWND, LPWSTR );
  942. DWORD APIENTRY RasEditPhonebookEntryA( HWND, LPSTR, LPSTR );
  943. DWORD APIENTRY RasEditPhonebookEntryW( HWND, LPWSTR, LPWSTR );
  944. DWORD APIENTRY RasSetEntryDialParamsA( LPSTR, LPRASDIALPARAMSA, BOOL );
  945. DWORD APIENTRY RasSetEntryDialParamsW( LPWSTR, LPRASDIALPARAMSW, BOOL );
  946. DWORD APIENTRY RasGetEntryDialParamsA( LPSTR, LPRASDIALPARAMSA, LPBOOL );
  947. DWORD APIENTRY RasGetEntryDialParamsW( LPWSTR, LPRASDIALPARAMSW, LPBOOL );
  948. DWORD APIENTRY RasEnumDevicesA( LPRASDEVINFOA, LPDWORD, LPDWORD );
  949. DWORD APIENTRY RasEnumDevicesW( LPRASDEVINFOW, LPDWORD, LPDWORD );
  950. DWORD APIENTRY RasGetCountryInfoA( LPRASCTRYINFOA, LPDWORD );
  951. DWORD APIENTRY RasGetCountryInfoW( LPRASCTRYINFOW, LPDWORD );
  952. DWORD APIENTRY RasGetEntryPropertiesA( LPSTR, LPSTR, LPRASENTRYA, LPDWORD, LPBYTE, LPDWORD );
  953. DWORD APIENTRY RasGetEntryPropertiesW( LPWSTR, LPWSTR, LPRASENTRYW, LPDWORD, LPBYTE, LPDWORD );
  954. DWORD APIENTRY RasSetEntryPropertiesA( LPSTR, LPSTR, LPRASENTRYA, DWORD, LPBYTE, DWORD );
  955. DWORD APIENTRY RasSetEntryPropertiesW( LPWSTR, LPWSTR, LPRASENTRYW, DWORD, LPBYTE, DWORD );
  956. DWORD APIENTRY RasRenameEntryA( LPSTR, LPSTR, LPSTR );
  957. DWORD APIENTRY RasRenameEntryW( LPWSTR, LPWSTR, LPWSTR );
  958. DWORD APIENTRY RasDeleteEntryA( LPSTR, LPSTR );
  959. DWORD APIENTRY RasDeleteEntryW( LPWSTR, LPWSTR );
  960. DWORD APIENTRY RasValidateEntryNameA( LPSTR, LPSTR );
  961. DWORD APIENTRY RasValidateEntryNameW( LPWSTR, LPWSTR );
  962. #if (WINVER >= 0x401)
  963. DWORD APIENTRY RasGetSubEntryHandleA( HRASCONN, DWORD, LPHRASCONN );
  964. DWORD APIENTRY RasGetSubEntryHandleW( HRASCONN, DWORD, LPHRASCONN );
  965. DWORD APIENTRY RasGetCredentialsA( LPSTR, LPSTR, LPRASCREDENTIALSA);
  966. DWORD APIENTRY RasGetCredentialsW( LPWSTR, LPWSTR, LPRASCREDENTIALSW );
  967. DWORD APIENTRY RasSetCredentialsA( LPSTR, LPSTR, LPRASCREDENTIALSA, BOOL );
  968. DWORD APIENTRY RasSetCredentialsW( LPWSTR, LPWSTR, LPRASCREDENTIALSW, BOOL );
  969. DWORD APIENTRY RasConnectionNotificationA( HRASCONN, HANDLE, DWORD );
  970. DWORD APIENTRY RasConnectionNotificationW( HRASCONN, HANDLE, DWORD );
  971. DWORD APIENTRY RasGetSubEntryPropertiesA( LPSTR, LPSTR, DWORD,
  972. LPRASSUBENTRYA, LPDWORD, LPBYTE, LPDWORD );
  973. DWORD APIENTRY RasGetSubEntryPropertiesW( LPWSTR, LPWSTR, DWORD,
  974. LPRASSUBENTRYW, LPDWORD, LPBYTE, LPDWORD );
  975. DWORD APIENTRY RasSetSubEntryPropertiesA( LPSTR, LPSTR, DWORD,
  976. LPRASSUBENTRYA, DWORD, LPBYTE, DWORD );
  977. DWORD APIENTRY RasSetSubEntryPropertiesW( LPWSTR, LPWSTR, DWORD,
  978. LPRASSUBENTRYW, DWORD, LPBYTE, DWORD );
  979. DWORD APIENTRY RasDeleteSubEntryA( LPSTR, LPSTR, DWORD );
  980. DWORD APIENTRY RasDeleteSubEntryW( LPWSTR, LPWSTR, DWORD );
  981. DWORD APIENTRY RasGetAutodialAddressA( LPSTR, LPDWORD, LPRASAUTODIALENTRYA,
  982. LPDWORD, LPDWORD );
  983. DWORD APIENTRY RasGetAutodialAddressW( LPWSTR, LPDWORD, LPRASAUTODIALENTRYW,
  984. LPDWORD, LPDWORD);
  985. DWORD APIENTRY RasSetAutodialAddressA( LPSTR, DWORD, LPRASAUTODIALENTRYA,
  986. DWORD, DWORD );
  987. DWORD APIENTRY RasSetAutodialAddressW( LPWSTR, DWORD, LPRASAUTODIALENTRYW,
  988. DWORD, DWORD );
  989. DWORD APIENTRY RasEnumAutodialAddressesA( LPSTR *, LPDWORD, LPDWORD );
  990. DWORD APIENTRY RasEnumAutodialAddressesW( LPWSTR *, LPDWORD, LPDWORD );
  991. DWORD APIENTRY RasGetAutodialEnableA( DWORD, LPBOOL );
  992. DWORD APIENTRY RasGetAutodialEnableW( DWORD, LPBOOL );
  993. DWORD APIENTRY RasSetAutodialEnableA( DWORD, BOOL );
  994. DWORD APIENTRY RasSetAutodialEnableW( DWORD, BOOL );
  995. DWORD APIENTRY RasGetAutodialParamA( DWORD, LPVOID, LPDWORD );
  996. DWORD APIENTRY RasGetAutodialParamW( DWORD, LPVOID, LPDWORD );
  997. DWORD APIENTRY RasSetAutodialParamA( DWORD, LPVOID, DWORD );
  998. DWORD APIENTRY RasSetAutodialParamW( DWORD, LPVOID, DWORD );
  999. #endif
  1000. #ifdef UNICODE
  1001. #define RasDial RasDialW
  1002. #define RasEnumConnections RasEnumConnectionsW
  1003. #define RasEnumEntries RasEnumEntriesW
  1004. #define RasGetConnectStatus RasGetConnectStatusW
  1005. #define RasGetErrorString RasGetErrorStringW
  1006. #define RasHangUp RasHangUpW
  1007. #define RasGetProjectionInfo RasGetProjectionInfoW
  1008. #define RasCreatePhonebookEntry RasCreatePhonebookEntryW
  1009. #define RasEditPhonebookEntry RasEditPhonebookEntryW
  1010. #define RasSetEntryDialParams RasSetEntryDialParamsW
  1011. #define RasGetEntryDialParams RasGetEntryDialParamsW
  1012. #define RasEnumDevices RasEnumDevicesW
  1013. #define RasGetCountryInfo RasGetCountryInfoW
  1014. #define RasGetEntryProperties RasGetEntryPropertiesW
  1015. #define RasSetEntryProperties RasSetEntryPropertiesW
  1016. #define RasRenameEntry RasRenameEntryW
  1017. #define RasDeleteEntry RasDeleteEntryW
  1018. #define RasValidateEntryName RasValidateEntryNameW
  1019. #if (WINVER >= 0x401)
  1020. #define RasGetSubEntryHandle RasGetSubEntryHandleW
  1021. #define RasConnectionNotification RasConnectionNotificationW
  1022. #define RasGetSubEntryProperties RasGetSubEntryPropertiesW
  1023. #define RasSetSubEntryProperties RasSetSubEntryPropertiesW
  1024. #define RasDeleteSubEntry RasDeleteSubEntryW
  1025. #define RasGetCredentials RasGetCredentialsW
  1026. #define RasSetCredentials RasSetCredentialsW
  1027. #define RasGetAutodialAddress RasGetAutodialAddressW
  1028. #define RasSetAutodialAddress RasSetAutodialAddressW
  1029. #define RasEnumAutodialAddresses RasEnumAutodialAddressesW
  1030. #define RasGetAutodialEnable RasGetAutodialEnableW
  1031. #define RasSetAutodialEnable RasSetAutodialEnableW
  1032. #define RasGetAutodialParam RasGetAutodialParamW
  1033. #define RasSetAutodialParam RasSetAutodialParamW
  1034. #endif
  1035. #else
  1036. #define RasDial RasDialA
  1037. #define RasEnumConnections RasEnumConnectionsA
  1038. #define RasEnumEntries RasEnumEntriesA
  1039. #define RasGetConnectStatus RasGetConnectStatusA
  1040. #define RasGetErrorString RasGetErrorStringA
  1041. #define RasHangUp RasHangUpA
  1042. #define RasGetProjectionInfo RasGetProjectionInfoA
  1043. #define RasCreatePhonebookEntry RasCreatePhonebookEntryA
  1044. #define RasEditPhonebookEntry RasEditPhonebookEntryA
  1045. #define RasSetEntryDialParams RasSetEntryDialParamsA
  1046. #define RasGetEntryDialParams RasGetEntryDialParamsA
  1047. #define RasEnumDevices RasEnumDevicesA
  1048. #define RasGetCountryInfo RasGetCountryInfoA
  1049. #define RasGetEntryProperties RasGetEntryPropertiesA
  1050. #define RasSetEntryProperties RasSetEntryPropertiesA
  1051. #define RasRenameEntry RasRenameEntryA
  1052. #define RasDeleteEntry RasDeleteEntryA
  1053. #define RasValidateEntryName RasValidateEntryNameA
  1054. #if (WINVER >= 0x401)
  1055. #define RasGetSubEntryHandle RasGetSubEntryHandleA
  1056. #define RasConnectionNotification RasConnectionNotificationA
  1057. #define RasGetSubEntryProperties RasGetSubEntryPropertiesA
  1058. #define RasSetSubEntryProperties RasSetSubEntryPropertiesA
  1059. #define RasDeleteSubEntry RasDeleteSubEntryA
  1060. #define RasGetCredentials RasGetCredentialsA
  1061. #define RasSetCredentials RasSetCredentialsA
  1062. #define RasGetAutodialAddress RasGetAutodialAddressA
  1063. #define RasSetAutodialAddress RasSetAutodialAddressA
  1064. #define RasEnumAutodialAddresses RasEnumAutodialAddressesA
  1065. #define RasGetAutodialEnable RasGetAutodialEnableA
  1066. #define RasSetAutodialEnable RasSetAutodialEnableA
  1067. #define RasGetAutodialParam RasGetAutodialParamA
  1068. #define RasSetAutodialParam RasSetAutodialParamA
  1069. #endif
  1070. #endif
  1071. #ifdef __cplusplus
  1072. }
  1073. #endif
  1074. #include <poppack.h>
  1075. #endif // _RAS_H_