home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Compilers / digital marsC compier / dm / include / win32 / Ras.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-08  |  31.5 KB  |  1,174 lines

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