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