xref: /reactos/sdk/include/psdk/wininet.h (revision 56601978)
1 /*
2  * Copyright (C) 2000 Ulrich Czekalla
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #ifndef _WINE_WININET_H_
20 #define _WINE_WININET_H_
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 #define INTERNETAPI
27 #define BOOLAPI _Success_(return != 0) INTERNETAPI BOOL WINAPI
28 
29 typedef LPVOID HINTERNET;
30 typedef HINTERNET * LPHINTERNET;
31 
32 typedef WORD INTERNET_PORT;
33 typedef INTERNET_PORT * LPINTERNET_PORT;
34 
35 
36 #define INTERNET_INVALID_PORT_NUMBER    0
37 
38 #define INTERNET_DEFAULT_FTP_PORT       21
39 #define INTERNET_DEFAULT_GOPHER_PORT    70
40 #define INTERNET_DEFAULT_HTTP_PORT      80
41 #define INTERNET_DEFAULT_HTTPS_PORT     443
42 #define INTERNET_DEFAULT_SOCKS_PORT     1080
43 
44 #define INTERNET_MAX_HOST_NAME_LENGTH   256
45 #define INTERNET_MAX_USER_NAME_LENGTH   128
46 #define INTERNET_MAX_PASSWORD_LENGTH    128
47 #define INTERNET_MAX_PORT_NUMBER_LENGTH 5
48 #define INTERNET_MAX_PORT_NUMBER_VALUE  65535
49 #define INTERNET_MAX_PATH_LENGTH        2048
50 #define INTERNET_MAX_SCHEME_LENGTH      32
51 #define INTERNET_MAX_URL_LENGTH         (INTERNET_MAX_SCHEME_LENGTH + sizeof("://")+ INTERNET_MAX_PATH_LENGTH)
52 #define INTERNET_KEEP_ALIVE_UNKNOWN     ((DWORD)-1)
53 #define INTERNET_KEEP_ALIVE_ENABLED     1
54 #define INTERNET_KEEP_ALIVE_DISABLED    0
55 #define INTERNET_REQFLAG_FROM_CACHE     0x00000001
56 #define INTERNET_REQFLAG_ASYNC          0x00000002
57 #define INTERNET_REQFLAG_VIA_PROXY      0x00000004
58 #define INTERNET_REQFLAG_NO_HEADERS     0x00000008
59 #define INTERNET_REQFLAG_PASSIVE        0x00000010
60 #define INTERNET_REQFLAG_CACHE_WRITE_DISABLED 0x00000040
61 #define INTERNET_FLAG_RELOAD            0x80000000
62 #define INTERNET_FLAG_RAW_DATA          0x40000000
63 #define INTERNET_FLAG_EXISTING_CONNECT  0x20000000
64 #define INTERNET_FLAG_ASYNC             0x10000000
65 #define INTERNET_FLAG_PASSIVE           0x08000000
66 #define INTERNET_FLAG_NO_CACHE_WRITE    0x04000000
67 #define INTERNET_FLAG_DONT_CACHE        INTERNET_FLAG_NO_CACHE_WRITE
68 #define INTERNET_FLAG_MAKE_PERSISTENT   0x02000000
69 #define INTERNET_FLAG_FROM_CACHE        0x01000000
70 #define INTERNET_FLAG_OFFLINE           INTERNET_FLAG_FROM_CACHE
71 #define INTERNET_FLAG_SECURE            0x00800000
72 #define INTERNET_FLAG_KEEP_CONNECTION   0x00400000
73 #define INTERNET_FLAG_NO_AUTO_REDIRECT  0x00200000
74 #define INTERNET_FLAG_READ_PREFETCH     0x00100000
75 #define INTERNET_FLAG_NO_COOKIES        0x00080000
76 #define INTERNET_FLAG_NO_AUTH           0x00040000
77 #define INTERNET_FLAG_CACHE_IF_NET_FAIL 0x00010000
78 #define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP   0x00008000
79 #define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS  0x00004000
80 #define INTERNET_FLAG_IGNORE_CERT_DATE_INVALID  0x00002000
81 #define INTERNET_FLAG_IGNORE_CERT_CN_INVALID    0x00001000
82 #define INTERNET_FLAG_RESYNCHRONIZE     0x00000800
83 #define INTERNET_FLAG_HYPERLINK         0x00000400
84 #define INTERNET_FLAG_NO_UI             0x00000200
85 #define INTERNET_FLAG_PRAGMA_NOCACHE    0x00000100
86 #define INTERNET_FLAG_CACHE_ASYNC       0x00000080
87 #define INTERNET_FLAG_FORMS_SUBMIT      0x00000040
88 #define INTERNET_FLAG_NEED_FILE         0x00000010
89 #define INTERNET_FLAG_MUST_CACHE_REQUEST INTERNET_FLAG_NEED_FILE
90 #define INTERNET_FLAG_TRANSFER_ASCII    FTP_TRANSFER_TYPE_ASCII
91 #define INTERNET_FLAG_TRANSFER_BINARY   FTP_TRANSFER_TYPE_BINARY
92 #define SECURITY_INTERNET_MASK  (INTERNET_FLAG_IGNORE_CERT_CN_INVALID|\
93 INTERNET_FLAG_IGNORE_CERT_DATE_INVALID|\
94 INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS|\
95 INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP)
96 
97 #define INTERNET_FLAGS_MASK     (INTERNET_FLAG_RELOAD \
98                                 | INTERNET_FLAG_RAW_DATA            \
99                                 | INTERNET_FLAG_EXISTING_CONNECT    \
100                                 | INTERNET_FLAG_ASYNC               \
101                                 | INTERNET_FLAG_PASSIVE             \
102                                 | INTERNET_FLAG_NO_CACHE_WRITE      \
103                                 | INTERNET_FLAG_MAKE_PERSISTENT     \
104                                 | INTERNET_FLAG_FROM_CACHE          \
105                                 | INTERNET_FLAG_SECURE              \
106                                 | INTERNET_FLAG_KEEP_CONNECTION     \
107                                 | INTERNET_FLAG_NO_AUTO_REDIRECT    \
108                                 | INTERNET_FLAG_READ_PREFETCH       \
109                                 | INTERNET_FLAG_NO_COOKIES          \
110                                 | INTERNET_FLAG_NO_AUTH             \
111                                 | INTERNET_FLAG_CACHE_IF_NET_FAIL   \
112                                 | SECURITY_INTERNET_MASK            \
113                                 | INTERNET_FLAG_RESYNCHRONIZE       \
114                                 | INTERNET_FLAG_HYPERLINK           \
115                                 | INTERNET_FLAG_NO_UI               \
116                                 | INTERNET_FLAG_PRAGMA_NOCACHE      \
117                                 | INTERNET_FLAG_CACHE_ASYNC         \
118                                 | INTERNET_FLAG_FORMS_SUBMIT        \
119                                 | INTERNET_FLAG_NEED_FILE           \
120                                 | INTERNET_FLAG_TRANSFER_BINARY     \
121                                 | INTERNET_FLAG_TRANSFER_ASCII      \
122                                 )
123 
124 #define INTERNET_ERROR_MASK_INSERT_CDROM                    0x1
125 #define INTERNET_ERROR_MASK_COMBINED_SEC_CERT               0x2
126 #define INTERNET_ERROR_MASK_NEED_MSN_SSPI_PKG               0x4
127 #define INTERNET_ERROR_MASK_LOGIN_FAILURE_DISPLAY_ENTITY_BODY 0x8
128 
129 #define INTERNET_OPTIONS_MASK   (~INTERNET_FLAGS_MASK)
130 #define WININET_API_FLAG_ASYNC          0x00000001
131 #define WININET_API_FLAG_SYNC           0x00000004
132 #define WININET_API_FLAG_USE_CONTEXT    0x00000008
133 #define INTERNET_NO_CALLBACK            0
134 
135 typedef enum {
136     INTERNET_SCHEME_PARTIAL = -2,
137     INTERNET_SCHEME_UNKNOWN = -1,
138     INTERNET_SCHEME_DEFAULT = 0,
139     INTERNET_SCHEME_FTP,   /* yes, this contradicts winhttp.h */
140     INTERNET_SCHEME_GOPHER,
141     INTERNET_SCHEME_HTTP,  /* yes, this contradicts winhttp.h */
142     INTERNET_SCHEME_HTTPS, /* yes, this contradicts winhttp.h */
143     INTERNET_SCHEME_FILE,
144     INTERNET_SCHEME_NEWS,
145     INTERNET_SCHEME_MAILTO,
146     INTERNET_SCHEME_SOCKS, /* yes, this contradicts winhttp.h */
147     INTERNET_SCHEME_JAVASCRIPT,
148     INTERNET_SCHEME_VBSCRIPT,
149     INTERNET_SCHEME_RES,
150     INTERNET_SCHEME_FIRST = INTERNET_SCHEME_FTP,
151     INTERNET_SCHEME_LAST = INTERNET_SCHEME_RES
152 } INTERNET_SCHEME,* LPINTERNET_SCHEME;
153 
154 typedef struct {
155     DWORD_PTR dwResult;
156     DWORD dwError;
157 } INTERNET_ASYNC_RESULT,* LPINTERNET_ASYNC_RESULT;
158 
159 typedef struct {
160     DWORD dwAccessType;
161     LPCSTR lpszProxy;
162     LPCSTR lpszProxyBypass;
163 } INTERNET_PROXY_INFOA,* LPINTERNET_PROXY_INFOA;
164 
165 typedef struct {
166     DWORD dwAccessType;
167     LPCWSTR lpszProxy;
168     LPCWSTR lpszProxyBypass;
169 } INTERNET_PROXY_INFOW,* LPINTERNET_PROXY_INFOW;
170 
171 
172 DECL_WINELIB_TYPE_AW(INTERNET_PROXY_INFO)
173 DECL_WINELIB_TYPE_AW(LPINTERNET_PROXY_INFO)
174 
175 typedef struct {
176     DWORD dwMajorVersion;
177     DWORD dwMinorVersion;
178 } INTERNET_VERSION_INFO,* LPINTERNET_VERSION_INFO;
179 
180 typedef struct {
181     DWORD dwMajorVersion;
182     DWORD dwMinorVersion;
183 } HTTP_VERSION_INFO,* LPHTTP_VERSION_INFO;
184 
185 typedef struct {
186     DWORD dwConnectedState;
187     DWORD dwFlags;
188 } INTERNET_CONNECTED_INFO,* LPINTERNET_CONNECTED_INFO;
189 
190 #define ISO_FORCE_DISCONNECTED  0x00000001
191 
192 typedef struct {
193     DWORD   dwStructSize;
194     LPSTR   lpszScheme;
195     DWORD   dwSchemeLength;
196     INTERNET_SCHEME nScheme;
197     LPSTR   lpszHostName;
198     DWORD   dwHostNameLength;
199     INTERNET_PORT nPort;
200     LPSTR   lpszUserName;
201     DWORD   dwUserNameLength;
202     LPSTR   lpszPassword;
203     DWORD   dwPasswordLength;
204     LPSTR   lpszUrlPath;
205     DWORD   dwUrlPathLength;
206     LPSTR   lpszExtraInfo;
207     DWORD   dwExtraInfoLength;
208 } URL_COMPONENTSA,* LPURL_COMPONENTSA;
209 
210 typedef struct {
211     DWORD   dwStructSize;
212     LPWSTR  lpszScheme;
213     DWORD   dwSchemeLength;
214     INTERNET_SCHEME nScheme;
215     LPWSTR  lpszHostName;
216     DWORD   dwHostNameLength;
217     INTERNET_PORT nPort;
218     LPWSTR  lpszUserName;
219     DWORD   dwUserNameLength;
220     LPWSTR  lpszPassword;
221     DWORD   dwPasswordLength;
222     LPWSTR  lpszUrlPath;
223     DWORD   dwUrlPathLength;
224     LPWSTR  lpszExtraInfo;
225     DWORD   dwExtraInfoLength;
226 } URL_COMPONENTSW,* LPURL_COMPONENTSW;
227 
228 DECL_WINELIB_TYPE_AW(URL_COMPONENTS)
229 DECL_WINELIB_TYPE_AW(LPURL_COMPONENTS)
230 
231 typedef struct {
232     FILETIME ftExpiry;
233     FILETIME ftStart;
234     LPSTR lpszSubjectInfo;
235     LPSTR lpszIssuerInfo;
236     LPSTR lpszProtocolName;
237     LPSTR lpszSignatureAlgName;
238     LPSTR lpszEncryptionAlgName;
239     DWORD dwKeySize;
240 
241 } INTERNET_CERTIFICATE_INFOA,* LPINTERNET_CERTIFICATE_INFOA;
242 
243 typedef struct {
244     FILETIME ftExpiry;
245     FILETIME ftStart;
246     LPWSTR lpszSubjectInfo;
247     LPWSTR lpszIssuerInfo;
248     LPWSTR lpszProtocolName;
249     LPWSTR lpszSignatureAlgName;
250     LPWSTR lpszEncryptionAlgName;
251     DWORD dwKeySize;
252 
253 } INTERNET_CERTIFICATE_INFOW,* LPINTERNET_CERTIFICATE_INFOW;
254 
255 DECL_WINELIB_TYPE_AW(INTERNET_CERTIFICATE_INFO)
256 DECL_WINELIB_TYPE_AW(LPINTERNET_CERTIFICATE_INFO)
257 
258 typedef struct _INTERNET_BUFFERSA {
259     DWORD dwStructSize;
260     struct _INTERNET_BUFFERSA * Next;
261     LPCSTR   lpcszHeader;
262     DWORD dwHeadersLength;
263     DWORD dwHeadersTotal;
264     LPVOID lpvBuffer;
265     DWORD dwBufferLength;
266     DWORD dwBufferTotal;
267     DWORD dwOffsetLow;
268     DWORD dwOffsetHigh;
269 } INTERNET_BUFFERSA,* LPINTERNET_BUFFERSA;
270 
271 typedef struct _INTERNET_BUFFERSW {
272     DWORD dwStructSize;
273     struct _INTERNET_BUFFERSW * Next;
274     LPCWSTR  lpcszHeader;
275     DWORD dwHeadersLength;
276     DWORD dwHeadersTotal;
277     LPVOID lpvBuffer;
278     DWORD dwBufferLength;
279     DWORD dwBufferTotal;
280     DWORD dwOffsetLow;
281     DWORD dwOffsetHigh;
282 } INTERNET_BUFFERSW,* LPINTERNET_BUFFERSW;
283 
284 DECL_WINELIB_TYPE_AW(INTERNET_BUFFERS)
285 DECL_WINELIB_TYPE_AW(LPINTERNET_BUFFERS)
286 
287 #define GROUP_OWNER_STORAGE_SIZE 4
288 #define GROUPNAME_MAX_LENGTH 120
289 
290 typedef struct _INTERNET_CACHE_GROUP_INFOA {
291     DWORD dwGroupSize;
292     DWORD dwGroupFlags;
293     DWORD dwGroupType;
294     DWORD dwDiskUsage;
295     DWORD dwDiskQuota;
296     DWORD dwOwnerStorage[GROUP_OWNER_STORAGE_SIZE];
297     CHAR  szGroupName[GROUPNAME_MAX_LENGTH];
298 } INTERNET_CACHE_GROUP_INFOA, * LPINTERNET_CACHE_GROUP_INFOA;
299 
300 typedef struct _INTERNET_CACHE_GROUP_INFOW {
301     DWORD dwGroupSize;
302     DWORD dwGroupFlags;
303     DWORD dwGroupType;
304     DWORD dwDiskUsage;
305     DWORD dwDiskQuota;
306     DWORD dwOwnerStorage[GROUP_OWNER_STORAGE_SIZE];
307     WCHAR szGroupName[GROUPNAME_MAX_LENGTH];
308 } INTERNET_CACHE_GROUP_INFOW, *LPINTERNET_CACHE_GROUP_INFOW;
309 
310 DECL_WINELIB_TYPE_AW(INTERNET_CACHE_GROUP_INFO)
311 DECL_WINELIB_TYPE_AW(LPINTERNET_CACHE_GROUP_INFO)
312 
313 typedef struct _INTERNET_PER_CONN_OPTIONA {
314     DWORD dwOption;
315     union {
316         DWORD    dwValue;
317         LPSTR    pszValue;
318         FILETIME ftValue;
319     } Value;
320 } INTERNET_PER_CONN_OPTIONA, *LPINTERNET_PER_CONN_OPTIONA;
321 
322 typedef struct _INTERNET_PER_CONN_OPTIONW {
323     DWORD dwOption;
324     union {
325         DWORD    dwValue;
326         LPWSTR   pszValue;
327         FILETIME ftValue;
328     } Value;
329 } INTERNET_PER_CONN_OPTIONW, *LPINTERNET_PER_CONN_OPTIONW;
330 
331 DECL_WINELIB_TYPE_AW(INTERNET_PER_CONN_OPTION)
332 DECL_WINELIB_TYPE_AW(LPINTERNET_PER_CONN_OPTION)
333 
334 #define INTERNET_PER_CONN_FLAGS                        1
335 #define INTERNET_PER_CONN_PROXY_SERVER                 2
336 #define INTERNET_PER_CONN_PROXY_BYPASS                 3
337 #define INTERNET_PER_CONN_AUTOCONFIG_URL               4
338 #define INTERNET_PER_CONN_AUTODISCOVERY_FLAGS          5
339 #define INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL     6
340 #define INTERNET_PER_CONN_AUTOCONFIG_RELOAD_DELAY_MINS 7
341 #define INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME  8
342 #define INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL   9
343 #define INTERNET_PER_CONN_FLAGS_UI                     10
344 
345 /* Values for INTERNET_PER_CONN_FLAGS */
346 #define PROXY_TYPE_DIRECT         0x00000001
347 #define PROXY_TYPE_PROXY          0x00000002
348 #define PROXY_TYPE_AUTO_PROXY_URL 0x00000004
349 #define PROXY_TYPE_AUTO_DETECT    0x00000008
350 /* Values for INTERNET_PER_CONN_AUTODISCOVERY_FLAGS */
351 #define AUTO_PROXY_FLAG_USER_SET                0x00000001
352 #define AUTO_PROXY_FLAG_ALWAYS_DETECT           0x00000002
353 #define AUTO_PROXY_FLAG_DETECTION_RUN           0x00000004
354 #define AUTO_PROXY_FLAG_MIGRATED                0x00000008
355 #define AUTO_PROXY_FLAG_DONT_CACHE_PROXY_RESULT 0x00000010
356 #define AUTO_PROXY_FLAG_CACHE_INIT_RUN          0x00000020
357 #define AUTO_PROXY_FLAG_DETECTION_SUSPECT       0x00000040
358 
359 typedef struct _INTERNET_PER_CONN_OPTION_LISTA {
360     DWORD                       dwSize;
361     LPSTR                       pszConnection;
362     DWORD                       dwOptionCount;
363     DWORD                       dwOptionError;
364     LPINTERNET_PER_CONN_OPTIONA pOptions;
365 } INTERNET_PER_CONN_OPTION_LISTA, *LPINTERNET_PER_CONN_OPTION_LISTA;
366 
367 typedef struct _INTERNET_PER_CONN_OPTION_LISTW {
368     DWORD                       dwSize;
369     LPWSTR                      pszConnection;
370     DWORD                       dwOptionCount;
371     DWORD                       dwOptionError;
372     LPINTERNET_PER_CONN_OPTIONW pOptions;
373 } INTERNET_PER_CONN_OPTION_LISTW, *LPINTERNET_PER_CONN_OPTION_LISTW;
374 
375 DECL_WINELIB_TYPE_AW(INTERNET_PER_CONN_OPTION_LIST)
376 DECL_WINELIB_TYPE_AW(LPINTERNET_PER_CONN_OPTION_LIST)
377 
378 typedef struct _INTERNET_DIAGNOSTIC_SOCKET_INFO
379 {
380     DWORD_PTR Socket;
381     DWORD     SourcePort;
382     DWORD     DestPort;
383     DWORD     Flags;
384 } INTERNET_DIAGNOSTIC_SOCKET_INFO, *LPINTERNET_DIAGNOSTIC_SOCKET_INFO;
385 
386 #define IDSI_FLAG_KEEP_ALIVE 0x00000001
387 #define IDSI_FLAG_SECURE     0x00000002
388 #define IDSI_FLAG_PROXY      0x00000004
389 #define IDSI_FLAG_TUNNEL     0x00000008
390 
391 BOOLAPI
392 InternetTimeFromSystemTimeA(
393   _In_ CONST SYSTEMTIME *pst,
394   _In_ DWORD dwRFC,
395   _Out_writes_bytes_(cbTime) LPSTR lpszTime,
396   _In_ DWORD cbTime);
397 
398 BOOLAPI
399 InternetTimeFromSystemTimeW(
400   _In_ CONST SYSTEMTIME *pst,
401   _In_ DWORD dwRFC,
402   _Out_writes_bytes_(cbTime) LPWSTR lpszTime,
403   _In_ DWORD cbTime);
404 
405 #define InternetTimeFromSystemTime WINELIB_NAME_AW(InternetTimeFromSystemTime)
406 
407 #define INTERNET_RFC1123_FORMAT    0
408 #define INTERNET_RFC1123_BUFSIZE   30
409 
410 BOOLAPI
411 InternetTimeToSystemTimeA(
412   _In_ LPCSTR,
413   _Out_ SYSTEMTIME *,
414   _Reserved_ DWORD);
415 
416 BOOLAPI
417 InternetTimeToSystemTimeW(
418   _In_ LPCWSTR,
419   _Out_ SYSTEMTIME *,
420   _Reserved_ DWORD);
421 
422 #define InternetTimeToSystemTime WINELIB_NAME_AW(InternetTimeToSystemTime)
423 
424 BOOLAPI
425 InternetCrackUrlA(
426   _In_reads_(dwUrlLength) LPCSTR lpszUrl,
427   _In_ DWORD dwUrlLength,
428   _In_ DWORD dwFlags,
429   _Inout_ LPURL_COMPONENTSA lpUrlComponents);
430 
431 BOOLAPI
432 InternetCrackUrlW(
433   _In_reads_(dwUrlLength) LPCWSTR lpszUrl,
434   _In_ DWORD dwUrlLength,
435   _In_ DWORD dwFlags,
436   _Inout_ LPURL_COMPONENTSW lpUrlComponents);
437 
438 #define InternetCrackUrl WINELIB_NAME_AW(InternetCrackUrl)
439 
440 BOOLAPI
441 InternetCreateUrlA(
442   _In_ LPURL_COMPONENTSA lpUrlComponents,
443   _In_ DWORD dwFlags,
444   _Out_writes_opt_(*lpdwUrlLength) LPSTR lpszUrl,
445   _Inout_ LPDWORD lpdwUrlLength);
446 
447 BOOLAPI
448 InternetCreateUrlW(
449   _In_ LPURL_COMPONENTSW lpUrlComponents,
450   _In_ DWORD dwFlags,
451   _Out_writes_opt_(*lpdwUrlLength) LPWSTR lpszUrl,
452   _Inout_ LPDWORD lpdwUrlLength);
453 
454 #define InternetCreateUrl WINELIB_NAME_AW(InternetCreateUrl)
455 
456 BOOLAPI
457 InternetCanonicalizeUrlA(
458   _In_ LPCSTR lpszUrl,
459   _Out_writes_(*lpdwBufferLength) LPSTR lpszBuffer,
460   _Inout_ LPDWORD lpdwBufferLength,
461   _In_ DWORD dwFlags);
462 
463 BOOLAPI
464 InternetCanonicalizeUrlW(
465   _In_ LPCWSTR lpszUrl,
466   _Out_writes_(*lpdwBufferLength) LPWSTR lpszBuffer,
467   _Inout_ LPDWORD lpdwBufferLength,
468   _In_ DWORD dwFlags);
469 
470 #define InternetCanonicalizeUrl WINELIB_NAME_AW(InternetCanonicalizeUrl)
471 
472 BOOLAPI
473 InternetCombineUrlA(
474   _In_ LPCSTR lpszBaseUrl,
475   _In_ LPCSTR lpszRelativeUrl,
476   _Out_writes_(*lpdwBufferLength) LPSTR lpszBuffer,
477   _Inout_ LPDWORD lpdwBufferLength,
478   _In_ DWORD dwFlags);
479 
480 BOOLAPI
481 InternetCombineUrlW(
482   _In_ LPCWSTR lpszBaseUrl,
483   _In_ LPCWSTR lpszRelativeUrl,
484   _Out_writes_(*lpdwBufferLength) LPWSTR lpszBuffer,
485   _Inout_ LPDWORD lpdwBufferLength,
486   _In_ DWORD dwFlags);
487 
488 #define InternetCombineUrl WINELIB_NAME_AW(InternetCombineUrl)
489 
490 #define ICU_ESCAPE      0x80000000
491 #define ICU_USERNAME    0x40000000
492 #define ICU_NO_ENCODE   0x20000000
493 #define ICU_DECODE      0x10000000
494 #define ICU_NO_META     0x08000000
495 #define ICU_ENCODE_SPACES_ONLY 0x04000000
496 #define ICU_BROWSER_MODE 0x02000000
497 #define ICU_ENCODE_PERCENT 0x00001000
498 
499 INTERNETAPI
500 HINTERNET
501 WINAPI
502 InternetOpenA(
503   _In_opt_ LPCSTR,
504   _In_ DWORD,
505   _In_opt_ LPCSTR,
506   _In_opt_ LPCSTR,
507   _In_ DWORD);
508 
509 INTERNETAPI
510 HINTERNET
511 WINAPI
512 InternetOpenW(
513   _In_opt_ LPCWSTR,
514   _In_ DWORD,
515   _In_opt_ LPCWSTR,
516   _In_opt_ LPCWSTR,
517   _In_ DWORD);
518 
519 #define InternetOpen WINELIB_NAME_AW(InternetOpen)
520 
521 #define INTERNET_OPEN_TYPE_PRECONFIG                    0
522 #define INTERNET_OPEN_TYPE_DIRECT                       1
523 #define INTERNET_OPEN_TYPE_PROXY                        3
524 #define INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY  4
525 #define PRE_CONFIG_INTERNET_ACCESS  INTERNET_OPEN_TYPE_PRECONFIG
526 #define LOCAL_INTERNET_ACCESS       INTERNET_OPEN_TYPE_DIRECT
527 #define CERN_PROXY_INTERNET_ACCESS  INTERNET_OPEN_TYPE_PROXY
528 
529 BOOLAPI InternetCloseHandle(_In_ HINTERNET);
530 
531 INTERNETAPI
532 HINTERNET
533 WINAPI
534 InternetConnectA(
535   _In_ HINTERNET,
536   _In_ LPCSTR,
537   _In_ INTERNET_PORT,
538   _In_opt_ LPCSTR,
539   _In_opt_ LPCSTR,
540   _In_ DWORD,
541   _In_ DWORD,
542   _In_opt_ DWORD_PTR);
543 
544 INTERNETAPI
545 HINTERNET
546 WINAPI
547 InternetConnectW(
548   _In_ HINTERNET,
549   _In_ LPCWSTR,
550   _In_ INTERNET_PORT,
551   _In_opt_ LPCWSTR,
552   _In_opt_ LPCWSTR,
553   _In_ DWORD,
554   _In_ DWORD,
555   _In_opt_ DWORD_PTR);
556 
557 #define InternetConnect WINELIB_NAME_AW(InternetConnect)
558 
559 #define INTERNET_SERVICE_URL    0
560 #define INTERNET_SERVICE_FTP    1
561 #define INTERNET_SERVICE_GOPHER 2
562 #define INTERNET_SERVICE_HTTP   3
563 
564 #define InternetConnectUrl(hInternet,lpszUrl,dwFlags,dwContext) \
565     InternetConnect(hInternet,\
566                     lpszUrl,\
567                     INTERNET_INVALID_PORT_NUMBER,\
568                     NULL,\
569                     NULL,\
570                     INTERNET_SERVICE_URL,\
571                     dwFlags,\
572                     dwContext                       \
573                     )
574 
575 INTERNETAPI
576 HINTERNET
577 WINAPI
578 InternetOpenUrlA(
579   _In_ HINTERNET hInternet,
580   _In_ LPCSTR lpszUrl,
581   _In_reads_opt_(dwHeadersLength) LPCSTR lpszHeaders,
582   _In_ DWORD dwHeadersLength,
583   _In_ DWORD dwFlags,
584   _In_opt_ DWORD_PTR dwContext);
585 
586 INTERNETAPI
587 HINTERNET
588 WINAPI
589 InternetOpenUrlW(
590   _In_ HINTERNET hInternet,
591   _In_ LPCWSTR lpszUrl,
592   _In_reads_opt_(dwHeadersLength) LPCWSTR lpszHeaders,
593   _In_ DWORD dwHeadersLength,
594   _In_ DWORD dwFlags,
595   _In_opt_ DWORD_PTR dwContext);
596 
597 #define InternetOpenUrl WINELIB_NAME_AW(InternetOpenUrl)
598 
599 BOOLAPI
600 InternetReadFile(
601   _In_ HINTERNET hFile,
602   _Out_writes_bytes_(dwNumberOfBytesToRead) __out_data_source(NETWORK) LPVOID lpBuffer,
603   _In_ DWORD dwNumberOfBytesToRead,
604   _Out_ LPDWORD lpdwNumberOfBytesRead);
605 
606 BOOLAPI
607 InternetReadFileExA(
608   _In_ HINTERNET hFile,
609   _Out_ __out_data_source(NETWORK) LPINTERNET_BUFFERSA lpBuffersOut,
610   _In_ DWORD dwFlags,
611   _In_opt_ DWORD_PTR dwContext);
612 
613 BOOLAPI
614 InternetReadFileExW(
615   _In_ HINTERNET hFile,
616   _Out_ __out_data_source(NETWORK) LPINTERNET_BUFFERSW lpBuffersOut,
617   _In_ DWORD dwFlags,
618   _In_opt_ DWORD_PTR dwContext);
619 
620 #define InternetReadFileEx WINELIB_NAME_AW(InternetReadFileEx)
621 
622 #define IRF_ASYNC       WININET_API_FLAG_ASYNC
623 #define IRF_SYNC        WININET_API_FLAG_SYNC
624 #define IRF_USE_CONTEXT WININET_API_FLAG_USE_CONTEXT
625 #define IRF_NO_WAIT     0x00000008
626 
627 INTERNETAPI
628 DWORD
629 WINAPI
630 InternetSetFilePointer(
631   _In_ HINTERNET,
632   _In_ LONG,
633   _Inout_opt_ PVOID,
634   _In_ DWORD,
635   _Reserved_ DWORD_PTR);
636 
637 BOOLAPI
638 InternetWriteFile(
639   _In_ HINTERNET hFile,
640   _In_reads_bytes_(dwNumberOfBytesToWrite) LPCVOID lpBuffer,
641   _In_ DWORD dwNumberOfBytesToWrite,
642   _Out_ LPDWORD lpdwNumberOfBytesWritten);
643 
644 BOOLAPI
645 InternetQueryDataAvailable(
646   _In_ HINTERNET hFile,
647   _Out_opt_ __out_data_source(NETWORK) LPDWORD lpdwNumberOfBytesAvailable,
648   _In_ DWORD dwFlags,
649   _In_opt_ DWORD_PTR dwContext);
650 
651 BOOLAPI InternetFindNextFileA(_In_ HINTERNET, _Out_ LPVOID);
652 BOOLAPI InternetFindNextFileW(_In_ HINTERNET, _Out_ LPVOID);
653 #define InternetFindNextFile  WINELIB_NAME_AW(InternetFindNextFile)
654 
655 BOOLAPI
656 InternetQueryOptionA(
657   _In_opt_ HINTERNET hInternet,
658   _In_ DWORD dwOption,
659   _Out_writes_bytes_to_opt_(*lpdwBufferLength, *lpdwBufferLength) __out_data_source(NETWORK) LPVOID lpBuffer,
660   _Inout_ LPDWORD lpdwBufferLength);
661 
662 BOOLAPI
663 InternetQueryOptionW(
664   _In_opt_ HINTERNET hInternet,
665   _In_ DWORD dwOption,
666   _Out_writes_bytes_to_opt_(*lpdwBufferLength, *lpdwBufferLength) __out_data_source(NETWORK) LPVOID lpBuffer,
667   _Inout_ LPDWORD lpdwBufferLength);
668 
669 #define InternetQueryOption WINELIB_NAME_AW(InternetQueryOption)
670 
671 BOOLAPI InternetSetOptionA(_In_opt_ HINTERNET, _In_ DWORD, _In_opt_ LPVOID, _In_ DWORD);
672 BOOLAPI InternetSetOptionW(_In_opt_ HINTERNET, _In_ DWORD, _In_opt_ LPVOID, _In_ DWORD);
673 #define InternetSetOption  WINELIB_NAME_AW(InternetSetOption)
674 
675 BOOLAPI
676 InternetSetOptionExA(
677   _In_opt_ HINTERNET,
678   _In_ DWORD,
679   _In_opt_ LPVOID,
680   _In_ DWORD,
681   _In_ DWORD);
682 
683 BOOLAPI
684 InternetSetOptionExW(
685   _In_opt_ HINTERNET,
686   _In_ DWORD,
687   _In_opt_ LPVOID,
688   _In_ DWORD,
689   _In_ DWORD);
690 
691 #define InternetSetOptionEx WINELIB_NAME_AW(InternetSetOptionEx)
692 
693 BOOLAPI InternetLockRequestFile(_In_ HINTERNET, _Out_ HANDLE *);
694 BOOLAPI InternetUnlockRequestFile(_Inout_ HANDLE);
695 
696 #define ISO_GLOBAL      0x00000001
697 #define ISO_REGISTRY    0x00000002
698 
699 #define ISO_VALID_FLAGS (ISO_GLOBAL | ISO_REGISTRY)
700 #define INTERNET_OPTION_CALLBACK                1
701 #define INTERNET_OPTION_CONNECT_TIMEOUT         2
702 #define INTERNET_OPTION_CONNECT_RETRIES         3
703 #define INTERNET_OPTION_CONNECT_BACKOFF         4
704 #define INTERNET_OPTION_SEND_TIMEOUT            5
705 #define INTERNET_OPTION_CONTROL_SEND_TIMEOUT    INTERNET_OPTION_SEND_TIMEOUT
706 #define INTERNET_OPTION_RECEIVE_TIMEOUT         6
707 #define INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT INTERNET_OPTION_RECEIVE_TIMEOUT
708 #define INTERNET_OPTION_DATA_SEND_TIMEOUT       7
709 #define INTERNET_OPTION_DATA_RECEIVE_TIMEOUT    8
710 #define INTERNET_OPTION_HANDLE_TYPE             9
711 #define INTERNET_OPTION_LISTEN_TIMEOUT          11
712 #define INTERNET_OPTION_READ_BUFFER_SIZE        12
713 #define INTERNET_OPTION_WRITE_BUFFER_SIZE       13
714 #define INTERNET_OPTION_ASYNC_ID                15
715 #define INTERNET_OPTION_ASYNC_PRIORITY          16
716 #define INTERNET_OPTION_PARENT_HANDLE           21
717 #define INTERNET_OPTION_KEEP_CONNECTION         22
718 #define INTERNET_OPTION_REQUEST_FLAGS           23
719 #define INTERNET_OPTION_EXTENDED_ERROR          24
720 #define INTERNET_OPTION_OFFLINE_MODE            26
721 #define INTERNET_OPTION_CACHE_STREAM_HANDLE     27
722 #define INTERNET_OPTION_USERNAME                28
723 #define INTERNET_OPTION_PASSWORD                29
724 #define INTERNET_OPTION_ASYNC                   30
725 #define INTERNET_OPTION_SECURITY_FLAGS          31
726 #define INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT 32
727 #define INTERNET_OPTION_DATAFILE_NAME           33
728 #define INTERNET_OPTION_URL                     34
729 #define INTERNET_OPTION_SECURITY_CERTIFICATE    35
730 #define INTERNET_OPTION_SECURITY_KEY_BITNESS    36
731 #define INTERNET_OPTION_REFRESH                 37
732 #define INTERNET_OPTION_PROXY                   38
733 #define INTERNET_OPTION_SETTINGS_CHANGED        39
734 #define INTERNET_OPTION_VERSION                 40
735 #define INTERNET_OPTION_USER_AGENT              41
736 #define INTERNET_OPTION_END_BROWSER_SESSION     42
737 #define INTERNET_OPTION_PROXY_USERNAME          43
738 #define INTERNET_OPTION_PROXY_PASSWORD          44
739 #define INTERNET_OPTION_CONTEXT_VALUE           45
740 #define INTERNET_OPTION_CONNECT_LIMIT           46
741 #define INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT 47
742 #define INTERNET_OPTION_POLICY                  48
743 #define INTERNET_OPTION_DISCONNECTED_TIMEOUT    49
744 #define INTERNET_OPTION_CONNECTED_STATE         50
745 #define INTERNET_OPTION_IDLE_STATE              51
746 #define INTERNET_OPTION_OFFLINE_SEMANTICS       52
747 #define INTERNET_OPTION_SECONDARY_CACHE_KEY     53
748 #define INTERNET_OPTION_CALLBACK_FILTER         54
749 #define INTERNET_OPTION_CONNECT_TIME            55
750 #define INTERNET_OPTION_SEND_THROUGHPUT         56
751 #define INTERNET_OPTION_RECEIVE_THROUGHPUT      57
752 #define INTERNET_OPTION_REQUEST_PRIORITY        58
753 #define INTERNET_OPTION_HTTP_VERSION            59
754 #define INTERNET_OPTION_RESET_URLCACHE_SESSION  60
755 #define INTERNET_OPTION_ERROR_MASK              62
756 #define INTERNET_OPTION_FROM_CACHE_TIMEOUT      63
757 #define INTERNET_OPTION_BYPASS_EDITED_ENTRY     64
758 #define INTERNET_OPTION_HTTP_DECODING           65
759 #define INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO  67
760 #define INTERNET_OPTION_CODEPAGE                68
761 #define INTERNET_OPTION_CACHE_TIMESTAMPS        69
762 #define INTERNET_OPTION_DISABLE_AUTODIAL        70
763 #define INTERNET_OPTION_MAX_CONNS_PER_SERVER    73
764 #define INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER 74
765 #define INTERNET_OPTION_PER_CONNECTION_OPTION   75
766 #define INTERNET_OPTION_DIGEST_AUTH_UNLOAD      76
767 #define INTERNET_OPTION_IGNORE_OFFLINE          77
768 #define INTERNET_OPTION_IDENTITY                78
769 #define INTERNET_OPTION_REMOVE_IDENTITY         79
770 #define INTERNET_OPTION_ALTER_IDENTITY          80
771 #define INTERNET_OPTION_SUPPRESS_BEHAVIOR       81
772 #define INTERNET_OPTION_AUTODIAL_MODE           82
773 #define INTERNET_OPTION_AUTODIAL_CONNECTION     83
774 #define INTERNET_OPTION_CLIENT_CERT_CONTEXT     84
775 #define INTERNET_OPTION_AUTH_FLAGS              85
776 #define INTERNET_OPTION_COOKIES_3RD_PARTY       86
777 #define INTERNET_OPTION_DISABLE_PASSPORT_AUTH   87
778 #define INTERNET_OPTION_SEND_UTF8_SERVERNAME_TO_PROXY 88
779 #define INTERNET_OPTION_EXEMPT_CONNECTION_LIMIT 89
780 #define INTERNET_OPTION_ENABLE_PASSPORT_AUTH    90
781 
782 #define INTERNET_OPTION_HIBERNATE_INACTIVE_WORKER_THREADS 91
783 #define INTERNET_OPTION_ACTIVATE_WORKER_THREADS           92
784 #define INTERNET_OPTION_RESTORE_WORKER_THREAD_DEFAULTS    93
785 #define INTERNET_OPTION_SOCKET_SEND_BUFFER_LENGTH         94
786 
787 #define INTERNET_OPTION_PROXY_SETTINGS_CHANGED  95
788 #define INTERNET_OPTION_DATAFILE_EXT            96
789 
790 #define INTERNET_OPTION_CODEPAGE_PATH           100
791 #define INTERNET_OPTION_CODEPAGE_EXTRA          101
792 #define INTERNET_OPTION_IDN                     102
793 #define INTERNET_OPTION_MAX_CONNS_PER_PROXY     103
794 #define INTERNET_OPTION_SUPPRESS_SERVER_AUTH    104
795 #define INTERNET_OPTION_SERVER_CERT_CHAIN_CONTEXT 105
796 
797 
798 #define INTERNET_FIRST_OPTION                   INTERNET_OPTION_CALLBACK
799 #define INTERNET_LAST_OPTION                    INTERNET_OPTION_SERVER_CERT_CHAIN_CONTEXT
800 
801 #define INTERNET_PRIORITY_FOREGROUND            1000
802 #define INTERNET_HANDLE_TYPE_INTERNET           1
803 #define INTERNET_HANDLE_TYPE_CONNECT_FTP        2
804 #define INTERNET_HANDLE_TYPE_CONNECT_GOPHER     3
805 #define INTERNET_HANDLE_TYPE_CONNECT_HTTP       4
806 #define INTERNET_HANDLE_TYPE_FTP_FIND           5
807 #define INTERNET_HANDLE_TYPE_FTP_FIND_HTML      6
808 #define INTERNET_HANDLE_TYPE_FTP_FILE           7
809 #define INTERNET_HANDLE_TYPE_FTP_FILE_HTML      8
810 #define INTERNET_HANDLE_TYPE_GOPHER_FIND        9
811 #define INTERNET_HANDLE_TYPE_GOPHER_FIND_HTML   10
812 #define INTERNET_HANDLE_TYPE_GOPHER_FILE        11
813 #define INTERNET_HANDLE_TYPE_GOPHER_FILE_HTML   12
814 #define INTERNET_HANDLE_TYPE_HTTP_REQUEST       13
815 #define SECURITY_FLAG_SECURE                    0x00000001
816 #define SECURITY_FLAG_STRENGTH_WEAK             0x10000000
817 #define SECURITY_FLAG_STRENGTH_MEDIUM           0x40000000
818 #define SECURITY_FLAG_STRENGTH_STRONG           0x20000000
819 #define SECURITY_FLAG_UNKNOWNBIT                0x80000000
820 #define SECURITY_FLAG_NORMALBITNESS             SECURITY_FLAG_STRENGTH_WEAK
821 #define SECURITY_FLAG_SSL                       0x00000002
822 #define SECURITY_FLAG_SSL3                      0x00000004
823 #define SECURITY_FLAG_PCT                       0x00000008
824 #define SECURITY_FLAG_PCT4                      0x00000010
825 #define SECURITY_FLAG_IETFSSL4                  0x00000020
826 #define SECURITY_FLAG_40BIT                     SECURITY_FLAG_STRENGTH_WEAK
827 #define SECURITY_FLAG_128BIT                    SECURITY_FLAG_STRENGTH_STRONG
828 #define SECURITY_FLAG_56BIT                     SECURITY_FLAG_STRENGTH_MEDIUM
829 #define SECURITY_FLAG_IGNORE_REVOCATION         0x00000080
830 #define SECURITY_FLAG_IGNORE_UNKNOWN_CA         0x00000100
831 #define SECURITY_FLAG_IGNORE_WRONG_USAGE        0x00000200
832 #define SECURITY_FLAG_IGNORE_CERT_CN_INVALID    INTERNET_FLAG_IGNORE_CERT_CN_INVALID
833 #define SECURITY_FLAG_IGNORE_CERT_DATE_INVALID  INTERNET_FLAG_IGNORE_CERT_DATE_INVALID
834 #define SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTPS  INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS
835 #define SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTP   INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP
836 #define SECURITY_SET_MASK       (SECURITY_FLAG_IGNORE_REVOCATION |\
837                                  SECURITY_FLAG_IGNORE_UNKNOWN_CA |\
838                                  SECURITY_FLAG_IGNORE_CERT_CN_INVALID |\
839                                  SECURITY_FLAG_IGNORE_CERT_DATE_INVALID |\
840                                  SECURITY_FLAG_IGNORE_WRONG_USAGE)
841 
842 
843 
844 BOOLAPI
845 InternetGetLastResponseInfoA(
846   _Out_ LPDWORD lpdwError,
847   _Out_writes_opt_(*lpdwBufferLength) LPSTR lpszBuffer,
848   _Inout_ LPDWORD lpdwBufferLength);
849 
850 BOOLAPI
851 InternetGetLastResponseInfoW(
852   _Out_ LPDWORD lpdwError,
853   _Out_writes_opt_(*lpdwBufferLength) LPWSTR lpszBuffer,
854   _Inout_ LPDWORD lpdwBufferLength);
855 
856 #define InternetGetLastResponseInfo WINELIB_NAME_AW(InternetGetLastResponseInfo)
857 
858 typedef VOID
859 (CALLBACK *INTERNET_STATUS_CALLBACK)(
860   _In_ HINTERNET,
861   _In_opt_ DWORD_PTR,
862   _In_ DWORD,
863   _In_opt_ LPVOID,
864   _In_ DWORD);
865 typedef INTERNET_STATUS_CALLBACK * LPINTERNET_STATUS_CALLBACK;
866 
867 INTERNETAPI
868 INTERNET_STATUS_CALLBACK
869 WINAPI
870 InternetSetStatusCallbackA(
871   _In_ HINTERNET,
872   _In_opt_ INTERNET_STATUS_CALLBACK);
873 
874 INTERNETAPI
875 INTERNET_STATUS_CALLBACK
876 WINAPI
877 InternetSetStatusCallbackW(
878   _In_ HINTERNET,
879   _In_opt_ INTERNET_STATUS_CALLBACK);
880 
881 #define InternetSetStatusCallback WINELIB_NAME_AW(InternetSetStatusCallback)
882 
883 #define INTERNET_STATUS_RESOLVING_NAME          10
884 #define INTERNET_STATUS_NAME_RESOLVED           11
885 #define INTERNET_STATUS_CONNECTING_TO_SERVER    20
886 #define INTERNET_STATUS_CONNECTED_TO_SERVER     21
887 #define INTERNET_STATUS_SENDING_REQUEST         30
888 #define INTERNET_STATUS_REQUEST_SENT            31
889 #define INTERNET_STATUS_RECEIVING_RESPONSE      40
890 #define INTERNET_STATUS_RESPONSE_RECEIVED       41
891 #define INTERNET_STATUS_CTL_RESPONSE_RECEIVED   42
892 #define INTERNET_STATUS_PREFETCH                43
893 #define INTERNET_STATUS_CLOSING_CONNECTION      50
894 #define INTERNET_STATUS_CONNECTION_CLOSED       51
895 #define INTERNET_STATUS_HANDLE_CREATED          60
896 #define INTERNET_STATUS_HANDLE_CLOSING          70
897 #define INTERNET_STATUS_DETECTING_PROXY         80
898 #define INTERNET_STATUS_REQUEST_COMPLETE        100
899 #define INTERNET_STATUS_REDIRECT                110
900 #define INTERNET_STATUS_INTERMEDIATE_RESPONSE   120
901 #define INTERNET_STATUS_USER_INPUT_REQUIRED     140
902 #define INTERNET_STATUS_STATE_CHANGE            200
903 #define INTERNET_STATUS_COOKIE_SENT             320
904 #define INTERNET_STATUS_COOKIE_RECEIVED         321
905 #define INTERNET_STATUS_PRIVACY_IMPACTED        324
906 #define INTERNET_STATUS_P3P_HEADER              325
907 #define INTERNET_STATUS_P3P_POLICYREF           326
908 #define INTERNET_STATUS_COOKIE_HISTORY          327
909 #define INTERNET_STATE_CONNECTED                0x00000001
910 #define INTERNET_STATE_DISCONNECTED             0x00000002
911 #define INTERNET_STATE_DISCONNECTED_BY_USER     0x00000010
912 #define INTERNET_STATE_IDLE                     0x00000100
913 #define INTERNET_STATE_BUSY                     0x00000200
914 
915 #define INTERNET_INVALID_STATUS_CALLBACK        ((INTERNET_STATUS_CALLBACK)(-1))
916 
917 #define FTP_TRANSFER_TYPE_UNKNOWN   0x00000000
918 #define FTP_TRANSFER_TYPE_ASCII     0x00000001
919 #define FTP_TRANSFER_TYPE_BINARY    0x00000002
920 #define FTP_TRANSFER_TYPE_MASK      (FTP_TRANSFER_TYPE_ASCII | FTP_TRANSFER_TYPE_BINARY)
921 
922 BOOLAPI
923 FtpCommandA(
924   _In_ HINTERNET,
925   _In_ BOOL,
926   _In_ DWORD,
927   _In_ LPCSTR,
928   _In_opt_ DWORD_PTR,
929   _Out_opt_ HINTERNET *);
930 
931 BOOLAPI
932 FtpCommandW(
933   _In_ HINTERNET,
934   _In_ BOOL,
935   _In_ DWORD,
936   _In_ LPCWSTR,
937   _In_opt_ DWORD_PTR,
938   _Out_opt_ HINTERNET *);
939 
940 #define FtpCommand WINELIB_NAME_AW(FtpCommand)
941 
942 INTERNETAPI
943 HINTERNET
944 WINAPI
945 FtpFindFirstFileA(
946   _In_ HINTERNET,
947   _In_opt_ LPCSTR,
948   _Out_opt_ LPWIN32_FIND_DATAA,
949   _In_ DWORD,
950   _In_opt_ DWORD_PTR);
951 
952 INTERNETAPI
953 HINTERNET
954 WINAPI
955 FtpFindFirstFileW(
956   _In_ HINTERNET,
957   _In_opt_ LPCWSTR,
958   _Out_opt_ LPWIN32_FIND_DATAW,
959   _In_ DWORD,
960   _In_opt_ DWORD_PTR);
961 
962 #define FtpFindFirstFile WINELIB_NAME_AW(FtpFindFirstFile)
963 
964 BOOLAPI
965 FtpGetFileA(
966   _In_ HINTERNET,
967   _In_ LPCSTR,
968   _In_ LPCSTR,
969   _In_ BOOL,
970   _In_ DWORD,
971   _In_ DWORD,
972   _In_opt_ DWORD_PTR);
973 
974 BOOLAPI
975 FtpGetFileW(
976   _In_ HINTERNET,
977   _In_ LPCWSTR,
978   _In_ LPCWSTR,
979   _In_ BOOL,
980   _In_ DWORD,
981   _In_ DWORD,
982   _In_opt_ DWORD_PTR);
983 
984 #define FtpGetFile WINELIB_NAME_AW(FtpGetFile)
985 
986 DWORD WINAPI FtpGetFileSize(_In_ HINTERNET, _Out_opt_ LPDWORD);
987 
988 BOOLAPI
989 FtpPutFileA(
990   _In_ HINTERNET,
991   _In_ LPCSTR,
992   _In_ LPCSTR,
993   _In_ DWORD,
994   _In_opt_ DWORD_PTR);
995 
996 BOOLAPI
997 FtpPutFileW(
998   _In_ HINTERNET,
999   _In_ LPCWSTR,
1000   _In_ LPCWSTR,
1001   _In_ DWORD,
1002   _In_opt_ DWORD_PTR);
1003 
1004 #define FtpPutFile WINELIB_NAME_AW(FtpPutFile)
1005 
1006 BOOLAPI FtpDeleteFileA(_In_ HINTERNET, _In_ LPCSTR);
1007 BOOLAPI FtpDeleteFileW(_In_ HINTERNET, _In_ LPCWSTR);
1008 #define FtpDeleteFile  WINELIB_NAME_AW(FtpDeleteFile)
1009 
1010 BOOLAPI FtpRenameFileA(_In_ HINTERNET, _In_ LPCSTR, _In_ LPCSTR);
1011 BOOLAPI FtpRenameFileW(_In_ HINTERNET, _In_ LPCWSTR, _In_ LPCWSTR);
1012 #define FtpRenameFile  WINELIB_NAME_AW(FtpRenameFile)
1013 
1014 INTERNETAPI
1015 HINTERNET
1016 WINAPI
1017 FtpOpenFileA(
1018   _In_ HINTERNET,
1019   _In_ LPCSTR,
1020   _In_ DWORD,
1021   _In_ DWORD,
1022   _In_opt_ DWORD_PTR);
1023 
1024 INTERNETAPI
1025 HINTERNET
1026 WINAPI
1027 FtpOpenFileW(
1028   _In_ HINTERNET,
1029   _In_ LPCWSTR,
1030   _In_ DWORD,
1031   _In_ DWORD,
1032   _In_opt_ DWORD_PTR);
1033 
1034 #define FtpOpenFile WINELIB_NAME_AW(FtpOpenFile)
1035 
1036 BOOLAPI FtpCreateDirectoryA(_In_ HINTERNET, _In_ LPCSTR);
1037 BOOLAPI FtpCreateDirectoryW(_In_ HINTERNET, _In_ LPCWSTR);
1038 #define FtpCreateDirectory  WINELIB_NAME_AW(FtpCreateDirectory)
1039 
1040 BOOLAPI FtpRemoveDirectoryA(_In_ HINTERNET, _In_ LPCSTR);
1041 BOOLAPI FtpRemoveDirectoryW(_In_ HINTERNET, _In_ LPCWSTR);
1042 #define FtpRemoveDirectory  WINELIB_NAME_AW(FtpRemoveDirectory)
1043 
1044 BOOLAPI FtpSetCurrentDirectoryA(_In_ HINTERNET, _In_ LPCSTR);
1045 BOOLAPI FtpSetCurrentDirectoryW(_In_ HINTERNET, _In_ LPCWSTR);
1046 #define FtpSetCurrentDirectory  WINELIB_NAME_AW(FtpSetCurrentDirectory)
1047 
1048 BOOLAPI
1049 FtpGetCurrentDirectoryA(
1050   _In_ HINTERNET hConnect,
1051   _Out_writes_(*lpdwCurrentDirectory) LPSTR lpszCurrentDirectory,
1052   _Inout_ LPDWORD lpdwCurrentDirectory);
1053 
1054 BOOLAPI
1055 FtpGetCurrentDirectoryW(
1056   _In_ HINTERNET hConnect,
1057   _Out_writes_(*lpdwCurrentDirectory) LPWSTR lpszCurrentDirectory,
1058   _Inout_ LPDWORD lpdwCurrentDirectory);
1059 
1060 #define FtpGetCurrentDirectory WINELIB_NAME_AW(FtpGetCurrentDirectory)
1061 
1062 #define MAX_GOPHER_DISPLAY_TEXT     128
1063 #define MAX_GOPHER_SELECTOR_TEXT    256
1064 #define MAX_GOPHER_HOST_NAME        INTERNET_MAX_HOST_NAME_LENGTH
1065 #define MAX_GOPHER_LOCATOR_LENGTH   (1                                  \
1066                                     + MAX_GOPHER_DISPLAY_TEXT           \
1067                                     + 1                                 \
1068                                     + MAX_GOPHER_SELECTOR_TEXT          \
1069                                     + 1                                 \
1070                                     + MAX_GOPHER_HOST_NAME              \
1071                                     + 1                                 \
1072                                     + INTERNET_MAX_PORT_NUMBER_LENGTH   \
1073                                     + 1                                 \
1074                                     + 1                                 \
1075                                     + 2                                 \
1076                                     )
1077 
1078 
1079 typedef struct {
1080     CHAR   DisplayString[MAX_GOPHER_DISPLAY_TEXT + 1];
1081     DWORD GopherType;
1082     DWORD SizeLow;
1083     DWORD SizeHigh;
1084     FILETIME LastModificationTime;
1085     CHAR   Locator[MAX_GOPHER_LOCATOR_LENGTH + 1];
1086 } GOPHER_FIND_DATAA,* LPGOPHER_FIND_DATAA;
1087 
1088 typedef struct {
1089     WCHAR  DisplayString[MAX_GOPHER_DISPLAY_TEXT + 1];
1090     DWORD GopherType;
1091     DWORD SizeLow;
1092     DWORD SizeHigh;
1093     FILETIME LastModificationTime;
1094     WCHAR  Locator[MAX_GOPHER_LOCATOR_LENGTH + 1];
1095 } GOPHER_FIND_DATAW,* LPGOPHER_FIND_DATAW;
1096 
1097 DECL_WINELIB_TYPE_AW(GOPHER_FIND_DATA)
1098 DECL_WINELIB_TYPE_AW(LPGOPHER_FIND_DATA)
1099 
1100 #define GOPHER_TYPE_TEXT_FILE       0x00000001
1101 #define GOPHER_TYPE_DIRECTORY       0x00000002
1102 #define GOPHER_TYPE_CSO             0x00000004
1103 #define GOPHER_TYPE_ERROR           0x00000008
1104 #define GOPHER_TYPE_MAC_BINHEX      0x00000010
1105 #define GOPHER_TYPE_DOS_ARCHIVE     0x00000020
1106 #define GOPHER_TYPE_UNIX_UUENCODED  0x00000040
1107 #define GOPHER_TYPE_INDEX_SERVER    0x00000080
1108 #define GOPHER_TYPE_TELNET          0x00000100
1109 #define GOPHER_TYPE_BINARY          0x00000200
1110 #define GOPHER_TYPE_REDUNDANT       0x00000400
1111 #define GOPHER_TYPE_TN3270          0x00000800
1112 #define GOPHER_TYPE_GIF             0x00001000
1113 #define GOPHER_TYPE_IMAGE           0x00002000
1114 #define GOPHER_TYPE_BITMAP          0x00004000
1115 #define GOPHER_TYPE_MOVIE           0x00008000
1116 #define GOPHER_TYPE_SOUND           0x00010000
1117 #define GOPHER_TYPE_HTML            0x00020000
1118 #define GOPHER_TYPE_PDF             0x00040000
1119 #define GOPHER_TYPE_CALENDAR        0x00080000
1120 #define GOPHER_TYPE_INLINE          0x00100000
1121 #define GOPHER_TYPE_UNKNOWN         0x20000000
1122 #define GOPHER_TYPE_ASK             0x40000000
1123 #define GOPHER_TYPE_GOPHER_PLUS     0x80000000
1124 
1125 #define IS_GOPHER_FILE(type)            (BOOL)(((type) & GOPHER_TYPE_FILE_MASK) != 0)
1126 #define IS_GOPHER_DIRECTORY(type)       (BOOL)(((type) & GOPHER_TYPE_DIRECTORY) != 0)
1127 #define IS_GOPHER_PHONE_SERVER(type)    (BOOL)(((type) & GOPHER_TYPE_CSO) != 0)
1128 #define IS_GOPHER_ERROR(type)           (BOOL)(((type) & GOPHER_TYPE_ERROR) != 0)
1129 #define IS_GOPHER_INDEX_SERVER(type)    (BOOL)(((type) & GOPHER_TYPE_INDEX_SERVER) != 0)
1130 #define IS_GOPHER_TELNET_SESSION(type)  (BOOL)(((type) & GOPHER_TYPE_TELNET) != 0)
1131 #define IS_GOPHER_BACKUP_SERVER(type)   (BOOL)(((type) & GOPHER_TYPE_REDUNDANT) != 0)
1132 #define IS_GOPHER_TN3270_SESSION(type)  (BOOL)(((type) & GOPHER_TYPE_TN3270) != 0)
1133 #define IS_GOPHER_ASK(type)             (BOOL)(((type) & GOPHER_TYPE_ASK) != 0)
1134 #define IS_GOPHER_PLUS(type)            (BOOL)(((type) & GOPHER_TYPE_GOPHER_PLUS) != 0)
1135 #define IS_GOPHER_TYPE_KNOWN(type)      (BOOL)(!((type) & GOPHER_TYPE_UNKNOWN))
1136 #define GOPHER_TYPE_FILE_MASK       (GOPHER_TYPE_TEXT_FILE \
1137                                     | GOPHER_TYPE_MAC_BINHEX        \
1138                                     | GOPHER_TYPE_DOS_ARCHIVE       \
1139                                     | GOPHER_TYPE_UNIX_UUENCODED    \
1140                                     | GOPHER_TYPE_BINARY            \
1141                                     | GOPHER_TYPE_GIF               \
1142                                     | GOPHER_TYPE_IMAGE             \
1143                                     | GOPHER_TYPE_BITMAP            \
1144                                     | GOPHER_TYPE_MOVIE             \
1145                                     | GOPHER_TYPE_SOUND             \
1146                                     | GOPHER_TYPE_HTML              \
1147                                     | GOPHER_TYPE_PDF               \
1148                                     | GOPHER_TYPE_CALENDAR          \
1149                                     | GOPHER_TYPE_INLINE            \
1150                                     )
1151 
1152 
1153 typedef struct {
1154     LPCSTR Comment;
1155     LPCSTR EmailAddress;
1156 } GOPHER_ADMIN_ATTRIBUTE_TYPEA,* LPGOPHER_ADMIN_ATTRIBUTE_TYPEA;
1157 
1158 typedef struct {
1159     LPCWSTR Comment;
1160     LPCWSTR EmailAddress;
1161 } GOPHER_ADMIN_ATTRIBUTE_TYPEW,* LPGOPHER_ADMIN_ATTRIBUTE_TYPEW;
1162 
1163 DECL_WINELIB_TYPE_AW(GOPHER_ADMIN_ATTRIBUTE_TYPE)
1164 DECL_WINELIB_TYPE_AW(LPGOPHER_ADMIN_ATTRIBUTE_TYPE)
1165 
1166 typedef struct {
1167     FILETIME DateAndTime;
1168 } GOPHER_MOD_DATE_ATTRIBUTE_TYPE,* LPGOPHER_MOD_DATE_ATTRIBUTE_TYPE;
1169 
1170 typedef struct {
1171     DWORD Ttl;
1172 } GOPHER_TTL_ATTRIBUTE_TYPE,* LPGOPHER_TTL_ATTRIBUTE_TYPE;
1173 
1174 typedef struct {
1175     INT Score;
1176 } GOPHER_SCORE_ATTRIBUTE_TYPE,* LPGOPHER_SCORE_ATTRIBUTE_TYPE;
1177 
1178 typedef struct {
1179     INT LowerBound;
1180     INT UpperBound;
1181 } GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE,* LPGOPHER_SCORE_RANGE_ATTRIBUTE_TYPE;
1182 
1183 typedef struct {
1184     LPCSTR Site;
1185 } GOPHER_SITE_ATTRIBUTE_TYPEA,* LPGOPHER_SITE_ATTRIBUTE_TYPEA;
1186 
1187 typedef struct {
1188     LPCWSTR Site;
1189 } GOPHER_SITE_ATTRIBUTE_TYPEW,* LPGOPHER_SITE_ATTRIBUTE_TYPEW;
1190 
1191 DECL_WINELIB_TYPE_AW(GOPHER_SITE_ATTRIBUTE_TYPE)
1192 DECL_WINELIB_TYPE_AW(LPGOPHER_SITE_ATTRIBUTE_TYPE)
1193 
1194 typedef struct {
1195     LPCSTR Organization;
1196 } GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA,* LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEA;
1197 
1198 typedef struct {
1199     LPCWSTR Organization;
1200 } GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW,* LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEW;
1201 
1202 DECL_WINELIB_TYPE_AW(GOPHER_ORGANIZATION_ATTRIBUTE_TYPE)
1203 DECL_WINELIB_TYPE_AW(LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPE)
1204 
1205 typedef struct {
1206     LPCSTR Location;
1207 } GOPHER_LOCATION_ATTRIBUTE_TYPEA,* LPGOPHER_LOCATION_ATTRIBUTE_TYPEA;
1208 
1209 typedef struct {
1210     LPCWSTR Location;
1211 } GOPHER_LOCATION_ATTRIBUTE_TYPEW,* LPGOPHER_LOCATION_ATTRIBUTE_TYPEW;
1212 
1213 DECL_WINELIB_TYPE_AW(GOPHER_LOCATION_ATTRIBUTE_TYPE)
1214 DECL_WINELIB_TYPE_AW(LPGOPHER_LOCATION_ATTRIBUTE_TYPE)
1215 
1216 typedef struct {
1217     INT DegreesNorth;
1218     INT MinutesNorth;
1219     INT SecondsNorth;
1220     INT DegreesEast;
1221     INT MinutesEast;
1222     INT SecondsEast;
1223 } GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE,* LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE;
1224 
1225 typedef struct {
1226     INT Zone;
1227 } GOPHER_TIMEZONE_ATTRIBUTE_TYPE,* LPGOPHER_TIMEZONE_ATTRIBUTE_TYPE;
1228 
1229 typedef struct {
1230     LPCSTR Provider;
1231 } GOPHER_PROVIDER_ATTRIBUTE_TYPEA,* LPGOPHER_PROVIDER_ATTRIBUTE_TYPEA;
1232 
1233 typedef struct {
1234     LPCWSTR Provider;
1235 } GOPHER_PROVIDER_ATTRIBUTE_TYPEW,* LPGOPHER_PROVIDER_ATTRIBUTE_TYPEW;
1236 
1237 DECL_WINELIB_TYPE_AW(GOPHER_PROVIDER_ATTRIBUTE_TYPE)
1238 DECL_WINELIB_TYPE_AW(LPGOPHER_PROVIDER_ATTRIBUTE_TYPE)
1239 
1240 typedef struct {
1241     LPCSTR Version;
1242 } GOPHER_VERSION_ATTRIBUTE_TYPEA,* LPGOPHER_VERSION_ATTRIBUTE_TYPEA;
1243 
1244 typedef struct {
1245     LPCWSTR Version;
1246 } GOPHER_VERSION_ATTRIBUTE_TYPEW,* LPGOPHER_VERSION_ATTRIBUTE_TYPEW;
1247 
1248 DECL_WINELIB_TYPE_AW(GOPHER_VERSION_ATTRIBUTE_TYPE)
1249 DECL_WINELIB_TYPE_AW(LPGOPHER_VERSION_ATTRIBUTE_TYPE)
1250 
1251 typedef struct {
1252     LPCSTR ShortAbstract;
1253     LPCSTR AbstractFile;
1254 } GOPHER_ABSTRACT_ATTRIBUTE_TYPEA,* LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEA;
1255 
1256 typedef struct {
1257     LPCWSTR ShortAbstract;
1258     LPCWSTR AbstractFile;
1259 } GOPHER_ABSTRACT_ATTRIBUTE_TYPEW,* LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEW;
1260 
1261 DECL_WINELIB_TYPE_AW(GOPHER_ABSTRACT_ATTRIBUTE_TYPE)
1262 DECL_WINELIB_TYPE_AW(LPGOPHER_ABSTRACT_ATTRIBUTE_TYPE)
1263 
1264 typedef struct {
1265     LPCSTR ContentType;
1266     LPCSTR Language;
1267     DWORD Size;
1268 } GOPHER_VIEW_ATTRIBUTE_TYPEA,* LPGOPHER_VIEW_ATTRIBUTE_TYPEA;
1269 
1270 typedef struct {
1271     LPCWSTR ContentType;
1272     LPCWSTR Language;
1273     DWORD Size;
1274 } GOPHER_VIEW_ATTRIBUTE_TYPEW,* LPGOPHER_VIEW_ATTRIBUTE_TYPEW;
1275 
1276 DECL_WINELIB_TYPE_AW(GOPHER_VIEW_ATTRIBUTE_TYPE)
1277 DECL_WINELIB_TYPE_AW(LPGOPHER_VIEW_ATTRIBUTE_TYPE)
1278 
1279 typedef struct {
1280     BOOL TreeWalk;
1281 } GOPHER_VERONICA_ATTRIBUTE_TYPE,* LPGOPHER_VERONICA_ATTRIBUTE_TYPE;
1282 
1283 typedef struct {
1284     LPCSTR QuestionType;
1285     LPCSTR QuestionText;
1286 } GOPHER_ASK_ATTRIBUTE_TYPEA,* LPGOPHER_ASK_ATTRIBUTE_TYPEA;
1287 
1288 typedef struct {
1289     LPCWSTR QuestionType;
1290     LPCWSTR QuestionText;
1291 } GOPHER_ASK_ATTRIBUTE_TYPEW,* LPGOPHER_ASK_ATTRIBUTE_TYPEW;
1292 
1293 DECL_WINELIB_TYPE_AW(GOPHER_ASK_ATTRIBUTE_TYPE)
1294 DECL_WINELIB_TYPE_AW(LPGOPHER_ASK_ATTRIBUTE_TYPE)
1295 
1296 typedef struct {
1297     LPCSTR Text;
1298 } GOPHER_UNKNOWN_ATTRIBUTE_TYPEA,* LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEA;
1299 
1300 typedef struct {
1301     LPCWSTR Text;
1302 } GOPHER_UNKNOWN_ATTRIBUTE_TYPEW,* LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEW;
1303 
1304 DECL_WINELIB_TYPE_AW(GOPHER_UNKNOWN_ATTRIBUTE_TYPE)
1305 DECL_WINELIB_TYPE_AW(LPGOPHER_UNKNOWN_ATTRIBUTE_TYPE)
1306 
1307 typedef struct {
1308     DWORD CategoryId;
1309     DWORD AttributeId;
1310     union {
1311         GOPHER_ADMIN_ATTRIBUTE_TYPEA Admin;
1312         GOPHER_MOD_DATE_ATTRIBUTE_TYPE ModDate;
1313         GOPHER_TTL_ATTRIBUTE_TYPE Ttl;
1314         GOPHER_SCORE_ATTRIBUTE_TYPE Score;
1315         GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE ScoreRange;
1316         GOPHER_SITE_ATTRIBUTE_TYPEA Site;
1317         GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA Organization;
1318         GOPHER_LOCATION_ATTRIBUTE_TYPEA Location;
1319         GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE GeographicalLocation;
1320         GOPHER_TIMEZONE_ATTRIBUTE_TYPE TimeZone;
1321         GOPHER_PROVIDER_ATTRIBUTE_TYPEA Provider;
1322         GOPHER_VERSION_ATTRIBUTE_TYPEA Version;
1323         GOPHER_ABSTRACT_ATTRIBUTE_TYPEA Abstract;
1324         GOPHER_VIEW_ATTRIBUTE_TYPEA View;
1325         GOPHER_VERONICA_ATTRIBUTE_TYPE Veronica;
1326         GOPHER_ASK_ATTRIBUTE_TYPEA Ask;
1327         GOPHER_UNKNOWN_ATTRIBUTE_TYPEA Unknown;
1328     } AttributeType;
1329 } GOPHER_ATTRIBUTE_TYPEA, *LPGOPHER_ATTRIBUTE_TYPEA;
1330 
1331 typedef struct {
1332     DWORD CategoryId;
1333     DWORD AttributeId;
1334     union {
1335         GOPHER_ADMIN_ATTRIBUTE_TYPEW Admin;
1336         GOPHER_MOD_DATE_ATTRIBUTE_TYPE ModDate;
1337         GOPHER_TTL_ATTRIBUTE_TYPE Ttl;
1338         GOPHER_SCORE_ATTRIBUTE_TYPE Score;
1339         GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE ScoreRange;
1340         GOPHER_SITE_ATTRIBUTE_TYPEW Site;
1341         GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW Organization;
1342         GOPHER_LOCATION_ATTRIBUTE_TYPEW Location;
1343         GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE GeographicalLocation;
1344         GOPHER_TIMEZONE_ATTRIBUTE_TYPE TimeZone;
1345         GOPHER_PROVIDER_ATTRIBUTE_TYPEW Provider;
1346         GOPHER_VERSION_ATTRIBUTE_TYPEW Version;
1347         GOPHER_ABSTRACT_ATTRIBUTE_TYPEW Abstract;
1348         GOPHER_VIEW_ATTRIBUTE_TYPEW View;
1349         GOPHER_VERONICA_ATTRIBUTE_TYPE Veronica;
1350         GOPHER_ASK_ATTRIBUTE_TYPEW Ask;
1351         GOPHER_UNKNOWN_ATTRIBUTE_TYPEW Unknown;
1352     } AttributeType;
1353 } GOPHER_ATTRIBUTE_TYPEW, *LPGOPHER_ATTRIBUTE_TYPEW;
1354 
1355 DECL_WINELIB_TYPE_AW(GOPHER_ATTRIBUTE_TYPE)
1356 DECL_WINELIB_TYPE_AW(LPGOPHER_ATTRIBUTE_TYPE)
1357 
1358 #define MAX_GOPHER_CATEGORY_NAME    128
1359 #define MAX_GOPHER_ATTRIBUTE_NAME   128
1360 #define MIN_GOPHER_ATTRIBUTE_LENGTH 256
1361 
1362 #define GOPHER_INFO_CATEGORY        TEXT("+INFO")
1363 #define GOPHER_ADMIN_CATEGORY       TEXT("+ADMIN")
1364 #define GOPHER_VIEWS_CATEGORY       TEXT("+VIEWS")
1365 #define GOPHER_ABSTRACT_CATEGORY    TEXT("+ABSTRACT")
1366 #define GOPHER_VERONICA_CATEGORY    TEXT("+VERONICA")
1367 #define GOPHER_ADMIN_ATTRIBUTE      TEXT("Admin")
1368 #define GOPHER_MOD_DATE_ATTRIBUTE   TEXT("Mod-Date")
1369 #define GOPHER_TTL_ATTRIBUTE        TEXT("TTL")
1370 #define GOPHER_SCORE_ATTRIBUTE      TEXT("Score")
1371 #define GOPHER_RANGE_ATTRIBUTE      TEXT("Score-range")
1372 #define GOPHER_SITE_ATTRIBUTE       TEXT("Site")
1373 #define GOPHER_ORG_ATTRIBUTE        TEXT("Org")
1374 #define GOPHER_LOCATION_ATTRIBUTE   TEXT("Loc")
1375 #define GOPHER_GEOG_ATTRIBUTE       TEXT("Geog")
1376 #define GOPHER_TIMEZONE_ATTRIBUTE   TEXT("TZ")
1377 #define GOPHER_PROVIDER_ATTRIBUTE   TEXT("Provider")
1378 #define GOPHER_VERSION_ATTRIBUTE    TEXT("Version")
1379 #define GOPHER_ABSTRACT_ATTRIBUTE   TEXT("Abstract")
1380 #define GOPHER_VIEW_ATTRIBUTE       TEXT("View")
1381 #define GOPHER_TREEWALK_ATTRIBUTE   TEXT("treewalk")
1382 
1383 #define GOPHER_ATTRIBUTE_ID_BASE        0xabcccc00
1384 
1385 #define GOPHER_CATEGORY_ID_ALL          (GOPHER_ATTRIBUTE_ID_BASE + 1)
1386 #define GOPHER_CATEGORY_ID_INFO         (GOPHER_ATTRIBUTE_ID_BASE + 2)
1387 #define GOPHER_CATEGORY_ID_ADMIN        (GOPHER_ATTRIBUTE_ID_BASE + 3)
1388 #define GOPHER_CATEGORY_ID_VIEWS        (GOPHER_ATTRIBUTE_ID_BASE + 4)
1389 #define GOPHER_CATEGORY_ID_ABSTRACT     (GOPHER_ATTRIBUTE_ID_BASE + 5)
1390 #define GOPHER_CATEGORY_ID_VERONICA     (GOPHER_ATTRIBUTE_ID_BASE + 6)
1391 #define GOPHER_CATEGORY_ID_ASK          (GOPHER_ATTRIBUTE_ID_BASE + 7)
1392 #define GOPHER_CATEGORY_ID_UNKNOWN      (GOPHER_ATTRIBUTE_ID_BASE + 8)
1393 
1394 #define GOPHER_ATTRIBUTE_ID_ALL         (GOPHER_ATTRIBUTE_ID_BASE + 9)
1395 #define GOPHER_ATTRIBUTE_ID_ADMIN       (GOPHER_ATTRIBUTE_ID_BASE + 10)
1396 #define GOPHER_ATTRIBUTE_ID_MOD_DATE    (GOPHER_ATTRIBUTE_ID_BASE + 11)
1397 #define GOPHER_ATTRIBUTE_ID_TTL         (GOPHER_ATTRIBUTE_ID_BASE + 12)
1398 #define GOPHER_ATTRIBUTE_ID_SCORE       (GOPHER_ATTRIBUTE_ID_BASE + 13)
1399 #define GOPHER_ATTRIBUTE_ID_RANGE       (GOPHER_ATTRIBUTE_ID_BASE + 14)
1400 #define GOPHER_ATTRIBUTE_ID_SITE        (GOPHER_ATTRIBUTE_ID_BASE + 15)
1401 #define GOPHER_ATTRIBUTE_ID_ORG         (GOPHER_ATTRIBUTE_ID_BASE + 16)
1402 #define GOPHER_ATTRIBUTE_ID_LOCATION    (GOPHER_ATTRIBUTE_ID_BASE + 17)
1403 #define GOPHER_ATTRIBUTE_ID_GEOG        (GOPHER_ATTRIBUTE_ID_BASE + 18)
1404 #define GOPHER_ATTRIBUTE_ID_TIMEZONE    (GOPHER_ATTRIBUTE_ID_BASE + 19)
1405 #define GOPHER_ATTRIBUTE_ID_PROVIDER    (GOPHER_ATTRIBUTE_ID_BASE + 20)
1406 #define GOPHER_ATTRIBUTE_ID_VERSION     (GOPHER_ATTRIBUTE_ID_BASE + 21)
1407 #define GOPHER_ATTRIBUTE_ID_ABSTRACT    (GOPHER_ATTRIBUTE_ID_BASE + 22)
1408 #define GOPHER_ATTRIBUTE_ID_VIEW        (GOPHER_ATTRIBUTE_ID_BASE + 23)
1409 #define GOPHER_ATTRIBUTE_ID_TREEWALK    (GOPHER_ATTRIBUTE_ID_BASE + 24)
1410 #define GOPHER_ATTRIBUTE_ID_UNKNOWN     (GOPHER_ATTRIBUTE_ID_BASE + 25)
1411 
1412 BOOLAPI
1413 GopherCreateLocatorA(
1414   _In_ LPCSTR lpszHost,
1415   _In_ INTERNET_PORT nServerPort,
1416   _In_opt_ LPCSTR lpszDisplayString,
1417   _In_opt_ LPCSTR lpszSelectorString,
1418   _In_ DWORD dwGopherType,
1419   _Out_writes_opt_(*lpdwBufferLength) LPSTR lpszLocator,
1420   _Inout_ LPDWORD lpdwBufferLength);
1421 
1422 BOOLAPI
1423 GopherCreateLocatorW(
1424   _In_ LPCWSTR lpszHost,
1425   _In_ INTERNET_PORT nServerPort,
1426   _In_opt_ LPCWSTR lpszDisplayString,
1427   _In_opt_ LPCWSTR lpszSelectorString,
1428   _In_ DWORD dwGopherType,
1429   _Out_writes_opt_(*lpdwBufferLength) LPWSTR lpszLocator,
1430   _Inout_ LPDWORD lpdwBufferLength);
1431 
1432 #define GopherCreateLocator WINELIB_NAME_AW(GopherCreateLocator)
1433 
1434 BOOLAPI GopherGetLocatorTypeA(_In_ LPCSTR, _Out_ LPDWORD);
1435 BOOLAPI GopherGetLocatorTypeW(_In_ LPCWSTR, _Out_ LPDWORD);
1436 #define GopherGetLocatorType WINELIB_NAME_AW(GopherGetLocatorType)
1437 
1438 INTERNETAPI
1439 HINTERNET
1440 WINAPI
1441 GopherFindFirstFileA(
1442   _In_ HINTERNET hConnect,
1443   _In_opt_ LPCSTR lpszLocator,
1444   _In_opt_ LPCSTR lpszSearchString,
1445   _Out_opt_ LPGOPHER_FIND_DATAA lpFindData,
1446   _In_ DWORD dwFlags,
1447   _In_opt_ DWORD_PTR dwContext);
1448 
1449 INTERNETAPI
1450 HINTERNET
1451 WINAPI
1452 GopherFindFirstFileW(
1453   _In_ HINTERNET hConnect,
1454   _In_opt_ LPCWSTR lpszLocator,
1455   _In_opt_ LPCWSTR lpszSearchString,
1456   _Out_opt_ LPGOPHER_FIND_DATAW lpFindData,
1457   _In_ DWORD dwFlags,
1458   _In_opt_ DWORD_PTR dwContext);
1459 
1460 #define GopherFindFirstFile WINELIB_NAME_AW(GopherFindFirstFile)
1461 
1462 INTERNETAPI
1463 HINTERNET
1464 WINAPI
1465 GopherOpenFileA(
1466   _In_ HINTERNET,
1467   _In_ LPCSTR,
1468   _In_opt_ LPCSTR,
1469   _In_ DWORD,
1470   _In_opt_ DWORD_PTR);
1471 
1472 INTERNETAPI
1473 HINTERNET
1474 WINAPI
1475 GopherOpenFileW(
1476   _In_ HINTERNET,
1477   _In_ LPCWSTR,
1478   _In_opt_ LPCWSTR,
1479   _In_ DWORD,
1480   _In_opt_ DWORD_PTR);
1481 
1482 #define GopherOpenFile WINELIB_NAME_AW(GopherOpenFile)
1483 
1484 typedef BOOL
1485 (CALLBACK *GOPHER_ATTRIBUTE_ENUMERATORA)(
1486   _In_ LPGOPHER_ATTRIBUTE_TYPEA,
1487   _In_ DWORD);
1488 
1489 typedef BOOL
1490 (CALLBACK *GOPHER_ATTRIBUTE_ENUMERATORW)(
1491   _In_ LPGOPHER_ATTRIBUTE_TYPEW,
1492   _In_ DWORD);
1493 
1494 DECL_WINELIB_TYPE_AW(GOPHER_ATTRIBUTE_ENUMERATOR)
1495 
1496 BOOLAPI
1497 GopherGetAttributeA(
1498   _In_ HINTERNET hConnect,
1499   _In_ LPCSTR lpszLocator,
1500   _In_opt_ LPCSTR lpszAttributeName,
1501   _At_((LPSTR) lpBuffer, _Out_writes_(dwBufferLength)) LPBYTE lpBuffer,
1502   _In_ DWORD dwBufferLength,
1503   _Out_ LPDWORD lpdwCharactersReturned,
1504   _In_opt_ GOPHER_ATTRIBUTE_ENUMERATORA lpfnEnumerator,
1505   _In_opt_ DWORD_PTR dwContext);
1506 
1507 BOOLAPI
1508 GopherGetAttributeW(
1509   _In_ HINTERNET hConnect,
1510   _In_ LPCWSTR lpszLocator,
1511   _In_opt_ LPCWSTR lpszAttributeName,
1512   _At_((LPWSTR) lpBuffer, _Out_writes_(dwBufferLength)) LPBYTE lpBuffer,
1513   _In_ DWORD dwBufferLength,
1514   _Out_ LPDWORD lpdwCharactersReturned,
1515   _In_opt_ GOPHER_ATTRIBUTE_ENUMERATORW lpfnEnumerator,
1516   _In_opt_ DWORD_PTR dwContext);
1517 
1518 #define GopherGetAttribute WINELIB_NAME_AW(GopherGetAttribute)
1519 
1520 #define HTTP_MAJOR_VERSION      1
1521 #define HTTP_MINOR_VERSION      0
1522 #define HTTP_VERSION            TEXT("HTTP/1.0")
1523 #define HTTP_QUERY_MIME_VERSION                 0
1524 #define HTTP_QUERY_CONTENT_TYPE                 1
1525 #define HTTP_QUERY_CONTENT_TRANSFER_ENCODING    2
1526 #define HTTP_QUERY_CONTENT_ID                   3
1527 #define HTTP_QUERY_CONTENT_DESCRIPTION          4
1528 #define HTTP_QUERY_CONTENT_LENGTH               5
1529 #define HTTP_QUERY_CONTENT_LANGUAGE             6
1530 #define HTTP_QUERY_ALLOW                        7
1531 #define HTTP_QUERY_PUBLIC                       8
1532 #define HTTP_QUERY_DATE                         9
1533 #define HTTP_QUERY_EXPIRES                      10
1534 #define HTTP_QUERY_LAST_MODIFIED                11
1535 #define HTTP_QUERY_MESSAGE_ID                   12
1536 #define HTTP_QUERY_URI                          13
1537 #define HTTP_QUERY_DERIVED_FROM                 14
1538 #define HTTP_QUERY_COST                         15
1539 #define HTTP_QUERY_LINK                         16
1540 #define HTTP_QUERY_PRAGMA                       17
1541 #define HTTP_QUERY_VERSION                      18
1542 #define HTTP_QUERY_STATUS_CODE                  19
1543 #define HTTP_QUERY_STATUS_TEXT                  20
1544 #define HTTP_QUERY_RAW_HEADERS                  21
1545 #define HTTP_QUERY_RAW_HEADERS_CRLF             22
1546 #define HTTP_QUERY_CONNECTION                   23
1547 #define HTTP_QUERY_ACCEPT                       24
1548 #define HTTP_QUERY_ACCEPT_CHARSET               25
1549 #define HTTP_QUERY_ACCEPT_ENCODING              26
1550 #define HTTP_QUERY_ACCEPT_LANGUAGE              27
1551 #define HTTP_QUERY_AUTHORIZATION                28
1552 #define HTTP_QUERY_CONTENT_ENCODING             29
1553 #define HTTP_QUERY_FORWARDED                    30
1554 #define HTTP_QUERY_FROM                         31
1555 #define HTTP_QUERY_IF_MODIFIED_SINCE            32
1556 #define HTTP_QUERY_LOCATION                     33
1557 #define HTTP_QUERY_ORIG_URI                     34
1558 #define HTTP_QUERY_REFERER                      35
1559 #define HTTP_QUERY_RETRY_AFTER                  36
1560 #define HTTP_QUERY_SERVER                       37
1561 #define HTTP_QUERY_TITLE                        38
1562 #define HTTP_QUERY_USER_AGENT                   39
1563 #define HTTP_QUERY_WWW_AUTHENTICATE             40
1564 #define HTTP_QUERY_PROXY_AUTHENTICATE           41
1565 #define HTTP_QUERY_ACCEPT_RANGES                42
1566 #define HTTP_QUERY_SET_COOKIE                   43
1567 #define HTTP_QUERY_COOKIE                       44
1568 #define HTTP_QUERY_REQUEST_METHOD               45
1569 #define HTTP_QUERY_REFRESH                      46
1570 #define HTTP_QUERY_CONTENT_DISPOSITION          47
1571 #define HTTP_QUERY_AGE                          48
1572 #define HTTP_QUERY_CACHE_CONTROL                49
1573 #define HTTP_QUERY_CONTENT_BASE                 50
1574 #define HTTP_QUERY_CONTENT_LOCATION             51
1575 #define HTTP_QUERY_CONTENT_MD5                  52
1576 #define HTTP_QUERY_CONTENT_RANGE                53
1577 #define HTTP_QUERY_ETAG                         54
1578 #define HTTP_QUERY_HOST                         55
1579 #define HTTP_QUERY_IF_MATCH                     56
1580 #define HTTP_QUERY_IF_NONE_MATCH                57
1581 #define HTTP_QUERY_IF_RANGE                     58
1582 #define HTTP_QUERY_IF_UNMODIFIED_SINCE          59
1583 #define HTTP_QUERY_MAX_FORWARDS                 60
1584 #define HTTP_QUERY_PROXY_AUTHORIZATION          61
1585 #define HTTP_QUERY_RANGE                        62
1586 #define HTTP_QUERY_TRANSFER_ENCODING            63
1587 #define HTTP_QUERY_UPGRADE                      64
1588 #define HTTP_QUERY_VARY                         65
1589 #define HTTP_QUERY_VIA                          66
1590 #define HTTP_QUERY_WARNING                      67
1591 #define HTTP_QUERY_EXPECT                       68
1592 #define HTTP_QUERY_PROXY_CONNECTION             69
1593 #define HTTP_QUERY_UNLESS_MODIFIED_SINCE        70
1594 #define HTTP_QUERY_ECHO_REQUEST                 71
1595 #define HTTP_QUERY_ECHO_REPLY                   72
1596 #define HTTP_QUERY_ECHO_HEADERS                 73
1597 #define HTTP_QUERY_ECHO_HEADERS_CRLF            74
1598 #define HTTP_QUERY_PROXY_SUPPORT                75
1599 #define HTTP_QUERY_AUTHENTICATION_INFO          76
1600 #define HTTP_QUERY_PASSPORT_URLS                77
1601 #define HTTP_QUERY_PASSPORT_CONFIG              78
1602 #define HTTP_QUERY_MAX                          78
1603 #define HTTP_QUERY_CUSTOM                       65535
1604 #define HTTP_QUERY_FLAG_REQUEST_HEADERS         0x80000000
1605 #define HTTP_QUERY_FLAG_SYSTEMTIME              0x40000000
1606 #define HTTP_QUERY_FLAG_NUMBER                  0x20000000
1607 #define HTTP_QUERY_FLAG_COALESCE                0x10000000
1608 #define HTTP_QUERY_MODIFIER_FLAGS_MASK          (HTTP_QUERY_FLAG_REQUEST_HEADERS \
1609                                                 | HTTP_QUERY_FLAG_SYSTEMTIME        \
1610                                                 | HTTP_QUERY_FLAG_NUMBER            \
1611                                                 | HTTP_QUERY_FLAG_COALESCE          \
1612                                                 )
1613 #define HTTP_QUERY_HEADER_MASK                  (~HTTP_QUERY_MODIFIER_FLAGS_MASK)
1614 
1615 #define HTTP_STATUS_CONTINUE            100
1616 #define HTTP_STATUS_SWITCH_PROTOCOLS    101
1617 #define HTTP_STATUS_OK                  200
1618 #define HTTP_STATUS_CREATED             201
1619 #define HTTP_STATUS_ACCEPTED            202
1620 #define HTTP_STATUS_PARTIAL             203
1621 #define HTTP_STATUS_NO_CONTENT          204
1622 #define HTTP_STATUS_RESET_CONTENT       205
1623 #define HTTP_STATUS_PARTIAL_CONTENT     206
1624 #define HTTP_STATUS_AMBIGUOUS           300
1625 #define HTTP_STATUS_MOVED               301
1626 #define HTTP_STATUS_REDIRECT            302
1627 #define HTTP_STATUS_REDIRECT_METHOD     303
1628 #define HTTP_STATUS_NOT_MODIFIED        304
1629 #define HTTP_STATUS_USE_PROXY           305
1630 #define HTTP_STATUS_REDIRECT_KEEP_VERB  307
1631 #define HTTP_STATUS_BAD_REQUEST         400
1632 #define HTTP_STATUS_DENIED              401
1633 #define HTTP_STATUS_PAYMENT_REQ         402
1634 #define HTTP_STATUS_FORBIDDEN           403
1635 #define HTTP_STATUS_NOT_FOUND           404
1636 #define HTTP_STATUS_BAD_METHOD          405
1637 #define HTTP_STATUS_NONE_ACCEPTABLE     406
1638 #define HTTP_STATUS_PROXY_AUTH_REQ      407
1639 #define HTTP_STATUS_REQUEST_TIMEOUT     408
1640 #define HTTP_STATUS_CONFLICT            409
1641 #define HTTP_STATUS_GONE                410
1642 #define HTTP_STATUS_LENGTH_REQUIRED     411
1643 #define HTTP_STATUS_PRECOND_FAILED      412
1644 #define HTTP_STATUS_REQUEST_TOO_LARGE   413
1645 #define HTTP_STATUS_URI_TOO_LONG        414
1646 #define HTTP_STATUS_UNSUPPORTED_MEDIA   415
1647 #define HTTP_STATUS_SERVER_ERROR        500
1648 #define HTTP_STATUS_NOT_SUPPORTED       501
1649 #define HTTP_STATUS_BAD_GATEWAY         502
1650 #define HTTP_STATUS_SERVICE_UNAVAIL     503
1651 #define HTTP_STATUS_GATEWAY_TIMEOUT     504
1652 #define HTTP_STATUS_VERSION_NOT_SUP     505
1653 #define HTTP_STATUS_FIRST               HTTP_STATUS_CONTINUE
1654 #define HTTP_STATUS_LAST                HTTP_STATUS_VERSION_NOT_SUP
1655 
1656 
1657 INTERNETAPI
1658 HINTERNET
1659 WINAPI
1660 HttpOpenRequestA(
1661   _In_ HINTERNET hConnect,
1662   _In_opt_ LPCSTR lpszVerb,
1663   _In_opt_ LPCSTR lpszObjectName,
1664   _In_opt_ LPCSTR lpszVersion,
1665   _In_opt_ LPCSTR lpszReferrer,
1666   _In_opt_z_ LPCSTR FAR * lplpszAcceptTypes,
1667   _In_ DWORD dwFlags,
1668   _In_opt_ DWORD_PTR dwContext);
1669 
1670 INTERNETAPI
1671 HINTERNET
1672 WINAPI HttpOpenRequestW(
1673   _In_ HINTERNET hConnect,
1674   _In_opt_ LPCWSTR lpszVerb,
1675   _In_opt_ LPCWSTR lpszObjectName,
1676   _In_opt_ LPCWSTR lpszVersion,
1677   _In_opt_ LPCWSTR lpszReferrer,
1678   _In_opt_z_ LPCWSTR FAR * lplpszAcceptTypes,
1679   _In_ DWORD dwFlags,
1680   _In_opt_ DWORD_PTR dwContext);
1681 
1682 #define HttpOpenRequest WINELIB_NAME_AW(HttpOpenRequest)
1683 
1684 BOOLAPI
1685 HttpAddRequestHeadersA(
1686   _In_ HINTERNET hRequest,
1687   _When_(dwHeadersLength == (DWORD) - 1, _In_z_)
1688   _When_(dwHeadersLength != (DWORD) - 1, _In_reads_(dwHeadersLength))
1689     LPCSTR lpszHeaders,
1690   _In_ DWORD dwHeadersLength,
1691   _In_ DWORD dwModifiers);
1692 
1693 BOOLAPI
1694 HttpAddRequestHeadersW(
1695   _In_ HINTERNET hRequest,
1696   _When_(dwHeadersLength == (DWORD) - 1, _In_z_)
1697   _When_(dwHeadersLength != (DWORD) - 1, _In_reads_(dwHeadersLength))
1698     LPCWSTR lpszHeaders,
1699   _In_ DWORD dwHeadersLength,
1700   _In_ DWORD dwModifiers);
1701 
1702 #define HttpAddRequestHeaders WINELIB_NAME_AW(HttpAddRequestHeaders)
1703 
1704 #define HTTP_ADDREQ_INDEX_MASK      0x0000FFFF
1705 #define HTTP_ADDREQ_FLAGS_MASK      0xFFFF0000
1706 #define HTTP_ADDREQ_FLAG_ADD_IF_NEW 0x10000000
1707 #define HTTP_ADDREQ_FLAG_ADD        0x20000000
1708 #define HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA       0x40000000
1709 #define HTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON   0x01000000
1710 #define HTTP_ADDREQ_FLAG_COALESCE                  HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA
1711 #define HTTP_ADDREQ_FLAG_REPLACE    0x80000000
1712 
1713 BOOLAPI
1714 HttpSendRequestA(
1715   _In_ HINTERNET hRequest,
1716   _In_reads_opt_(dwHeadersLength) LPCSTR lpszHeaders,
1717   _In_ DWORD dwHeadersLength,
1718   _In_reads_bytes_opt_(dwOptionalLength) LPVOID lpOptional,
1719   _In_ DWORD dwOptionalLength);
1720 
1721 BOOLAPI
1722 HttpSendRequestW(
1723   _In_ HINTERNET hRequest,
1724   _In_reads_opt_(dwHeadersLength) LPCWSTR lpszHeaders,
1725   _In_ DWORD dwHeadersLength,
1726   _In_reads_bytes_opt_(dwOptionalLength) LPVOID lpOptional,
1727   _In_ DWORD dwOptionalLength);
1728 
1729 #define HttpSendRequest WINELIB_NAME_AW(HttpSendRequest)
1730 
1731 BOOLAPI
1732 HttpSendRequestExA(
1733   _In_ HINTERNET,
1734   _In_opt_ LPINTERNET_BUFFERSA,
1735   _Out_opt_ LPINTERNET_BUFFERSA,
1736   _In_ DWORD,
1737   _In_opt_ DWORD_PTR);
1738 
1739 BOOLAPI
1740 HttpSendRequestExW(
1741   _In_ HINTERNET,
1742   _In_opt_ LPINTERNET_BUFFERSW,
1743   _Out_opt_ LPINTERNET_BUFFERSW,
1744   _In_ DWORD,
1745   _In_opt_ DWORD_PTR);
1746 
1747 #define HttpSendRequestEx WINELIB_NAME_AW(HttpSendRequestEx)
1748 
1749 #define HSR_ASYNC       WININET_API_FLAG_ASYNC
1750 #define HSR_SYNC        WININET_API_FLAG_SYNC
1751 #define HSR_USE_CONTEXT WININET_API_FLAG_USE_CONTEXT
1752 #define HSR_INITIATE    0x00000008
1753 #define HSR_DOWNLOAD    0x00000010
1754 #define HSR_CHUNKED     0x00000020
1755 
1756 BOOLAPI
1757 HttpEndRequestA(
1758   _In_ HINTERNET,
1759   _Out_opt_ LPINTERNET_BUFFERSA,
1760   _In_ DWORD,
1761   _In_opt_ DWORD_PTR);
1762 
1763 BOOLAPI
1764 HttpEndRequestW(
1765   _In_ HINTERNET,
1766   _Out_opt_ LPINTERNET_BUFFERSW,
1767   _In_ DWORD,
1768   _In_opt_ DWORD_PTR);
1769 
1770 #define HttpEndRequest WINELIB_NAME_AW(HttpEndRequest)
1771 
1772 BOOLAPI
1773 HttpQueryInfoA(
1774   _In_ HINTERNET hRequest,
1775   _In_ DWORD dwInfoLevel,
1776   _Inout_updates_bytes_to_opt_(*lpdwBufferLength, *lpdwBufferLength) __out_data_source(NETWORK) LPVOID lpBuffer,
1777   _Inout_ LPDWORD lpdwBufferLength,
1778   _Inout_opt_ LPDWORD lpdwIndex);
1779 
1780 BOOLAPI
1781 HttpQueryInfoW(
1782   _In_ HINTERNET hRequest,
1783   _In_ DWORD dwInfoLevel,
1784   _Inout_updates_bytes_to_opt_(*lpdwBufferLength, *lpdwBufferLength) __out_data_source(NETWORK) LPVOID lpBuffer,
1785   _Inout_ LPDWORD lpdwBufferLength,
1786   _Inout_opt_ LPDWORD lpdwIndex);
1787 
1788 #define HttpQueryInfo WINELIB_NAME_AW(HttpQueryInfo)
1789 
1790 typedef enum {
1791     COOKIE_STATE_UNKNOWN,
1792     COOKIE_STATE_ACCEPT,
1793     COOKIE_STATE_PROMPT,
1794     COOKIE_STATE_LEASH,
1795     COOKIE_STATE_DOWNGRADE,
1796     COOKIE_STATE_REJECT,
1797     COOKIE_STATE_MAX = COOKIE_STATE_REJECT
1798 } InternetCookieState;
1799 
1800 BOOLAPI InternetClearAllPerSiteCookieDecisions(VOID);
1801 
1802 BOOLAPI
1803 InternetEnumPerSiteCookieDecisionA(
1804   _Out_writes_to_(*pcSiteNameSize, *pcSiteNameSize) LPSTR pszSiteName,
1805   _Inout_ ULONG *pcSiteNameSize,
1806   _Out_ ULONG *pdwDecision,
1807   _In_ ULONG dwIndex);
1808 
1809 BOOLAPI
1810 InternetEnumPerSiteCookieDecisionW(
1811   _Out_writes_to_(*pcSiteNameSize, *pcSiteNameSize) LPWSTR pszSiteName,
1812   _Inout_ ULONG *pcSiteNameSize,
1813   _Out_ ULONG *pdwDecision,
1814   _In_ ULONG dwIndex);
1815 
1816 #define InternetEnumPerSiteCookieDecision WINELIB_NAME_AW(InternetEnumPerSiteCookieDecision)
1817 
1818 #define INTERNET_COOKIE_IS_SECURE       0x00000001
1819 #define INTERNET_COOKIE_IS_SESSION      0x00000002
1820 #define INTERNET_COOKIE_THIRD_PARTY     0x00000010
1821 #define INTERNET_COOKIE_PROMPT_REQUIRED 0x00000020
1822 #define INTERNET_COOKIE_EVALUATE_P3P    0x00000040
1823 #define INTERNET_COOKIE_APPLY_P3P       0x00000080
1824 #define INTERNET_COOKIE_P3P_ENABLED     0x00000100
1825 #define INTERNET_COOKIE_IS_RESTRICTED   0x00000200
1826 #define INTERNET_COOKIE_IE6             0x00000400
1827 #define INTERNET_COOKIE_IS_LEGACY       0x00000800
1828 #define INTERNET_COOKIE_HTTPONLY        0x00002000
1829 
1830 BOOLAPI
1831 InternetGetCookieExA(
1832   _In_ LPCSTR lpszUrl,
1833   _In_opt_ LPCSTR lpszCookieName,
1834   _In_reads_opt_(*lpdwSize) LPSTR lpszCookieData,
1835   _Inout_ LPDWORD lpdwSize,
1836   _In_ DWORD dwFlags,
1837   _Reserved_ LPVOID lpReserved);
1838 
1839 BOOLAPI
1840 InternetGetCookieExW(
1841   _In_ LPCWSTR lpszUrl,
1842   _In_opt_ LPCWSTR lpszCookieName,
1843   _In_reads_opt_(*lpdwSize) LPWSTR lpszCookieData,
1844   _Inout_ LPDWORD lpdwSize,
1845   _In_ DWORD dwFlags,
1846   _Reserved_ LPVOID lpReserved);
1847 
1848 #define InternetGetCookieEx WINELIB_NAME_AW(InternetGetCookieEx)
1849 
1850 DWORD
1851 WINAPI
1852 InternetSetCookieExA(
1853   _In_ LPCSTR,
1854   _In_opt_ LPCSTR,
1855   _In_ LPCSTR,
1856   _In_ DWORD,
1857   _In_opt_ DWORD_PTR);
1858 
1859 DWORD
1860 WINAPI
1861 InternetSetCookieExW(
1862   _In_ LPCWSTR,
1863   _In_opt_ LPCWSTR,
1864   _In_ LPCWSTR,
1865   _In_ DWORD,
1866   _In_opt_ DWORD_PTR);
1867 
1868 #define InternetSetCookieEx WINELIB_NAME_AW(InternetSetCookieEx)
1869 
1870 BOOLAPI InternetGetPerSiteCookieDecisionA(_In_ LPCSTR, _Out_ ULONG *);
1871 BOOLAPI InternetGetPerSiteCookieDecisionW(_In_ LPCWSTR, _Out_ ULONG *);
1872 #define InternetGetPerSiteCookieDecision WINELIB_NAME_AW(InternetGetPerSiteCookieDecision)
1873 
1874 BOOLAPI InternetSetPerSiteCookieDecisionA(_In_ LPCSTR, _In_ DWORD);
1875 BOOLAPI InternetSetPerSiteCookieDecisionW(_In_ LPCWSTR, _In_ DWORD);
1876 #define InternetSetPerSiteCookieDecision WINELIB_NAME_AW(InternetSetPerSiteCookieDecision)
1877 
1878 BOOLAPI InternetSetCookieA(_In_ LPCSTR, _In_opt_ LPCSTR, _In_ LPCSTR);
1879 BOOLAPI InternetSetCookieW(_In_ LPCWSTR, _In_opt_ LPCWSTR, _In_ LPCWSTR);
1880 #define InternetSetCookie  WINELIB_NAME_AW(InternetSetCookie)
1881 
1882 BOOLAPI
1883 InternetGetCookieA(
1884   _In_ LPCSTR lpszUrl,
1885   _In_opt_ LPCSTR lpszCookieName,
1886   _Out_writes_opt_(*lpdwSize) LPSTR lpszCookieData,
1887   _Inout_ LPDWORD lpdwSize);
1888 
1889 BOOLAPI
1890 InternetGetCookieW(
1891   _In_ LPCWSTR lpszUrl,
1892   _In_opt_ LPCWSTR lpszCookieName,
1893   _Out_writes_opt_(*lpdwSize) LPWSTR lpszCookieData,
1894   _Inout_ LPDWORD lpdwSize);
1895 
1896 #define InternetGetCookie WINELIB_NAME_AW(InternetGetCookie)
1897 
1898 INTERNETAPI DWORD WINAPI InternetAttemptConnect(_In_ DWORD);
1899 
1900 BOOLAPI InternetCheckConnectionA(_In_ LPCSTR, _In_ DWORD, _In_ DWORD);
1901 BOOLAPI InternetCheckConnectionW(_In_ LPCWSTR, _In_ DWORD, _In_ DWORD);
1902 #define InternetCheckConnection  WINELIB_NAME_AW(InternetCheckConnection)
1903 
1904 #define FLAG_ICC_FORCE_CONNECTION       0x00000001
1905 
1906 #define FLAGS_ERROR_UI_FILTER_FOR_ERRORS        0x01
1907 #define FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS     0x02
1908 #define FLAGS_ERROR_UI_FLAGS_GENERATE_DATA      0x04
1909 #define FLAGS_ERROR_UI_FLAGS_NO_UI              0x08
1910 #define FLAGS_ERROR_UI_SERIALIZE_DIALOGS        0x10
1911 
1912 DWORD InternetAuthNotifyCallback ( DWORD_PTR ,DWORD ,LPVOID );
1913 typedef DWORD (CALLBACK *PFN_AUTH_NOTIFY) (DWORD_PTR,DWORD,LPVOID);
1914 
1915 typedef struct
1916 {
1917     DWORD            cbStruct;
1918     DWORD            dwOptions;
1919     PFN_AUTH_NOTIFY  pfnNotify;
1920     DWORD_PTR        dwContext;
1921 }
1922 INTERNET_AUTH_NOTIFY_DATA;
1923 
1924 
1925 INTERNETAPI
1926 DWORD
1927 WINAPI
1928 InternetErrorDlg(
1929   _In_ HWND,
1930   _Inout_opt_ HINTERNET,
1931   _In_ DWORD,
1932   _In_ DWORD,
1933   _Inout_opt_ LPVOID *);
1934 
1935 INTERNETAPI
1936 DWORD
1937 WINAPI
1938 InternetConfirmZoneCrossingA(
1939   _In_ HWND,
1940   _In_ LPSTR,
1941   _In_ LPSTR,
1942   _In_ BOOL);
1943 
1944 INTERNETAPI
1945 DWORD
1946 WINAPI
1947 InternetConfirmZoneCrossingW(
1948   _In_ HWND,
1949   _In_ LPWSTR,
1950   _In_ LPWSTR,
1951   _In_ BOOL);
1952 
1953 #define InternetConfirmZoneCrossing WINELIB_NAME_AW(InternetConfirmZoneCrossing)
1954 
1955 #define PRIVACY_TEMPLATE_NO_COOKIES  0
1956 #define PRIVACY_TEMPLATE_HIGH        1
1957 #define PRIVACY_TEMPLATE_MEDIUM_HIGH 2
1958 #define PRIVACY_TEMPLATE_MEDIUM      3
1959 #define PRIVACY_TEMPLATE_MEDIUM_LOW  4
1960 #define PRIVACY_TEMPLATE_LOW         5
1961 #define PRIVACY_TEMPLATE_CUSTOM      100
1962 #define PRIVACY_TEMPLATE_ADVANCED    101
1963 
1964 #define PRIVACY_TEMPLATE_MAX         PRIVACY_TEMPLATE_LOW
1965 
1966 #define PRIVACY_TYPE_FIRST_PARTY 0
1967 #define PRIVACY_TYPE_THIRD_PARTY 1
1968 
1969 INTERNETAPI
1970 DWORD
1971 WINAPI
1972 PrivacySetZonePreferenceW(
1973   _In_ DWORD,
1974   _In_ DWORD,
1975   _In_ DWORD,
1976   _In_opt_ LPCWSTR);
1977 
1978 INTERNETAPI
1979 DWORD
1980 WINAPI
1981 PrivacyGetZonePreferenceW(
1982   _In_ DWORD dwZone,
1983   _In_ DWORD dwType,
1984   _Out_opt_ LPDWORD pdwTemplate,
1985   _Out_writes_opt_(*pdwBufferLength) LPWSTR pszBuffer,
1986   _Inout_opt_ LPDWORD pdwBufferLength);
1987 
1988 #define INTERNET_ERROR_BASE                     12000
1989 
1990 #define ERROR_INTERNET_OUT_OF_HANDLES           (INTERNET_ERROR_BASE + 1)
1991 #define ERROR_INTERNET_TIMEOUT                  (INTERNET_ERROR_BASE + 2)
1992 #define ERROR_INTERNET_EXTENDED_ERROR           (INTERNET_ERROR_BASE + 3)
1993 #define ERROR_INTERNET_INTERNAL_ERROR           (INTERNET_ERROR_BASE + 4)
1994 #define ERROR_INTERNET_INVALID_URL              (INTERNET_ERROR_BASE + 5)
1995 #define ERROR_INTERNET_UNRECOGNIZED_SCHEME      (INTERNET_ERROR_BASE + 6)
1996 #define ERROR_INTERNET_NAME_NOT_RESOLVED        (INTERNET_ERROR_BASE + 7)
1997 #define ERROR_INTERNET_PROTOCOL_NOT_FOUND       (INTERNET_ERROR_BASE + 8)
1998 #define ERROR_INTERNET_INVALID_OPTION           (INTERNET_ERROR_BASE + 9)
1999 #define ERROR_INTERNET_BAD_OPTION_LENGTH        (INTERNET_ERROR_BASE + 10)
2000 #define ERROR_INTERNET_OPTION_NOT_SETTABLE      (INTERNET_ERROR_BASE + 11)
2001 #define ERROR_INTERNET_SHUTDOWN                 (INTERNET_ERROR_BASE + 12)
2002 #define ERROR_INTERNET_INCORRECT_USER_NAME      (INTERNET_ERROR_BASE + 13)
2003 #define ERROR_INTERNET_INCORRECT_PASSWORD       (INTERNET_ERROR_BASE + 14)
2004 #define ERROR_INTERNET_LOGIN_FAILURE            (INTERNET_ERROR_BASE + 15)
2005 #define ERROR_INTERNET_INVALID_OPERATION        (INTERNET_ERROR_BASE + 16)
2006 #define ERROR_INTERNET_OPERATION_CANCELLED      (INTERNET_ERROR_BASE + 17)
2007 #define ERROR_INTERNET_INCORRECT_HANDLE_TYPE    (INTERNET_ERROR_BASE + 18)
2008 #define ERROR_INTERNET_INCORRECT_HANDLE_STATE   (INTERNET_ERROR_BASE + 19)
2009 #define ERROR_INTERNET_NOT_PROXY_REQUEST        (INTERNET_ERROR_BASE + 20)
2010 #define ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND (INTERNET_ERROR_BASE + 21)
2011 #define ERROR_INTERNET_BAD_REGISTRY_PARAMETER   (INTERNET_ERROR_BASE + 22)
2012 #define ERROR_INTERNET_NO_DIRECT_ACCESS         (INTERNET_ERROR_BASE + 23)
2013 #define ERROR_INTERNET_NO_CONTEXT               (INTERNET_ERROR_BASE + 24)
2014 #define ERROR_INTERNET_NO_CALLBACK              (INTERNET_ERROR_BASE + 25)
2015 #define ERROR_INTERNET_REQUEST_PENDING          (INTERNET_ERROR_BASE + 26)
2016 #define ERROR_INTERNET_INCORRECT_FORMAT         (INTERNET_ERROR_BASE + 27)
2017 #define ERROR_INTERNET_ITEM_NOT_FOUND           (INTERNET_ERROR_BASE + 28)
2018 #define ERROR_INTERNET_CANNOT_CONNECT           (INTERNET_ERROR_BASE + 29)
2019 #define ERROR_INTERNET_CONNECTION_ABORTED       (INTERNET_ERROR_BASE + 30)
2020 #define ERROR_INTERNET_CONNECTION_RESET         (INTERNET_ERROR_BASE + 31)
2021 #define ERROR_INTERNET_FORCE_RETRY              (INTERNET_ERROR_BASE + 32)
2022 #define ERROR_INTERNET_INVALID_PROXY_REQUEST    (INTERNET_ERROR_BASE + 33)
2023 #define ERROR_INTERNET_NEED_UI                  (INTERNET_ERROR_BASE + 34)
2024 #define ERROR_INTERNET_HANDLE_EXISTS            (INTERNET_ERROR_BASE + 36)
2025 #define ERROR_INTERNET_SEC_CERT_DATE_INVALID    (INTERNET_ERROR_BASE + 37)
2026 #define ERROR_INTERNET_SEC_CERT_CN_INVALID      (INTERNET_ERROR_BASE + 38)
2027 #define ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR   (INTERNET_ERROR_BASE + 39)
2028 #define ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR   (INTERNET_ERROR_BASE + 40)
2029 #define ERROR_INTERNET_MIXED_SECURITY           (INTERNET_ERROR_BASE + 41)
2030 #define ERROR_INTERNET_CHG_POST_IS_NON_SECURE   (INTERNET_ERROR_BASE + 42)
2031 #define ERROR_INTERNET_POST_IS_NON_SECURE       (INTERNET_ERROR_BASE + 43)
2032 #define ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED  (INTERNET_ERROR_BASE + 44)
2033 #define ERROR_INTERNET_INVALID_CA               (INTERNET_ERROR_BASE + 45)
2034 #define ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP    (INTERNET_ERROR_BASE + 46)
2035 #define ERROR_INTERNET_ASYNC_THREAD_FAILED      (INTERNET_ERROR_BASE + 47)
2036 #define ERROR_INTERNET_REDIRECT_SCHEME_CHANGE   (INTERNET_ERROR_BASE + 48)
2037 #define ERROR_INTERNET_DIALOG_PENDING           (INTERNET_ERROR_BASE + 49)
2038 #define ERROR_INTERNET_RETRY_DIALOG             (INTERNET_ERROR_BASE + 50)
2039 #define ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR  (INTERNET_ERROR_BASE + 52)
2040 #define ERROR_INTERNET_INSERT_CDROM             (INTERNET_ERROR_BASE + 53)
2041 #define ERROR_INTERNET_FORTEZZA_LOGIN_NEEDED    (INTERNET_ERROR_BASE + 54)
2042 #define ERROR_INTERNET_SEC_CERT_ERRORS          (INTERNET_ERROR_BASE + 55)
2043 #define ERROR_INTERNET_SEC_CERT_NO_REV          (INTERNET_ERROR_BASE + 56)
2044 #define ERROR_INTERNET_SEC_CERT_REV_FAILED      (INTERNET_ERROR_BASE + 57)
2045 #define ERROR_INTERNET_SEC_CERT_WEAK_SIGNATURE  (INTERNET_ERROR_BASE + 62)
2046 #define ERROR_FTP_TRANSFER_IN_PROGRESS          (INTERNET_ERROR_BASE + 110)
2047 #define ERROR_FTP_DROPPED                       (INTERNET_ERROR_BASE + 111)
2048 #define ERROR_FTP_NO_PASSIVE_MODE               (INTERNET_ERROR_BASE + 112)
2049 #define ERROR_GOPHER_PROTOCOL_ERROR             (INTERNET_ERROR_BASE + 130)
2050 #define ERROR_GOPHER_NOT_FILE                   (INTERNET_ERROR_BASE + 131)
2051 #define ERROR_GOPHER_DATA_ERROR                 (INTERNET_ERROR_BASE + 132)
2052 #define ERROR_GOPHER_END_OF_DATA                (INTERNET_ERROR_BASE + 133)
2053 #define ERROR_GOPHER_INVALID_LOCATOR            (INTERNET_ERROR_BASE + 134)
2054 #define ERROR_GOPHER_INCORRECT_LOCATOR_TYPE     (INTERNET_ERROR_BASE + 135)
2055 #define ERROR_GOPHER_NOT_GOPHER_PLUS            (INTERNET_ERROR_BASE + 136)
2056 #define ERROR_GOPHER_ATTRIBUTE_NOT_FOUND        (INTERNET_ERROR_BASE + 137)
2057 #define ERROR_GOPHER_UNKNOWN_LOCATOR            (INTERNET_ERROR_BASE + 138)
2058 #define ERROR_HTTP_HEADER_NOT_FOUND             (INTERNET_ERROR_BASE + 150)
2059 #define ERROR_HTTP_DOWNLEVEL_SERVER             (INTERNET_ERROR_BASE + 151)
2060 #define ERROR_HTTP_INVALID_SERVER_RESPONSE      (INTERNET_ERROR_BASE + 152)
2061 #define ERROR_HTTP_INVALID_HEADER               (INTERNET_ERROR_BASE + 153)
2062 #define ERROR_HTTP_INVALID_QUERY_REQUEST        (INTERNET_ERROR_BASE + 154)
2063 #define ERROR_HTTP_HEADER_ALREADY_EXISTS        (INTERNET_ERROR_BASE + 155)
2064 #define ERROR_HTTP_REDIRECT_FAILED              (INTERNET_ERROR_BASE + 156)
2065 #define ERROR_HTTP_NOT_REDIRECTED               (INTERNET_ERROR_BASE + 160)
2066 #define ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION    (INTERNET_ERROR_BASE + 161)
2067 #define ERROR_HTTP_COOKIE_DECLINED              (INTERNET_ERROR_BASE + 162)
2068 #define ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION  (INTERNET_ERROR_BASE + 168)
2069 #define ERROR_INTERNET_SECURITY_CHANNEL_ERROR   (INTERNET_ERROR_BASE + 157)
2070 #define ERROR_INTERNET_UNABLE_TO_CACHE_FILE     (INTERNET_ERROR_BASE + 158)
2071 #define ERROR_INTERNET_TCPIP_NOT_INSTALLED      (INTERNET_ERROR_BASE + 159)
2072 #define ERROR_INTERNET_DISCONNECTED             (INTERNET_ERROR_BASE + 163)
2073 #define ERROR_INTERNET_SERVER_UNREACHABLE       (INTERNET_ERROR_BASE + 164)
2074 #define ERROR_INTERNET_PROXY_SERVER_UNREACHABLE (INTERNET_ERROR_BASE + 165)
2075 #define ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT    (INTERNET_ERROR_BASE + 166)
2076 #define ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT (INTERNET_ERROR_BASE + 167)
2077 #define ERROR_INTERNET_SEC_INVALID_CERT    (INTERNET_ERROR_BASE + 169)
2078 #define ERROR_INTERNET_SEC_CERT_REVOKED    (INTERNET_ERROR_BASE + 170)
2079 #define ERROR_INTERNET_FAILED_DUETOSECURITYCHECK  (INTERNET_ERROR_BASE + 171)
2080 #define ERROR_INTERNET_NOT_INITIALIZED            (INTERNET_ERROR_BASE + 172)
2081 #define ERROR_INTERNET_NEED_MSN_SSPI_PKG          (INTERNET_ERROR_BASE + 173)
2082 #define ERROR_INTERNET_LOGIN_FAILURE_DISPLAY_ENTITY_BODY  (INTERNET_ERROR_BASE + 174)
2083 #define ERROR_INTERNET_DECODING_FAILED            (INTERNET_ERROR_BASE + 175)
2084 #define INTERNET_ERROR_LAST                       ERROR_INTERNET_DECODING_FAILED
2085 
2086 
2087 #define NORMAL_CACHE_ENTRY              0x00000001
2088 #define STICKY_CACHE_ENTRY              0x00000004
2089 #define EDITED_CACHE_ENTRY              0x00000008
2090 #define COOKIE_CACHE_ENTRY              0x00100000
2091 #define URLHISTORY_CACHE_ENTRY          0x00200000
2092 #define TRACK_OFFLINE_CACHE_ENTRY       0x00000010
2093 #define TRACK_ONLINE_CACHE_ENTRY        0x00000020
2094 #define SPARSE_CACHE_ENTRY              0x00010000
2095 
2096 #define URLCACHE_FIND_DEFAULT_FILTER    NORMAL_CACHE_ENTRY             \
2097                                     |   COOKIE_CACHE_ENTRY             \
2098                                     |   URLHISTORY_CACHE_ENTRY         \
2099                                     |   TRACK_OFFLINE_CACHE_ENTRY      \
2100                                     |   TRACK_ONLINE_CACHE_ENTRY       \
2101                                     |   STICKY_CACHE_ENTRY
2102 
2103 
2104 typedef struct _INTERNET_CACHE_ENTRY_INFOA {
2105     DWORD dwStructSize;
2106     LPSTR lpszSourceUrlName;
2107     LPSTR   lpszLocalFileName;
2108     DWORD CacheEntryType;
2109     DWORD dwUseCount;
2110     DWORD dwHitRate;
2111     DWORD dwSizeLow;
2112     DWORD dwSizeHigh;
2113     FILETIME LastModifiedTime;
2114     FILETIME ExpireTime;
2115     FILETIME LastAccessTime;
2116     FILETIME LastSyncTime;
2117 
2118     LPBYTE lpHeaderInfo;
2119     DWORD dwHeaderInfoSize;
2120     LPSTR lpszFileExtension;
2121     union {
2122       DWORD dwReserved;
2123       DWORD dwExemptDelta;
2124     } DUMMYUNIONNAME;
2125 } INTERNET_CACHE_ENTRY_INFOA,* LPINTERNET_CACHE_ENTRY_INFOA;
2126 
2127 typedef struct _INTERNET_CACHE_ENTRY_INFOW {
2128     DWORD dwStructSize;
2129     LPWSTR lpszSourceUrlName;
2130     LPWSTR  lpszLocalFileName;
2131     DWORD CacheEntryType;
2132     DWORD dwUseCount;
2133     DWORD dwHitRate;
2134     DWORD dwSizeLow;
2135     DWORD dwSizeHigh;
2136     FILETIME LastModifiedTime;
2137     FILETIME ExpireTime;
2138     FILETIME LastAccessTime;
2139     FILETIME LastSyncTime;
2140 
2141     LPBYTE lpHeaderInfo;
2142     DWORD dwHeaderInfoSize;
2143     LPWSTR  lpszFileExtension;
2144     union {
2145       DWORD dwReserved;
2146       DWORD dwExemptDelta;
2147     } DUMMYUNIONNAME;
2148 } INTERNET_CACHE_ENTRY_INFOW,* LPINTERNET_CACHE_ENTRY_INFOW;
2149 
2150 DECL_WINELIB_TYPE_AW(INTERNET_CACHE_ENTRY_INFO)
2151 DECL_WINELIB_TYPE_AW(LPINTERNET_CACHE_ENTRY_INFO)
2152 
2153 typedef struct _INTERNET_CACHE_TIMESTAMPS
2154 {
2155     FILETIME ftExpires;
2156     FILETIME ftLastModified;
2157 } INTERNET_CACHE_TIMESTAMPS, *LPINTERNET_CACHE_TIMESTAMPS;
2158 
2159 BOOLAPI
2160 CreateUrlCacheEntryA(
2161   _In_ LPCSTR lpszUrlName,
2162   _In_ DWORD dwExpectedFileSize,
2163   _In_opt_ LPCSTR lpszFileExtension,
2164   _Inout_updates_(MAX_PATH) LPSTR lpszFileName,
2165   _In_ DWORD dwReserved);
2166 
2167 BOOLAPI
2168 CreateUrlCacheEntryW(
2169   _In_ LPCWSTR lpszUrlName,
2170   _In_ DWORD dwExpectedFileSize,
2171   _In_opt_ LPCWSTR lpszFileExtension,
2172   _Inout_updates_(MAX_PATH) LPWSTR lpszFileName,
2173   _In_ DWORD dwReserved);
2174 
2175 #define CreateUrlCacheEntry WINELIB_NAME_AW(CreateUrlCacheEntry)
2176 
2177 BOOLAPI
2178 CommitUrlCacheEntryA(
2179   _In_ LPCSTR lpszUrlName,
2180   _In_opt_ LPCSTR lpszLocalFileName,
2181   _In_ FILETIME ExpireTime,
2182   _In_ FILETIME LastModifiedTime,
2183   _In_ DWORD CacheEntryType,
2184   _In_reads_opt_(cchHeaderInfo) LPBYTE lpHeaderInfo,
2185   _In_ DWORD cchHeaderInfo,
2186   _Reserved_ LPCSTR lpszFileExtension,
2187   _In_opt_ LPCSTR lpszOriginalUrl);
2188 
2189 BOOLAPI
2190 CommitUrlCacheEntryW(
2191   _In_ LPCWSTR lpszUrlName,
2192   _In_opt_ LPCWSTR lpszLocalFileName,
2193   _In_ FILETIME ExpireTime,
2194   _In_ FILETIME LastModifiedTime,
2195   _In_ DWORD CacheEntryType,
2196   _In_reads_opt_(cchHeaderInfo) LPWSTR lpszHeaderInfo,
2197   _In_ DWORD cchHeaderInfo,
2198   _Reserved_ LPCWSTR lpszFileExtension,
2199   _In_opt_ LPCWSTR lpszOriginalUrl);
2200 
2201 #define CommitUrlCacheEntry WINELIB_NAME_AW(CommitUrlCacheEntry)
2202 
2203 BOOLAPI ResumeSuspendedDownload(_In_ HINTERNET, _In_ DWORD);
2204 
2205 BOOLAPI
2206 RetrieveUrlCacheEntryFileA(
2207   _In_ LPCSTR lpszUrlName,
2208   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOA lpCacheEntryInfo,
2209   _Inout_ LPDWORD lpcbCacheEntryInfo,
2210   _Reserved_ DWORD dwReserved);
2211 
2212 BOOLAPI
2213 RetrieveUrlCacheEntryFileW(
2214   _In_ LPCWSTR lpszUrlName,
2215   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOW lpCacheEntryInfo,
2216   _Inout_ LPDWORD lpcbCacheEntryInfo,
2217   _Reserved_ DWORD dwReserved);
2218 
2219 #define RetrieveUrlCacheEntryFile WINELIB_NAME_AW(RetrieveUrlCacheEntryFile)
2220 
2221 BOOLAPI UnlockUrlCacheEntryFileA(_In_ LPCSTR, _Reserved_ DWORD);
2222 BOOLAPI UnlockUrlCacheEntryFileW(_In_ LPCWSTR, _Reserved_ DWORD);
2223 #define UnlockUrlCacheEntryFile  WINELIB_NAME_AW(UnlockUrlCacheEntryFile)
2224 
2225 INTERNETAPI
2226 HANDLE
2227 WINAPI
2228 RetrieveUrlCacheEntryStreamA(
2229   _In_ LPCSTR  lpszUrlName,
2230   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOA lpCacheEntryInfo,
2231   _Inout_ LPDWORD lpcbCacheEntryInfo,
2232   _In_ BOOL fRandomRead,
2233   _Reserved_ DWORD dwReserved);
2234 
2235 INTERNETAPI
2236 HANDLE
2237 WINAPI
2238 RetrieveUrlCacheEntryStreamW(
2239   _In_ LPCWSTR  lpszUrlName,
2240   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOW lpCacheEntryInfo,
2241   _Inout_ LPDWORD lpcbCacheEntryInfo,
2242   _In_ BOOL fRandomRead,
2243   _Reserved_ DWORD dwReserved);
2244 
2245 #define RetrieveUrlCacheEntryStream WINELIB_NAME_AW(RetrieveUrlCacheEntryStream)
2246 
2247 BOOLAPI
2248 ReadUrlCacheEntryStream(
2249   _In_ HANDLE hUrlCacheStream,
2250   _In_ DWORD dwLocation,
2251   _Out_writes_bytes_(*lpdwLen) __out_data_source(NETWORK) LPVOID lpBuffer,
2252   _Inout_ LPDWORD lpdwLen,
2253   _Reserved_ DWORD Reserved);
2254 
2255 BOOLAPI UnlockUrlCacheEntryStream(_In_ HANDLE, _Reserved_ DWORD);
2256 
2257 BOOLAPI
2258 GetUrlCacheEntryInfoA(
2259   _In_ LPCSTR lpszUrlName,
2260   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOA lpCacheEntryInfo,
2261   _Inout_opt_ LPDWORD lpcbCacheEntryInfo);
2262 
2263 BOOLAPI
2264 GetUrlCacheEntryInfoW(
2265   _In_ LPCWSTR lpszUrlName,
2266   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOW lpCacheEntryInfo,
2267   _Inout_opt_ LPDWORD lpcbCacheEntryInfo);
2268 
2269 #define GetUrlCacheEntryInfo WINELIB_NAME_AW(GetUrlCacheEntryInfo)
2270 
2271 BOOLAPI
2272 GetUrlCacheEntryInfoExA(
2273   _In_ LPCSTR lpszUrl,
2274   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOA lpCacheEntryInfo,
2275   _Inout_opt_ LPDWORD lpcbCacheEntryInfo,
2276   _Reserved_ LPSTR lpszRedirectUrl,
2277   _Reserved_ LPDWORD lpcbRedirectUrl,
2278   _Reserved_ LPVOID lpReserved,
2279   _In_ DWORD dwFlags);
2280 
2281 BOOLAPI
2282 GetUrlCacheEntryInfoExW(
2283   _In_ LPCWSTR lpszUrl,
2284   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOW lpCacheEntryInfo,
2285   _Inout_opt_ LPDWORD lpcbCacheEntryInfo,
2286   _Reserved_ LPWSTR lpszRedirectUrl,
2287   _Reserved_ LPDWORD lpcbRedirectUrl,
2288   _Reserved_ LPVOID lpReserved,
2289   _In_ DWORD dwFlags);
2290 
2291 #define GetUrlCacheEntryInfoEx WINELIB_NAME_AW(GetUrlCacheEntryInfoEx)
2292 
2293 #define CACHE_ENTRY_ATTRIBUTE_FC    0x00000004
2294 #define CACHE_ENTRY_HITRATE_FC      0x00000010
2295 #define CACHE_ENTRY_MODTIME_FC      0x00000040
2296 #define CACHE_ENTRY_EXPTIME_FC      0x00000080
2297 #define CACHE_ENTRY_ACCTIME_FC      0x00000100
2298 #define CACHE_ENTRY_SYNCTIME_FC     0x00000200
2299 #define CACHE_ENTRY_HEADERINFO_FC   0x00000400
2300 #define CACHE_ENTRY_EXEMPT_DELTA_FC 0x00000800
2301 
2302 
2303 BOOLAPI
2304 SetUrlCacheEntryInfoA(
2305   _In_ LPCSTR,
2306   _In_ LPINTERNET_CACHE_ENTRY_INFOA,
2307   _In_ DWORD);
2308 
2309 BOOLAPI
2310 SetUrlCacheEntryInfoW(
2311   _In_ LPCWSTR,
2312   _In_ LPINTERNET_CACHE_ENTRY_INFOW,
2313   _In_ DWORD);
2314 
2315 #define SetUrlCacheEntryInfo WINELIB_NAME_AW(SetUrlCacheEntryInfo)
2316 
2317 typedef LONGLONG GROUPID;
2318 
2319 INTERNETAPI GROUPID WINAPI CreateUrlCacheGroup(_In_ DWORD, _Reserved_ LPVOID);
2320 BOOLAPI DeleteUrlCacheGroup(_In_ GROUPID, _In_ DWORD, _Reserved_ LPVOID);
2321 
2322 INTERNETAPI
2323 HANDLE
2324 WINAPI
2325 FindFirstUrlCacheGroup(
2326   _In_ DWORD,
2327   _In_ DWORD,
2328   _Reserved_ LPVOID,
2329   _Reserved_ DWORD,
2330   _Out_ GROUPID*,
2331   _Reserved_ LPVOID);
2332 
2333 BOOLAPI FindNextUrlCacheGroup(_In_ HANDLE, _Out_ GROUPID*, _Reserved_ LPVOID);
2334 
2335 BOOLAPI
2336 GetUrlCacheGroupAttributeA(
2337   _In_ GROUPID gid,
2338   _Reserved_ DWORD dwFlags,
2339   _In_ DWORD dwAttributes,
2340   _Out_writes_bytes_(*lpcbGroupInfo) LPINTERNET_CACHE_GROUP_INFOA lpGroupInfo,
2341   _Inout_ LPDWORD lpcbGroupInfo,
2342   _Reserved_ LPVOID lpReserved);
2343 
2344 BOOLAPI
2345 GetUrlCacheGroupAttributeW(
2346   _In_ GROUPID gid,
2347   _Reserved_ DWORD dwFlags,
2348   _In_ DWORD dwAttributes,
2349   _Out_writes_bytes_(*lpcbGroupInfo) LPINTERNET_CACHE_GROUP_INFOW lpGroupInfo,
2350   _Inout_ LPDWORD lpcbGroupInfo,
2351   _Reserved_ LPVOID lpReserved);
2352 
2353 #define GetUrlCacheGroupAttribute WINELIB_NAME_AW(GetUrlCacheGroupAttribute)
2354 
2355 #define INTERNET_CACHE_GROUP_ADD      0
2356 #define INTERNET_CACHE_GROUP_REMOVE   1
2357 
2358 BOOLAPI
2359 SetUrlCacheEntryGroupA(
2360   _In_ LPCSTR,
2361   _In_ DWORD,
2362   _In_ GROUPID,
2363   _Reserved_ LPBYTE,
2364   _Reserved_ DWORD,
2365   _Reserved_ LPVOID);
2366 
2367 BOOLAPI
2368 SetUrlCacheEntryGroupW(
2369   _In_ LPCWSTR,
2370   _In_ DWORD,
2371   _In_ GROUPID,
2372   _Reserved_ LPBYTE,
2373   _Reserved_ DWORD,
2374   _Reserved_ LPVOID);
2375 
2376 #define SetUrlCacheEntryGroup WINELIB_NAME_AW(SetUrlCacheEntryGroup)
2377 
2378 BOOLAPI
2379 SetUrlCacheGroupAttributeA(
2380   _In_ GROUPID,
2381   _Reserved_ DWORD,
2382   _In_ DWORD,
2383   _In_ LPINTERNET_CACHE_GROUP_INFOA,
2384   _Reserved_ LPVOID);
2385 
2386 BOOLAPI
2387 SetUrlCacheGroupAttributeW(
2388   _In_ GROUPID,
2389   _Reserved_ DWORD,
2390   _In_ DWORD,
2391   _In_ LPINTERNET_CACHE_GROUP_INFOW,
2392   _Reserved_ LPVOID);
2393 
2394 #define SetUrlCacheGroupAttribute WINELIB_NAME_AW(SetUrlCacheGroupAttribute)
2395 
2396 INTERNETAPI
2397 HANDLE
2398 WINAPI
2399 FindFirstUrlCacheEntryExA(
2400   _In_opt_ LPCSTR  lpszUrlSearchPattern,
2401   _In_ DWORD dwFlags,
2402   _In_ DWORD  dwFilter,
2403   _In_ GROUPID  GroupId,
2404   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOA lpFirstCacheEntryInfo,
2405   _Inout_ LPDWORD lpcbCacheEntryInfo,
2406   _Reserved_ LPVOID lpGroupAttributes,
2407   _Reserved_ LPDWORD lpcbGroupAttributes,
2408   _Reserved_ LPVOID lpReserved);
2409 
2410 INTERNETAPI
2411 HANDLE
2412 WINAPI
2413 FindFirstUrlCacheEntryExW(
2414   _In_opt_ LPCWSTR  lpszUrlSearchPattern,
2415   _In_ DWORD dwFlags,
2416   _In_ DWORD  dwFilter,
2417   _In_ GROUPID  GroupId,
2418   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOW lpFirstCacheEntryInfo,
2419   _Inout_ LPDWORD lpcbCacheEntryInfo,
2420   _Reserved_ LPVOID lpGroupAttributes,
2421   _Reserved_ LPDWORD lpcbGroupAttributes,
2422   _Reserved_ LPVOID lpReserved);
2423 
2424 #define FindFirstUrlCacheEntryEx WINELIB_NAME_AW(FindFirstUrlCacheEntryEx)
2425 
2426 BOOLAPI
2427 FindNextUrlCacheEntryExA(
2428   _In_ HANDLE hEnumHandle,
2429   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOA lpNextCacheEntryInfo,
2430   _Inout_ LPDWORD lpcbCacheEntryInfo,
2431   _Reserved_ LPVOID lpGroupAttributes,
2432   _Reserved_ LPDWORD lpcbGroupAttributes,
2433   _Reserved_ LPVOID lpReserved);
2434 
2435 BOOLAPI
2436 FindNextUrlCacheEntryExW(
2437   _In_ HANDLE hEnumHandle,
2438   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOW lpNextCacheEntryInfo,
2439   _Inout_ LPDWORD lpcbCacheEntryInfo,
2440   _Reserved_ LPVOID lpGroupAttributes,
2441   _Reserved_ LPDWORD lpcbGroupAttributes,
2442   _Reserved_ LPVOID lpReserved);
2443 
2444 #define FindNextUrlCacheEntryEx WINELIB_NAME_AW(FindNextUrlCacheEntryEx)
2445 
2446 INTERNETAPI
2447 HANDLE
2448 WINAPI
2449 FindFirstUrlCacheEntryA(
2450   _In_opt_ LPCSTR lpszUrlSearchPattern,
2451   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOA lpFirstCacheEntryInfo,
2452   _Inout_ LPDWORD lpcbCacheEntryInfo);
2453 
2454 INTERNETAPI
2455 HANDLE
2456 WINAPI
2457 FindFirstUrlCacheEntryW(
2458   _In_opt_ LPCWSTR lpszUrlSearchPattern,
2459   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOW lpFirstCacheEntryInfo,
2460   _Inout_ LPDWORD lpcbCacheEntryInfo);
2461 
2462 #define FindFirstUrlCacheEntry WINELIB_NAME_AW(FindFirstUrlCacheEntry)
2463 
2464 BOOLAPI
2465 FindNextUrlCacheEntryA(
2466   _In_ HANDLE hEnumHandle,
2467   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOA lpNextCacheEntryInfo,
2468   _Inout_ LPDWORD lpcbCacheEntryInfo);
2469 
2470 BOOLAPI
2471 FindNextUrlCacheEntryW(
2472   _In_ HANDLE hEnumHandle,
2473   _Inout_updates_bytes_opt_(*lpcbCacheEntryInfo) LPINTERNET_CACHE_ENTRY_INFOW lpNextCacheEntryInfo,
2474   _Inout_ LPDWORD lpcbCacheEntryInfo);
2475 
2476 #define FindNextUrlCacheEntry WINELIB_NAME_AW(FindNextUrlCacheEntry)
2477 
2478 BOOLAPI FindCloseUrlCache(_In_ HANDLE);
2479 
2480 BOOLAPI DeleteUrlCacheEntryA(_In_ LPCSTR);
2481 BOOLAPI DeleteUrlCacheEntryW(_In_ LPCWSTR);
2482 #define DeleteUrlCacheEntry  WINELIB_NAME_AW(DeleteUrlCacheEntry)
2483 
2484 /* FCS_ flags and FreeUrlCacheSpace are no longer documented */
2485 #define FCS_PERCENT_CACHE_SPACE  0  /* guessed value */
2486 #define FCS_PERCENT_DISK_SPACE   1  /* guessed value */
2487 #define FCS_ABSOLUTE_SIZE        2  /* guessed value */
2488 
2489 BOOLAPI FreeUrlCacheSpaceA(LPCSTR ,DWORD ,DWORD);
2490 BOOLAPI FreeUrlCacheSpaceW(LPCWSTR ,DWORD ,DWORD);
2491 #define FreeUrlCacheSpace  WINELIB_NAME_AW(FreeUrlCacheSpace)
2492 
2493 INTERNETAPI
2494 DWORD
2495 WINAPI
2496 InternetDialA(
2497   _In_ HWND,
2498   _In_opt_ LPSTR,
2499   _In_ DWORD,
2500   _Out_ DWORD_PTR*,
2501   _Reserved_ DWORD);
2502 
2503 INTERNETAPI
2504 DWORD
2505 WINAPI
2506 InternetDialW(
2507   _In_ HWND,
2508   _In_opt_ LPWSTR,
2509   _In_ DWORD,
2510   _Out_ DWORD_PTR*,
2511   _Reserved_ DWORD);
2512 
2513 #define InternetDial WINELIB_NAME_AW(InternetDial)
2514 
2515 #define INTERNET_DIAL_UNATTENDED       0x8000
2516 
2517 INTERNETAPI DWORD WINAPI InternetHangUp(_In_ DWORD_PTR, _Reserved_ DWORD);
2518 BOOLAPI CreateMD5SSOHash(_In_ PWSTR, _In_ PWSTR, _In_ PWSTR, _Out_ PBYTE);
2519 
2520 #define INTERENT_GOONLINE_REFRESH 0x00000001
2521 #define INTERENT_GOONLINE_MASK 0x00000001
2522 
2523 BOOLAPI InternetGoOnlineA(_In_opt_ LPSTR, _In_ HWND, _In_ DWORD);
2524 BOOLAPI InternetGoOnlineW(_In_opt_ LPWSTR, _In_ HWND, _In_ DWORD);
2525 #define InternetGoOnline  WINELIB_NAME_AW(InternetGoOnline)
2526 
2527 BOOLAPI InternetAutodial(_In_ DWORD, _In_opt_ HWND);
2528 
2529 #define INTERNET_AUTODIAL_FORCE_ONLINE          1
2530 #define INTERNET_AUTODIAL_FORCE_UNATTENDED      2
2531 #define INTERNET_AUTODIAL_FAILIFSECURITYCHECK   4
2532 
2533 #define INTERNET_AUTODIAL_FLAGS_MASK (INTERNET_AUTODIAL_FORCE_ONLINE | INTERNET_AUTODIAL_FORCE_UNATTENDED | INTERNET_AUTODIAL_FAILIFSECURITYCHECK)
2534 
2535 BOOL WINAPI InternetAutodialHangup(_Reserved_ DWORD);
2536 BOOL WINAPI InternetGetConnectedState(_Out_ LPDWORD, _Reserved_ DWORD);
2537 
2538 #define INTERNET_CONNECTION_MODEM        0x01
2539 #define INTERNET_CONNECTION_LAN          0x02
2540 #define INTERNET_CONNECTION_PROXY        0x04
2541 #define INTERNET_CONNECTION_MODEM_BUSY   0x08
2542 #define INTERNET_RAS_INSTALLED           0x10
2543 #define INTERNET_CONNECTION_OFFLINE      0x20
2544 #define INTERNET_CONNECTION_CONFIGURED   0x40
2545 
2546 typedef DWORD (CALLBACK *PFN_DIAL_HANDLER) (HWND,LPCSTR,DWORD,LPDWORD);
2547 
2548 #define INTERNET_CUSTOMDIAL_CONNECT         0
2549 #define INTERNET_CUSTOMDIAL_UNATTENDED      1
2550 #define INTERNET_CUSTOMDIAL_DISCONNECT      2
2551 #define INTERNET_CUSTOMDIAL_SHOWOFFLINE     4
2552 #define INTERNET_CUSTOMDIAL_SAFE_FOR_UNATTENDED 1
2553 #define INTERNET_CUSTOMDIAL_WILL_SUPPLY_STATE   2
2554 #define INTERNET_CUSTOMDIAL_CAN_HANGUP          4
2555 
2556 BOOLAPI InternetSetDialStateA(_In_opt_ LPCSTR, _In_ DWORD, _Reserved_ DWORD);
2557 BOOLAPI InternetSetDialStateW(_In_opt_ LPCWSTR, _In_ DWORD, _Reserved_ DWORD);
2558 #define InternetSetDialState WINELIB_NAME_AW(InternetSetDialState)
2559 
2560 #define INTERNET_DIALSTATE_DISCONNECTED     1
2561 
2562 BOOLAPI
2563 InternetGetConnectedStateExA(
2564   _Out_opt_ LPDWORD lpdwFlags,
2565   _Out_writes_opt_(cchNameLen) LPSTR lpszConnectionName,
2566   _In_ DWORD cchNameLen,
2567   _Reserved_ DWORD dwReserved);
2568 
2569 BOOLAPI
2570 InternetGetConnectedStateExW(
2571   _Out_opt_ LPDWORD lpdwFlags,
2572   _Out_writes_opt_(cchNameLen) LPWSTR lpszConnectionName,
2573   _In_ DWORD cchNameLen,
2574   _Reserved_ DWORD dwReserved);
2575 
2576 #define InternetGetConnectedStateEx WINELIB_NAME_AW(InternetGetConnectedStateEx)
2577 
2578 typedef struct AutoProxyHelperVtbl
2579 {
2580     BOOL  (WINAPI *IsResolvable)(LPSTR);
2581     DWORD (WINAPI *GetIPAddress)(LPSTR, LPDWORD);
2582     DWORD (WINAPI *ResolveHostName)(LPSTR, LPSTR, LPDWORD);
2583     BOOL  (WINAPI *IsInNet)(LPSTR, LPSTR, LPSTR);
2584     BOOL  (WINAPI *IsResolvableEx)(LPSTR);
2585     DWORD (WINAPI *GetIPAddressEx)(LPSTR, LPDWORD);
2586     DWORD (WINAPI *ResolveHostNameEx)(LPSTR, LPSTR, LPDWORD);
2587     BOOL  (WINAPI *IsInNetEx)(LPSTR, LPSTR);
2588     DWORD (WINAPI *SortIpList)(LPSTR, LPSTR, LPDWORD);
2589 } AutoProxyHelperVtbl;
2590 
2591 typedef struct AutoProxyHelperFunctions
2592 {
2593     const struct AutoProxyHelperVtbl *lpVtbl;
2594 } AutoProxyHelperFunctions;
2595 
2596 typedef struct
2597 {
2598     DWORD dwStructSize;
2599     LPSTR lpszScriptBuffer;
2600     DWORD dwScriptBufferSize;
2601 } AUTO_PROXY_SCRIPT_BUFFER, *LPAUTO_PROXY_SCRIPT_BUFFER;
2602 
2603 BOOLAPI InternetInitializeAutoProxyDll(_In_ DWORD);
2604 
2605 BOOLAPI
2606 DetectAutoProxyUrl(
2607   _Out_writes_(cchAutoProxyUrl) PSTR pszAutoProxyUrl,
2608   _In_ DWORD cchAutoProxyUrl,
2609   _In_ DWORD dwDetectFlags);
2610 
2611 #ifdef __cplusplus
2612 }
2613 #endif
2614 
2615 #endif /* _WINE_WININET_H_ */
2616