source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/wininet.h@ 1175

Last change on this file since 1175 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 78.5 KB
RevLine 
[1166]1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _WININET_
7#define _WININET_
8
9#include <_mingw_unicode.h>
10#include <specstrings.h>
11
12#ifdef _WIN64
13#include <pshpack8.h>
14#else
15#include <pshpack4.h>
16#endif
17
18#if defined(__cplusplus)
19extern "C" {
20#endif
21
22#define INTERNETAPI EXTERN_C DECLSPEC_IMPORT HRESULT WINAPI
23#define INTERNETAPI_(type) EXTERN_C DECLSPEC_IMPORT type WINAPI
24#define URLCACHEAPI EXTERN_C DECLSPEC_IMPORT HRESULT WINAPI
25#define URLCACHEAPI_(type) EXTERN_C DECLSPEC_IMPORT type WINAPI
26
27#define BOOLAPI INTERNETAPI_(WINBOOL)
28
29 typedef LPVOID HINTERNET;
30 typedef HINTERNET *LPHINTERNET;
31
32 typedef WORD INTERNET_PORT;
33 typedef INTERNET_PORT *LPINTERNET_PORT;
34
35#define INTERNET_INVALID_PORT_NUMBER 0
36
37#define INTERNET_DEFAULT_FTP_PORT 21
38#define INTERNET_DEFAULT_GOPHER_PORT 70
39#define INTERNET_DEFAULT_HTTP_PORT 80
40#define INTERNET_DEFAULT_HTTPS_PORT 443
41#define INTERNET_DEFAULT_SOCKS_PORT 1080
42
43#define INTERNET_MAX_HOST_NAME_LENGTH 256
44#define INTERNET_MAX_USER_NAME_LENGTH 128
45#define INTERNET_MAX_PASSWORD_LENGTH 128
46#define INTERNET_MAX_PORT_NUMBER_LENGTH 5
47#define INTERNET_MAX_PORT_NUMBER_VALUE 65535
48#define INTERNET_MAX_PATH_LENGTH 2048
49#define INTERNET_MAX_SCHEME_LENGTH 32
50#define INTERNET_MAX_URL_LENGTH (INTERNET_MAX_SCHEME_LENGTH + sizeof("://") + INTERNET_MAX_PATH_LENGTH)
51
52#define INTERNET_KEEP_ALIVE_UNKNOWN ((DWORD)-1)
53#define INTERNET_KEEP_ALIVE_ENABLED 1
54#define INTERNET_KEEP_ALIVE_DISABLED 0
55
56#define INTERNET_REQFLAG_FROM_CACHE 0x00000001
57#define INTERNET_REQFLAG_ASYNC 0x00000002
58#define INTERNET_REQFLAG_VIA_PROXY 0x00000004
59#define INTERNET_REQFLAG_NO_HEADERS 0x00000008
60#define INTERNET_REQFLAG_PASSIVE 0x00000010
61#define INTERNET_REQFLAG_CACHE_WRITE_DISABLED 0x00000040
62#define INTERNET_REQFLAG_NET_TIMEOUT 0x00000080
63
64#define INTERNET_FLAG_IDN_DIRECT 0x00000001
65#define INTERNET_FLAG_IDN_PROXY 0x00000002
66
67#define INTERNET_FLAG_RELOAD 0x80000000
68
69#define INTERNET_FLAG_RAW_DATA 0x40000000
70#define INTERNET_FLAG_EXISTING_CONNECT 0x20000000
71
72#define INTERNET_FLAG_ASYNC 0x10000000
73
74#define INTERNET_FLAG_PASSIVE 0x08000000
75
76#define INTERNET_FLAG_NO_CACHE_WRITE 0x04000000
77#define INTERNET_FLAG_DONT_CACHE INTERNET_FLAG_NO_CACHE_WRITE
78#define INTERNET_FLAG_MAKE_PERSISTENT 0x02000000
79#define INTERNET_FLAG_FROM_CACHE 0x01000000
80#define INTERNET_FLAG_OFFLINE INTERNET_FLAG_FROM_CACHE
81
82#define INTERNET_FLAG_SECURE 0x00800000
83#define INTERNET_FLAG_KEEP_CONNECTION 0x00400000
84#define INTERNET_FLAG_NO_AUTO_REDIRECT 0x00200000
85#define INTERNET_FLAG_READ_PREFETCH 0x00100000
86#define INTERNET_FLAG_NO_COOKIES 0x00080000
87#define INTERNET_FLAG_NO_AUTH 0x00040000
88#define INTERNET_FLAG_RESTRICTED_ZONE 0x00020000
89#define INTERNET_FLAG_CACHE_IF_NET_FAIL 0x00010000
90
91#define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP 0x00008000
92#define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS 0x00004000
93#define INTERNET_FLAG_IGNORE_CERT_DATE_INVALID 0x00002000
94#define INTERNET_FLAG_IGNORE_CERT_CN_INVALID 0x00001000
95
96#define INTERNET_FLAG_RESYNCHRONIZE 0x00000800
97#define INTERNET_FLAG_HYPERLINK 0x00000400
98#define INTERNET_FLAG_NO_UI 0x00000200
99#define INTERNET_FLAG_PRAGMA_NOCACHE 0x00000100
100#define INTERNET_FLAG_CACHE_ASYNC 0x00000080
101#define INTERNET_FLAG_FORMS_SUBMIT 0x00000040
102#define INTERNET_FLAG_FWD_BACK 0x00000020
103#define INTERNET_FLAG_NEED_FILE 0x00000010
104#define INTERNET_FLAG_MUST_CACHE_REQUEST INTERNET_FLAG_NEED_FILE
105
106#define INTERNET_FLAG_TRANSFER_ASCII FTP_TRANSFER_TYPE_ASCII
107#define INTERNET_FLAG_TRANSFER_BINARY FTP_TRANSFER_TYPE_BINARY
108
109#define SECURITY_INTERNET_MASK (INTERNET_FLAG_IGNORE_CERT_CN_INVALID | INTERNET_FLAG_IGNORE_CERT_DATE_INVALID | INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS | INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP)
110#define SECURITY_IGNORE_ERROR_MASK (INTERNET_FLAG_IGNORE_CERT_CN_INVALID | INTERNET_FLAG_IGNORE_CERT_DATE_INVALID | SECURITY_FLAG_IGNORE_UNKNOWN_CA | SECURITY_FLAG_IGNORE_REVOCATION | SECURITY_FLAG_IGNORE_WEAK_SIGNATURE)
111#define INTERNET_FLAGS_MASK (INTERNET_FLAG_RELOAD | INTERNET_FLAG_RAW_DATA | INTERNET_FLAG_EXISTING_CONNECT | INTERNET_FLAG_ASYNC | INTERNET_FLAG_PASSIVE | INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_MAKE_PERSISTENT | INTERNET_FLAG_FROM_CACHE | INTERNET_FLAG_SECURE | INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_NO_AUTO_REDIRECT | INTERNET_FLAG_READ_PREFETCH | INTERNET_FLAG_NO_COOKIES | INTERNET_FLAG_NO_AUTH | INTERNET_FLAG_CACHE_IF_NET_FAIL | SECURITY_INTERNET_MASK | INTERNET_FLAG_RESYNCHRONIZE | INTERNET_FLAG_HYPERLINK | INTERNET_FLAG_NO_UI | INTERNET_FLAG_PRAGMA_NOCACHE | INTERNET_FLAG_CACHE_ASYNC | INTERNET_FLAG_FORMS_SUBMIT | INTERNET_FLAG_NEED_FILE | INTERNET_FLAG_RESTRICTED_ZONE | INTERNET_FLAG_TRANSFER_BINARY | INTERNET_FLAG_TRANSFER_ASCII | INTERNET_FLAG_FWD_BACK | INTERNET_FLAG_BGUPDATE)
112
113#define INTERNET_ERROR_MASK_INSERT_CDROM 0x1
114#define INTERNET_ERROR_MASK_COMBINED_SEC_CERT 0x2
115#define INTERNET_ERROR_MASK_NEED_MSN_SSPI_PKG 0X4
116#define INTERNET_ERROR_MASK_LOGIN_FAILURE_DISPLAY_ENTITY_BODY 0x8
117
118#define INTERNET_OPTIONS_MASK (~INTERNET_FLAGS_MASK)
119
120#define WININET_API_FLAG_ASYNC 0x00000001
121#define WININET_API_FLAG_SYNC 0x00000004
122#define WININET_API_FLAG_USE_CONTEXT 0x00000008
123
124#define INTERNET_NO_CALLBACK 0
125
126 typedef enum {
127 INTERNET_SCHEME_PARTIAL = -2,INTERNET_SCHEME_UNKNOWN = -1,INTERNET_SCHEME_DEFAULT = 0,INTERNET_SCHEME_FTP,INTERNET_SCHEME_GOPHER,
128 INTERNET_SCHEME_HTTP,INTERNET_SCHEME_HTTPS,INTERNET_SCHEME_FILE,INTERNET_SCHEME_NEWS,INTERNET_SCHEME_MAILTO,INTERNET_SCHEME_SOCKS,
129 INTERNET_SCHEME_JAVASCRIPT,INTERNET_SCHEME_VBSCRIPT,INTERNET_SCHEME_RES,INTERNET_SCHEME_FIRST = INTERNET_SCHEME_FTP,
130 INTERNET_SCHEME_LAST = INTERNET_SCHEME_RES
131 } INTERNET_SCHEME,*LPINTERNET_SCHEME;
132
133 typedef struct {
134 DWORD_PTR dwResult;
135 DWORD dwError;
136 } INTERNET_ASYNC_RESULT,*LPINTERNET_ASYNC_RESULT;
137
138 typedef struct {
139 DWORD_PTR Socket;
140 DWORD SourcePort;
141 DWORD DestPort;
142 DWORD Flags;
143 } INTERNET_DIAGNOSTIC_SOCKET_INFO,*LPINTERNET_DIAGNOSTIC_SOCKET_INFO;
144
145#define IDSI_FLAG_KEEP_ALIVE 0x00000001
146#define IDSI_FLAG_SECURE 0x00000002
147#define IDSI_FLAG_PROXY 0x00000004
148#define IDSI_FLAG_TUNNEL 0x00000008
149
150 typedef struct {
151 DWORD dwAccessType;
152 LPCTSTR lpszProxy;
153 LPCTSTR lpszProxyBypass;
154 } INTERNET_PROXY_INFO,*LPINTERNET_PROXY_INFO;
155
156 typedef struct {
157 DWORD dwOption;
158 union {
159 DWORD dwValue;
160 LPSTR pszValue;
161 FILETIME ftValue;
162 } Value;
163 } INTERNET_PER_CONN_OPTIONA,*LPINTERNET_PER_CONN_OPTIONA;
164
165 typedef struct {
166 DWORD dwOption;
167 union {
168 DWORD dwValue;
169 LPWSTR pszValue;
170 FILETIME ftValue;
171 } Value;
172 } INTERNET_PER_CONN_OPTIONW,*LPINTERNET_PER_CONN_OPTIONW;
173
174 __MINGW_TYPEDEF_AW(INTERNET_PER_CONN_OPTION)
175 __MINGW_TYPEDEF_AW(LPINTERNET_PER_CONN_OPTION)
176
177 typedef struct {
178 DWORD dwSize;
179 LPSTR pszConnection;
180 DWORD dwOptionCount;
181 DWORD dwOptionError;
182 LPINTERNET_PER_CONN_OPTIONA pOptions;
183 } INTERNET_PER_CONN_OPTION_LISTA,*LPINTERNET_PER_CONN_OPTION_LISTA;
184
185 typedef struct {
186 DWORD dwSize;
187 LPWSTR pszConnection;
188 DWORD dwOptionCount;
189 DWORD dwOptionError;
190 LPINTERNET_PER_CONN_OPTIONW pOptions;
191 } INTERNET_PER_CONN_OPTION_LISTW,*LPINTERNET_PER_CONN_OPTION_LISTW;
192
193 __MINGW_TYPEDEF_AW(INTERNET_PER_CONN_OPTION_LIST)
194 __MINGW_TYPEDEF_AW(LPINTERNET_PER_CONN_OPTION_LIST)
195
196#define INTERNET_PER_CONN_FLAGS 1
197#define INTERNET_PER_CONN_PROXY_SERVER 2
198#define INTERNET_PER_CONN_PROXY_BYPASS 3
199#define INTERNET_PER_CONN_AUTOCONFIG_URL 4
200#define INTERNET_PER_CONN_AUTODISCOVERY_FLAGS 5
201#define INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL 6
202#define INTERNET_PER_CONN_AUTOCONFIG_RELOAD_DELAY_MINS 7
203#define INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME 8
204#define INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL 9
205#define INTERNET_PER_CONN_FLAGS_UI 10
206
207#define PROXY_TYPE_DIRECT 0x00000001
208#define PROXY_TYPE_PROXY 0x00000002
209#define PROXY_TYPE_AUTO_PROXY_URL 0x00000004
210#define PROXY_TYPE_AUTO_DETECT 0x00000008
211
212#define AUTO_PROXY_FLAG_USER_SET 0x00000001
213#define AUTO_PROXY_FLAG_ALWAYS_DETECT 0x00000002
214#define AUTO_PROXY_FLAG_DETECTION_RUN 0x00000004
215#define AUTO_PROXY_FLAG_MIGRATED 0x00000008
216#define AUTO_PROXY_FLAG_DONT_CACHE_PROXY_RESULT 0x00000010
217#define AUTO_PROXY_FLAG_CACHE_INIT_RUN 0x00000020
218#define AUTO_PROXY_FLAG_DETECTION_SUSPECT 0x00000040
219
220 typedef struct {
221 DWORD dwMajorVersion;
222 DWORD dwMinorVersion;
223 } INTERNET_VERSION_INFO,*LPINTERNET_VERSION_INFO;
224
225 typedef struct {
226 DWORD dwMajorVersion;
227 DWORD dwMinorVersion;
228 } HTTP_VERSION_INFO,*LPHTTP_VERSION_INFO;
229
230 typedef struct {
231 DWORD dwConnectedState;
232 DWORD dwFlags;
233 } INTERNET_CONNECTED_INFO,*LPINTERNET_CONNECTED_INFO;
234
235#define ISO_FORCE_DISCONNECTED 0x00000001
236
237 typedef struct {
238 DWORD dwStructSize;
239 LPSTR lpszScheme;
240 DWORD dwSchemeLength;
241 INTERNET_SCHEME nScheme;
242 LPSTR lpszHostName;
243 DWORD dwHostNameLength;
244 INTERNET_PORT nPort;
245 LPSTR lpszUserName;
246 DWORD dwUserNameLength;
247 LPSTR lpszPassword;
248 DWORD dwPasswordLength;
249 LPSTR lpszUrlPath;
250 DWORD dwUrlPathLength;
251 LPSTR lpszExtraInfo;
252 DWORD dwExtraInfoLength;
253 } URL_COMPONENTSA,*LPURL_COMPONENTSA;
254
255 typedef struct {
256 DWORD dwStructSize;
257 LPWSTR lpszScheme;
258 DWORD dwSchemeLength;
259 INTERNET_SCHEME nScheme;
260 LPWSTR lpszHostName;
261 DWORD dwHostNameLength;
262 INTERNET_PORT nPort;
263 LPWSTR lpszUserName;
264 DWORD dwUserNameLength;
265 LPWSTR lpszPassword;
266 DWORD dwPasswordLength;
267 LPWSTR lpszUrlPath;
268 DWORD dwUrlPathLength;
269 LPWSTR lpszExtraInfo;
270 DWORD dwExtraInfoLength;
271 } URL_COMPONENTSW,*LPURL_COMPONENTSW;
272
273 __MINGW_TYPEDEF_AW(URL_COMPONENTS)
274 __MINGW_TYPEDEF_AW(LPURL_COMPONENTS)
275
276 typedef struct {
277 FILETIME ftExpiry;
278 FILETIME ftStart;
279 LPTSTR lpszSubjectInfo;
280 LPTSTR lpszIssuerInfo;
281 LPTSTR lpszProtocolName;
282 LPTSTR lpszSignatureAlgName;
283 LPTSTR lpszEncryptionAlgName;
284 DWORD dwKeySize;
285 } INTERNET_CERTIFICATE_INFO,*LPINTERNET_CERTIFICATE_INFO;
286
287 typedef struct _INTERNET_BUFFERSA {
288 DWORD dwStructSize;
289 struct _INTERNET_BUFFERSA *Next;
290 LPCSTR lpcszHeader;
291 DWORD dwHeadersLength;
292 DWORD dwHeadersTotal;
293 LPVOID lpvBuffer;
294 DWORD dwBufferLength;
295 DWORD dwBufferTotal;
296 DWORD dwOffsetLow;
297 DWORD dwOffsetHigh;
298 } INTERNET_BUFFERSA,*LPINTERNET_BUFFERSA;
299
300 typedef struct _INTERNET_BUFFERSW {
301 DWORD dwStructSize;
302 struct _INTERNET_BUFFERSW *Next;
303 LPCWSTR lpcszHeader;
304 DWORD dwHeadersLength;
305 DWORD dwHeadersTotal;
306 LPVOID lpvBuffer;
307 DWORD dwBufferLength;
308 DWORD dwBufferTotal;
309 DWORD dwOffsetLow;
310 DWORD dwOffsetHigh;
311 } INTERNET_BUFFERSW,*LPINTERNET_BUFFERSW;
312
313 __MINGW_TYPEDEF_AW(INTERNET_BUFFERS)
314 __MINGW_TYPEDEF_AW(LPINTERNET_BUFFERS)
315
316#if defined(UNICODE)
317#define InternetTimeFromSystemTime InternetTimeFromSystemTimeW
318#else
319 BOOLAPI InternetTimeFromSystemTime(CONST SYSTEMTIME *pst,DWORD dwRFC,LPSTR lpszTime,DWORD cbTime);
320#endif
321
322 BOOLAPI InternetTimeFromSystemTimeA(CONST SYSTEMTIME *pst,DWORD dwRFC,LPSTR lpszTime,DWORD cbTime);
323 BOOLAPI InternetTimeFromSystemTimeW(CONST SYSTEMTIME *pst,DWORD dwRFC,LPWSTR lpszTime,DWORD cbTime);
324
325#define INTERNET_RFC1123_FORMAT 0
326#define INTERNET_RFC1123_BUFSIZE 30
327
328#define InternetCrackUrl __MINGW_NAME_AW(InternetCrackUrl)
329#define InternetCreateUrl __MINGW_NAME_AW(InternetCreateUrl)
330#define InternetCanonicalizeUrl __MINGW_NAME_AW(InternetCanonicalizeUrl)
331#define InternetCombineUrl __MINGW_NAME_AW(InternetCombineUrl)
332
333#if defined(UNICODE)
334#define InternetTimeToSystemTime InternetTimeToSystemTimeW
335#else
336 BOOLAPI InternetTimeToSystemTime(LPCSTR lpszTime,SYSTEMTIME *pst,DWORD dwReserved);
337#endif
338
339 BOOLAPI InternetTimeToSystemTimeA(LPCSTR lpszTime,SYSTEMTIME *pst,DWORD dwReserved);
340 BOOLAPI InternetTimeToSystemTimeW(LPCWSTR lpszTime,SYSTEMTIME *pst,DWORD dwReserved);
341 BOOLAPI InternetCrackUrlA(LPCSTR lpszUrl,DWORD dwUrlLength,DWORD dwFlags,LPURL_COMPONENTSA lpUrlComponents);
342 BOOLAPI InternetCrackUrlW(LPCWSTR lpszUrl,DWORD dwUrlLength,DWORD dwFlags,LPURL_COMPONENTSW lpUrlComponents);
343 BOOLAPI InternetCreateUrlA(LPURL_COMPONENTSA lpUrlComponents,DWORD dwFlags,LPSTR lpszUrl,LPDWORD lpdwUrlLength);
344 BOOLAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents,DWORD dwFlags,LPWSTR lpszUrl,LPDWORD lpdwUrlLength);
345 BOOLAPI InternetCanonicalizeUrlA(LPCSTR lpszUrl,LPSTR lpszBuffer,LPDWORD lpdwBufferLength,DWORD dwFlags);
346 BOOLAPI InternetCanonicalizeUrlW(LPCWSTR lpszUrl,LPWSTR lpszBuffer,LPDWORD lpdwBufferLength,DWORD dwFlags);
347 BOOLAPI InternetCombineUrlA(LPCSTR lpszBaseUrl,LPCSTR lpszRelativeUrl,LPSTR lpszBuffer,LPDWORD lpdwBufferLength,DWORD dwFlags);
348 BOOLAPI InternetCombineUrlW(LPCWSTR lpszBaseUrl,LPCWSTR lpszRelativeUrl,LPWSTR lpszBuffer,LPDWORD lpdwBufferLength,DWORD dwFlags);
349
350#define ICU_ESCAPE 0x80000000
351#define ICU_USERNAME 0x40000000
352
353#define ICU_NO_ENCODE 0x20000000
354#define ICU_DECODE 0x10000000
355#define ICU_NO_META 0x08000000
356#define ICU_ENCODE_SPACES_ONLY 0x04000000
357#define ICU_BROWSER_MODE 0x02000000
358#define ICU_ENCODE_PERCENT 0x00001000
359
360#define InternetOpen __MINGW_NAME_AW(InternetOpen)
361
362 INTERNETAPI_(HINTERNET) InternetOpenA(LPCSTR lpszAgent,DWORD dwAccessType,LPCSTR lpszProxy,LPCSTR lpszProxyBypass,DWORD dwFlags);
363 INTERNETAPI_(HINTERNET) InternetOpenW(LPCWSTR lpszAgent,DWORD dwAccessType,LPCWSTR lpszProxy,LPCWSTR lpszProxyBypass,DWORD dwFlags);
364
365#define INTERNET_OPEN_TYPE_PRECONFIG 0
366#define INTERNET_OPEN_TYPE_DIRECT 1
367#define INTERNET_OPEN_TYPE_PROXY 3
368#define INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY 4
369
370#define PRE_CONFIG_INTERNET_ACCESS INTERNET_OPEN_TYPE_PRECONFIG
371#define LOCAL_INTERNET_ACCESS INTERNET_OPEN_TYPE_DIRECT
372#define CERN_PROXY_INTERNET_ACCESS INTERNET_OPEN_TYPE_PROXY
373
374#define InternetConnect __MINGW_NAME_AW(InternetConnect)
375
376 BOOLAPI InternetCloseHandle(HINTERNET hInternet);
377 INTERNETAPI_(HINTERNET) InternetConnectA(HINTERNET hInternet,LPCSTR lpszServerName,INTERNET_PORT nServerPort,LPCSTR lpszUserName,LPCSTR lpszPassword,DWORD dwService,DWORD dwFlags,DWORD_PTR dwContext);
378 INTERNETAPI_(HINTERNET) InternetConnectW(HINTERNET hInternet,LPCWSTR lpszServerName,INTERNET_PORT nServerPort,LPCWSTR lpszUserName,LPCWSTR lpszPassword,DWORD dwService,DWORD dwFlags,DWORD_PTR dwContext);
379
380#define INTERNET_SERVICE_FTP 1
381#define INTERNET_SERVICE_GOPHER 2
382#define INTERNET_SERVICE_HTTP 3
383
384#define InternetOpenUrl __MINGW_NAME_AW(InternetOpenUrl)
385#define InternetReadFileEx __MINGW_NAME_AW(InternetReadFileEx)
386
387 INTERNETAPI_(HINTERNET) InternetOpenUrlA(HINTERNET hInternet,LPCSTR lpszUrl,LPCSTR lpszHeaders,DWORD dwHeadersLength,DWORD dwFlags,DWORD_PTR dwContext);
388 INTERNETAPI_(HINTERNET) InternetOpenUrlW(HINTERNET hInternet,LPCWSTR lpszUrl,LPCWSTR lpszHeaders,DWORD dwHeadersLength,DWORD dwFlags,DWORD_PTR dwContext);
389 BOOLAPI InternetReadFile(HINTERNET hFile,LPVOID lpBuffer,DWORD dwNumberOfBytesToRead,LPDWORD lpdwNumberOfBytesRead);
390 INTERNETAPI_(WINBOOL) InternetReadFileExA(HINTERNET hFile,LPINTERNET_BUFFERSA lpBuffersOut,DWORD dwFlags,DWORD_PTR dwContext);
391 INTERNETAPI_(WINBOOL) InternetReadFileExW(HINTERNET hFile,LPINTERNET_BUFFERSW lpBuffersOut,DWORD dwFlags,DWORD_PTR dwContext);
392
393#define IRF_ASYNC WININET_API_FLAG_ASYNC
394#define IRF_SYNC WININET_API_FLAG_SYNC
395#define IRF_USE_CONTEXT WININET_API_FLAG_USE_CONTEXT
396#define IRF_NO_WAIT 0x00000008
397
398#define InternetFindNextFile __MINGW_NAME_AW(InternetFindNextFile)
399#define InternetQueryOption __MINGW_NAME_AW(InternetQueryOption)
400#define InternetSetOption __MINGW_NAME_AW(InternetSetOption)
401#define InternetSetOptionEx __MINGW_NAME_AW(InternetSetOptionEx)
402
403 INTERNETAPI_(DWORD) InternetSetFilePointer(HINTERNET hFile,LONG lDistanceToMove,PVOID pReserved,DWORD dwMoveMethod,DWORD_PTR dwContext);
404 BOOLAPI InternetWriteFile(HINTERNET hFile,LPCVOID lpBuffer,DWORD dwNumberOfBytesToWrite,LPDWORD lpdwNumberOfBytesWritten);
405 BOOLAPI InternetQueryDataAvailable(HINTERNET hFile,LPDWORD lpdwNumberOfBytesAvailable,DWORD dwFlags,DWORD_PTR dwContext);
406 BOOLAPI InternetFindNextFileA(HINTERNET hFind,LPVOID lpvFindData);
407 BOOLAPI InternetFindNextFileW(HINTERNET hFind,LPVOID lpvFindData);
408 BOOLAPI InternetQueryOptionA(HINTERNET hInternet,DWORD dwOption,LPVOID lpBuffer,LPDWORD lpdwBufferLength);
409 BOOLAPI InternetQueryOptionW(HINTERNET hInternet,DWORD dwOption,LPVOID lpBuffer,LPDWORD lpdwBufferLength);
410 BOOLAPI InternetSetOptionA(HINTERNET hInternet,DWORD dwOption,LPVOID lpBuffer,DWORD dwBufferLength);
411 BOOLAPI InternetSetOptionW(HINTERNET hInternet,DWORD dwOption,LPVOID lpBuffer,DWORD dwBufferLength);
412 BOOLAPI InternetSetOptionExA(HINTERNET hInternet,DWORD dwOption,LPVOID lpBuffer,DWORD dwBufferLength,DWORD dwFlags);
413 BOOLAPI InternetSetOptionExW(HINTERNET hInternet,DWORD dwOption,LPVOID lpBuffer,DWORD dwBufferLength,DWORD dwFlags);
414 BOOLAPI InternetLockRequestFile(HINTERNET hInternet,HANDLE *lphLockRequestInfo);
415 BOOLAPI InternetUnlockRequestFile(HANDLE hLockRequestInfo);
416
417#define ISO_GLOBAL 0x00000001
418#define ISO_REGISTRY 0x00000002
419
420#define ISO_VALID_FLAGS (ISO_GLOBAL | ISO_REGISTRY)
421
422#define INTERNET_OPTION_CALLBACK 1
423#define INTERNET_OPTION_CONNECT_TIMEOUT 2
424#define INTERNET_OPTION_CONNECT_RETRIES 3
425#define INTERNET_OPTION_CONNECT_BACKOFF 4
426#define INTERNET_OPTION_SEND_TIMEOUT 5
427#define INTERNET_OPTION_CONTROL_SEND_TIMEOUT INTERNET_OPTION_SEND_TIMEOUT
428#define INTERNET_OPTION_RECEIVE_TIMEOUT 6
429#define INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT INTERNET_OPTION_RECEIVE_TIMEOUT
430#define INTERNET_OPTION_DATA_SEND_TIMEOUT 7
431#define INTERNET_OPTION_DATA_RECEIVE_TIMEOUT 8
432#define INTERNET_OPTION_HANDLE_TYPE 9
433#define INTERNET_OPTION_LISTEN_TIMEOUT 11
434#define INTERNET_OPTION_READ_BUFFER_SIZE 12
435#define INTERNET_OPTION_WRITE_BUFFER_SIZE 13
436
437#define INTERNET_OPTION_ASYNC_ID 15
438#define INTERNET_OPTION_ASYNC_PRIORITY 16
439
440#define INTERNET_OPTION_PARENT_HANDLE 21
441#define INTERNET_OPTION_KEEP_CONNECTION 22
442#define INTERNET_OPTION_REQUEST_FLAGS 23
443#define INTERNET_OPTION_EXTENDED_ERROR 24
444
445#define INTERNET_OPTION_OFFLINE_MODE 26
446#define INTERNET_OPTION_CACHE_STREAM_HANDLE 27
447#define INTERNET_OPTION_USERNAME 28
448#define INTERNET_OPTION_PASSWORD 29
449#define INTERNET_OPTION_ASYNC 30
450#define INTERNET_OPTION_SECURITY_FLAGS 31
451#define INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT 32
452#define INTERNET_OPTION_DATAFILE_NAME 33
453#define INTERNET_OPTION_URL 34
454#define INTERNET_OPTION_SECURITY_CERTIFICATE 35
455#define INTERNET_OPTION_SECURITY_KEY_BITNESS 36
456#define INTERNET_OPTION_REFRESH 37
457#define INTERNET_OPTION_PROXY 38
458#define INTERNET_OPTION_SETTINGS_CHANGED 39
459#define INTERNET_OPTION_VERSION 40
460#define INTERNET_OPTION_USER_AGENT 41
461#define INTERNET_OPTION_END_BROWSER_SESSION 42
462#define INTERNET_OPTION_PROXY_USERNAME 43
463#define INTERNET_OPTION_PROXY_PASSWORD 44
464#define INTERNET_OPTION_CONTEXT_VALUE 45
465#define INTERNET_OPTION_CONNECT_LIMIT 46
466#define INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT 47
467#define INTERNET_OPTION_POLICY 48
468#define INTERNET_OPTION_DISCONNECTED_TIMEOUT 49
469#define INTERNET_OPTION_CONNECTED_STATE 50
470#define INTERNET_OPTION_IDLE_STATE 51
471#define INTERNET_OPTION_OFFLINE_SEMANTICS 52
472#define INTERNET_OPTION_SECONDARY_CACHE_KEY 53
473#define INTERNET_OPTION_CALLBACK_FILTER 54
474#define INTERNET_OPTION_CONNECT_TIME 55
475#define INTERNET_OPTION_SEND_THROUGHPUT 56
476#define INTERNET_OPTION_RECEIVE_THROUGHPUT 57
477#define INTERNET_OPTION_REQUEST_PRIORITY 58
478#define INTERNET_OPTION_HTTP_VERSION 59
479#define INTERNET_OPTION_RESET_URLCACHE_SESSION 60
480#define INTERNET_OPTION_ERROR_MASK 62
481#define INTERNET_OPTION_FROM_CACHE_TIMEOUT 63
482#define INTERNET_OPTION_BYPASS_EDITED_ENTRY 64
483#define INTERNET_OPTION_HTTP_DECODING 65
484#define INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO 67
485#define INTERNET_OPTION_CODEPAGE 68
486#define INTERNET_OPTION_CACHE_TIMESTAMPS 69
487#define INTERNET_OPTION_DISABLE_AUTODIAL 70
488#define INTERNET_OPTION_MAX_CONNS_PER_SERVER 73
489#define INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER 74
490#define INTERNET_OPTION_PER_CONNECTION_OPTION 75
491#define INTERNET_OPTION_DIGEST_AUTH_UNLOAD 76
492#define INTERNET_OPTION_IGNORE_OFFLINE 77
493#define INTERNET_OPTION_IDENTITY 78
494#define INTERNET_OPTION_REMOVE_IDENTITY 79
495#define INTERNET_OPTION_ALTER_IDENTITY 80
496#define INTERNET_OPTION_SUPPRESS_BEHAVIOR 81
497#define INTERNET_OPTION_AUTODIAL_MODE 82
498#define INTERNET_OPTION_AUTODIAL_CONNECTION 83
499#define INTERNET_OPTION_CLIENT_CERT_CONTEXT 84
500#define INTERNET_OPTION_AUTH_FLAGS 85
501#define INTERNET_OPTION_COOKIES_3RD_PARTY 86
502#define INTERNET_OPTION_DISABLE_PASSPORT_AUTH 87
503#define INTERNET_OPTION_SEND_UTF8_SERVERNAME_TO_PROXY 88
504#define INTERNET_OPTION_EXEMPT_CONNECTION_LIMIT 89
505#define INTERNET_OPTION_ENABLE_PASSPORT_AUTH 90
506
507#define INTERNET_OPTION_HIBERNATE_INACTIVE_WORKER_THREADS 91
508#define INTERNET_OPTION_ACTIVATE_WORKER_THREADS 92
509#define INTERNET_OPTION_RESTORE_WORKER_THREAD_DEFAULTS 93
510#define INTERNET_OPTION_SOCKET_SEND_BUFFER_LENGTH 94
511#define INTERNET_OPTION_PROXY_SETTINGS_CHANGED 95
512
513#define INTERNET_OPTION_DATAFILE_EXT 96
514
515#define INTERNET_OPTION_CODEPAGE_PATH 100
516#define INTERNET_OPTION_CODEPAGE_EXTRA 101
517#define INTERNET_OPTION_IDN 102
518#define INTERNET_OPTION_MAX_CONNS_PER_PROXY 103
519#define INTERNET_OPTION_SUPPRESS_SERVER_AUTH 104
520#define INTERNET_OPTION_SERVER_CERT_CHAIN_CONTEXT 105
521
522#define INTERNET_OPTION_ENABLE_REDIRECT_CACHE_READ 122
523
524#define INTERNET_OPTION_COMPRESSED_CONTENT_LENGTH 147
525#define INTERNET_OPTION_ENABLE_HTTP_PROTOCOL 148
526#define INTERNET_OPTION_HTTP_PROTOCOL_USED 149
527
528#define INTERNET_OPTION_ENCODE_EXTRA 155
529
530#define INTERNET_OPTION_HSTS 157
531
532#define INTERNET_OPTION_ENTERPRISE_CONTEXT 159
533
534#define INTERNET_OPTION_CONNECTION_FILTER 162
535#define INTERNET_OPTION_REFERER_TOKEN_BINDING_HOSTNAME 163
536
537#define INTERNET_OPTION_TOKEN_BINDING_PUBLIC_KEY 181
538
539#define INTERNET_OPTION_COOKIES_SAME_SITE_LEVEL 187
540
541#define INTERNET_FIRST_OPTION INTERNET_OPTION_CALLBACK
542#define INTERNET_LAST_OPTION INTERNET_OPTION_DATAFILE_EXT
543
544#define INTERNET_PRIORITY_FOREGROUND 1000
545
546#define HTTP_COOKIES_SAME_SITE_LEVEL_UNKNOWN 0x0
547#define HTTP_COOKIES_SAME_SITE_LEVEL_SAME_SITE 0x1
548#define HTTP_COOKIES_SAME_SITE_LEVEL_CROSS_SITE_LAX 0x2
549#define HTTP_COOKIES_SAME_SITE_LEVEL_CROSS_SITE 0x3
550
551#define HTTP_COOKIES_SAME_SITE_LEVEL_MAX HTTP_COOKIES_SAME_SITE_LEVEL_CROSS_SITE
552
553#define HTTP_PROTOCOL_FLAG_HTTP2 0x2
554#define HTTP_PROTOCOL_MASK HTTP_PROTOCOL_FLAG_HTTP2
555
556#define INTERNET_HANDLE_TYPE_INTERNET 1
557#define INTERNET_HANDLE_TYPE_CONNECT_FTP 2
558#define INTERNET_HANDLE_TYPE_CONNECT_GOPHER 3
559#define INTERNET_HANDLE_TYPE_CONNECT_HTTP 4
560#define INTERNET_HANDLE_TYPE_FTP_FIND 5
561#define INTERNET_HANDLE_TYPE_FTP_FIND_HTML 6
562#define INTERNET_HANDLE_TYPE_FTP_FILE 7
563#define INTERNET_HANDLE_TYPE_FTP_FILE_HTML 8
564#define INTERNET_HANDLE_TYPE_GOPHER_FIND 9
565#define INTERNET_HANDLE_TYPE_GOPHER_FIND_HTML 10
566#define INTERNET_HANDLE_TYPE_GOPHER_FILE 11
567#define INTERNET_HANDLE_TYPE_GOPHER_FILE_HTML 12
568#define INTERNET_HANDLE_TYPE_HTTP_REQUEST 13
569#define INTERNET_HANDLE_TYPE_FILE_REQUEST 14
570
571#define AUTH_FLAG_DISABLE_NEGOTIATE 0x00000001
572#define AUTH_FLAG_ENABLE_NEGOTIATE 0x00000002
573#define AUTH_FLAG_DISABLE_BASIC_CLEARCHANNEL 0x00000004
574#define AUTH_FLAG_DISABLE_SERVER_AUTH 0x00000008
575
576#define SECURITY_FLAG_SECURE 0x00000001
577#define SECURITY_FLAG_STRENGTH_WEAK 0x10000000
578#define SECURITY_FLAG_STRENGTH_MEDIUM 0x40000000
579#define SECURITY_FLAG_STRENGTH_STRONG 0x20000000
580#define SECURITY_FLAG_UNKNOWNBIT 0x80000000
581#define SECURITY_FLAG_FORTEZZA 0x08000000
582#define SECURITY_FLAG_NORMALBITNESS SECURITY_FLAG_STRENGTH_WEAK
583
584#define SECURITY_FLAG_SSL 0x00000002
585#define SECURITY_FLAG_SSL3 0x00000004
586#define SECURITY_FLAG_PCT 0x00000008
587#define SECURITY_FLAG_PCT4 0x00000010
588#define SECURITY_FLAG_IETFSSL4 0x00000020
589
590#define SECURITY_FLAG_40BIT SECURITY_FLAG_STRENGTH_WEAK
591#define SECURITY_FLAG_128BIT SECURITY_FLAG_STRENGTH_STRONG
592#define SECURITY_FLAG_56BIT SECURITY_FLAG_STRENGTH_MEDIUM
593
594#define SECURITY_FLAG_IGNORE_REVOCATION 0x00000080
595#define SECURITY_FLAG_IGNORE_UNKNOWN_CA 0x00000100
596#define SECURITY_FLAG_IGNORE_WRONG_USAGE 0x00000200
597#define SECURITY_FLAG_IGNORE_WEAK_SIGNATURE 0x00010000
598
599#define SECURITY_FLAG_IGNORE_CERT_CN_INVALID INTERNET_FLAG_IGNORE_CERT_CN_INVALID
600#define SECURITY_FLAG_IGNORE_CERT_DATE_INVALID INTERNET_FLAG_IGNORE_CERT_DATE_INVALID
601
602#define SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTPS INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS
603#define SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTP INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP
604
605#define SECURITY_SET_MASK (SECURITY_FLAG_IGNORE_REVOCATION | SECURITY_FLAG_IGNORE_UNKNOWN_CA | SECURITY_FLAG_IGNORE_CERT_CN_INVALID | SECURITY_FLAG_IGNORE_CERT_DATE_INVALID | SECURITY_FLAG_IGNORE_WRONG_USAGE)
606
607#define SECURITY_FLAG_OPT_IN_WEAK_SIGNATURE 0x00020000
608
609#define AUTODIAL_MODE_NEVER 1
610#define AUTODIAL_MODE_ALWAYS 2
611#define AUTODIAL_MODE_NO_NETWORK_PRESENT 4
612
613#define InternetGetLastResponseInfo __MINGW_NAME_AW(InternetGetLastResponseInfo)
614
615 BOOLAPI InternetGetLastResponseInfoA(LPDWORD lpdwError,LPSTR lpszBuffer,LPDWORD lpdwBufferLength);
616 BOOLAPI InternetGetLastResponseInfoW(LPDWORD lpdwError,LPWSTR lpszBuffer,LPDWORD lpdwBufferLength);
617
618 typedef VOID (CALLBACK *INTERNET_STATUS_CALLBACK)(HINTERNET hInternet,DWORD_PTR dwContext,DWORD dwInternetStatus,LPVOID lpvStatusInformation,DWORD dwStatusInformationLength);
619 typedef INTERNET_STATUS_CALLBACK *LPINTERNET_STATUS_CALLBACK;
620
621#if defined(UNICODE)
622#define InternetSetStatusCallback InternetSetStatusCallbackW
623#else
624 INTERNETAPI_(INTERNET_STATUS_CALLBACK) InternetSetStatusCallback(HINTERNET hInternet,INTERNET_STATUS_CALLBACK lpfnInternetCallback);
625#endif
626
627 INTERNETAPI_(INTERNET_STATUS_CALLBACK) InternetSetStatusCallbackA(HINTERNET hInternet,INTERNET_STATUS_CALLBACK lpfnInternetCallback);
628 INTERNETAPI_(INTERNET_STATUS_CALLBACK) InternetSetStatusCallbackW(HINTERNET hInternet,INTERNET_STATUS_CALLBACK lpfnInternetCallback);
629
630#define INTERNET_STATUS_RESOLVING_NAME 10
631#define INTERNET_STATUS_NAME_RESOLVED 11
632#define INTERNET_STATUS_CONNECTING_TO_SERVER 20
633#define INTERNET_STATUS_CONNECTED_TO_SERVER 21
634#define INTERNET_STATUS_SENDING_REQUEST 30
635#define INTERNET_STATUS_REQUEST_SENT 31
636#define INTERNET_STATUS_RECEIVING_RESPONSE 40
637#define INTERNET_STATUS_RESPONSE_RECEIVED 41
638#define INTERNET_STATUS_CTL_RESPONSE_RECEIVED 42
639#define INTERNET_STATUS_PREFETCH 43
640#define INTERNET_STATUS_CLOSING_CONNECTION 50
641#define INTERNET_STATUS_CONNECTION_CLOSED 51
642#define INTERNET_STATUS_HANDLE_CREATED 60
643#define INTERNET_STATUS_HANDLE_CLOSING 70
644#define INTERNET_STATUS_DETECTING_PROXY 80
645#define INTERNET_STATUS_REQUEST_COMPLETE 100
646#define INTERNET_STATUS_REDIRECT 110
647#define INTERNET_STATUS_INTERMEDIATE_RESPONSE 120
648#define INTERNET_STATUS_USER_INPUT_REQUIRED 140
649#define INTERNET_STATUS_STATE_CHANGE 200
650#define INTERNET_STATUS_COOKIE_SENT 320
651#define INTERNET_STATUS_COOKIE_RECEIVED 321
652#define INTERNET_STATUS_PRIVACY_IMPACTED 324
653#define INTERNET_STATUS_P3P_HEADER 325
654#define INTERNET_STATUS_P3P_POLICYREF 326
655#define INTERNET_STATUS_COOKIE_HISTORY 327
656
657#define INTERNET_STATE_CONNECTED 0x00000001
658#define INTERNET_STATE_DISCONNECTED 0x00000002
659#define INTERNET_STATE_DISCONNECTED_BY_USER 0x00000010
660#define INTERNET_STATE_IDLE 0x00000100
661#define INTERNET_STATE_BUSY 0x00000200
662
663 typedef enum {
664 COOKIE_STATE_UNKNOWN = 0x0,COOKIE_STATE_ACCEPT = 0x1,COOKIE_STATE_PROMPT = 0x2,COOKIE_STATE_LEASH = 0x3,COOKIE_STATE_DOWNGRADE = 0x4,
665 COOKIE_STATE_REJECT = 0x5,COOKIE_STATE_MAX = COOKIE_STATE_REJECT
666 } InternetCookieState;
667
668 typedef struct {
669 int cSession;
670 int cPersistent;
671 int cAccepted;
672 int cLeashed;
673 int cDowngraded;
674 int cBlocked;
675 const char *pszLocation;
676 } IncomingCookieState;
677
678 typedef struct {
679 int cSent;
680 int cSuppressed;
681
682 const char *pszLocation;
683 } OutgoingCookieState;
684
685 typedef struct {
686 WINBOOL fAccepted;
687 WINBOOL fLeashed;
688 WINBOOL fDowngraded;
689 WINBOOL fRejected;
690 } InternetCookieHistory;
691
692 typedef struct {
693 DWORD dwCookieState;
694 WINBOOL fAllowSession;
695 } CookieDecision;
696
697#define INTERNET_INVALID_STATUS_CALLBACK ((INTERNET_STATUS_CALLBACK)(INT_PTR)-1)
698
699#define FTP_TRANSFER_TYPE_UNKNOWN 0x00000000
700#define FTP_TRANSFER_TYPE_ASCII 0x00000001
701#define FTP_TRANSFER_TYPE_BINARY 0x00000002
702
703#define FTP_TRANSFER_TYPE_MASK (FTP_TRANSFER_TYPE_ASCII | FTP_TRANSFER_TYPE_BINARY)
704
705#define FtpFindFirstFile __MINGW_NAME_AW(FtpFindFirstFile)
706#define FtpGetFile __MINGW_NAME_AW(FtpGetFile)
707#define FtpPutFile __MINGW_NAME_AW(FtpPutFile)
708#define FtpDeleteFile __MINGW_NAME_AW(FtpDeleteFile)
709#define FtpRenameFile __MINGW_NAME_AW(FtpRenameFile)
710#define FtpOpenFile __MINGW_NAME_AW(FtpOpenFile)
711#define FtpCreateDirectory __MINGW_NAME_AW(FtpCreateDirectory)
712#define FtpRemoveDirectory __MINGW_NAME_AW(FtpRemoveDirectory)
713#define FtpSetCurrentDirectory __MINGW_NAME_AW(FtpSetCurrentDirectory)
714#define FtpGetCurrentDirectory __MINGW_NAME_AW(FtpGetCurrentDirectory)
715#define FtpCommand __MINGW_NAME_AW(FtpCommand)
716
717 INTERNETAPI_(HINTERNET) FtpFindFirstFileA(HINTERNET hConnect,LPCSTR lpszSearchFile,LPWIN32_FIND_DATAA lpFindFileData,DWORD dwFlags,DWORD_PTR dwContext);
718 INTERNETAPI_(HINTERNET) FtpFindFirstFileW(HINTERNET hConnect,LPCWSTR lpszSearchFile,LPWIN32_FIND_DATAW lpFindFileData,DWORD dwFlags,DWORD_PTR dwContext);
719 BOOLAPI FtpGetFileA(HINTERNET hConnect,LPCSTR lpszRemoteFile,LPCSTR lpszNewFile,WINBOOL fFailIfExists,DWORD dwFlagsAndAttributes,DWORD dwFlags,DWORD_PTR dwContext);
720 BOOLAPI FtpGetFileW(HINTERNET hConnect,LPCWSTR lpszRemoteFile,LPCWSTR lpszNewFile,WINBOOL fFailIfExists,DWORD dwFlagsAndAttributes,DWORD dwFlags,DWORD_PTR dwContext);
721 BOOLAPI FtpPutFileA(HINTERNET hConnect,LPCSTR lpszLocalFile,LPCSTR lpszNewRemoteFile,DWORD dwFlags,DWORD_PTR dwContext);
722 BOOLAPI FtpPutFileW(HINTERNET hConnect,LPCWSTR lpszLocalFile,LPCWSTR lpszNewRemoteFile,DWORD dwFlags,DWORD_PTR dwContext);
723 BOOLAPI FtpGetFileEx(HINTERNET hFtpSession,LPCSTR lpszRemoteFile,LPCWSTR lpszNewFile,WINBOOL fFailIfExists,DWORD dwFlagsAndAttributes,DWORD dwFlags,DWORD_PTR dwContext);
724 BOOLAPI FtpPutFileEx(HINTERNET hFtpSession,LPCWSTR lpszLocalFile,LPCSTR lpszNewRemoteFile,DWORD dwFlags,DWORD_PTR dwContext);
725 BOOLAPI FtpDeleteFileA(HINTERNET hConnect,LPCSTR lpszFileName);
726 BOOLAPI FtpDeleteFileW(HINTERNET hConnect,LPCWSTR lpszFileName);
727 BOOLAPI FtpRenameFileA(HINTERNET hConnect,LPCSTR lpszExisting,LPCSTR lpszNew);
728 BOOLAPI FtpRenameFileW(HINTERNET hConnect,LPCWSTR lpszExisting,LPCWSTR lpszNew);
729 INTERNETAPI_(HINTERNET) FtpOpenFileA(HINTERNET hConnect,LPCSTR lpszFileName,DWORD dwAccess,DWORD dwFlags,DWORD_PTR dwContext);
730 INTERNETAPI_(HINTERNET) FtpOpenFileW(HINTERNET hConnect,LPCWSTR lpszFileName,DWORD dwAccess,DWORD dwFlags,DWORD_PTR dwContext);
731 BOOLAPI FtpCreateDirectoryA(HINTERNET hConnect,LPCSTR lpszDirectory);
732 BOOLAPI FtpCreateDirectoryW(HINTERNET hConnect,LPCWSTR lpszDirectory);
733 BOOLAPI FtpRemoveDirectoryA(HINTERNET hConnect,LPCSTR lpszDirectory);
734 BOOLAPI FtpRemoveDirectoryW(HINTERNET hConnect,LPCWSTR lpszDirectory);
735 BOOLAPI FtpSetCurrentDirectoryA(HINTERNET hConnect,LPCSTR lpszDirectory);
736 BOOLAPI FtpSetCurrentDirectoryW(HINTERNET hConnect,LPCWSTR lpszDirectory);
737 BOOLAPI FtpGetCurrentDirectoryA(HINTERNET hConnect,LPSTR lpszCurrentDirectory,LPDWORD lpdwCurrentDirectory);
738 BOOLAPI FtpGetCurrentDirectoryW(HINTERNET hConnect,LPWSTR lpszCurrentDirectory,LPDWORD lpdwCurrentDirectory);
739 BOOLAPI FtpCommandA(HINTERNET hConnect,WINBOOL fExpectResponse,DWORD dwFlags,LPCSTR lpszCommand,DWORD_PTR dwContext,HINTERNET *phFtpCommand);
740 BOOLAPI FtpCommandW(HINTERNET hConnect,WINBOOL fExpectResponse,DWORD dwFlags,LPCWSTR lpszCommand,DWORD_PTR dwContext,HINTERNET *phFtpCommand);
741 INTERNETAPI_(DWORD) FtpGetFileSize(HINTERNET hFile,LPDWORD lpdwFileSizeHigh);
742
743#define MAX_GOPHER_DISPLAY_TEXT 128
744#define MAX_GOPHER_SELECTOR_TEXT 256
745#define MAX_GOPHER_HOST_NAME INTERNET_MAX_HOST_NAME_LENGTH
746#define MAX_GOPHER_LOCATOR_LENGTH (1 + MAX_GOPHER_DISPLAY_TEXT + 1 + MAX_GOPHER_SELECTOR_TEXT + 1 + MAX_GOPHER_HOST_NAME + 1 + INTERNET_MAX_PORT_NUMBER_LENGTH + 1 + 1 + 2)
747
748 typedef struct {
749 CHAR DisplayString[MAX_GOPHER_DISPLAY_TEXT + 1];
750 DWORD GopherType;
751 DWORD SizeLow;
752 DWORD SizeHigh;
753 FILETIME LastModificationTime;
754 CHAR Locator[MAX_GOPHER_LOCATOR_LENGTH + 1];
755 } GOPHER_FIND_DATAA,*LPGOPHER_FIND_DATAA;
756
757 typedef struct {
758 WCHAR DisplayString[MAX_GOPHER_DISPLAY_TEXT + 1];
759 DWORD GopherType;
760 DWORD SizeLow;
761 DWORD SizeHigh;
762 FILETIME LastModificationTime;
763 WCHAR Locator[MAX_GOPHER_LOCATOR_LENGTH + 1];
764 } GOPHER_FIND_DATAW,*LPGOPHER_FIND_DATAW;
765
766 __MINGW_TYPEDEF_AW(GOPHER_FIND_DATA)
767 __MINGW_TYPEDEF_AW(LPGOPHER_FIND_DATA)
768
769#define GOPHER_TYPE_TEXT_FILE 0x00000001
770#define GOPHER_TYPE_DIRECTORY 0x00000002
771#define GOPHER_TYPE_CSO 0x00000004
772#define GOPHER_TYPE_ERROR 0x00000008
773#define GOPHER_TYPE_MAC_BINHEX 0x00000010
774#define GOPHER_TYPE_DOS_ARCHIVE 0x00000020
775#define GOPHER_TYPE_UNIX_UUENCODED 0x00000040
776#define GOPHER_TYPE_INDEX_SERVER 0x00000080
777#define GOPHER_TYPE_TELNET 0x00000100
778#define GOPHER_TYPE_BINARY 0x00000200
779#define GOPHER_TYPE_REDUNDANT 0x00000400
780#define GOPHER_TYPE_TN3270 0x00000800
781#define GOPHER_TYPE_GIF 0x00001000
782#define GOPHER_TYPE_IMAGE 0x00002000
783#define GOPHER_TYPE_BITMAP 0x00004000
784#define GOPHER_TYPE_MOVIE 0x00008000
785#define GOPHER_TYPE_SOUND 0x00010000
786#define GOPHER_TYPE_HTML 0x00020000
787#define GOPHER_TYPE_PDF 0x00040000
788#define GOPHER_TYPE_CALENDAR 0x00080000
789#define GOPHER_TYPE_INLINE 0x00100000
790#define GOPHER_TYPE_UNKNOWN 0x20000000
791#define GOPHER_TYPE_ASK 0x40000000
792#define GOPHER_TYPE_GOPHER_PLUS 0x80000000
793
794#define IS_GOPHER_FILE(type) (WINBOOL)(((type) & GOPHER_TYPE_FILE_MASK) ? TRUE : FALSE)
795#define IS_GOPHER_DIRECTORY(type) (WINBOOL)(((type) & GOPHER_TYPE_DIRECTORY) ? TRUE : FALSE)
796#define IS_GOPHER_PHONE_SERVER(type) (WINBOOL)(((type) & GOPHER_TYPE_CSO) ? TRUE : FALSE)
797#define IS_GOPHER_ERROR(type) (WINBOOL)(((type) & GOPHER_TYPE_ERROR) ? TRUE : FALSE)
798#define IS_GOPHER_INDEX_SERVER(type) (WINBOOL)(((type) & GOPHER_TYPE_INDEX_SERVER) ? TRUE : FALSE)
799#define IS_GOPHER_TELNET_SESSION(type) (WINBOOL)(((type) & GOPHER_TYPE_TELNET) ? TRUE : FALSE)
800#define IS_GOPHER_BACKUP_SERVER(type) (WINBOOL)(((type) & GOPHER_TYPE_REDUNDANT) ? TRUE : FALSE)
801#define IS_GOPHER_TN3270_SESSION(type) (WINBOOL)(((type) & GOPHER_TYPE_TN3270) ? TRUE : FALSE)
802#define IS_GOPHER_ASK(type) (WINBOOL)(((type) & GOPHER_TYPE_ASK) ? TRUE : FALSE)
803#define IS_GOPHER_PLUS(type) (WINBOOL)(((type) & GOPHER_TYPE_GOPHER_PLUS) ? TRUE : FALSE)
804
805#define IS_GOPHER_TYPE_KNOWN(type) (WINBOOL)(((type) & GOPHER_TYPE_UNKNOWN) ? FALSE : TRUE)
806
807#define GOPHER_TYPE_FILE_MASK (GOPHER_TYPE_TEXT_FILE | GOPHER_TYPE_MAC_BINHEX | GOPHER_TYPE_DOS_ARCHIVE | GOPHER_TYPE_UNIX_UUENCODED | GOPHER_TYPE_BINARY | GOPHER_TYPE_GIF | GOPHER_TYPE_IMAGE | GOPHER_TYPE_BITMAP | GOPHER_TYPE_MOVIE | GOPHER_TYPE_SOUND | GOPHER_TYPE_HTML | GOPHER_TYPE_PDF | GOPHER_TYPE_CALENDAR | GOPHER_TYPE_INLINE)
808
809 typedef struct {
810 LPCTSTR Comment;
811 LPCTSTR EmailAddress;
812 } GOPHER_ADMIN_ATTRIBUTE_TYPE,*LPGOPHER_ADMIN_ATTRIBUTE_TYPE;
813
814 typedef struct {
815 FILETIME DateAndTime;
816 } GOPHER_MOD_DATE_ATTRIBUTE_TYPE,*LPGOPHER_MOD_DATE_ATTRIBUTE_TYPE;
817
818 typedef struct {
819 DWORD Ttl;
820 } GOPHER_TTL_ATTRIBUTE_TYPE,*LPGOPHER_TTL_ATTRIBUTE_TYPE;
821
822 typedef struct {
823 INT Score;
824 } GOPHER_SCORE_ATTRIBUTE_TYPE,*LPGOPHER_SCORE_ATTRIBUTE_TYPE;
825
826 typedef struct {
827 INT LowerBound;
828 INT UpperBound;
829 } GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE,*LPGOPHER_SCORE_RANGE_ATTRIBUTE_TYPE;
830
831 typedef struct {
832 LPCTSTR Site;
833 } GOPHER_SITE_ATTRIBUTE_TYPE,*LPGOPHER_SITE_ATTRIBUTE_TYPE;
834
835 typedef struct {
836 LPCTSTR Organization;
837 } GOPHER_ORGANIZATION_ATTRIBUTE_TYPE,*LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPE;
838
839 typedef struct {
840 LPCTSTR Location;
841 } GOPHER_LOCATION_ATTRIBUTE_TYPE,*LPGOPHER_LOCATION_ATTRIBUTE_TYPE;
842
843 typedef struct {
844 INT DegreesNorth;
845 INT MinutesNorth;
846 INT SecondsNorth;
847 INT DegreesEast;
848 INT MinutesEast;
849 INT SecondsEast;
850 } GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE,*LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE;
851
852 typedef struct {
853 INT Zone;
854 } GOPHER_TIMEZONE_ATTRIBUTE_TYPE,*LPGOPHER_TIMEZONE_ATTRIBUTE_TYPE;
855
856 typedef struct {
857 LPCTSTR Provider;
858 } GOPHER_PROVIDER_ATTRIBUTE_TYPE,*LPGOPHER_PROVIDER_ATTRIBUTE_TYPE;
859
860 typedef struct {
861 LPCTSTR Version;
862 } GOPHER_VERSION_ATTRIBUTE_TYPE,*LPGOPHER_VERSION_ATTRIBUTE_TYPE;
863
864 typedef struct {
865 LPCTSTR ShortAbstract;
866 LPCTSTR AbstractFile;
867 } GOPHER_ABSTRACT_ATTRIBUTE_TYPE,*LPGOPHER_ABSTRACT_ATTRIBUTE_TYPE;
868
869 typedef struct {
870 LPCTSTR ContentType;
871 LPCTSTR Language;
872 DWORD Size;
873 } GOPHER_VIEW_ATTRIBUTE_TYPE,*LPGOPHER_VIEW_ATTRIBUTE_TYPE;
874
875 typedef struct {
876 WINBOOL TreeWalk;
877 } GOPHER_VERONICA_ATTRIBUTE_TYPE,*LPGOPHER_VERONICA_ATTRIBUTE_TYPE;
878
879 typedef struct {
880 LPCTSTR QuestionType;
881 LPCTSTR QuestionText;
882 } GOPHER_ASK_ATTRIBUTE_TYPE,*LPGOPHER_ASK_ATTRIBUTE_TYPE;
883
884 typedef struct {
885 LPCTSTR Text;
886 } GOPHER_UNKNOWN_ATTRIBUTE_TYPE,*LPGOPHER_UNKNOWN_ATTRIBUTE_TYPE;
887
888 typedef struct {
889 DWORD CategoryId;
890 DWORD AttributeId;
891 union {
892 GOPHER_ADMIN_ATTRIBUTE_TYPE Admin;
893 GOPHER_MOD_DATE_ATTRIBUTE_TYPE ModDate;
894 GOPHER_TTL_ATTRIBUTE_TYPE Ttl;
895 GOPHER_SCORE_ATTRIBUTE_TYPE Score;
896 GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE ScoreRange;
897 GOPHER_SITE_ATTRIBUTE_TYPE Site;
898 GOPHER_ORGANIZATION_ATTRIBUTE_TYPE Organization;
899 GOPHER_LOCATION_ATTRIBUTE_TYPE Location;
900 GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE GeographicalLocation;
901 GOPHER_TIMEZONE_ATTRIBUTE_TYPE TimeZone;
902 GOPHER_PROVIDER_ATTRIBUTE_TYPE Provider;
903 GOPHER_VERSION_ATTRIBUTE_TYPE Version;
904 GOPHER_ABSTRACT_ATTRIBUTE_TYPE Abstract;
905 GOPHER_VIEW_ATTRIBUTE_TYPE View;
906 GOPHER_VERONICA_ATTRIBUTE_TYPE Veronica;
907 GOPHER_ASK_ATTRIBUTE_TYPE Ask;
908 GOPHER_UNKNOWN_ATTRIBUTE_TYPE Unknown;
909 } AttributeType;
910 } GOPHER_ATTRIBUTE_TYPE,*LPGOPHER_ATTRIBUTE_TYPE;
911
912#define MAX_GOPHER_CATEGORY_NAME 128
913#define MAX_GOPHER_ATTRIBUTE_NAME 128
914#define MIN_GOPHER_ATTRIBUTE_LENGTH 256
915
916#define GOPHER_INFO_CATEGORY TEXT("+INFO")
917#define GOPHER_ADMIN_CATEGORY TEXT("+ADMIN")
918#define GOPHER_VIEWS_CATEGORY TEXT("+VIEWS")
919#define GOPHER_ABSTRACT_CATEGORY TEXT("+ABSTRACT")
920#define GOPHER_VERONICA_CATEGORY TEXT("+VERONICA")
921
922#define GOPHER_ADMIN_ATTRIBUTE TEXT("Admin")
923#define GOPHER_MOD_DATE_ATTRIBUTE TEXT("Mod-Date")
924#define GOPHER_TTL_ATTRIBUTE TEXT("TTL")
925#define GOPHER_SCORE_ATTRIBUTE TEXT("Score")
926#define GOPHER_RANGE_ATTRIBUTE TEXT("Score-range")
927#define GOPHER_SITE_ATTRIBUTE TEXT("Site")
928#define GOPHER_ORG_ATTRIBUTE TEXT("Org")
929#define GOPHER_LOCATION_ATTRIBUTE TEXT("Loc")
930#define GOPHER_GEOG_ATTRIBUTE TEXT("Geog")
931#define GOPHER_TIMEZONE_ATTRIBUTE TEXT("TZ")
932#define GOPHER_PROVIDER_ATTRIBUTE TEXT("Provider")
933#define GOPHER_VERSION_ATTRIBUTE TEXT("Version")
934#define GOPHER_ABSTRACT_ATTRIBUTE TEXT("Abstract")
935#define GOPHER_VIEW_ATTRIBUTE TEXT("View")
936#define GOPHER_TREEWALK_ATTRIBUTE TEXT("treewalk")
937
938#define GOPHER_ATTRIBUTE_ID_BASE 0xabcccc00
939
940#define GOPHER_CATEGORY_ID_ALL (GOPHER_ATTRIBUTE_ID_BASE + 1)
941
942#define GOPHER_CATEGORY_ID_INFO (GOPHER_ATTRIBUTE_ID_BASE + 2)
943#define GOPHER_CATEGORY_ID_ADMIN (GOPHER_ATTRIBUTE_ID_BASE + 3)
944#define GOPHER_CATEGORY_ID_VIEWS (GOPHER_ATTRIBUTE_ID_BASE + 4)
945#define GOPHER_CATEGORY_ID_ABSTRACT (GOPHER_ATTRIBUTE_ID_BASE + 5)
946#define GOPHER_CATEGORY_ID_VERONICA (GOPHER_ATTRIBUTE_ID_BASE + 6)
947#define GOPHER_CATEGORY_ID_ASK (GOPHER_ATTRIBUTE_ID_BASE + 7)
948
949#define GOPHER_CATEGORY_ID_UNKNOWN (GOPHER_ATTRIBUTE_ID_BASE + 8)
950
951#define GOPHER_ATTRIBUTE_ID_ALL (GOPHER_ATTRIBUTE_ID_BASE + 9)
952
953#define GOPHER_ATTRIBUTE_ID_ADMIN (GOPHER_ATTRIBUTE_ID_BASE + 10)
954#define GOPHER_ATTRIBUTE_ID_MOD_DATE (GOPHER_ATTRIBUTE_ID_BASE + 11)
955#define GOPHER_ATTRIBUTE_ID_TTL (GOPHER_ATTRIBUTE_ID_BASE + 12)
956#define GOPHER_ATTRIBUTE_ID_SCORE (GOPHER_ATTRIBUTE_ID_BASE + 13)
957#define GOPHER_ATTRIBUTE_ID_RANGE (GOPHER_ATTRIBUTE_ID_BASE + 14)
958#define GOPHER_ATTRIBUTE_ID_SITE (GOPHER_ATTRIBUTE_ID_BASE + 15)
959#define GOPHER_ATTRIBUTE_ID_ORG (GOPHER_ATTRIBUTE_ID_BASE + 16)
960#define GOPHER_ATTRIBUTE_ID_LOCATION (GOPHER_ATTRIBUTE_ID_BASE + 17)
961#define GOPHER_ATTRIBUTE_ID_GEOG (GOPHER_ATTRIBUTE_ID_BASE + 18)
962#define GOPHER_ATTRIBUTE_ID_TIMEZONE (GOPHER_ATTRIBUTE_ID_BASE + 19)
963#define GOPHER_ATTRIBUTE_ID_PROVIDER (GOPHER_ATTRIBUTE_ID_BASE + 20)
964#define GOPHER_ATTRIBUTE_ID_VERSION (GOPHER_ATTRIBUTE_ID_BASE + 21)
965#define GOPHER_ATTRIBUTE_ID_ABSTRACT (GOPHER_ATTRIBUTE_ID_BASE + 22)
966#define GOPHER_ATTRIBUTE_ID_VIEW (GOPHER_ATTRIBUTE_ID_BASE + 23)
967#define GOPHER_ATTRIBUTE_ID_TREEWALK (GOPHER_ATTRIBUTE_ID_BASE + 24)
968
969#define GOPHER_ATTRIBUTE_ID_UNKNOWN (GOPHER_ATTRIBUTE_ID_BASE + 25)
970
971#define GopherCreateLocator __MINGW_NAME_AW(GopherCreateLocator)
972#define GopherGetLocatorType __MINGW_NAME_AW(GopherGetLocatorType)
973#define GopherFindFirstFile __MINGW_NAME_AW(GopherFindFirstFile)
974#define GopherOpenFile __MINGW_NAME_AW(GopherOpenFile)
975#define GopherGetAttribute __MINGW_NAME_AW(GopherGetAttribute)
976
977 BOOLAPI GopherCreateLocatorA(LPCSTR lpszHost,INTERNET_PORT nServerPort,LPCSTR lpszDisplayString,LPCSTR lpszSelectorString,DWORD dwGopherType,LPSTR lpszLocator,LPDWORD lpdwBufferLength);
978 BOOLAPI GopherCreateLocatorW(LPCWSTR lpszHost,INTERNET_PORT nServerPort,LPCWSTR lpszDisplayString,LPCWSTR lpszSelectorString,DWORD dwGopherType,LPWSTR lpszLocator,LPDWORD lpdwBufferLength);
979 BOOLAPI GopherGetLocatorTypeA(LPCSTR lpszLocator,LPDWORD lpdwGopherType);
980 BOOLAPI GopherGetLocatorTypeW(LPCWSTR lpszLocator,LPDWORD lpdwGopherType);
981 INTERNETAPI_(HINTERNET) GopherFindFirstFileA(HINTERNET hConnect,LPCSTR lpszLocator,LPCSTR lpszSearchString,LPGOPHER_FIND_DATAA lpFindData,DWORD dwFlags,DWORD_PTR dwContext);
982 INTERNETAPI_(HINTERNET) GopherFindFirstFileW(HINTERNET hConnect,LPCWSTR lpszLocator,LPCWSTR lpszSearchString,LPGOPHER_FIND_DATAW lpFindData,DWORD dwFlags,DWORD_PTR dwContext);
983 INTERNETAPI_(HINTERNET) GopherOpenFileA(HINTERNET hConnect,LPCSTR lpszLocator,LPCSTR lpszView,DWORD dwFlags,DWORD_PTR dwContext);
984 INTERNETAPI_(HINTERNET) GopherOpenFileW(HINTERNET hConnect,LPCWSTR lpszLocator,LPCWSTR lpszView,DWORD dwFlags,DWORD_PTR dwContext);
985
986 typedef WINBOOL (CALLBACK *GOPHER_ATTRIBUTE_ENUMERATOR)(LPGOPHER_ATTRIBUTE_TYPE lpAttributeInfo,DWORD dwError);
987
988 BOOLAPI GopherGetAttributeA(HINTERNET hConnect,LPCSTR lpszLocator,LPCSTR lpszAttributeName,LPBYTE lpBuffer,DWORD dwBufferLength,LPDWORD lpdwCharactersReturned,GOPHER_ATTRIBUTE_ENUMERATOR lpfnEnumerator,DWORD_PTR dwContext);
989 BOOLAPI GopherGetAttributeW(HINTERNET hConnect,LPCWSTR lpszLocator,LPCWSTR lpszAttributeName,LPBYTE lpBuffer,DWORD dwBufferLength,LPDWORD lpdwCharactersReturned,GOPHER_ATTRIBUTE_ENUMERATOR lpfnEnumerator,DWORD_PTR dwContext);
990
991#define HTTP_MAJOR_VERSION 1
992#define HTTP_MINOR_VERSION 0
993
994#define HTTP_VERSIONA "HTTP/1.0"
995#define HTTP_VERSIONW L"HTTP/1.0"
996
997#define HTTP_VERSION __MINGW_NAME_AW(HTTP_VERSION)
998
999#define HTTP_QUERY_MIME_VERSION 0
1000#define HTTP_QUERY_CONTENT_TYPE 1
1001#define HTTP_QUERY_CONTENT_TRANSFER_ENCODING 2
1002#define HTTP_QUERY_CONTENT_ID 3
1003#define HTTP_QUERY_CONTENT_DESCRIPTION 4
1004#define HTTP_QUERY_CONTENT_LENGTH 5
1005#define HTTP_QUERY_CONTENT_LANGUAGE 6
1006#define HTTP_QUERY_ALLOW 7
1007#define HTTP_QUERY_PUBLIC 8
1008#define HTTP_QUERY_DATE 9
1009#define HTTP_QUERY_EXPIRES 10
1010#define HTTP_QUERY_LAST_MODIFIED 11
1011#define HTTP_QUERY_MESSAGE_ID 12
1012#define HTTP_QUERY_URI 13
1013#define HTTP_QUERY_DERIVED_FROM 14
1014#define HTTP_QUERY_COST 15
1015#define HTTP_QUERY_LINK 16
1016#define HTTP_QUERY_PRAGMA 17
1017#define HTTP_QUERY_VERSION 18
1018#define HTTP_QUERY_STATUS_CODE 19
1019#define HTTP_QUERY_STATUS_TEXT 20
1020#define HTTP_QUERY_RAW_HEADERS 21
1021#define HTTP_QUERY_RAW_HEADERS_CRLF 22
1022#define HTTP_QUERY_CONNECTION 23
1023#define HTTP_QUERY_ACCEPT 24
1024#define HTTP_QUERY_ACCEPT_CHARSET 25
1025#define HTTP_QUERY_ACCEPT_ENCODING 26
1026#define HTTP_QUERY_ACCEPT_LANGUAGE 27
1027#define HTTP_QUERY_AUTHORIZATION 28
1028#define HTTP_QUERY_CONTENT_ENCODING 29
1029#define HTTP_QUERY_FORWARDED 30
1030#define HTTP_QUERY_FROM 31
1031#define HTTP_QUERY_IF_MODIFIED_SINCE 32
1032#define HTTP_QUERY_LOCATION 33
1033#define HTTP_QUERY_ORIG_URI 34
1034#define HTTP_QUERY_REFERER 35
1035#define HTTP_QUERY_RETRY_AFTER 36
1036#define HTTP_QUERY_SERVER 37
1037#define HTTP_QUERY_TITLE 38
1038#define HTTP_QUERY_USER_AGENT 39
1039#define HTTP_QUERY_WWW_AUTHENTICATE 40
1040#define HTTP_QUERY_PROXY_AUTHENTICATE 41
1041#define HTTP_QUERY_ACCEPT_RANGES 42
1042#define HTTP_QUERY_SET_COOKIE 43
1043#define HTTP_QUERY_COOKIE 44
1044#define HTTP_QUERY_REQUEST_METHOD 45
1045#define HTTP_QUERY_REFRESH 46
1046#define HTTP_QUERY_CONTENT_DISPOSITION 47
1047
1048#define HTTP_QUERY_AGE 48
1049#define HTTP_QUERY_CACHE_CONTROL 49
1050#define HTTP_QUERY_CONTENT_BASE 50
1051#define HTTP_QUERY_CONTENT_LOCATION 51
1052#define HTTP_QUERY_CONTENT_MD5 52
1053#define HTTP_QUERY_CONTENT_RANGE 53
1054#define HTTP_QUERY_ETAG 54
1055#define HTTP_QUERY_HOST 55
1056#define HTTP_QUERY_IF_MATCH 56
1057#define HTTP_QUERY_IF_NONE_MATCH 57
1058#define HTTP_QUERY_IF_RANGE 58
1059#define HTTP_QUERY_IF_UNMODIFIED_SINCE 59
1060#define HTTP_QUERY_MAX_FORWARDS 60
1061#define HTTP_QUERY_PROXY_AUTHORIZATION 61
1062#define HTTP_QUERY_RANGE 62
1063#define HTTP_QUERY_TRANSFER_ENCODING 63
1064#define HTTP_QUERY_UPGRADE 64
1065#define HTTP_QUERY_VARY 65
1066#define HTTP_QUERY_VIA 66
1067#define HTTP_QUERY_WARNING 67
1068#define HTTP_QUERY_EXPECT 68
1069#define HTTP_QUERY_PROXY_CONNECTION 69
1070#define HTTP_QUERY_UNLESS_MODIFIED_SINCE 70
1071
1072#define HTTP_QUERY_ECHO_REQUEST 71
1073#define HTTP_QUERY_ECHO_REPLY 72
1074
1075#define HTTP_QUERY_ECHO_HEADERS 73
1076#define HTTP_QUERY_ECHO_HEADERS_CRLF 74
1077
1078#define HTTP_QUERY_PROXY_SUPPORT 75
1079#define HTTP_QUERY_AUTHENTICATION_INFO 76
1080#define HTTP_QUERY_PASSPORT_URLS 77
1081#define HTTP_QUERY_PASSPORT_CONFIG 78
1082
1083#define HTTP_QUERY_X_CONTENT_TYPE_OPTIONS 79
1084#define HTTP_QUERY_P3P 80
1085#define HTTP_QUERY_X_P2P_PEERDIST 81
1086#define HTTP_QUERY_TRANSLATE 82
1087#define HTTP_QUERY_X_UA_COMPATIBLE 83
1088#define HTTP_QUERY_DEFAULT_STYLE 84
1089#define HTTP_QUERY_X_FRAME_OPTIONS 85
1090#define HTTP_QUERY_X_XSS_PROTECTION 86
1091
1092#define HTTP_QUERY_SET_COOKIE2 87
1093
1094#define HTTP_QUERY_DO_NOT_TRACK 88
1095
1096#define HTTP_QUERY_KEEP_ALIVE 89
1097
1098#define HTTP_QUERY_HTTP2_SETTINGS 90
1099
1100#define HTTP_QUERY_STRICT_TRANSPORT_SECURITY 91
1101
1102#define HTTP_QUERY_TOKEN_BINDING 92
1103
1104#define HTTP_QUERY_INCLUDE_REFERRED_TOKEN_BINDING_ID 93
1105#define HTTP_QUERY_INCLUDE_REFERER_TOKEN_BINDING_ID HTTP_QUERY_INCLUDE_REFERRED_TOKEN_BINDING_ID
1106
1107#define HTTP_QUERY_PUBLIC_KEY_PINS 94
1108#define HTTP_QUERY_PUBLIC_KEY_PINS_REPORT_ONLY 95
1109
1110#define HTTP_QUERY_MAX 78
1111#define HTTP_QUERY_CUSTOM 65535
1112
1113#define HTTP_QUERY_FLAG_REQUEST_HEADERS 0x80000000
1114#define HTTP_QUERY_FLAG_SYSTEMTIME 0x40000000
1115#define HTTP_QUERY_FLAG_NUMBER 0x20000000
1116#define HTTP_QUERY_FLAG_COALESCE 0x10000000
1117#define HTTP_QUERY_FLAG_NUMBER64 0x08000000
1118#define HTTP_QUERY_FLAG_COALESCE_WITH_COMMA 0x04000000
1119#define HTTP_QUERY_MODIFIER_FLAGS_MASK (HTTP_QUERY_FLAG_REQUEST_HEADERS | HTTP_QUERY_FLAG_SYSTEMTIME | HTTP_QUERY_FLAG_NUMBER | HTTP_QUERY_FLAG_COALESCE | HTTP_QUERY_FLAG_NUMBER64 | HTTP_QUERY_FLAG_COALESCE_WITH_COMMA)
1120#define HTTP_QUERY_HEADER_MASK (~HTTP_QUERY_MODIFIER_FLAGS_MASK)
1121
1122#define HTTP_STATUS_CONTINUE 100
1123#define HTTP_STATUS_SWITCH_PROTOCOLS 101
1124
1125#define HTTP_STATUS_OK 200
1126#define HTTP_STATUS_CREATED 201
1127#define HTTP_STATUS_ACCEPTED 202
1128#define HTTP_STATUS_PARTIAL 203
1129#define HTTP_STATUS_NO_CONTENT 204
1130#define HTTP_STATUS_RESET_CONTENT 205
1131#define HTTP_STATUS_PARTIAL_CONTENT 206
1132
1133#define HTTP_STATUS_AMBIGUOUS 300
1134#define HTTP_STATUS_MOVED 301
1135#define HTTP_STATUS_REDIRECT 302
1136#define HTTP_STATUS_REDIRECT_METHOD 303
1137#define HTTP_STATUS_NOT_MODIFIED 304
1138#define HTTP_STATUS_USE_PROXY 305
1139#define HTTP_STATUS_REDIRECT_KEEP_VERB 307
1140#define HTTP_STATUS_PERMANENT_REDIRECT 308
1141
1142#define HTTP_STATUS_BAD_REQUEST 400
1143#define HTTP_STATUS_DENIED 401
1144#define HTTP_STATUS_PAYMENT_REQ 402
1145#define HTTP_STATUS_FORBIDDEN 403
1146#define HTTP_STATUS_NOT_FOUND 404
1147#define HTTP_STATUS_BAD_METHOD 405
1148#define HTTP_STATUS_NONE_ACCEPTABLE 406
1149#define HTTP_STATUS_PROXY_AUTH_REQ 407
1150#define HTTP_STATUS_REQUEST_TIMEOUT 408
1151#define HTTP_STATUS_CONFLICT 409
1152#define HTTP_STATUS_GONE 410
1153#define HTTP_STATUS_LENGTH_REQUIRED 411
1154#define HTTP_STATUS_PRECOND_FAILED 412
1155#define HTTP_STATUS_REQUEST_TOO_LARGE 413
1156#define HTTP_STATUS_URI_TOO_LONG 414
1157#define HTTP_STATUS_UNSUPPORTED_MEDIA 415
1158#define HTTP_STATUS_MISDIRECTED_REQUEST 421
1159#define HTTP_STATUS_RETRY_WITH 449
1160
1161#define HTTP_STATUS_SERVER_ERROR 500
1162#define HTTP_STATUS_NOT_SUPPORTED 501
1163#define HTTP_STATUS_BAD_GATEWAY 502
1164#define HTTP_STATUS_SERVICE_UNAVAIL 503
1165#define HTTP_STATUS_GATEWAY_TIMEOUT 504
1166#define HTTP_STATUS_VERSION_NOT_SUP 505
1167
1168#define HTTP_STATUS_FIRST HTTP_STATUS_CONTINUE
1169#define HTTP_STATUS_LAST HTTP_STATUS_VERSION_NOT_SUP
1170
1171#define HttpOpenRequest __MINGW_NAME_AW(HttpOpenRequest)
1172#define HttpAddRequestHeaders __MINGW_NAME_AW(HttpAddRequestHeaders)
1173
1174 INTERNETAPI_(HINTERNET) HttpOpenRequestA(HINTERNET hConnect,LPCSTR lpszVerb,LPCSTR lpszObjectName,LPCSTR lpszVersion,LPCSTR lpszReferrer,LPCSTR *lplpszAcceptTypes,DWORD dwFlags,DWORD_PTR dwContext);
1175 INTERNETAPI_(HINTERNET) HttpOpenRequestW(HINTERNET hConnect,LPCWSTR lpszVerb,LPCWSTR lpszObjectName,LPCWSTR lpszVersion,LPCWSTR lpszReferrer,LPCWSTR *lplpszAcceptTypes,DWORD dwFlags,DWORD_PTR dwContext);
1176 BOOLAPI HttpAddRequestHeadersA(HINTERNET hRequest,LPCSTR lpszHeaders,DWORD dwHeadersLength,DWORD dwModifiers);
1177 BOOLAPI HttpAddRequestHeadersW(HINTERNET hRequest,LPCWSTR lpszHeaders,DWORD dwHeadersLength,DWORD dwModifiers);
1178
1179#define HTTP_ADDREQ_INDEX_MASK 0x0000FFFF
1180#define HTTP_ADDREQ_FLAGS_MASK 0xFFFF0000
1181
1182#define HTTP_ADDREQ_FLAG_ADD_IF_NEW 0x10000000
1183#define HTTP_ADDREQ_FLAG_ADD 0x20000000
1184#define HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA 0x40000000
1185#define HTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON 0x01000000
1186#define HTTP_ADDREQ_FLAG_COALESCE HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA
1187#define HTTP_ADDREQ_FLAG_REPLACE 0x80000000
1188
1189#define HttpSendRequest __MINGW_NAME_AW(HttpSendRequest)
1190#define HttpSendRequestEx __MINGW_NAME_AW(HttpSendRequestEx)
1191
1192 BOOLAPI HttpSendRequestA(HINTERNET hRequest,LPCSTR lpszHeaders,DWORD dwHeadersLength,LPVOID lpOptional,DWORD dwOptionalLength);
1193 BOOLAPI HttpSendRequestW(HINTERNET hRequest,LPCWSTR lpszHeaders,DWORD dwHeadersLength,LPVOID lpOptional,DWORD dwOptionalLength);
1194 INTERNETAPI_(WINBOOL) HttpSendRequestExA(HINTERNET hRequest,LPINTERNET_BUFFERSA lpBuffersIn,LPINTERNET_BUFFERSA lpBuffersOut,DWORD dwFlags,DWORD_PTR dwContext);
1195 INTERNETAPI_(WINBOOL) HttpSendRequestExW(HINTERNET hRequest,LPINTERNET_BUFFERSW lpBuffersIn,LPINTERNET_BUFFERSW lpBuffersOut,DWORD dwFlags,DWORD_PTR dwContext);
1196
1197#define HSR_ASYNC WININET_API_FLAG_ASYNC
1198#define HSR_SYNC WININET_API_FLAG_SYNC
1199#define HSR_USE_CONTEXT WININET_API_FLAG_USE_CONTEXT
1200#define HSR_INITIATE 0x00000008
1201#define HSR_DOWNLOAD 0x00000010
1202#define HSR_CHUNKED 0x00000020
1203
1204#define HttpEndRequest __MINGW_NAME_AW(HttpEndRequest)
1205#define HttpQueryInfo __MINGW_NAME_AW(HttpQueryInfo)
1206
1207 INTERNETAPI_(WINBOOL) HttpEndRequestA(HINTERNET hRequest,LPINTERNET_BUFFERSA lpBuffersOut,DWORD dwFlags,DWORD_PTR dwContext);
1208 INTERNETAPI_(WINBOOL) HttpEndRequestW(HINTERNET hRequest,LPINTERNET_BUFFERSW lpBuffersOut,DWORD dwFlags,DWORD_PTR dwContext);
1209 BOOLAPI HttpQueryInfoA(HINTERNET hRequest,DWORD dwInfoLevel,LPVOID lpBuffer,LPDWORD lpdwBufferLength,LPDWORD lpdwIndex);
1210 BOOLAPI HttpQueryInfoW(HINTERNET hRequest,DWORD dwInfoLevel,LPVOID lpBuffer,LPDWORD lpdwBufferLength,LPDWORD lpdwIndex);
1211
1212 typedef struct {
1213 PWSTR pwszName;
1214 PWSTR pwszValue;
1215 PWSTR pwszDomain;
1216 PWSTR pwszPath;
1217 DWORD dwFlags;
1218 FILETIME ftExpires;
1219 WINBOOL fExpiresSet;
1220 } INTERNET_COOKIE2;
1221
1222#define INTERNET_COOKIE_IS_SECURE 0x01
1223#define INTERNET_COOKIE_IS_SESSION 0x02
1224
1225#define INTERNET_COOKIE_THIRD_PARTY 0x10
1226#define INTERNET_COOKIE_PROMPT_REQUIRED 0x20
1227#define INTERNET_COOKIE_EVALUATE_P3P 0x40
1228#define INTERNET_COOKIE_APPLY_P3P 0x80
1229
1230#define INTERNET_COOKIE_P3P_ENABLED 0x100
1231#define INTERNET_COOKIE_IS_RESTRICTED 0x200
1232#define INTERNET_COOKIE_IE6 0x400
1233#define INTERNET_COOKIE_IS_LEGACY 0x800
1234
1235#define INTERNET_COOKIE_NON_SCRIPT 0x00001000
1236#define INTERNET_COOKIE_HTTPONLY 0x00002000
1237#define INTERNET_COOKIE_HOST_ONLY 0x00004000
1238#define INTERNET_COOKIE_APPLY_HOST_ONLY 0x00008000
1239
1240#define INTERNET_COOKIE_HOST_ONLY_APPLIED 0x00080000
1241#define INTERNET_COOKIE_SAME_SITE_STRICT 0x00100000
1242#define INTERNET_COOKIE_SAME_SITE_LAX 0x00200000
1243#define INTERNET_COOKIE_SAME_SITE_LEVEL_CROSS_SITE 0x00400000
1244
1245#define InternetSetCookie __MINGW_NAME_AW(InternetSetCookie)
1246#define InternetGetCookie __MINGW_NAME_AW(InternetGetCookie)
1247#define InternetSetCookieEx __MINGW_NAME_AW(InternetSetCookieEx)
1248#define InternetGetCookieEx __MINGW_NAME_AW(InternetGetCookieEx)
1249#define InternetCheckConnection __MINGW_NAME_AW(InternetCheckConnection)
1250
1251 BOOLAPI InternetSetCookieA(LPCSTR lpszUrl,LPCSTR lpszCookieName,LPCSTR lpszCookieData);
1252 BOOLAPI InternetSetCookieW(LPCWSTR lpszUrl,LPCWSTR lpszCookieName,LPCWSTR lpszCookieData);
1253 BOOLAPI InternetGetCookieA(LPCSTR lpszUrl,LPCSTR lpszCookieName,LPSTR lpszCookieData,LPDWORD lpdwSize);
1254 BOOLAPI InternetGetCookieW(LPCWSTR lpszUrl,LPCWSTR lpszCookieName,LPWSTR lpszCookieData,LPDWORD lpdwSize);
1255 INTERNETAPI_(DWORD) InternetSetCookieExA(LPCSTR lpszUrl,LPCSTR lpszCookieName,LPCSTR lpszCookieData,DWORD dwFlags,DWORD_PTR dwReserved);
1256 INTERNETAPI_(DWORD) InternetSetCookieExW(LPCWSTR lpszUrl,LPCWSTR lpszCookieName,LPCWSTR lpszCookieData,DWORD dwFlags,DWORD_PTR dwReserved);
1257 BOOLAPI InternetGetCookieExA(LPCSTR lpszUrl,LPCSTR lpszCookieName,LPSTR lpszCookieData,LPDWORD lpdwSize,DWORD dwFlags,LPVOID lpReserved);
1258 BOOLAPI InternetGetCookieExW(LPCWSTR lpszUrl,LPCWSTR lpszCookieName,LPWSTR lpszCookieData,LPDWORD lpdwSize,DWORD dwFlags,LPVOID lpReserved);
1259 INTERNETAPI_(DWORD) InternetAttemptConnect(DWORD dwReserved);
1260 BOOLAPI InternetCheckConnectionA(LPCSTR lpszUrl,DWORD dwFlags,DWORD dwReserved);
1261 BOOLAPI InternetCheckConnectionW(LPCWSTR lpszUrl,DWORD dwFlags,DWORD dwReserved);
1262
1263#define FLAG_ICC_FORCE_CONNECTION 0x00000001
1264
1265#define FLAGS_ERROR_UI_FILTER_FOR_ERRORS 0x01
1266#define FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS 0x02
1267#define FLAGS_ERROR_UI_FLAGS_GENERATE_DATA 0x04
1268#define FLAGS_ERROR_UI_FLAGS_NO_UI 0x08
1269#define FLAGS_ERROR_UI_SERIALIZE_DIALOGS 0x10
1270
1271 DWORD InternetAuthNotifyCallback(DWORD_PTR dwContext,DWORD dwReturn,LPVOID lpReserved);
1272 typedef DWORD (CALLBACK *PFN_AUTH_NOTIFY) (DWORD_PTR,DWORD,LPVOID);
1273
1274 typedef struct {
1275 DWORD cbStruct;
1276 DWORD dwOptions;
1277 PFN_AUTH_NOTIFY pfnNotify;
1278 DWORD_PTR dwContext;
1279 } INTERNET_AUTH_NOTIFY_DATA;
1280
1281#if defined(UNICODE)
1282#define InternetConfirmZoneCrossing InternetConfirmZoneCrossingW
1283#else
1284 INTERNETAPI_(DWORD) InternetConfirmZoneCrossing(HWND hWnd,LPSTR szUrlPrev,LPSTR szUrlNew,WINBOOL bPost);
1285#endif
1286
1287 INTERNETAPI_(WINBOOL) ResumeSuspendedDownload(HINTERNET hRequest,DWORD dwResultCode);
1288 INTERNETAPI_(DWORD) InternetErrorDlg(HWND hWnd,HINTERNET hRequest,DWORD dwError,DWORD dwFlags,LPVOID *lppvData);
1289 INTERNETAPI_(DWORD) InternetConfirmZoneCrossingA(HWND hWnd,LPSTR szUrlPrev,LPSTR szUrlNew,WINBOOL bPost);
1290 INTERNETAPI_(DWORD) InternetConfirmZoneCrossingW(HWND hWnd,LPWSTR szUrlPrev,LPWSTR szUrlNew,WINBOOL bPost);
1291
1292#define INTERNET_ERROR_BASE 12000
1293
1294#define ERROR_INTERNET_OUT_OF_HANDLES (INTERNET_ERROR_BASE + 1)
1295#define ERROR_INTERNET_TIMEOUT (INTERNET_ERROR_BASE + 2)
1296#define ERROR_INTERNET_EXTENDED_ERROR (INTERNET_ERROR_BASE + 3)
1297#define ERROR_INTERNET_INTERNAL_ERROR (INTERNET_ERROR_BASE + 4)
1298#define ERROR_INTERNET_INVALID_URL (INTERNET_ERROR_BASE + 5)
1299#define ERROR_INTERNET_UNRECOGNIZED_SCHEME (INTERNET_ERROR_BASE + 6)
1300#define ERROR_INTERNET_NAME_NOT_RESOLVED (INTERNET_ERROR_BASE + 7)
1301#define ERROR_INTERNET_PROTOCOL_NOT_FOUND (INTERNET_ERROR_BASE + 8)
1302#define ERROR_INTERNET_INVALID_OPTION (INTERNET_ERROR_BASE + 9)
1303#define ERROR_INTERNET_BAD_OPTION_LENGTH (INTERNET_ERROR_BASE + 10)
1304#define ERROR_INTERNET_OPTION_NOT_SETTABLE (INTERNET_ERROR_BASE + 11)
1305#define ERROR_INTERNET_SHUTDOWN (INTERNET_ERROR_BASE + 12)
1306#define ERROR_INTERNET_INCORRECT_USER_NAME (INTERNET_ERROR_BASE + 13)
1307#define ERROR_INTERNET_INCORRECT_PASSWORD (INTERNET_ERROR_BASE + 14)
1308#define ERROR_INTERNET_LOGIN_FAILURE (INTERNET_ERROR_BASE + 15)
1309#define ERROR_INTERNET_INVALID_OPERATION (INTERNET_ERROR_BASE + 16)
1310#define ERROR_INTERNET_OPERATION_CANCELLED (INTERNET_ERROR_BASE + 17)
1311#define ERROR_INTERNET_INCORRECT_HANDLE_TYPE (INTERNET_ERROR_BASE + 18)
1312#define ERROR_INTERNET_INCORRECT_HANDLE_STATE (INTERNET_ERROR_BASE + 19)
1313#define ERROR_INTERNET_NOT_PROXY_REQUEST (INTERNET_ERROR_BASE + 20)
1314#define ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND (INTERNET_ERROR_BASE + 21)
1315#define ERROR_INTERNET_BAD_REGISTRY_PARAMETER (INTERNET_ERROR_BASE + 22)
1316#define ERROR_INTERNET_NO_DIRECT_ACCESS (INTERNET_ERROR_BASE + 23)
1317#define ERROR_INTERNET_NO_CONTEXT (INTERNET_ERROR_BASE + 24)
1318#define ERROR_INTERNET_NO_CALLBACK (INTERNET_ERROR_BASE + 25)
1319#define ERROR_INTERNET_REQUEST_PENDING (INTERNET_ERROR_BASE + 26)
1320#define ERROR_INTERNET_INCORRECT_FORMAT (INTERNET_ERROR_BASE + 27)
1321#define ERROR_INTERNET_ITEM_NOT_FOUND (INTERNET_ERROR_BASE + 28)
1322#define ERROR_INTERNET_CANNOT_CONNECT (INTERNET_ERROR_BASE + 29)
1323#define ERROR_INTERNET_CONNECTION_ABORTED (INTERNET_ERROR_BASE + 30)
1324#define ERROR_INTERNET_CONNECTION_RESET (INTERNET_ERROR_BASE + 31)
1325#define ERROR_INTERNET_FORCE_RETRY (INTERNET_ERROR_BASE + 32)
1326#define ERROR_INTERNET_INVALID_PROXY_REQUEST (INTERNET_ERROR_BASE + 33)
1327#define ERROR_INTERNET_NEED_UI (INTERNET_ERROR_BASE + 34)
1328#define ERROR_INTERNET_HANDLE_EXISTS (INTERNET_ERROR_BASE + 36)
1329#define ERROR_INTERNET_SEC_CERT_DATE_INVALID (INTERNET_ERROR_BASE + 37)
1330#define ERROR_INTERNET_SEC_CERT_CN_INVALID (INTERNET_ERROR_BASE + 38)
1331#define ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR (INTERNET_ERROR_BASE + 39)
1332#define ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR (INTERNET_ERROR_BASE + 40)
1333#define ERROR_INTERNET_MIXED_SECURITY (INTERNET_ERROR_BASE + 41)
1334#define ERROR_INTERNET_CHG_POST_IS_NON_SECURE (INTERNET_ERROR_BASE + 42)
1335#define ERROR_INTERNET_POST_IS_NON_SECURE (INTERNET_ERROR_BASE + 43)
1336#define ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED (INTERNET_ERROR_BASE + 44)
1337#define ERROR_INTERNET_INVALID_CA (INTERNET_ERROR_BASE + 45)
1338#define ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP (INTERNET_ERROR_BASE + 46)
1339#define ERROR_INTERNET_ASYNC_THREAD_FAILED (INTERNET_ERROR_BASE + 47)
1340#define ERROR_INTERNET_REDIRECT_SCHEME_CHANGE (INTERNET_ERROR_BASE + 48)
1341#define ERROR_INTERNET_DIALOG_PENDING (INTERNET_ERROR_BASE + 49)
1342#define ERROR_INTERNET_RETRY_DIALOG (INTERNET_ERROR_BASE + 50)
1343#define ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR (INTERNET_ERROR_BASE + 52)
1344#define ERROR_INTERNET_INSERT_CDROM (INTERNET_ERROR_BASE + 53)
1345#define ERROR_INTERNET_FORTEZZA_LOGIN_NEEDED (INTERNET_ERROR_BASE + 54)
1346#define ERROR_INTERNET_SEC_CERT_ERRORS (INTERNET_ERROR_BASE + 55)
1347#define ERROR_INTERNET_SEC_CERT_NO_REV (INTERNET_ERROR_BASE + 56)
1348#define ERROR_INTERNET_SEC_CERT_REV_FAILED (INTERNET_ERROR_BASE + 57)
1349#define ERROR_FTP_TRANSFER_IN_PROGRESS (INTERNET_ERROR_BASE + 110)
1350#define ERROR_FTP_DROPPED (INTERNET_ERROR_BASE + 111)
1351#define ERROR_FTP_NO_PASSIVE_MODE (INTERNET_ERROR_BASE + 112)
1352#define ERROR_GOPHER_PROTOCOL_ERROR (INTERNET_ERROR_BASE + 130)
1353#define ERROR_GOPHER_NOT_FILE (INTERNET_ERROR_BASE + 131)
1354#define ERROR_GOPHER_DATA_ERROR (INTERNET_ERROR_BASE + 132)
1355#define ERROR_GOPHER_END_OF_DATA (INTERNET_ERROR_BASE + 133)
1356#define ERROR_GOPHER_INVALID_LOCATOR (INTERNET_ERROR_BASE + 134)
1357#define ERROR_GOPHER_INCORRECT_LOCATOR_TYPE (INTERNET_ERROR_BASE + 135)
1358#define ERROR_GOPHER_NOT_GOPHER_PLUS (INTERNET_ERROR_BASE + 136)
1359#define ERROR_GOPHER_ATTRIBUTE_NOT_FOUND (INTERNET_ERROR_BASE + 137)
1360#define ERROR_GOPHER_UNKNOWN_LOCATOR (INTERNET_ERROR_BASE + 138)
1361#define ERROR_HTTP_HEADER_NOT_FOUND (INTERNET_ERROR_BASE + 150)
1362#define ERROR_HTTP_DOWNLEVEL_SERVER (INTERNET_ERROR_BASE + 151)
1363#define ERROR_HTTP_INVALID_SERVER_RESPONSE (INTERNET_ERROR_BASE + 152)
1364#define ERROR_HTTP_INVALID_HEADER (INTERNET_ERROR_BASE + 153)
1365#define ERROR_HTTP_INVALID_QUERY_REQUEST (INTERNET_ERROR_BASE + 154)
1366#define ERROR_HTTP_HEADER_ALREADY_EXISTS (INTERNET_ERROR_BASE + 155)
1367#define ERROR_HTTP_REDIRECT_FAILED (INTERNET_ERROR_BASE + 156)
1368#define ERROR_HTTP_NOT_REDIRECTED (INTERNET_ERROR_BASE + 160)
1369#define ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION (INTERNET_ERROR_BASE + 161)
1370#define ERROR_HTTP_COOKIE_DECLINED (INTERNET_ERROR_BASE + 162)
1371#define ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION (INTERNET_ERROR_BASE + 168)
1372#define ERROR_INTERNET_SECURITY_CHANNEL_ERROR (INTERNET_ERROR_BASE + 157)
1373#define ERROR_INTERNET_UNABLE_TO_CACHE_FILE (INTERNET_ERROR_BASE + 158)
1374#define ERROR_INTERNET_TCPIP_NOT_INSTALLED (INTERNET_ERROR_BASE + 159)
1375#define ERROR_INTERNET_DISCONNECTED (INTERNET_ERROR_BASE + 163)
1376#define ERROR_INTERNET_SERVER_UNREACHABLE (INTERNET_ERROR_BASE + 164)
1377#define ERROR_INTERNET_PROXY_SERVER_UNREACHABLE (INTERNET_ERROR_BASE + 165)
1378#define ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT (INTERNET_ERROR_BASE + 166)
1379#define ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT (INTERNET_ERROR_BASE + 167)
1380#define ERROR_INTERNET_SEC_INVALID_CERT (INTERNET_ERROR_BASE + 169)
1381#define ERROR_INTERNET_SEC_CERT_REVOKED (INTERNET_ERROR_BASE + 170)
1382#define ERROR_INTERNET_FAILED_DUETOSECURITYCHECK (INTERNET_ERROR_BASE + 171)
1383#define ERROR_INTERNET_NOT_INITIALIZED (INTERNET_ERROR_BASE + 172)
1384#define ERROR_INTERNET_NEED_MSN_SSPI_PKG (INTERNET_ERROR_BASE + 173)
1385#define ERROR_INTERNET_LOGIN_FAILURE_DISPLAY_ENTITY_BODY (INTERNET_ERROR_BASE + 174)
1386
1387#define INTERNET_ERROR_LAST ERROR_INTERNET_LOGIN_FAILURE_DISPLAY_ENTITY_BODY
1388
1389#define NORMAL_CACHE_ENTRY 0x00000001
1390#define STICKY_CACHE_ENTRY 0x00000004
1391#define EDITED_CACHE_ENTRY 0x00000008
1392#define TRACK_OFFLINE_CACHE_ENTRY 0x00000010
1393#define TRACK_ONLINE_CACHE_ENTRY 0x00000020
1394#define SPARSE_CACHE_ENTRY 0x00010000
1395#define COOKIE_CACHE_ENTRY 0x00100000
1396#define URLHISTORY_CACHE_ENTRY 0x00200000
1397
1398#define URLCACHE_FIND_DEFAULT_FILTER NORMAL_CACHE_ENTRY | COOKIE_CACHE_ENTRY | URLHISTORY_CACHE_ENTRY | TRACK_OFFLINE_CACHE_ENTRY | TRACK_ONLINE_CACHE_ENTRY | STICKY_CACHE_ENTRY
1399
1400 typedef struct _INTERNET_CACHE_ENTRY_INFOA {
1401 DWORD dwStructSize;
1402 LPSTR lpszSourceUrlName;
1403 LPSTR lpszLocalFileName;
1404 DWORD CacheEntryType;
1405 DWORD dwUseCount;
1406 DWORD dwHitRate;
1407 DWORD dwSizeLow;
1408 DWORD dwSizeHigh;
1409 FILETIME LastModifiedTime;
1410 FILETIME ExpireTime;
1411 FILETIME LastAccessTime;
1412 FILETIME LastSyncTime;
1413 LPSTR lpHeaderInfo;
1414 DWORD dwHeaderInfoSize;
1415 LPSTR lpszFileExtension;
1416 __C89_NAMELESS union {
1417 DWORD dwReserved;
1418 DWORD dwExemptDelta;
1419 };
1420 } INTERNET_CACHE_ENTRY_INFOA,*LPINTERNET_CACHE_ENTRY_INFOA;
1421
1422 typedef struct _INTERNET_CACHE_ENTRY_INFOW {
1423 DWORD dwStructSize;
1424 LPWSTR lpszSourceUrlName;
1425 LPWSTR lpszLocalFileName;
1426 DWORD CacheEntryType;
1427 DWORD dwUseCount;
1428 DWORD dwHitRate;
1429 DWORD dwSizeLow;
1430 DWORD dwSizeHigh;
1431 FILETIME LastModifiedTime;
1432 FILETIME ExpireTime;
1433 FILETIME LastAccessTime;
1434 FILETIME LastSyncTime;
1435 LPWSTR lpHeaderInfo;
1436 DWORD dwHeaderInfoSize;
1437 LPWSTR lpszFileExtension;
1438 __C89_NAMELESS union {
1439 DWORD dwReserved;
1440 DWORD dwExemptDelta;
1441 };
1442 } INTERNET_CACHE_ENTRY_INFOW,*LPINTERNET_CACHE_ENTRY_INFOW;
1443
1444 __MINGW_TYPEDEF_AW(INTERNET_CACHE_ENTRY_INFO)
1445 __MINGW_TYPEDEF_AW(LPINTERNET_CACHE_ENTRY_INFO)
1446
1447 typedef struct _INTERNET_CACHE_TIMESTAMPS {
1448 FILETIME ftExpires;
1449 FILETIME ftLastModified;
1450 } INTERNET_CACHE_TIMESTAMPS,*LPINTERNET_CACHE_TIMESTAMPS;
1451
1452 typedef LONGLONG GROUPID;
1453
1454#define CACHEGROUP_ATTRIBUTE_GET_ALL 0xffffffff
1455#define CACHEGROUP_ATTRIBUTE_BASIC 0x00000001
1456#define CACHEGROUP_ATTRIBUTE_FLAG 0x00000002
1457#define CACHEGROUP_ATTRIBUTE_TYPE 0x00000004
1458#define CACHEGROUP_ATTRIBUTE_QUOTA 0x00000008
1459#define CACHEGROUP_ATTRIBUTE_GROUPNAME 0x00000010
1460#define CACHEGROUP_ATTRIBUTE_STORAGE 0x00000020
1461
1462#define CACHEGROUP_FLAG_NONPURGEABLE 0x00000001
1463#define CACHEGROUP_FLAG_GIDONLY 0x00000004
1464
1465#define CACHEGROUP_FLAG_FLUSHURL_ONDELETE 0x00000002
1466
1467#define CACHEGROUP_SEARCH_ALL 0x00000000
1468#define CACHEGROUP_SEARCH_BYURL 0x00000001
1469
1470#define CACHEGROUP_TYPE_INVALID 0x00000001
1471
1472#define CACHEGROUP_READWRITE_MASK CACHEGROUP_ATTRIBUTE_TYPE | CACHEGROUP_ATTRIBUTE_QUOTA | CACHEGROUP_ATTRIBUTE_GROUPNAME | CACHEGROUP_ATTRIBUTE_STORAGE
1473
1474#define GROUPNAME_MAX_LENGTH 120
1475#define GROUP_OWNER_STORAGE_SIZE 4
1476 typedef struct _INTERNET_CACHE_GROUP_INFOA {
1477 DWORD dwGroupSize;
1478 DWORD dwGroupFlags;
1479 DWORD dwGroupType;
1480 DWORD dwDiskUsage;
1481 DWORD dwDiskQuota;
1482 DWORD dwOwnerStorage[GROUP_OWNER_STORAGE_SIZE];
1483 CHAR szGroupName[GROUPNAME_MAX_LENGTH];
1484 } INTERNET_CACHE_GROUP_INFOA,*LPINTERNET_CACHE_GROUP_INFOA;
1485
1486 typedef struct _INTERNET_CACHE_GROUP_INFOW {
1487 DWORD dwGroupSize;
1488 DWORD dwGroupFlags;
1489 DWORD dwGroupType;
1490 DWORD dwDiskUsage;
1491 DWORD dwDiskQuota;
1492 DWORD dwOwnerStorage[GROUP_OWNER_STORAGE_SIZE];
1493 WCHAR szGroupName[GROUPNAME_MAX_LENGTH];
1494 } INTERNET_CACHE_GROUP_INFOW,*LPINTERNET_CACHE_GROUP_INFOW;
1495
1496 __MINGW_TYPEDEF_AW(INTERNET_CACHE_GROUP_INFO)
1497 __MINGW_TYPEDEF_AW(LPINTERNET_CACHE_GROUP_INFO)
1498
1499#define CreateUrlCacheEntry __MINGW_NAME_AW(CreateUrlCacheEntry)
1500#define CommitUrlCacheEntry __MINGW_NAME_AW(CommitUrlCacheEntry)
1501#define RetrieveUrlCacheEntryFile __MINGW_NAME_AW(RetrieveUrlCacheEntryFile)
1502#define UnlockUrlCacheEntryFile __MINGW_NAME_AW(UnlockUrlCacheEntryFile)
1503#define RetrieveUrlCacheEntryStream __MINGW_NAME_AW(RetrieveUrlCacheEntryStream)
1504#define GetUrlCacheEntryInfo __MINGW_NAME_AW(GetUrlCacheEntryInfo)
1505#define GetUrlCacheGroupAttribute __MINGW_NAME_AW(GetUrlCacheGroupAttribute)
1506#define SetUrlCacheGroupAttribute __MINGW_NAME_AW(SetUrlCacheGroupAttribute)
1507#define GetUrlCacheEntryInfoEx __MINGW_NAME_AW(GetUrlCacheEntryInfoEx)
1508
1509 BOOLAPI CreateUrlCacheEntryA(LPCSTR lpszUrlName,DWORD dwExpectedFileSize,LPCSTR lpszFileExtension,LPSTR lpszFileName,DWORD dwReserved);
1510 BOOLAPI CreateUrlCacheEntryW(LPCWSTR lpszUrlName,DWORD dwExpectedFileSize,LPCWSTR lpszFileExtension,LPWSTR lpszFileName,DWORD dwReserved);
1511#ifndef USE_FIXED_COMMIT_URL_CACHE_ENTRY
1512 BOOLAPI CommitUrlCacheEntryA(LPCSTR lpszUrlName,LPCSTR lpszLocalFileName,FILETIME ExpireTime,FILETIME LastModifiedTime,DWORD CacheEntryType,LPBYTE lpHeaderInfo,DWORD dwHeaderSize,LPCSTR lpszFileExtension,LPCSTR lpszOriginalUrl);
1513 BOOLAPI CommitUrlCacheEntryW(LPCWSTR lpszUrlName,LPCWSTR lpszLocalFileName,FILETIME ExpireTime,FILETIME LastModifiedTime,DWORD CacheEntryType,LPWSTR lpszHeaderInfo,DWORD dwHeaders,LPCWSTR lpszFileExtension,LPCWSTR lpszOriginalUrl);
1514#else
1515 CommitUrlCacheEntryA(LPCSTR lpszUrlName,LPCSTR lpszLocalFileName,FILETIME ExpireTime,FILETIME LastModifiedTime,DWORD CacheEntryType,LPCSTR lpHeaderInfo,DWORD dwHeaderSize,LPCSTR lpszFileExtension,LPCSTR lpszOriginalUrl);
1516 CommitUrlCacheEntryW(LPCWSTR lpszUrlName,LPCWSTR lpszLocalFileName,FILETIME ExpireTime,FILETIME LastModifiedTime,DWORD CacheEntryType,LPCWSTR lpHeaderInfo,DWORD dwHeaderSize,LPCWSTR lpszFileExtension,LPCWSTR lpszOriginalUrl);
1517#endif
1518 BOOLAPI RetrieveUrlCacheEntryFileA(LPCSTR lpszUrlName,LPINTERNET_CACHE_ENTRY_INFOA lpCacheEntryInfo,LPDWORD lpcbCacheEntryInfo,DWORD dwReserved);
1519 BOOLAPI RetrieveUrlCacheEntryFileW(LPCWSTR lpszUrlName,LPINTERNET_CACHE_ENTRY_INFOW lpCacheEntryInfo,LPDWORD lpcbCacheEntryInfo,DWORD dwReserved);
1520 BOOLAPI UnlockUrlCacheEntryFileA(LPCSTR lpszUrlName,DWORD dwReserved);
1521 BOOLAPI UnlockUrlCacheEntryFileW(LPCWSTR lpszUrlName,DWORD dwReserved);
1522 INTERNETAPI_(HANDLE) RetrieveUrlCacheEntryStreamA(LPCSTR lpszUrlName,LPINTERNET_CACHE_ENTRY_INFOA lpCacheEntryInfo,LPDWORD lpcbCacheEntryInfo,WINBOOL fRandomRead,DWORD dwReserved);
1523 INTERNETAPI_(HANDLE) RetrieveUrlCacheEntryStreamW(LPCWSTR lpszUrlName,LPINTERNET_CACHE_ENTRY_INFOW lpCacheEntryInfo,LPDWORD lpcbCacheEntryInfo,WINBOOL fRandomRead,DWORD dwReserved);
1524 BOOLAPI ReadUrlCacheEntryStream(HANDLE hUrlCacheStream,DWORD dwLocation,LPVOID lpBuffer,LPDWORD lpdwLen,DWORD Reserved);
1525 BOOLAPI UnlockUrlCacheEntryStream(HANDLE hUrlCacheStream,DWORD Reserved);
1526 URLCACHEAPI_(WINBOOL) GetUrlCacheEntryInfoA(LPCSTR lpszUrlName,LPINTERNET_CACHE_ENTRY_INFOA lpCacheEntryInfo,LPDWORD lpcbCacheEntryInfo);
1527 URLCACHEAPI_(WINBOOL) GetUrlCacheEntryInfoW(LPCWSTR lpszUrlName,LPINTERNET_CACHE_ENTRY_INFOW lpCacheEntryInfo,LPDWORD lpcbCacheEntryInfo);
1528 URLCACHEAPI_(HANDLE) FindFirstUrlCacheGroup(DWORD dwFlags,DWORD dwFilter,LPVOID lpSearchCondition,DWORD dwSearchCondition,GROUPID *lpGroupId,LPVOID lpReserved);
1529 URLCACHEAPI_(WINBOOL) FindNextUrlCacheGroup(HANDLE hFind,GROUPID *lpGroupId,LPVOID lpReserved);
1530 URLCACHEAPI_(WINBOOL) GetUrlCacheGroupAttributeA(GROUPID gid,DWORD dwFlags,DWORD dwAttributes,LPINTERNET_CACHE_GROUP_INFOA lpGroupInfo,LPDWORD lpdwGroupInfo,LPVOID lpReserved);
1531 URLCACHEAPI_(WINBOOL) GetUrlCacheGroupAttributeW(GROUPID gid,DWORD dwFlags,DWORD dwAttributes,LPINTERNET_CACHE_GROUP_INFOW lpGroupInfo,LPDWORD lpdwGroupInfo,LPVOID lpReserved);
1532 URLCACHEAPI_(WINBOOL) SetUrlCacheGroupAttributeA(GROUPID gid,DWORD dwFlags,DWORD dwAttributes,LPINTERNET_CACHE_GROUP_INFOA lpGroupInfo,LPVOID lpReserved);
1533 URLCACHEAPI_(WINBOOL) SetUrlCacheGroupAttributeW(GROUPID gid,DWORD dwFlags,DWORD dwAttributes,LPINTERNET_CACHE_GROUP_INFOW lpGroupInfo,LPVOID lpReserved);
1534 INTERNETAPI_(GROUPID) CreateUrlCacheGroup(DWORD dwFlags,LPVOID lpReserved);
1535 BOOLAPI DeleteUrlCacheGroup(GROUPID GroupId,DWORD dwFlags,LPVOID lpReserved);
1536 BOOLAPI GetUrlCacheEntryInfoExA(LPCSTR lpszUrl,LPINTERNET_CACHE_ENTRY_INFOA lpCacheEntryInfo,LPDWORD lpcbCacheEntryInfo,LPSTR lpszRedirectUrl,LPDWORD lpcbRedirectUrl,LPVOID lpReserved,DWORD dwFlags);
1537 BOOLAPI GetUrlCacheEntryInfoExW(LPCWSTR lpszUrl,LPINTERNET_CACHE_ENTRY_INFOW lpCacheEntryInfo,LPDWORD lpcbCacheEntryInfo,LPWSTR lpszRedirectUrl,LPDWORD lpcbRedirectUrl,LPVOID lpReserved,DWORD dwFlags);
1538
1539#define CACHE_ENTRY_ATTRIBUTE_FC 0x00000004
1540#define CACHE_ENTRY_HITRATE_FC 0x00000010
1541#define CACHE_ENTRY_MODTIME_FC 0x00000040
1542#define CACHE_ENTRY_EXPTIME_FC 0x00000080
1543#define CACHE_ENTRY_ACCTIME_FC 0x00000100
1544#define CACHE_ENTRY_SYNCTIME_FC 0x00000200
1545#define CACHE_ENTRY_HEADERINFO_FC 0x00000400
1546#define CACHE_ENTRY_EXEMPT_DELTA_FC 0x00000800
1547
1548#define SetUrlCacheEntryInfo __MINGW_NAME_AW(SetUrlCacheEntryInfo)
1549#define FindFirstUrlCacheEntryEx __MINGW_NAME_AW(FindFirstUrlCacheEntryEx)
1550#define FindNextUrlCacheEntryEx __MINGW_NAME_AW(FindNextUrlCacheEntryEx)
1551#define FindFirstUrlCacheEntry __MINGW_NAME_AW(FindFirstUrlCacheEntry)
1552#define FindNextUrlCacheEntry __MINGW_NAME_AW(FindNextUrlCacheEntry)
1553
1554#if defined(UNICODE)
1555#define InternetDial InternetDialW
1556#define InternetGoOnline InternetGoOnlineW
1557#define DeleteUrlCacheEntry DeleteUrlCacheEntryW
1558#define SetUrlCacheEntryGroup SetUrlCacheEntryGroupW
1559#else
1560 BOOLAPI SetUrlCacheEntryGroup(LPCSTR lpszUrlName,DWORD dwFlags,GROUPID GroupId,LPBYTE pbGroupAttributes,DWORD cbGroupAttributes,LPVOID lpReserved);
1561 BOOLAPI DeleteUrlCacheEntry(LPCSTR lpszUrlName);
1562 INTERNETAPI_(DWORD) InternetDial(HWND hwndParent,LPSTR lpszConnectoid,DWORD dwFlags,LPDWORD lpdwConnection,DWORD dwReserved);
1563 INTERNETAPI_(WINBOOL) InternetGoOnline(LPSTR lpszURL,HWND hwndParent,DWORD dwFlags);
1564#endif
1565
1566 BOOLAPI SetUrlCacheEntryInfoA(LPCSTR lpszUrlName,LPINTERNET_CACHE_ENTRY_INFOA lpCacheEntryInfo,DWORD dwFieldControl);
1567 BOOLAPI SetUrlCacheEntryInfoW(LPCWSTR lpszUrlName,LPINTERNET_CACHE_ENTRY_INFOW lpCacheEntryInfo,DWORD dwFieldControl);
1568 INTERNETAPI_(GROUPID) CreateUrlCacheGroup(DWORD dwFlags,LPVOID lpReserved);
1569 BOOLAPI DeleteUrlCacheGroup(GROUPID GroupId,DWORD dwFlags,LPVOID lpReserved);
1570
1571#define INTERNET_CACHE_GROUP_ADD 0
1572#define INTERNET_CACHE_GROUP_REMOVE 1
1573
1574 BOOLAPI SetUrlCacheEntryGroupA(LPCSTR lpszUrlName,DWORD dwFlags,GROUPID GroupId,LPBYTE pbGroupAttributes,DWORD cbGroupAttributes,LPVOID lpReserved);
1575 BOOLAPI SetUrlCacheEntryGroupW(LPCWSTR lpszUrlName,DWORD dwFlags,GROUPID GroupId,LPBYTE pbGroupAttributes,DWORD cbGroupAttributes,LPVOID lpReserved);
1576 INTERNETAPI_(HANDLE) FindFirstUrlCacheEntryExA(LPCSTR lpszUrlSearchPattern,DWORD dwFlags,DWORD dwFilter,GROUPID GroupId,LPINTERNET_CACHE_ENTRY_INFOA lpFirstCacheEntryInfo,LPDWORD lpcbEntryInfo,LPVOID lpGroupAttributes,LPDWORD lpcbGroupAttributes,LPVOID lpReserved);
1577 INTERNETAPI_(HANDLE) FindFirstUrlCacheEntryExW(LPCWSTR lpszUrlSearchPattern,DWORD dwFlags,DWORD dwFilter,GROUPID GroupId,LPINTERNET_CACHE_ENTRY_INFOW lpFirstCacheEntryInfo,LPDWORD lpcbEntryInfo,LPVOID lpGroupAttributes,LPDWORD lpcbGroupAttributes,LPVOID lpReserved);
1578 BOOLAPI FindNextUrlCacheEntryExA(HANDLE hEnumHandle,LPINTERNET_CACHE_ENTRY_INFOA lpNextCacheEntryInfo,LPDWORD lpcbEntryInfo,LPVOID lpGroupAttributes,LPDWORD lpcbGroupAttributes,LPVOID lpReserved);
1579 BOOLAPI FindNextUrlCacheEntryExW(HANDLE hEnumHandle,LPINTERNET_CACHE_ENTRY_INFOW lpNextCacheEntryInfo,LPDWORD lpcbEntryInfo,LPVOID lpGroupAttributes,LPDWORD lpcbGroupAttributes,LPVOID lpReserved);
1580 INTERNETAPI_(HANDLE) FindFirstUrlCacheEntryA(LPCSTR lpszUrlSearchPattern,LPINTERNET_CACHE_ENTRY_INFOA lpFirstCacheEntryInfo,LPDWORD lpcbCacheEntryInfo);
1581 INTERNETAPI_(HANDLE) FindFirstUrlCacheEntryW(LPCWSTR lpszUrlSearchPattern,LPINTERNET_CACHE_ENTRY_INFOW lpFirstCacheEntryInfo,LPDWORD lpcbCacheEntryInfo);
1582 BOOLAPI FindNextUrlCacheEntryA(HANDLE hEnumHandle,LPINTERNET_CACHE_ENTRY_INFOA lpNextCacheEntryInfo,LPDWORD lpcbCacheEntryInfo);
1583 BOOLAPI FindNextUrlCacheEntryW(HANDLE hEnumHandle,LPINTERNET_CACHE_ENTRY_INFOW lpNextCacheEntryInfo,LPDWORD lpcbCacheEntryInfo);
1584 BOOLAPI FindCloseUrlCache(HANDLE hEnumHandle);
1585 BOOLAPI DeleteUrlCacheEntryA(LPCSTR lpszUrlName);
1586 BOOLAPI DeleteUrlCacheEntryW(LPCWSTR lpszUrlName);
1587 INTERNETAPI_(DWORD) InternetDialA(HWND hwndParent,LPSTR lpszConnectoid,DWORD dwFlags,DWORD_PTR *lpdwConnection,DWORD dwReserved);
1588 INTERNETAPI_(DWORD) InternetDialW(HWND hwndParent,LPWSTR lpszConnectoid,DWORD dwFlags,DWORD_PTR *lpdwConnection,DWORD dwReserved);
1589
1590#define INTERNET_DIAL_FORCE_PROMPT 0x2000
1591#define INTERNET_DIAL_SHOW_OFFLINE 0x4000
1592#define INTERNET_DIAL_UNATTENDED 0x8000
1593
1594 INTERNETAPI_(DWORD) InternetHangUp(DWORD_PTR dwConnection,DWORD dwReserved);
1595
1596#define INTERENT_GOONLINE_REFRESH 0x00000001
1597#define INTERENT_GOONLINE_MASK 0x00000001
1598
1599 INTERNETAPI_(WINBOOL) InternetGoOnlineA(LPSTR lpszURL,HWND hwndParent,DWORD dwFlags);
1600 INTERNETAPI_(WINBOOL) InternetGoOnlineW(LPWSTR lpszURL,HWND hwndParent,DWORD dwFlags);
1601
1602 INTERNETAPI_(WINBOOL) InternetAutodial(DWORD dwFlags,HWND hwndParent);
1603
1604#define INTERNET_AUTODIAL_FORCE_ONLINE 1
1605#define INTERNET_AUTODIAL_FORCE_UNATTENDED 2
1606#define INTERNET_AUTODIAL_FAILIFSECURITYCHECK 4
1607#define INTERNET_AUTODIAL_OVERRIDE_NET_PRESENT 8
1608
1609#define INTERNET_AUTODIAL_FLAGS_MASK (INTERNET_AUTODIAL_FORCE_ONLINE | INTERNET_AUTODIAL_FORCE_UNATTENDED | INTERNET_AUTODIAL_FAILIFSECURITYCHECK | INTERNET_AUTODIAL_OVERRIDE_NET_PRESENT)
1610
1611 INTERNETAPI_(WINBOOL) InternetAutodialHangup(DWORD dwReserved);
1612 INTERNETAPI_(WINBOOL) InternetGetConnectedState(LPDWORD lpdwFlags,DWORD dwReserved);
1613 INTERNETAPI_(WINBOOL) InternetGetConnectedStateExA(LPDWORD lpdwFlags,LPSTR lpszConnectionName,DWORD dwBufLen,DWORD dwReserved);
1614 INTERNETAPI_(WINBOOL) InternetGetConnectedStateExW(LPDWORD lpdwFlags,LPWSTR lpszConnectionName,DWORD dwBufLen,DWORD dwReserved);
1615
1616#define PROXY_AUTO_DETECT_TYPE_DHCP 1
1617#define PROXY_AUTO_DETECT_TYPE_DNS_A 2
1618
1619 struct AutoProxyHelperFunctions;
1620
1621 typedef struct AutoProxyHelperVtbl {
1622 WINBOOL (WINAPI *IsResolvable)(LPSTR lpszHost);
1623 DWORD (WINAPI *GetIPAddress)(LPSTR lpszIPAddress,LPDWORD lpdwIPAddressSize);
1624 DWORD (WINAPI *ResolveHostName)(LPSTR lpszHostName,LPSTR lpszIPAddress,LPDWORD lpdwIPAddressSize);
1625 WINBOOL (WINAPI *IsInNet)(LPSTR lpszIPAddress,LPSTR lpszDest,LPSTR lpszMask);
1626 } AutoProxyHelperVtbl;
1627
1628 typedef struct {
1629 DWORD dwStructSize;
1630 LPSTR lpszScriptBuffer;
1631 DWORD dwScriptBufferSize;
1632 } AUTO_PROXY_SCRIPT_BUFFER,*LPAUTO_PROXY_SCRIPT_BUFFER;
1633
1634 typedef struct AutoProxyHelperFunctions {
1635 const struct AutoProxyHelperVtbl *lpVtbl;
1636 } AutoProxyHelperFunctions;
1637
1638 typedef WINBOOL (CALLBACK *pfnInternetInitializeAutoProxyDll)(DWORD dwVersion,LPSTR lpszDownloadedTempFile,LPSTR lpszMime,AutoProxyHelperFunctions *lpAutoProxyCallbacks,LPAUTO_PROXY_SCRIPT_BUFFER lpAutoProxyScriptBuffer);
1639 typedef WINBOOL (CALLBACK *pfnInternetDeInitializeAutoProxyDll)(LPSTR lpszMime,DWORD dwReserved);
1640 typedef WINBOOL (CALLBACK *pfnInternetGetProxyInfo)(LPCSTR lpszUrl,DWORD dwUrlLength,LPSTR lpszUrlHostName,DWORD dwUrlHostNameLength,LPSTR *lplpszProxyHostName,LPDWORD lpdwProxyHostNameLength);
1641
1642#if defined(UNICODE)
1643#define InternetGetConnectedStateEx InternetGetConnectedStateExW
1644#else
1645 INTERNETAPI_(WINBOOL) InternetGetConnectedStateEx(LPDWORD lpdwFlags,LPSTR lpszConnectionName,DWORD dwNameLen,DWORD dwReserved);
1646#endif
1647
1648 INTERNETAPI_(WINBOOL) InternetInitializeAutoProxyDll(DWORD dwReserved);
1649 INTERNETAPI_(WINBOOL) InternetDeInitializeAutoProxyDll(LPSTR lpszMime,DWORD dwReserved);
1650 INTERNETAPI_(WINBOOL) InternetGetProxyInfo(LPCSTR lpszUrl,DWORD dwUrlLength,LPSTR lpszUrlHostName,DWORD dwUrlHostNameLength,LPSTR *lplpszProxyHostName,LPDWORD lpdwProxyHostNameLength);
1651 INTERNETAPI_(WINBOOL) DetectAutoProxyUrl(LPSTR lpszAutoProxyUrl,DWORD dwAutoProxyUrlLength,DWORD dwDetectFlags);
1652 INTERNETAPI_(WINBOOL) CreateMD5SSOHash(PWSTR pszChallengeInfo,PWSTR pwszRealm,PWSTR pwszTarget,PBYTE pbHexHash);
1653
1654#define INTERNET_CONNECTION_MODEM 0x01
1655#define INTERNET_CONNECTION_LAN 0x02
1656#define INTERNET_CONNECTION_PROXY 0x04
1657#define INTERNET_CONNECTION_MODEM_BUSY 0x08
1658#define INTERNET_RAS_INSTALLED 0x10
1659#define INTERNET_CONNECTION_OFFLINE 0x20
1660#define INTERNET_CONNECTION_CONFIGURED 0x40
1661
1662 typedef DWORD (CALLBACK *PFN_DIAL_HANDLER) (HWND,LPCSTR,DWORD,LPDWORD);
1663
1664#define INTERNET_CUSTOMDIAL_CONNECT 0
1665#define INTERNET_CUSTOMDIAL_UNATTENDED 1
1666#define INTERNET_CUSTOMDIAL_DISCONNECT 2
1667#define INTERNET_CUSTOMDIAL_SHOWOFFLINE 4
1668
1669#define INTERNET_CUSTOMDIAL_SAFE_FOR_UNATTENDED 1
1670#define INTERNET_CUSTOMDIAL_WILL_SUPPLY_STATE 2
1671#define INTERNET_CUSTOMDIAL_CAN_HANGUP 4
1672
1673#define InternetSetPerSiteCookieDecision __MINGW_NAME_AW(InternetSetPerSiteCookieDecision)
1674#define InternetGetPerSiteCookieDecision __MINGW_NAME_AW(InternetGetPerSiteCookieDecision)
1675#define InternetEnumPerSiteCookieDecision __MINGW_NAME_AW(InternetEnumPerSiteCookieDecision)
1676
1677#if defined(UNICODE)
1678#define InternetSetDialState InternetSetDialStateW
1679#else
1680 INTERNETAPI_(WINBOOL) InternetSetDialState(LPCSTR lpszConnectoid,DWORD dwState,DWORD dwReserved);
1681#endif
1682
1683 INTERNETAPI_(WINBOOL) InternetSetDialStateA(LPCSTR lpszConnectoid,DWORD dwState,DWORD dwReserved);
1684 INTERNETAPI_(WINBOOL) InternetSetDialStateW(LPCWSTR lpszConnectoid,DWORD dwState,DWORD dwReserved);
1685
1686#define INTERNET_DIALSTATE_DISCONNECTED 1
1687
1688 INTERNETAPI_(WINBOOL) InternetSetPerSiteCookieDecisionA(LPCSTR pchHostName,DWORD dwDecision);
1689 INTERNETAPI_(WINBOOL) InternetSetPerSiteCookieDecisionW(LPCWSTR pchHostName,DWORD dwDecision);
1690 INTERNETAPI_(WINBOOL) InternetGetPerSiteCookieDecisionA(LPCSTR pchHostName,unsigned __LONG32 *pResult);
1691 INTERNETAPI_(WINBOOL) InternetGetPerSiteCookieDecisionW(LPCWSTR pchHostName,unsigned __LONG32 *pResult);
1692 INTERNETAPI_(WINBOOL) InternetClearAllPerSiteCookieDecisions();
1693 INTERNETAPI_(WINBOOL) InternetEnumPerSiteCookieDecisionA(LPSTR pszSiteName,unsigned __LONG32 *pcSiteNameSize,unsigned __LONG32 *pdwDecision,unsigned __LONG32 dwIndex);
1694 INTERNETAPI_(WINBOOL) InternetEnumPerSiteCookieDecisionW(LPWSTR pszSiteName,unsigned __LONG32 *pcSiteNameSize,unsigned __LONG32 *pdwDecision,unsigned __LONG32 dwIndex);
1695
1696#define INTERNET_IDENTITY_FLAG_PRIVATE_CACHE 0x01
1697#define INTERNET_IDENTITY_FLAG_SHARED_CACHE 0x02
1698#define INTERNET_IDENTITY_FLAG_CLEAR_DATA 0x04
1699#define INTERNET_IDENTITY_FLAG_CLEAR_COOKIES 0x08
1700#define INTERNET_IDENTITY_FLAG_CLEAR_HISTORY 0x10
1701#define INTERNET_IDENTITY_FLAG_CLEAR_CONTENT 0x20
1702
1703#define INTERNET_SUPPRESS_RESET_ALL 0x00
1704#define INTERNET_SUPPRESS_COOKIE_POLICY 0x01
1705#define INTERNET_SUPPRESS_COOKIE_POLICY_RESET 0x02
1706
1707#define PRIVACY_TEMPLATE_NO_COOKIES 0
1708#define PRIVACY_TEMPLATE_HIGH 1
1709#define PRIVACY_TEMPLATE_MEDIUM_HIGH 2
1710#define PRIVACY_TEMPLATE_MEDIUM 3
1711#define PRIVACY_TEMPLATE_MEDIUM_LOW 4
1712#define PRIVACY_TEMPLATE_LOW 5
1713#define PRIVACY_TEMPLATE_CUSTOM 100
1714#define PRIVACY_TEMPLATE_ADVANCED 101
1715
1716#define PRIVACY_TEMPLATE_MAX PRIVACY_TEMPLATE_LOW
1717
1718#define PRIVACY_TYPE_FIRST_PARTY 0
1719#define PRIVACY_TYPE_THIRD_PARTY 1
1720
1721 INTERNETAPI_(DWORD) PrivacySetZonePreferenceW(DWORD dwZone,DWORD dwType,DWORD dwTemplate,LPCWSTR pszPreference);
1722 INTERNETAPI_(DWORD) PrivacyGetZonePreferenceW(DWORD dwZone,DWORD dwType,LPDWORD pdwTemplate,LPWSTR pszBuffer,LPDWORD pdwBufferLength);
1723
1724#if defined(__cplusplus)
1725}
1726#endif
1727
1728#include <poppack.h>
1729#endif
Note: See TracBrowser for help on using the repository browser.