home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / ras.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  33KB  |  1,215 lines

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