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