home *** CD-ROM | disk | FTP | other *** search
/ Total Destruction / Total_Destruction.iso / addons / Lccwin32.exe / Lccwin32 / lccpub / include / ras.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-12-07  |  22.4 KB  |  712 lines

  1. #ifndef    _LCC_RAS_H_
  2. #define    _LCC_RAS_H_
  3. #ifndef    _LCC_NETCONS_INCLUDED
  4. #include    <lmcons.h>
  5. #endif
  6. #pragma    pack(push,4)
  7. #define    RAS_MaxDeviceType 16
  8. #define    RAS_MaxPhoneNumber 128
  9. #define    RAS_MaxIpAddress 15
  10. #define    RAS_MaxIpxAddress 21
  11. #define    RAS_MaxEntryName 256
  12. #define    RAS_MaxDeviceName 128
  13. #define    RAS_MaxCallbackNumber RAS_MaxPhoneNumber
  14. #define    RAS_MaxAreaCode 10
  15. #define    RAS_MaxPadType 32
  16. #define    RAS_MaxX25Address 200
  17. #define    RAS_MaxFacilities 200
  18. #define    RAS_MaxUserData 200
  19. DECLARE_HANDLE(HRASCONN);
  20. #define    LPHRASCONN HRASCONN*
  21. #define    RASCONNW struct tagRASCONNW
  22. RASCONNW
  23. {
  24.     DWORD dwSize;
  25.     HRASCONN hrasconn;
  26.     WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
  27.     WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  28.     WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  29.     WCHAR szPhonebook [ MAX_PATH ];
  30.     DWORD dwSubEntry;
  31. };
  32.  
  33. #define    RASCONNA struct tagRASCONNA
  34. RASCONNA
  35. {
  36.     DWORD dwSize;
  37.     HRASCONN hrasconn;
  38.     CHAR szEntryName[ RAS_MaxEntryName + 1 ];
  39.  
  40.     CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  41.     CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  42.     CHAR szPhonebook [ MAX_PATH ];
  43.     DWORD dwSubEntry;
  44. };
  45.  
  46. #ifdef    UNICODE
  47. #define    RASCONN RASCONNW
  48. #else
  49. #define    RASCONN RASCONNA
  50. #endif
  51. #define    LPRASCONNW RASCONNW*
  52. #define    LPRASCONNA RASCONNA*
  53. #define    LPRASCONN RASCONN*
  54. #define    RASCS_PAUSED 0x1000
  55. #define    RASCS_DONE 0x2000
  56. #define    RASCONNSTATE enum tagRASCONNSTATE
  57. RASCONNSTATE
  58. {
  59.     RASCS_OpenPort = 0,
  60.     RASCS_PortOpened,
  61.     RASCS_ConnectDevice,
  62.     RASCS_DeviceConnected,
  63.     RASCS_AllDevicesConnected,
  64.     RASCS_Authenticate,
  65.     RASCS_AuthNotify,
  66.     RASCS_AuthRetry,
  67.     RASCS_AuthCallback,
  68.     RASCS_AuthChangePassword,
  69.     RASCS_AuthProject,
  70.     RASCS_AuthLinkSpeed,
  71.     RASCS_AuthAck,
  72.     RASCS_ReAuthenticate,
  73.     RASCS_Authenticated,
  74.     RASCS_PrepareForCallback,
  75.     RASCS_WaitForModemReset,
  76.     RASCS_WaitForCallback,
  77.     RASCS_Projected,
  78.     RASCS_StartAuthentication,
  79.     RASCS_CallbackComplete,
  80.     RASCS_LogonNetwork,
  81.     RASCS_SubEntryConnected,
  82.     RASCS_SubEntryDisconnected,
  83.     RASCS_Interactive = RASCS_PAUSED,
  84.     RASCS_RetryAuthentication,
  85.     RASCS_CallbackSetByCaller,
  86.     RASCS_PasswordExpired,
  87.     RASCS_Connected = RASCS_DONE,
  88.     RASCS_Disconnected
  89. };
  90. #define    LPRASCONNSTATE RASCONNSTATE*
  91. #define    RASCONNSTATUSW struct tagRASCONNSTATUSW
  92. RASCONNSTATUSW
  93. {
  94.     DWORD dwSize;
  95.     RASCONNSTATE rasconnstate;
  96.     DWORD dwError;
  97.     WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  98.     WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  99.     WCHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  100. };
  101. #define    RASCONNSTATUSA struct tagRASCONNSTATUSA
  102. RASCONNSTATUSA
  103. {
  104.     DWORD dwSize;
  105.     RASCONNSTATE rasconnstate;
  106.     DWORD dwError;
  107.     CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  108.     CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  109.     CHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  110. };
  111. #ifdef    UNICODE
  112. #define    RASCONNSTATUS RASCONNSTATUSW
  113. #else
  114. #define    RASCONNSTATUS RASCONNSTATUSA
  115. #endif
  116. #define    LPRASCONNSTATUSW RASCONNSTATUSW*
  117. #define    LPRASCONNSTATUSA RASCONNSTATUSA*
  118. #define    LPRASCONNSTATUS RASCONNSTATUS*
  119. #define    RASDIALPARAMSW struct tagRASDIALPARAMSW
  120. RASDIALPARAMSW {
  121.     DWORD dwSize;
  122.     WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
  123.     WCHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  124.     WCHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
  125.     WCHAR szUserName[ UNLEN + 1 ];
  126.     WCHAR szPassword[ PWLEN + 1 ];
  127.     WCHAR szDomain[ DNLEN + 1 ];
  128.     DWORD dwSubEntry;
  129.     DWORD dwCallbackId;
  130. };
  131. #define    RASDIALPARAMSA struct tagRASDIALPARAMSA
  132. RASDIALPARAMSA {
  133.     DWORD dwSize;
  134.     CHAR szEntryName[ RAS_MaxEntryName + 1 ];
  135.     CHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  136.     CHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
  137.     CHAR szUserName[ UNLEN + 1 ];
  138.     CHAR szPassword[ PWLEN + 1 ];
  139.     CHAR szDomain[ DNLEN + 1 ];
  140.     DWORD dwSubEntry;
  141.     DWORD dwCallbackId;
  142. };
  143. #ifdef    UNICODE
  144. #define    RASDIALPARAMS RASDIALPARAMSW
  145. #else
  146. #define    RASDIALPARAMS RASDIALPARAMSA
  147. #endif
  148. #define    LPRASDIALPARAMSW RASDIALPARAMSW*
  149. #define    LPRASDIALPARAMSA RASDIALPARAMSA*
  150. #define    LPRASDIALPARAMS RASDIALPARAMS*
  151. #define    RASDIALEXTENSIONS struct tagRASDIALEXTENSIONS
  152. RASDIALEXTENSIONS {
  153.     DWORD dwSize;
  154.     DWORD dwfOptions;
  155.     HWND hwndParent;
  156.     DWORD reserved;
  157. };
  158. #define    LPRASDIALEXTENSIONS RASDIALEXTENSIONS*
  159. #define    RDEOPT_UsePrefixSuffix 1
  160. #define    RDEOPT_PausedStates 2
  161. #define    RDEOPT_IgnoreModemSpeaker 4
  162. #define    RDEOPT_SetModemSpeaker 8
  163. #define    RDEOPT_IgnoreSoftwareCompression 16
  164. #define    RDEOPT_SetSoftwareCompression 32
  165. #define    RDEOPT_DisableConnectedUI 64
  166. #define    RDEOPT_DisableReconnectUI 0x00000080
  167. #define    RDEOPT_DisableReconnect 0x00000100
  168. #define    RDEOPT_NoUser 0x00000200
  169. #define    RASENTRYNAMEW struct tagRASENTRYNAMEW
  170. RASENTRYNAMEW {
  171.     DWORD dwSize;
  172.     WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
  173. };
  174. #define    RASENTRYNAMEA struct tagRASENTRYNAMEA
  175. RASENTRYNAMEA {
  176.     DWORD dwSize;
  177.     CHAR szEntryName[ RAS_MaxEntryName + 1 ];
  178. };
  179. #ifdef    UNICODE
  180. #define    RASENTRYNAME RASENTRYNAMEW
  181. #else
  182. #define    RASENTRYNAME RASENTRYNAMEA
  183. #endif
  184. #define    LPRASENTRYNAMEW RASENTRYNAMEW*
  185. #define    LPRASENTRYNAMEA RASENTRYNAMEA*
  186. #define    LPRASENTRYNAME RASENTRYNAME*
  187. #define    RASPROJECTION enum tagRASPROJECTION
  188. RASPROJECTION {
  189.     RASP_Amb = 0x10000,
  190.     RASP_PppNbf = 0x803F,
  191.     RASP_PppIpx = 0x802B,
  192.     RASP_PppIp = 0x8021,
  193.     RASP_PppLcp = 0xC021,
  194.     RASP_Slip = 0x20000
  195. };
  196. #define    LPRASPROJECTION RASPROJECTION*
  197. #define    RASAMBW struct tagRASAMBW
  198. RASAMBW {
  199.     DWORD dwSize;
  200.     DWORD dwError;
  201.     WCHAR szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
  202.     BYTE bLana;
  203. };
  204. #define    RASAMBA struct tagRASAMBA
  205. RASAMBA {
  206.     DWORD dwSize;
  207.     DWORD dwError;
  208.     CHAR szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
  209.     BYTE bLana;
  210. };
  211. #ifdef    UNICODE
  212. #define    RASAMB RASAMBW
  213. #else
  214. #define    RASAMB RASAMBA
  215. #endif
  216. #define    LPRASAMBW RASAMBW*
  217. #define    LPRASAMBA RASAMBA*
  218. #define    LPRASAMB RASAMB*
  219. #define    RASPPPNBFW struct tagRASPPPNBFW
  220. RASPPPNBFW {
  221.     DWORD dwSize;
  222.     DWORD dwError;
  223.     DWORD dwNetBiosError;
  224.     WCHAR szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
  225.     WCHAR szWorkstationName[ NETBIOS_NAME_LEN + 1 ];
  226.     BYTE bLana;
  227. };
  228. #define    RASPPPNBFA struct tagRASPPPNBFA
  229. RASPPPNBFA {
  230.     DWORD dwSize;
  231.     DWORD dwError;
  232.     DWORD dwNetBiosError;
  233.     CHAR szNetBiosError[ NETBIOS_NAME_LEN + 1 ];
  234.     CHAR szWorkstationName[ NETBIOS_NAME_LEN + 1 ];
  235.     BYTE bLana;
  236. };
  237. #ifdef    UNICODE
  238. #define    RASPPPNBF RASPPPNBFW
  239. #else
  240. #define    RASPPPNBF RASPPPNBFA
  241. #endif
  242. #define    LPRASPPPNBFW RASPPPNBFW*
  243. #define    LPRASPPPNBFA RASPPPNBFA*
  244. #define    LPRASPPPNBF RASPPPNBF*
  245. #define    RASPPPIPXW struct tagRASIPXW
  246. RASPPPIPXW {
  247.     DWORD dwSize;
  248.     DWORD dwError;
  249.     WCHAR szIpxAddress[ RAS_MaxIpxAddress + 1 ];
  250. };
  251. #define    RASPPPIPXA struct tagRASPPPIPXA
  252. RASPPPIPXA {
  253.     DWORD dwSize;
  254.     DWORD dwError;
  255.     CHAR szIpxAddress[ RAS_MaxIpxAddress + 1 ];
  256. };
  257. #ifdef    UNICODE
  258. #define    RASPPPIPX RASPPPIPXW
  259. #else
  260. #define    RASPPPIPX RASPPPIPXA
  261. #endif
  262. #define    LPRASPPPIPXW RASPPPIPXW*
  263. #define    LPRASPPPIPXA RASPPPIPXA*
  264. #define    LPRASPPPIPX RASPPPIPX*
  265. #define    RASPPPIPW struct tagRASPPPIPW
  266. RASPPPIPW {
  267.     DWORD dwSize;
  268.     DWORD dwError;
  269.     WCHAR szIpAddress[ RAS_MaxIpAddress + 1 ];
  270.     WCHAR szServerIpAddress[ RAS_MaxIpAddress + 1 ];
  271. };
  272. #define    RASPPPIPA struct tagRASPPPIPA
  273. RASPPPIPA {
  274.     DWORD dwSize;
  275.     DWORD dwError;
  276.     CHAR szIpAddress[ RAS_MaxIpAddress + 1 ];
  277.     CHAR szServerIpAddress[ RAS_MaxIpAddress + 1 ];
  278. };
  279. #ifdef    UNICODE
  280. #define    RASPPPIP RASPPPIPW
  281. #else
  282. #define    RASPPPIP RASPPPIPA
  283. #endif
  284. #define    LPRASPPPIPW RASPPPIPW*
  285. #define    LPRASPPPIPA RASPPPIPA*
  286. #define    LPRASPPPIP RASPPPIP*
  287. #define    RASPPPLCP struct tagRASPPPLCP
  288. RASPPPLCP {
  289.     DWORD dwSize;
  290.     BOOL fBundled;
  291. };
  292. #define    LPRASPPPLCP RASPPPLCP*
  293. #define    RASSLIPW struct tagRASSLIPW
  294. RASSLIPW {
  295.     DWORD dwSize;
  296.     DWORD dwError;
  297.     WCHAR szIpAddress[ RAS_MaxIpAddress + 1 ];
  298. };
  299. #define    RASSLIPA struct tagRASSLIPA
  300. RASSLIPA {
  301.     DWORD dwSize;
  302.     DWORD dwError;
  303.     CHAR szIpAddress[ RAS_MaxIpAddress + 1 ];
  304. };
  305. #ifdef    UNICODE
  306. #define    RASSLIP RASSLIPW
  307. #else
  308. #define    RASSLIP RASSLIPA
  309. #endif
  310. #define    LPRASSLIPW RASSLIPW*
  311. #define    LPRASSLIPA RASSLIPA*
  312. #define    LPRASSLIP RASSLIP*
  313. #define    RASDIALEVENT "RasDialEvent"
  314. #define    WM_RASDIALEVENT 0xCCCD
  315. typedef    VOID (WINAPI *RASDIALFUNC)(UINT,RASCONNSTATE,DWORD);
  316. typedef    VOID (WINAPI *RASDIALFUNC1)(HRASCONN,UINT,RASCONNSTATE,DWORD,DWORD);
  317. typedef    DWORD (WINAPI *RASDIALFUNC2)(DWORD,DWORD,HRASCONN,UINT,RASCONNSTATE,DWORD,DWORD);
  318. #define    RASDEVINFOW struct tagRASDEVINFOW
  319. RASDEVINFOW {
  320.     DWORD dwSize;
  321.     WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  322.     WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  323. };
  324. #define    RASDEVINFOA struct tagRASDEVINFOA
  325. RASDEVINFOA {
  326.     DWORD dwSize;
  327.     CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  328.     CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  329. };
  330. #ifdef    UNICODE
  331. #define    RASDEVINFO RASDEVINFOW
  332. #else
  333. #define    RASDEVINFO RASDEVINFOA
  334. #endif
  335. #define    LPRASDEVINFOW RASDEVINFOW*
  336. #define    LPRASDEVINFOA RASDEVINFOA*
  337. #define    LPRASDEVINFO RASDEVINFO*
  338. #define    RASCTRYINFO struct RASCTRYINFO
  339. RASCTRYINFO {
  340.     DWORD dwSize;
  341.     DWORD dwCountryID;
  342.     DWORD dwNextCountryID;
  343.     DWORD dwCountryCode;
  344.     DWORD dwCountryNameOffset;
  345. };
  346. #define    RASCTRYINFOW RASCTRYINFO
  347. #define    RASCTRYINFOA RASCTRYINFO
  348. #define    LPRASCTRYINFOW RASCTRYINFOW*
  349. #define    LPRASCTRYINFOA RASCTRYINFOW*
  350. #define    LPRASCTRYINFO RASCTRYINFO*
  351. #define    RASIPADDR struct RASIPADDR
  352. RASIPADDR {
  353.     BYTE a;
  354.     BYTE b;
  355.     BYTE c;
  356.     BYTE d;
  357. };
  358. #define    RASENTRYA struct tagRASENTRYA
  359. RASENTRYA {
  360.     DWORD dwSize;
  361.     DWORD dwfOptions;
  362.     DWORD dwCountryID;
  363.     DWORD dwCountryCode;
  364.     CHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
  365.     CHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  366.     DWORD dwAlternateOffset;
  367.     RASIPADDR ipaddr;
  368.     RASIPADDR ipaddrDns;
  369.     RASIPADDR ipaddrDnsAlt;
  370.     RASIPADDR ipaddrWins;
  371.     RASIPADDR ipaddrWinsAlt;
  372.     DWORD dwFrameSize;
  373.     DWORD dwfNetProtocols;
  374.     DWORD dwFramingProtocol;
  375.     CHAR szScript[ MAX_PATH ];
  376.     CHAR szAutodialDll[ MAX_PATH ];
  377.     CHAR szAutodialFunc[ MAX_PATH ];
  378.     CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  379.     CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  380.     CHAR szX25PadType[ RAS_MaxPadType + 1 ];
  381.     CHAR szX25Address[ RAS_MaxX25Address + 1 ];
  382.     CHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
  383.     CHAR szX25UserData[ RAS_MaxUserData + 1 ];
  384.     DWORD dwChannels;
  385.     DWORD dwReserved1;
  386.     DWORD dwReserved2;
  387.     DWORD dwSubEntries;
  388.     DWORD dwDialMode;
  389.     DWORD dwDialExtraPercent;
  390.     DWORD dwDialExtraSampleSeconds;
  391.     DWORD dwHangUpExtraPercent;
  392.     DWORD dwHangUpExtraSampleSeconds;
  393.     DWORD dwIdleDisconnectSeconds;
  394. };
  395. #define    RASENTRYW struct tagRASENTRYW
  396. RASENTRYW {
  397.     DWORD dwSize;
  398.     DWORD dwfOptions;
  399.     DWORD dwCountryID;
  400.     DWORD dwCountryCode;
  401.     WCHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
  402.     WCHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  403.     DWORD dwAlternateOffset;
  404.     RASIPADDR ipaddr;
  405.     RASIPADDR ipaddrDns;
  406.     RASIPADDR ipaddrDnsAlt;
  407.     RASIPADDR ipaddrWins;
  408.     RASIPADDR ipaddrWinsAlt;
  409.     DWORD dwFrameSize;
  410.     DWORD dwfNetProtocols;
  411.     DWORD dwFramingProtocol;
  412.     WCHAR szScript[ MAX_PATH ];
  413.     WCHAR szAutodialDll[ MAX_PATH ];
  414.     WCHAR szAutodialFunc[ MAX_PATH ];
  415.     WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  416.     WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  417.     WCHAR szX25PadType[ RAS_MaxPadType + 1 ];
  418.     WCHAR szX25Address[ RAS_MaxX25Address + 1 ];
  419.     WCHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
  420.     WCHAR szX25UserData[ RAS_MaxUserData + 1 ];
  421.     DWORD dwChannels;
  422.     DWORD dwReserved1;
  423.     DWORD dwReserved2;
  424.     DWORD dwSubEntries;
  425.     DWORD dwDialMode;
  426.     DWORD dwDialExtraPercent;
  427.     DWORD dwDialExtraSampleSeconds;
  428.     DWORD dwHangUpExtraPercent;
  429.     DWORD dwHangUpExtraSampleSeconds;
  430.     DWORD dwIdleDisconnectSeconds;
  431. };
  432. #ifdef    UNICODE
  433. #define    RASENTRY RASENTRYW
  434. #else
  435. #define    RASENTRY RASENTRYA
  436. #endif
  437. #define    LPRASENTRYW RASENTRYW*
  438. #define    LPRASENTRYA RASENTRYA*
  439. #define    LPRASENTRY RASENTRY*
  440. #define    RASEO_UseCountryAndAreaCodes 1
  441. #define    RASEO_SpecificIpAddr 2
  442. #define    RASEO_SpecificNameServers 4
  443. #define    RASEO_IpHeaderCompression 8
  444. #define    RASEO_RemoteDefaultGateway 16
  445. #define    RASEO_DisableLcpExtensions 32
  446. #define    RASEO_TerminalBeforeDial 64
  447. #define    RASEO_TerminalAfterDial 0x80
  448. #define    RASEO_ModemLights 0x100
  449. #define    RASEO_SwCompression 0x200
  450. #define    RASEO_RequireEncryptedPw 0x400
  451. #define    RASEO_RequireMsEncryptedPw 0x800
  452. #define    RASEO_RequireDataEncryption 0x1000
  453. #define    RASEO_NetworkLogon 0x2000
  454. #define    RASEO_UseLogonCredentials 0x4000
  455. #define    RASEO_PromoteAlternates 0x08000
  456. #define    RASEO_SecureLocalFiles 0x10000
  457. #define    RASNP_NetBEUI 1
  458. #define    RASNP_Ipx 2
  459. #define    RASNP_Ip 4
  460. #define    RASFP_Ppp 1
  461. #define    RASFP_Slip 2
  462. #define    RASFP_Ras 4
  463. #define    RASDT_Modem TEXT("modem")
  464. #define    RASDT_Isdn TEXT("isdn")
  465. #define    RASDT_X25 TEXT("x25")
  466. typedef    BOOL (WINAPI *ORASADFUNC)(HWND,LPSTR,DWORD,LPDWORD);
  467. #define    RASCN_Connection 1
  468. #define    RASCN_Disconnection 2
  469. #define    RASCN_BandwidthAdded 4
  470. #define    RASCN_BandwidthRemoved 8
  471. #define    RASEDM_DialAll 1
  472. #define    RASEDM_DialAsNeeded 2
  473. #define    RASIDS_Disabled 0xffffffff
  474. #define    RASIDS_UseGlobalValue 0
  475. #define    RASADPARAMS struct tagRASADPARAMS
  476. RASADPARAMS
  477. {
  478.     DWORD dwSize;
  479.     HWND hwndOwner;
  480.     DWORD dwFlags;
  481.     LONG xDlg;
  482.     LONG yDlg;
  483. };
  484. #define    LPRASADPARAMS RASADPARAMS*
  485. #define    RASADFLG_PositionDlg 1
  486. typedef    BOOL (WINAPI *RASADFUNCA)(LPSTR,LPSTR,LPRASADPARAMS,LPDWORD);
  487. typedef    BOOL (WINAPI *RASADFUNCW)(LPWSTR,LPWSTR,LPRASADPARAMS,LPDWORD);
  488. #ifdef    UNICODE
  489. #define    RASADFUNC RASADFUNCW
  490. #else
  491. #define    RASADFUNC RASADFUNCA
  492. #endif
  493. #define    RASSUBENTRYA struct tagRASSUBENTRYA
  494. RASSUBENTRYA
  495. {
  496.     DWORD dwSize;
  497.     DWORD dwfFlags;
  498.     CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  499.     CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  500.     CHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  501.     DWORD dwAlternateOffset;
  502. };
  503. #define    RASSUBENTRYW struct tagRASSUBENTRYW
  504. RASSUBENTRYW
  505. {
  506.     DWORD dwSize;
  507.     DWORD dwfFlags;
  508.     WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
  509.     WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
  510.     WCHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
  511.     DWORD dwAlternateOffset;
  512. };
  513. #ifdef    UNICODE
  514. #define    RASSUBENTRY RASSUBENTRYW
  515. #else
  516. #define    RASSUBENTRY RASSUBENTRYA
  517. #endif
  518. #define    LPRASSUBENTRYW RASSUBENTRYW*
  519. #define    LPRASSUBENTRYA RASSUBENTRYA*
  520. #define    LPRASSUBENTRY RASSUBENTRY*
  521. #define    RASCREDENTIALSA struct tagRASCREDENTIALSA
  522. RASCREDENTIALSA
  523. {
  524.     DWORD dwSize;
  525.     DWORD dwMask;
  526.     CHAR szUserName[ UNLEN + 1 ];
  527.     CHAR szPassword[ PWLEN + 1 ];
  528.     CHAR szDomain[ DNLEN + 1 ];
  529. };
  530.  
  531. #define    RASCREDENTIALSW struct tagRASCREDENTIALSW
  532. RASCREDENTIALSW
  533. {
  534.     DWORD dwSize;
  535.     DWORD dwMask;
  536.     WCHAR szUserName[ UNLEN + 1 ];
  537.     WCHAR szPassword[ PWLEN + 1 ];
  538.     WCHAR szDomain[ DNLEN + 1 ];
  539. };
  540. #ifdef    UNICODE
  541. #define    RASCREDENTIALS RASCREDENTIALSW
  542. #else
  543. #define    RASCREDENTIALS RASCREDENTIALSA
  544. #endif
  545. #define    LPRASCREDENTIALSW RASCREDENTIALSW*
  546. #define    LPRASCREDENTIALSA RASCREDENTIALSA*
  547. #define    LPRASCREDENTIALS RASCREDENTIALS*
  548. #define    RASCM_UserName 1
  549. #define    RASCM_Password 2
  550. #define    RASCM_Domain 4
  551. #define    RASAUTODIALENTRYA struct tagRASAUTODIALENTRYA
  552. RASAUTODIALENTRYA
  553. {
  554.     DWORD dwSize;
  555.     DWORD dwFlags;
  556.     DWORD dwDialingLocation;
  557.     CHAR szPhonebook[ MAX_PATH ];
  558.     CHAR szEntry[ RAS_MaxEntryName + 1];
  559. };
  560.  
  561. #define    RASAUTODIALENTRYW struct tagRASAUTODIALENTRYW
  562. RASAUTODIALENTRYW
  563. {
  564.     DWORD dwSize;
  565.     DWORD dwFlags;
  566.     DWORD dwDialingLocation;
  567.     WCHAR szPhonebook[ MAX_PATH ];
  568.     WCHAR szEntry[ RAS_MaxEntryName + 1];
  569. };
  570. #ifdef    UNICODE
  571. #define    RASAUTODIALENTRY RASAUTODIALENTRYW
  572. #else
  573. #define    RASAUTODIALENTRY RASAUTODIALENTRYA
  574. #endif
  575. #define    LPRASAUTODIALENTRYW RASAUTODIALENTRYW*
  576. #define    LPRASAUTODIALENTRYA RASAUTODIALENTRYA*
  577. #define    LPRASAUTODIALENTRY RASAUTODIALENTRY*
  578. #define    RASADP_DisableConnectionQuery 0
  579. #define    RASADP_LoginSessionDisable 1
  580. #define    RASADP_SavedAddressesLimit 2
  581. #define    RASADP_FailedConnectionTimeout 3
  582. #define    RASADP_ConnectionQueryTimeout 4
  583. DWORD    APIENTRY RasDialA(LPRASDIALEXTENSIONS,LPSTR,LPRASDIALPARAMSA,DWORD,LPVOID,LPHRASCONN);
  584. DWORD    APIENTRY RasDialW(LPRASDIALEXTENSIONS,LPWSTR,LPRASDIALPARAMSW,DWORD,LPVOID,LPHRASCONN);
  585. DWORD    APIENTRY RasEnumConnectionsA(LPRASCONNA,LPDWORD,LPDWORD);
  586. DWORD    APIENTRY RasEnumConnectionsW(LPRASCONNW,LPDWORD,LPDWORD);
  587. DWORD    APIENTRY RasEnumEntriesA(LPSTR,LPSTR,LPRASENTRYNAMEA,LPDWORD,LPDWORD);
  588. DWORD    APIENTRY RasEnumEntriesW(LPWSTR,LPWSTR,LPRASENTRYNAMEW,LPDWORD,LPDWORD);
  589. DWORD    APIENTRY RasGetConnectStatusA(HRASCONN,LPRASCONNSTATUSA);
  590. DWORD    APIENTRY RasGetConnectStatusW(HRASCONN,LPRASCONNSTATUSW);
  591. DWORD    APIENTRY RasGetErrorStringA(UINT,LPSTR,DWORD);
  592. DWORD    APIENTRY RasGetErrorStringW(UINT,LPWSTR,DWORD);
  593. DWORD    APIENTRY RasHangUpA(HRASCONN);
  594. DWORD    APIENTRY RasHangUpW(HRASCONN);
  595. DWORD    APIENTRY RasGetProjectionInfoA(HRASCONN,RASPROJECTION,LPVOID,LPDWORD);
  596. DWORD    APIENTRY RasGetProjectionInfoW(HRASCONN,RASPROJECTION,LPVOID,LPDWORD);
  597. DWORD    APIENTRY RasCreatePhonebookEntryA(HWND,LPSTR);
  598. DWORD    APIENTRY RasCreatePhonebookEntryW(HWND,LPWSTR);
  599. DWORD    APIENTRY RasEditPhonebookEntryA(HWND,LPSTR,LPSTR);
  600. DWORD    APIENTRY RasEditPhonebookEntryW(HWND,LPWSTR,LPWSTR);
  601. DWORD    APIENTRY RasSetEntryDialParamsA(LPSTR,LPRASDIALPARAMSA,BOOL);
  602. DWORD    APIENTRY RasSetEntryDialParamsW(LPWSTR,LPRASDIALPARAMSW,BOOL);
  603. DWORD    APIENTRY RasGetEntryDialParamsA(LPSTR,LPRASDIALPARAMSA,LPBOOL);
  604. DWORD    APIENTRY RasGetEntryDialParamsW(LPWSTR,LPRASDIALPARAMSW,LPBOOL);
  605. DWORD    APIENTRY RasEnumDevicesA(LPRASDEVINFOA,LPDWORD,LPDWORD);
  606. DWORD    APIENTRY RasEnumDevicesW(LPRASDEVINFOW,LPDWORD,LPDWORD);
  607. DWORD    APIENTRY RasGetCountryInfoA(LPRASCTRYINFOA,LPDWORD);
  608. DWORD    APIENTRY RasGetCountryInfoW(LPRASCTRYINFOW,LPDWORD);
  609. DWORD    APIENTRY RasGetEntryPropertiesA(LPSTR,LPSTR,LPRASENTRYA,LPDWORD,LPBYTE,LPDWORD);
  610. DWORD    APIENTRY RasGetEntryPropertiesW(LPWSTR,LPWSTR,LPRASENTRYW,LPDWORD,LPBYTE,LPDWORD);
  611. DWORD    APIENTRY RasSetEntryPropertiesA(LPSTR,LPSTR,LPRASENTRYA,DWORD,LPBYTE,DWORD);
  612. DWORD    APIENTRY RasSetEntryPropertiesW(LPWSTR,LPWSTR,LPRASENTRYW,DWORD,LPBYTE,DWORD);
  613. DWORD    APIENTRY RasRenameEntryA(LPSTR,LPSTR,LPSTR);
  614. DWORD    APIENTRY RasRenameEntryW(LPWSTR,LPWSTR,LPWSTR);
  615. DWORD    APIENTRY RasDeleteEntryA(LPSTR,LPSTR);
  616. DWORD    APIENTRY RasDeleteEntryW(LPWSTR,LPWSTR);
  617. DWORD    APIENTRY RasValidateEntryNameA(LPSTR,LPSTR);
  618. DWORD    APIENTRY RasValidateEntryNameW(LPWSTR,LPWSTR);
  619. DWORD    APIENTRY RasGetSubEntryHandleA(HRASCONN,DWORD,LPHRASCONN);
  620. DWORD    APIENTRY RasGetSubEntryHandleW(HRASCONN,DWORD,LPHRASCONN);
  621. DWORD    APIENTRY RasGetCredentialsA(LPSTR,LPSTR,LPRASCREDENTIALSA);
  622. DWORD    APIENTRY RasGetCredentialsW(LPWSTR,LPWSTR,LPRASCREDENTIALSW);
  623. DWORD    APIENTRY RasSetCredentialsA(LPSTR,LPSTR,LPRASCREDENTIALSA,BOOL);
  624. DWORD    APIENTRY RasSetCredentialsW(LPWSTR,LPWSTR,LPRASCREDENTIALSW,BOOL);
  625. DWORD    APIENTRY RasConnectionNotificationA(HRASCONN,HANDLE,DWORD);
  626. DWORD    APIENTRY RasConnectionNotificationW(HRASCONN,HANDLE,DWORD);
  627. DWORD    APIENTRY RasGetSubEntryPropertiesA(LPSTR,LPSTR,DWORD,LPRASSUBENTRYA,LPDWORD,LPBYTE,LPDWORD);
  628. DWORD    APIENTRY RasGetSubEntryPropertiesW(LPWSTR,LPWSTR,DWORD,LPRASSUBENTRYW,LPDWORD,LPBYTE,LPDWORD);
  629. DWORD    APIENTRY RasSetSubEntryPropertiesA(LPSTR,LPSTR,DWORD,LPRASSUBENTRYA,DWORD,LPBYTE,DWORD);
  630. DWORD    APIENTRY RasSetSubEntryPropertiesW(LPWSTR,LPWSTR,DWORD,LPRASSUBENTRYW,DWORD,LPBYTE,DWORD);
  631. DWORD    APIENTRY RasGetAutodialAddressA(LPSTR,LPDWORD,LPRASAUTODIALENTRYA,LPDWORD,LPDWORD);
  632. DWORD    APIENTRY RasGetAutodialAddressW(LPWSTR,LPDWORD,LPRASAUTODIALENTRYW,LPDWORD,LPDWORD);
  633. DWORD    APIENTRY RasSetAutodialAddressA(LPSTR,DWORD,LPRASAUTODIALENTRYA,DWORD,DWORD);
  634. DWORD    APIENTRY RasSetAutodialAddressW(LPWSTR,DWORD,LPRASAUTODIALENTRYW,DWORD,DWORD);
  635. DWORD    APIENTRY RasEnumAutodialAddressesA(LPSTR *,LPDWORD,LPDWORD);
  636. DWORD    APIENTRY RasEnumAutodialAddressesW(LPWSTR *,LPDWORD,LPDWORD);
  637. DWORD    APIENTRY RasGetAutodialEnableA(DWORD,LPBOOL);
  638. DWORD    APIENTRY RasGetAutodialEnableW(DWORD,LPBOOL);
  639. DWORD    APIENTRY RasSetAutodialEnableA(DWORD,BOOL);
  640. DWORD    APIENTRY RasSetAutodialEnableW(DWORD,BOOL);
  641. DWORD    APIENTRY RasGetAutodialParamA(DWORD,LPVOID,LPDWORD);
  642. DWORD    APIENTRY RasGetAutodialParamW(DWORD,LPVOID,LPDWORD);
  643. DWORD    APIENTRY RasSetAutodialParamA(DWORD,LPVOID,DWORD);
  644. DWORD    APIENTRY RasSetAutodialParamW(DWORD,LPVOID,DWORD);
  645. #ifdef    UNICODE
  646. #define    RasDial RasDialW
  647. #define    RasEnumConnections RasEnumConnectionsW
  648. #define    RasEnumEntries RasEnumEntriesW
  649. #define    RasGetConnectStatus RasGetConnectStatusW
  650. #define    RasGetErrorString RasGetErrorStringW
  651. #define    RasHangUp RasHangUpW
  652. #define    RasGetProjectionInfo RasGetProjectionInfoW
  653. #define    RasCreatePhonebookEntry RasCreatePhonebookEntryW
  654. #define    RasEditPhonebookEntry RasEditPhonebookEntryW
  655. #define    RasSetEntryDialParams RasSetEntryDialParamsW
  656. #define    RasGetEntryDialParams RasGetEntryDialParamsW
  657. #define    RasEnumDevices RasEnumDevicesW
  658. #define    RasGetCountryInfo RasGetCountryInfoW
  659. #define    RasGetEntryProperties RasGetEntryPropertiesW
  660. #define    RasSetEntryProperties RasSetEntryPropertiesW
  661. #define    RasRenameEntry RasRenameEntryW
  662. #define    RasDeleteEntry RasDeleteEntryW
  663. #define    RasValidateEntryName RasValidateEntryNameW
  664. #define    RasGetSubEntryHandle RasGetSubEntryHandleW
  665. #define    RasConnectionNotification RasConnectionNotificationW
  666. #define    RasGetSubEntryProperties RasGetSubEntryPropertiesW
  667. #define    RasSetSubEntryProperties RasSetSubEntryPropertiesW
  668. #define    RasGetCredentials RasGetCredentialsW
  669. #define    RasSetCredentials RasSetCredentialsW
  670. #define    RasGetAutodialAddress RasGetAutodialAddressW
  671. #define    RasSetAutodialAddress RasSetAutodialAddressW
  672. #define    RasEnumAutodialAddresses RasEnumAutodialAddressesW
  673. #define    RasGetAutodialEnable RasGetAutodialEnableW
  674. #define    RasSetAutodialEnable RasSetAutodialEnableW
  675. #define    RasGetAutodialParam RasGetAutodialParamW
  676. #define    RasSetAutodialParam RasSetAutodialParamW
  677. #else
  678. #define    RasDial RasDialA
  679. #define    RasEnumConnections RasEnumConnectionsA
  680. #define    RasEnumEntries RasEnumEntriesA
  681. #define    RasGetConnectStatus RasGetConnectStatusA
  682. #define    RasGetErrorString RasGetErrorStringA
  683. #define    RasHangUp RasHangUpA
  684. #define    RasGetProjectionInfo RasGetProjectionInfoA
  685. #define    RasCreatePhonebookEntry RasCreatePhonebookEntryA
  686. #define    RasEditPhonebookEntry RasEditPhonebookEntryA
  687. #define    RasSetEntryDialParams RasSetEntryDialParamsA
  688. #define    RasGetEntryDialParams RasGetEntryDialParamsA
  689. #define    RasEnumDevices RasEnumDevicesA
  690. #define    RasGetCountryInfo RasGetCountryInfoA
  691. #define    RasGetEntryProperties RasGetEntryPropertiesA
  692. #define    RasSetEntryProperties RasSetEntryPropertiesA
  693. #define    RasRenameEntry RasRenameEntryA
  694. #define    RasDeleteEntry RasDeleteEntryA
  695. #define    RasValidateEntryName RasValidateEntryNameA
  696. #define    RasGetSubEntryHandle RasGetSubEntryHandleA
  697. #define    RasConnectionNotification RasConnectionNotificationA
  698. #define    RasGetSubEntryProperties RasGetSubEntryPropertiesA
  699. #define    RasSetSubEntryProperties RasSetSubEntryPropertiesA
  700. #define    RasGetCredentials RasGetCredentialsA
  701. #define    RasSetCredentials RasSetCredentialsA
  702. #define    RasGetAutodialAddress RasGetAutodialAddressA
  703. #define    RasSetAutodialAddress RasSetAutodialAddressA
  704. #define    RasEnumAutodialAddresses RasEnumAutodialAddressesA
  705. #define    RasGetAutodialEnable RasGetAutodialEnableA
  706. #define    RasSetAutodialEnable RasSetAutodialEnableA
  707. #define    RasGetAutodialParam RasGetAutodialParamA
  708. #define    RasSetAutodialParam RasSetAutodialParamA
  709. #endif
  710. #pragma    pack(pop)
  711. #endif
  712.