include: Add MSVC ARM version of NtCurrentTeb.
[wine.git] / include / winhttp.h
blob930c5891f5edc0e4a05499997652a88bf84dcfbf
1 /*
2 * Copyright (C) 2007 Francois Gouget
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.
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.
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
19 #ifndef __WINE_WINHTTP_H
20 #define __WINE_WINHTTP_H
22 #ifdef _WIN64
23 #include <pshpack8.h>
24 #else
25 #include <pshpack4.h>
26 #endif
28 #define WINHTTPAPI
29 #define BOOLAPI WINHTTPAPI BOOL WINAPI
32 typedef LPVOID HINTERNET;
33 typedef HINTERNET *LPHINTERNET;
35 #define INTERNET_DEFAULT_PORT 0
36 #define INTERNET_DEFAULT_HTTP_PORT 80
37 #define INTERNET_DEFAULT_HTTPS_PORT 443
38 typedef WORD INTERNET_PORT;
39 typedef INTERNET_PORT *LPINTERNET_PORT;
41 /* Yes, these values contradict wininet.h */
42 #define INTERNET_SCHEME_HTTP 1
43 #define INTERNET_SCHEME_HTTPS 2
44 #define INTERNET_SCHEME_FTP 3
45 #define INTERNET_SCHEME_SOCKS 4
46 typedef int INTERNET_SCHEME, *LPINTERNET_SCHEME;
48 #define ICU_ESCAPE 0x80000000
49 #define ICU_ESCAPE_AUTHORITY 0x00002000
50 #define ICU_REJECT_USERPWD 0x00004000
52 /* flags for WinHttpOpen */
53 #define WINHTTP_FLAG_ASYNC 0x10000000
55 /* flags for WinHttpOpenRequest */
56 #define WINHTTP_FLAG_ESCAPE_PERCENT 0x00000004
57 #define WINHTTP_FLAG_NULL_CODEPAGE 0x00000008
58 #define WINHTTP_FLAG_ESCAPE_DISABLE 0x00000040
59 #define WINHTTP_FLAG_ESCAPE_DISABLE_QUERY 0x00000080
60 #define WINHTTP_FLAG_BYPASS_PROXY_CACHE 0x00000100
61 #define WINHTTP_FLAG_REFRESH WINHTTP_FLAG_BYPASS_PROXY_CACHE
62 #define WINHTTP_FLAG_SECURE 0x00800000
64 #define WINHTTP_ACCESS_TYPE_DEFAULT_PROXY 0
65 #define WINHTTP_ACCESS_TYPE_NO_PROXY 1
66 #define WINHTTP_ACCESS_TYPE_NAMED_PROXY 3
67 #define WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY 4
69 #define WINHTTP_NO_PROXY_NAME NULL
70 #define WINHTTP_NO_PROXY_BYPASS NULL
72 #define WINHTTP_NO_CLIENT_CERT_CONTEXT NULL
74 #define WINHTTP_NO_REFERER NULL
75 #define WINHTTP_DEFAULT_ACCEPT_TYPES NULL
77 #define WINHTTP_NO_ADDITIONAL_HEADERS NULL
78 #define WINHTTP_NO_REQUEST_DATA NULL
80 #define WINHTTP_HEADER_NAME_BY_INDEX NULL
81 #define WINHTTP_NO_OUTPUT_BUFFER NULL
82 #define WINHTTP_NO_HEADER_INDEX NULL
84 #define WINHTTP_ADDREQ_INDEX_MASK 0x0000FFFF
85 #define WINHTTP_ADDREQ_FLAGS_MASK 0xFFFF0000
86 #define WINHTTP_ADDREQ_FLAG_ADD_IF_NEW 0x10000000
87 #define WINHTTP_ADDREQ_FLAG_ADD 0x20000000
88 #define WINHTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA 0x40000000
89 #define WINHTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON 0x01000000
90 #define WINHTTP_ADDREQ_FLAG_COALESCE WINHTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA
91 #define WINHTTP_ADDREQ_FLAG_REPLACE 0x80000000
93 #define WINHTTP_IGNORE_REQUEST_TOTAL_LENGTH 0
95 /* flags for WinHttp{Set/Query}Options */
96 #define WINHTTP_FIRST_OPTION WINHTTP_OPTION_CALLBACK
97 #define WINHTTP_OPTION_CALLBACK 1
98 #define WINHTTP_OPTION_RESOLVE_TIMEOUT 2
99 #define WINHTTP_OPTION_CONNECT_TIMEOUT 3
100 #define WINHTTP_OPTION_CONNECT_RETRIES 4
101 #define WINHTTP_OPTION_SEND_TIMEOUT 5
102 #define WINHTTP_OPTION_RECEIVE_TIMEOUT 6
103 #define WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT 7
104 #define WINHTTP_OPTION_HANDLE_TYPE 9
105 #define WINHTTP_OPTION_READ_BUFFER_SIZE 12
106 #define WINHTTP_OPTION_WRITE_BUFFER_SIZE 13
107 #define WINHTTP_OPTION_PARENT_HANDLE 21
108 #define WINHTTP_OPTION_EXTENDED_ERROR 24
109 #define WINHTTP_OPTION_SECURITY_FLAGS 31
110 #define WINHTTP_OPTION_SECURITY_CERTIFICATE_STRUCT 32
111 #define WINHTTP_OPTION_URL 34
112 #define WINHTTP_OPTION_SECURITY_KEY_BITNESS 36
113 #define WINHTTP_OPTION_PROXY 38
114 #define WINHTTP_OPTION_PROXY_RESULT_ENTRY 39
115 #define WINHTTP_OPTION_USER_AGENT 41
116 #define WINHTTP_OPTION_CONTEXT_VALUE 45
117 #define WINHTTP_OPTION_CLIENT_CERT_CONTEXT 47
118 #define WINHTTP_OPTION_REQUEST_PRIORITY 58
119 #define WINHTTP_OPTION_HTTP_VERSION 59
120 #define WINHTTP_OPTION_DISABLE_FEATURE 63
121 #define WINHTTP_OPTION_CODEPAGE 68
122 #define WINHTTP_OPTION_MAX_CONNS_PER_SERVER 73
123 #define WINHTTP_OPTION_MAX_CONNS_PER_1_0_SERVER 74
124 #define WINHTTP_OPTION_AUTOLOGON_POLICY 77
125 #define WINHTTP_OPTION_SERVER_CERT_CONTEXT 78
126 #define WINHTTP_OPTION_ENABLE_FEATURE 79
127 #define WINHTTP_OPTION_WORKER_THREAD_COUNT 80
128 #define WINHTTP_OPTION_PASSPORT_COBRANDING_TEXT 81
129 #define WINHTTP_OPTION_PASSPORT_COBRANDING_URL 82
130 #define WINHTTP_OPTION_CONFIGURE_PASSPORT_AUTH 83
131 #define WINHTTP_OPTION_SECURE_PROTOCOLS 84
132 #define WINHTTP_OPTION_ENABLETRACING 85
133 #define WINHTTP_OPTION_PASSPORT_SIGN_OUT 86
134 #define WINHTTP_OPTION_PASSPORT_RETURN_URL 87
135 #define WINHTTP_OPTION_REDIRECT_POLICY 88
136 #define WINHTTP_OPTION_MAX_HTTP_AUTOMATIC_REDIRECTS 89
137 #define WINHTTP_OPTION_MAX_HTTP_STATUS_CONTINUE 90
138 #define WINHTTP_OPTION_MAX_RESPONSE_HEADER_SIZE 91
139 #define WINHTTP_OPTION_MAX_RESPONSE_DRAIN_SIZE 92
140 #define WINHTTP_OPTION_CONNECTION_INFO 93
141 #define WINHTTP_OPTION_CLIENT_CERT_ISSUER_LIST 94
142 #define WINHTTP_OPTION_SPN 96
143 #define WINHTTP_OPTION_GLOBAL_PROXY_CREDS 97
144 #define WINHTTP_OPTION_GLOBAL_SERVER_CREDS 98
145 #define WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT 99
146 #define WINHTTP_OPTION_REJECT_USERPWD_IN_URL 100
147 #define WINHTTP_OPTION_USE_GLOBAL_SERVER_CREDENTIALS 101
148 #define WINHTTP_OPTION_RECEIVE_PROXY_CONNECT_RESPONSE 103
149 #define WINHTTP_OPTION_IS_PROXY_CONNECT_RESPONSE 104
150 #define WINHTTP_OPTION_SERVER_SPN_USED 106
151 #define WINHTTP_OPTION_PROXY_SPN_USED 107
152 #define WINHTTP_OPTION_SERVER_CBT 108
153 #define WINHTTP_OPTION_UNSAFE_HEADER_PARSING 110
154 #define WINHTTP_OPTION_ASSURED_NON_BLOCKING_CALLBACKS 111
155 #define WINHTTP_OPTION_UPGRADE_TO_WEB_SOCKET 114
156 #define WINHTTP_OPTION_WEB_SOCKET_CLOSE_TIMEOUT 115
157 #define WINHTTP_OPTION_WEB_SOCKET_KEEPALIVE_INTERVAL 116
158 #define WINHTTP_OPTION_DECOMPRESSION 118
159 #define WINHTTP_OPTION_WEB_SOCKET_RECEIVE_BUFFER_SIZE 122
160 #define WINHTTP_OPTION_WEB_SOCKET_SEND_BUFFER_SIZE 123
161 #define WINHTTP_OPTION_TCP_PRIORITY_HINT 128
162 #define WINHTTP_OPTION_CONNECTION_FILTER 131
163 #define WINHTTP_OPTION_ENABLE_HTTP_PROTOCOL 133
164 #define WINHTTP_OPTION_HTTP_PROTOCOL_USED 134
165 #define WINHTTP_OPTION_KDC_PROXY_SETTINGS 136
166 #define WINHTTP_OPTION_ENCODE_EXTRA 138
167 #define WINHTTP_OPTION_DISABLE_STREAM_QUEUE 139
168 #define WINHTTP_OPTION_IPV6_FAST_FALLBACK 140
169 #define WINHTTP_OPTION_CONNECTION_STATS_V0 141
170 #define WINHTTP_OPTION_REQUEST_TIMES 142
171 #define WINHTTP_OPTION_EXPIRE_CONNECTION 143
172 #define WINHTTP_OPTION_DISABLE_SECURE_PROTOCOL_FALLBACK 144
173 #define WINHTTP_OPTION_HTTP_PROTOCOL_REQUIRED 145
174 #define WINHTTP_OPTION_REQUEST_STATS 146
175 #define WINHTTP_OPTION_SERVER_CERT_CHAIN_CONTEXT 147
176 #define WINHTTP_LAST_OPTION WINHTTP_OPTION_SERVER_CERT_CHAIN_CONTEXT
177 #define WINHTTP_OPTION_USERNAME 0x1000
178 #define WINHTTP_OPTION_PASSWORD 0x1001
179 #define WINHTTP_OPTION_PROXY_USERNAME 0x1002
180 #define WINHTTP_OPTION_PROXY_PASSWORD 0x1003
182 #define WINHTTP_CONNS_PER_SERVER_UNLIMITED 0xFFFFFFFF
184 #define WINHTTP_DECOMPRESSION_FLAG_GZIP 0x00000001
185 #define WINHTTP_DECOMPRESSION_FLAG_DEFLATE 0x00000002
187 #define WINHTTP_DECOMPRESSION_FLAG_ALL ( WINHTTP_DECOMPRESSION_FLAG_GZIP | WINHTTP_DECOMPRESSION_FLAG_DEFLATE )
189 #define WINHTTP_PROTOCOL_FLAG_HTTP2 0x1
190 #define WINHTTP_PROTOCOL_MASK WINHTTP_PROTOCOL_FLAG_HTTP2
192 #define WINHTTP_AUTOLOGON_SECURITY_LEVEL_MEDIUM 0
193 #define WINHTTP_AUTOLOGON_SECURITY_LEVEL_LOW 1
194 #define WINHTTP_AUTOLOGON_SECURITY_LEVEL_HIGH 2
195 #define WINHTTP_AUTOLOGON_SECURITY_LEVEL_DEFAULT WINHTTP_AUTOLOGON_SECURITY_LEVEL_MEDIUM
197 #define WINHTTP_OPTION_REDIRECT_POLICY_NEVER 0
198 #define WINHTTP_OPTION_REDIRECT_POLICY_DISALLOW_HTTPS_TO_HTTP 1
199 #define WINHTTP_OPTION_REDIRECT_POLICY_ALWAYS 2
200 #define WINHTTP_OPTION_REDIRECT_POLICY_LAST WINHTTP_OPTION_REDIRECT_POLICY_ALWAYS
201 #define WINHTTP_OPTION_REDIRECT_POLICY_DEFAULT WINHTTP_OPTION_REDIRECT_POLICY_DISALLOW_HTTPS_TO_HTTP
203 #define WINHTTP_DISABLE_PASSPORT_AUTH 0x00000000
204 #define WINHTTP_ENABLE_PASSPORT_AUTH 0x10000000
205 #define WINHTTP_DISABLE_PASSPORT_KEYRING 0x20000000
206 #define WINHTTP_ENABLE_PASSPORT_KEYRING 0x40000000
208 #define WINHTTP_DISABLE_COOKIES 0x00000001
209 #define WINHTTP_DISABLE_REDIRECTS 0x00000002
210 #define WINHTTP_DISABLE_AUTHENTICATION 0x00000004
211 #define WINHTTP_DISABLE_KEEP_ALIVE 0x00000008
212 #define WINHTTP_ENABLE_SSL_REVOCATION 0x00000001
213 #define WINHTTP_ENABLE_SSL_REVERT_IMPERSONATION 0x00000002
214 #define WINHTTP_DISABLE_SPN_SERVER_PORT 0x00000000
215 #define WINHTTP_ENABLE_SPN_SERVER_PORT 0x00000001
216 #define WINHTTP_OPTION_SPN_MASK WINHTTP_ENABLE_SPN_SERVER_PORT
218 /* Options for WinHttpOpenRequest */
219 #define WINHTTP_NO_REFERER NULL
220 #define WINHTTP_DEFAULT_ACCEPT_TYPES NULL
222 /* Options for WinHttpSendRequest */
223 #define WINHTTP_NO_ADDITIONAL_HEADERS NULL
224 #define WINHTTP_NO_REQUEST_DATA NULL
226 /* WinHTTP error codes */
227 #define WINHTTP_ERROR_BASE 12000
228 #define ERROR_WINHTTP_OUT_OF_HANDLES (WINHTTP_ERROR_BASE + 1)
229 #define ERROR_WINHTTP_TIMEOUT (WINHTTP_ERROR_BASE + 2)
230 #define ERROR_WINHTTP_INTERNAL_ERROR (WINHTTP_ERROR_BASE + 4)
231 #define ERROR_WINHTTP_INVALID_URL (WINHTTP_ERROR_BASE + 5)
232 #define ERROR_WINHTTP_UNRECOGNIZED_SCHEME (WINHTTP_ERROR_BASE + 6)
233 #define ERROR_WINHTTP_NAME_NOT_RESOLVED (WINHTTP_ERROR_BASE + 7)
234 #define ERROR_WINHTTP_INVALID_OPTION (WINHTTP_ERROR_BASE + 9)
235 #define ERROR_WINHTTP_OPTION_NOT_SETTABLE (WINHTTP_ERROR_BASE + 11)
236 #define ERROR_WINHTTP_SHUTDOWN (WINHTTP_ERROR_BASE + 12)
237 #define ERROR_WINHTTP_LOGIN_FAILURE (WINHTTP_ERROR_BASE + 15)
238 #define ERROR_WINHTTP_OPERATION_CANCELLED (WINHTTP_ERROR_BASE + 17)
239 #define ERROR_WINHTTP_INCORRECT_HANDLE_TYPE (WINHTTP_ERROR_BASE + 18)
240 #define ERROR_WINHTTP_INCORRECT_HANDLE_STATE (WINHTTP_ERROR_BASE + 19)
241 #define ERROR_WINHTTP_CANNOT_CONNECT (WINHTTP_ERROR_BASE + 29)
242 #define ERROR_WINHTTP_CONNECTION_ERROR (WINHTTP_ERROR_BASE + 30)
243 #define ERROR_WINHTTP_RESEND_REQUEST (WINHTTP_ERROR_BASE + 32)
244 #define ERROR_WINHTTP_SECURE_CERT_DATE_INVALID (WINHTTP_ERROR_BASE + 37)
245 #define ERROR_WINHTTP_SECURE_CERT_CN_INVALID (WINHTTP_ERROR_BASE + 38)
246 #define ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED (WINHTTP_ERROR_BASE + 44)
247 #define ERROR_WINHTTP_SECURE_INVALID_CA (WINHTTP_ERROR_BASE + 45)
248 #define ERROR_WINHTTP_SECURE_CERT_REV_FAILED (WINHTTP_ERROR_BASE + 57)
249 #define ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN (WINHTTP_ERROR_BASE + 100)
250 #define ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND (WINHTTP_ERROR_BASE + 101)
251 #define ERROR_WINHTTP_CANNOT_CALL_AFTER_SEND (WINHTTP_ERROR_BASE + 102)
252 #define ERROR_WINHTTP_CANNOT_CALL_AFTER_OPEN (WINHTTP_ERROR_BASE + 103)
253 #define ERROR_WINHTTP_HEADER_NOT_FOUND (WINHTTP_ERROR_BASE + 150)
254 #define ERROR_WINHTTP_INVALID_SERVER_RESPONSE (WINHTTP_ERROR_BASE + 152)
255 #define ERROR_WINHTTP_INVALID_HEADER (WINHTTP_ERROR_BASE + 153)
256 #define ERROR_WINHTTP_INVALID_QUERY_REQUEST (WINHTTP_ERROR_BASE + 154)
257 #define ERROR_WINHTTP_HEADER_ALREADY_EXISTS (WINHTTP_ERROR_BASE + 155)
258 #define ERROR_WINHTTP_REDIRECT_FAILED (WINHTTP_ERROR_BASE + 156)
259 #define ERROR_WINHTTP_SECURE_CHANNEL_ERROR (WINHTTP_ERROR_BASE + 157)
260 #define ERROR_WINHTTP_BAD_AUTO_PROXY_SCRIPT (WINHTTP_ERROR_BASE + 166)
261 #define ERROR_WINHTTP_UNABLE_TO_DOWNLOAD_SCRIPT (WINHTTP_ERROR_BASE + 167)
262 #define ERROR_WINHTTP_SECURE_INVALID_CERT (WINHTTP_ERROR_BASE + 169)
263 #define ERROR_WINHTTP_SECURE_CERT_REVOKED (WINHTTP_ERROR_BASE + 170)
264 #define ERROR_WINHTTP_NOT_INITIALIZED (WINHTTP_ERROR_BASE + 172)
265 #define ERROR_WINHTTP_SECURE_FAILURE (WINHTTP_ERROR_BASE + 175)
266 #define ERROR_WINHTTP_UNHANDLED_SCRIPT_TYPE (WINHTTP_ERROR_BASE + 176)
267 #define ERROR_WINHTTP_SCRIPT_EXECUTION_ERROR (WINHTTP_ERROR_BASE + 177)
268 #define ERROR_WINHTTP_AUTO_PROXY_SERVICE_ERROR (WINHTTP_ERROR_BASE + 178)
269 #define ERROR_WINHTTP_SECURE_CERT_WRONG_USAGE (WINHTTP_ERROR_BASE + 179)
270 #define ERROR_WINHTTP_AUTODETECTION_FAILED (WINHTTP_ERROR_BASE + 180)
271 #define ERROR_WINHTTP_HEADER_COUNT_EXCEEDED (WINHTTP_ERROR_BASE + 181)
272 #define ERROR_WINHTTP_HEADER_SIZE_OVERFLOW (WINHTTP_ERROR_BASE + 182)
273 #define ERROR_WINHTTP_CHUNKED_ENCODING_HEADER_SIZE_OVERFLOW (WINHTTP_ERROR_BASE + 183)
274 #define ERROR_WINHTTP_RESPONSE_DRAIN_OVERFLOW (WINHTTP_ERROR_BASE + 184)
275 #define ERROR_WINHTTP_CLIENT_CERT_NO_PRIVATE_KEY (WINHTTP_ERROR_BASE + 185)
276 #define ERROR_WINHTTP_CLIENT_CERT_NO_ACCESS_PRIVATE_KEY (WINHTTP_ERROR_BASE + 186)
277 #define ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED_PROXY (WINHTTP_ERROR_BASE + 187)
278 #define ERROR_WINHTTP_SECURE_FAILURE_PROXY (WINHTTP_ERROR_BASE + 188)
279 #define ERROR_WINHTTP_RESERVED_189 (WINHTTP_ERROR_BASE + 189)
280 #define ERROR_WINHTTP_HTTP_PROTOCOL_MISMATCH (WINHTTP_ERROR_BASE + 190)
281 #define WINHTTP_ERROR_LAST (WINHTTP_ERROR_BASE + 188)
283 #define WINHTTP_RESET_STATE 0x00000001
284 #define WINHTTP_RESET_SWPAD_CURRENT_NETWORK 0x00000002
285 #define WINHTTP_RESET_SWPAD_ALL 0x00000004
286 #define WINHTTP_RESET_SCRIPT_CACHE 0x00000008
287 #define WINHTTP_RESET_ALL 0x0000FFFF
288 #define WINHTTP_RESET_NOTIFY_NETWORK_CHANGED 0x00010000
289 #define WINHTTP_RESET_OUT_OF_PROC 0x00020000
290 #define WINHTTP_RESET_DISCARD_RESOLVERS 0x00040000
292 /* WinHttp status codes */
293 #define HTTP_STATUS_CONTINUE 100
294 #define HTTP_STATUS_SWITCH_PROTOCOLS 101
295 #define HTTP_STATUS_OK 200
296 #define HTTP_STATUS_CREATED 201
297 #define HTTP_STATUS_ACCEPTED 202
298 #define HTTP_STATUS_PARTIAL 203
299 #define HTTP_STATUS_NO_CONTENT 204
300 #define HTTP_STATUS_RESET_CONTENT 205
301 #define HTTP_STATUS_PARTIAL_CONTENT 206
302 #define HTTP_STATUS_WEBDAV_MULTI_STATUS 207
303 #define HTTP_STATUS_AMBIGUOUS 300
304 #define HTTP_STATUS_MOVED 301
305 #define HTTP_STATUS_REDIRECT 302
306 #define HTTP_STATUS_REDIRECT_METHOD 303
307 #define HTTP_STATUS_NOT_MODIFIED 304
308 #define HTTP_STATUS_USE_PROXY 305
309 #define HTTP_STATUS_REDIRECT_KEEP_VERB 307
310 #define HTTP_STATUS_PERMANENT_REDIRECT 308
311 #define HTTP_STATUS_BAD_REQUEST 400
312 #define HTTP_STATUS_DENIED 401
313 #define HTTP_STATUS_PAYMENT_REQ 402
314 #define HTTP_STATUS_FORBIDDEN 403
315 #define HTTP_STATUS_NOT_FOUND 404
316 #define HTTP_STATUS_BAD_METHOD 405
317 #define HTTP_STATUS_NONE_ACCEPTABLE 406
318 #define HTTP_STATUS_PROXY_AUTH_REQ 407
319 #define HTTP_STATUS_REQUEST_TIMEOUT 408
320 #define HTTP_STATUS_CONFLICT 409
321 #define HTTP_STATUS_GONE 410
322 #define HTTP_STATUS_LENGTH_REQUIRED 411
323 #define HTTP_STATUS_PRECOND_FAILED 412
324 #define HTTP_STATUS_REQUEST_TOO_LARGE 413
325 #define HTTP_STATUS_URI_TOO_LONG 414
326 #define HTTP_STATUS_UNSUPPORTED_MEDIA 415
327 #define HTTP_STATUS_RETRY_WITH 449
328 #define HTTP_STATUS_SERVER_ERROR 500
329 #define HTTP_STATUS_NOT_SUPPORTED 501
330 #define HTTP_STATUS_BAD_GATEWAY 502
331 #define HTTP_STATUS_SERVICE_UNAVAIL 503
332 #define HTTP_STATUS_GATEWAY_TIMEOUT 504
333 #define HTTP_STATUS_VERSION_NOT_SUP 505
334 #define HTTP_STATUS_FIRST HTTP_STATUS_CONTINUE
335 #define HTTP_STATUS_LAST HTTP_STATUS_VERSION_NOT_SUP
337 #define SECURITY_FLAG_IGNORE_UNKNOWN_CA 0x00000100
338 #define SECURITY_FLAG_IGNORE_CERT_DATE_INVALID 0x00002000
339 #define SECURITY_FLAG_IGNORE_CERT_CN_INVALID 0x00001000
340 #define SECURITY_FLAG_IGNORE_CERT_WRONG_USAGE 0x00000200
341 #define SECURITY_FLAG_SECURE 0x00000001
342 #define SECURITY_FLAG_STRENGTH_WEAK 0x10000000
343 #define SECURITY_FLAG_STRENGTH_MEDIUM 0x40000000
344 #define SECURITY_FLAG_STRENGTH_STRONG 0x20000000
346 #define ICU_NO_ENCODE 0x20000000
347 #define ICU_DECODE 0x10000000
348 #define ICU_NO_META 0x08000000
349 #define ICU_ENCODE_SPACES_ONLY 0x04000000
350 #define ICU_BROWSER_MODE 0x02000000
351 #define ICU_ENCODE_PERCENT 0x00001000
353 /* Query flags */
354 #define WINHTTP_QUERY_MIME_VERSION 0
355 #define WINHTTP_QUERY_CONTENT_TYPE 1
356 #define WINHTTP_QUERY_CONTENT_TRANSFER_ENCODING 2
357 #define WINHTTP_QUERY_CONTENT_ID 3
358 #define WINHTTP_QUERY_CONTENT_DESCRIPTION 4
359 #define WINHTTP_QUERY_CONTENT_LENGTH 5
360 #define WINHTTP_QUERY_CONTENT_LANGUAGE 6
361 #define WINHTTP_QUERY_ALLOW 7
362 #define WINHTTP_QUERY_PUBLIC 8
363 #define WINHTTP_QUERY_DATE 9
364 #define WINHTTP_QUERY_EXPIRES 10
365 #define WINHTTP_QUERY_LAST_MODIFIED 11
366 #define WINHTTP_QUERY_MESSAGE_ID 12
367 #define WINHTTP_QUERY_URI 13
368 #define WINHTTP_QUERY_DERIVED_FROM 14
369 #define WINHTTP_QUERY_COST 15
370 #define WINHTTP_QUERY_LINK 16
371 #define WINHTTP_QUERY_PRAGMA 17
372 #define WINHTTP_QUERY_VERSION 18
373 #define WINHTTP_QUERY_STATUS_CODE 19
374 #define WINHTTP_QUERY_STATUS_TEXT 20
375 #define WINHTTP_QUERY_RAW_HEADERS 21
376 #define WINHTTP_QUERY_RAW_HEADERS_CRLF 22
377 #define WINHTTP_QUERY_CONNECTION 23
378 #define WINHTTP_QUERY_ACCEPT 24
379 #define WINHTTP_QUERY_ACCEPT_CHARSET 25
380 #define WINHTTP_QUERY_ACCEPT_ENCODING 26
381 #define WINHTTP_QUERY_ACCEPT_LANGUAGE 27
382 #define WINHTTP_QUERY_AUTHORIZATION 28
383 #define WINHTTP_QUERY_CONTENT_ENCODING 29
384 #define WINHTTP_QUERY_FORWARDED 30
385 #define WINHTTP_QUERY_FROM 31
386 #define WINHTTP_QUERY_IF_MODIFIED_SINCE 32
387 #define WINHTTP_QUERY_LOCATION 33
388 #define WINHTTP_QUERY_ORIG_URI 34
389 #define WINHTTP_QUERY_REFERER 35
390 #define WINHTTP_QUERY_RETRY_AFTER 36
391 #define WINHTTP_QUERY_SERVER 37
392 #define WINHTTP_QUERY_TITLE 38
393 #define WINHTTP_QUERY_USER_AGENT 39
394 #define WINHTTP_QUERY_WWW_AUTHENTICATE 40
395 #define WINHTTP_QUERY_PROXY_AUTHENTICATE 41
396 #define WINHTTP_QUERY_ACCEPT_RANGES 42
397 #define WINHTTP_QUERY_SET_COOKIE 43
398 #define WINHTTP_QUERY_COOKIE 44
399 #define WINHTTP_QUERY_REQUEST_METHOD 45
400 #define WINHTTP_QUERY_REFRESH 46
401 #define WINHTTP_QUERY_CONTENT_DISPOSITION 47
402 #define WINHTTP_QUERY_AGE 48
403 #define WINHTTP_QUERY_CACHE_CONTROL 49
404 #define WINHTTP_QUERY_CONTENT_BASE 50
405 #define WINHTTP_QUERY_CONTENT_LOCATION 51
406 #define WINHTTP_QUERY_CONTENT_MD5 52
407 #define WINHTTP_QUERY_CONTENT_RANGE 53
408 #define WINHTTP_QUERY_ETAG 54
409 #define WINHTTP_QUERY_HOST 55
410 #define WINHTTP_QUERY_IF_MATCH 56
411 #define WINHTTP_QUERY_IF_NONE_MATCH 57
412 #define WINHTTP_QUERY_IF_RANGE 58
413 #define WINHTTP_QUERY_IF_UNMODIFIED_SINCE 59
414 #define WINHTTP_QUERY_MAX_FORWARDS 60
415 #define WINHTTP_QUERY_PROXY_AUTHORIZATION 61
416 #define WINHTTP_QUERY_RANGE 62
417 #define WINHTTP_QUERY_TRANSFER_ENCODING 63
418 #define WINHTTP_QUERY_UPGRADE 64
419 #define WINHTTP_QUERY_VARY 65
420 #define WINHTTP_QUERY_VIA 66
421 #define WINHTTP_QUERY_WARNING 67
422 #define WINHTTP_QUERY_EXPECT 68
423 #define WINHTTP_QUERY_PROXY_CONNECTION 69
424 #define WINHTTP_QUERY_UNLESS_MODIFIED_SINCE 70
425 #define WINHTTP_QUERY_PROXY_SUPPORT 75
426 #define WINHTTP_QUERY_AUTHENTICATION_INFO 76
427 #define WINHTTP_QUERY_PASSPORT_URLS 77
428 #define WINHTTP_QUERY_PASSPORT_CONFIG 78
429 #define WINHTTP_QUERY_MAX 78
430 #define WINHTTP_QUERY_CUSTOM 65535
431 #define WINHTTP_QUERY_FLAG_REQUEST_HEADERS 0x80000000
432 #define WINHTTP_QUERY_FLAG_SYSTEMTIME 0x40000000
433 #define WINHTTP_QUERY_FLAG_NUMBER 0x20000000
434 #define WINHTTP_QUERY_FLAG_NUMBER64 0x08000000
436 /* Callback options */
437 #define WINHTTP_CALLBACK_STATUS_RESOLVING_NAME 0x00000001
438 #define WINHTTP_CALLBACK_STATUS_NAME_RESOLVED 0x00000002
439 #define WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER 0x00000004
440 #define WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER 0x00000008
441 #define WINHTTP_CALLBACK_STATUS_SENDING_REQUEST 0x00000010
442 #define WINHTTP_CALLBACK_STATUS_REQUEST_SENT 0x00000020
443 #define WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE 0x00000040
444 #define WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED 0x00000080
445 #define WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION 0x00000100
446 #define WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED 0x00000200
447 #define WINHTTP_CALLBACK_STATUS_HANDLE_CREATED 0x00000400
448 #define WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING 0x00000800
449 #define WINHTTP_CALLBACK_STATUS_DETECTING_PROXY 0x00001000
450 #define WINHTTP_CALLBACK_STATUS_REDIRECT 0x00004000
451 #define WINHTTP_CALLBACK_STATUS_INTERMEDIATE_RESPONSE 0x00008000
452 #define WINHTTP_CALLBACK_STATUS_SECURE_FAILURE 0x00010000
453 #define WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE 0x00020000
454 #define WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE 0x00040000
455 #define WINHTTP_CALLBACK_STATUS_READ_COMPLETE 0x00080000
456 #define WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE 0x00100000
457 #define WINHTTP_CALLBACK_STATUS_REQUEST_ERROR 0x00200000
458 #define WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE 0x00400000
459 #define WINHTTP_CALLBACK_STATUS_GETPROXYFORURL_COMPLETE 0x01000000
460 #define WINHTTP_CALLBACK_STATUS_CLOSE_COMPLETE 0x02000000
461 #define WINHTTP_CALLBACK_STATUS_SHUTDOWN_COMPLETE 0x04000000
462 #define WINHTTP_CALLBACK_STATUS_SETTINGS_WRITE_COMPLETE 0x10000000
463 #define WINHTTP_CALLBACK_STATUS_SETTINGS_READ_COMPLETE 0x20000000
464 #define WINHTTP_CALLBACK_FLAG_RESOLVE_NAME (WINHTTP_CALLBACK_STATUS_RESOLVING_NAME | WINHTTP_CALLBACK_STATUS_NAME_RESOLVED)
465 #define WINHTTP_CALLBACK_FLAG_CONNECT_TO_SERVER (WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER | WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER)
466 #define WINHTTP_CALLBACK_FLAG_SEND_REQUEST (WINHTTP_CALLBACK_STATUS_SENDING_REQUEST | WINHTTP_CALLBACK_STATUS_REQUEST_SENT)
467 #define WINHTTP_CALLBACK_FLAG_RECEIVE_RESPONSE (WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE | WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED)
468 #define WINHTTP_CALLBACK_FLAG_CLOSE_CONNECTION (WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION | WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED)
469 #define WINHTTP_CALLBACK_FLAG_HANDLES (WINHTTP_CALLBACK_STATUS_HANDLE_CREATED | WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING)
470 #define WINHTTP_CALLBACK_FLAG_DETECTING_PROXY WINHTTP_CALLBACK_STATUS_DETECTING_PROXY
471 #define WINHTTP_CALLBACK_FLAG_REDIRECT WINHTTP_CALLBACK_STATUS_REDIRECT
472 #define WINHTTP_CALLBACK_FLAG_INTERMEDIATE_RESPONSE WINHTTP_CALLBACK_STATUS_INTERMEDIATE_RESPONSE
473 #define WINHTTP_CALLBACK_FLAG_SECURE_FAILURE WINHTTP_CALLBACK_STATUS_SECURE_FAILURE
474 #define WINHTTP_CALLBACK_FLAG_SENDREQUEST_COMPLETE WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE
475 #define WINHTTP_CALLBACK_FLAG_HEADERS_AVAILABLE WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE
476 #define WINHTTP_CALLBACK_FLAG_DATA_AVAILABLE WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE
477 #define WINHTTP_CALLBACK_FLAG_READ_COMPLETE WINHTTP_CALLBACK_STATUS_READ_COMPLETE
478 #define WINHTTP_CALLBACK_FLAG_WRITE_COMPLETE WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE
479 #define WINHTTP_CALLBACK_FLAG_REQUEST_ERROR WINHTTP_CALLBACK_STATUS_REQUEST_ERROR
480 #define WINHTTP_CALLBACK_FLAG_GETPROXYFORURL_COMPLETE WINHTTP_CALLBACK_STATUS_GETPROXYFORURL_COMPLETE
481 #define WINHTTP_CALLBACK_FLAG_ALL_COMPLETIONS (WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE | WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE \
482 | WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE | WINHTTP_CALLBACK_STATUS_READ_COMPLETE \
483 | WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE | WINHTTP_CALLBACK_STATUS_REQUEST_ERROR \
484 | WINHTTP_CALLBACK_STATUS_GETPROXYFORURL_COMPLETE)
485 #define WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS 0xffffffff
486 #define WINHTTP_INVALID_STATUS_CALLBACK ((WINHTTP_STATUS_CALLBACK)(-1))
488 #define API_RECEIVE_RESPONSE (1)
489 #define API_QUERY_DATA_AVAILABLE (2)
490 #define API_READ_DATA (3)
491 #define API_WRITE_DATA (4)
492 #define API_SEND_REQUEST (5)
493 #define API_GET_PROXY_FOR_URL (6)
495 #define WINHTTP_HANDLE_TYPE_SESSION 1
496 #define WINHTTP_HANDLE_TYPE_CONNECT 2
497 #define WINHTTP_HANDLE_TYPE_REQUEST 3
499 #define WINHTTP_CALLBACK_STATUS_FLAG_CERT_REV_FAILED 0x00000001
500 #define WINHTTP_CALLBACK_STATUS_FLAG_INVALID_CERT 0x00000002
501 #define WINHTTP_CALLBACK_STATUS_FLAG_CERT_REVOKED 0x00000004
502 #define WINHTTP_CALLBACK_STATUS_FLAG_INVALID_CA 0x00000008
503 #define WINHTTP_CALLBACK_STATUS_FLAG_CERT_CN_INVALID 0x00000010
504 #define WINHTTP_CALLBACK_STATUS_FLAG_CERT_DATE_INVALID 0x00000020
505 #define WINHTTP_CALLBACK_STATUS_FLAG_CERT_WRONG_USAGE 0x00000040
506 #define WINHTTP_CALLBACK_STATUS_FLAG_SECURITY_CHANNEL_ERROR 0x80000000
508 #define WINHTTP_FLAG_SECURE_PROTOCOL_SSL2 0x00000008
509 #define WINHTTP_FLAG_SECURE_PROTOCOL_SSL3 0x00000020
510 #define WINHTTP_FLAG_SECURE_PROTOCOL_TLS1 0x00000080
511 #define WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 0x00000200
512 #define WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2 0x00000800
513 #define WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_3 0x00002000
514 #define WINHTTP_FLAG_SECURE_PROTOCOL_ALL (WINHTTP_FLAG_SECURE_PROTOCOL_SSL2 |\
515 WINHTTP_FLAG_SECURE_PROTOCOL_SSL3 |\
516 WINHTTP_FLAG_SECURE_PROTOCOL_TLS1)
518 #define WINHTTP_AUTH_SCHEME_BASIC 0x00000001
519 #define WINHTTP_AUTH_SCHEME_NTLM 0x00000002
520 #define WINHTTP_AUTH_SCHEME_PASSPORT 0x00000004
521 #define WINHTTP_AUTH_SCHEME_DIGEST 0x00000008
522 #define WINHTTP_AUTH_SCHEME_NEGOTIATE 0x00000010
524 #define WINHTTP_AUTH_TARGET_SERVER 0x00000000
525 #define WINHTTP_AUTH_TARGET_PROXY 0x00000001
527 #define WINHTTP_TIME_FORMAT_BUFSIZE 62
529 typedef struct
531 DWORD dwStructSize;
532 LPWSTR lpszScheme;
533 DWORD dwSchemeLength;
534 INTERNET_SCHEME nScheme;
535 LPWSTR lpszHostName;
536 DWORD dwHostNameLength;
537 INTERNET_PORT nPort;
538 LPWSTR lpszUserName;
539 DWORD dwUserNameLength;
540 LPWSTR lpszPassword;
541 DWORD dwPasswordLength;
542 LPWSTR lpszUrlPath;
543 DWORD dwUrlPathLength;
544 LPWSTR lpszExtraInfo;
545 DWORD dwExtraInfoLength;
546 } URL_COMPONENTS, *LPURL_COMPONENTS;
547 typedef URL_COMPONENTS URL_COMPONENTSW;
548 typedef LPURL_COMPONENTS LPURL_COMPONENTSW;
550 typedef struct
552 DWORD_PTR dwResult;
553 DWORD dwError;
554 } WINHTTP_ASYNC_RESULT, *LPWINHTTP_ASYNC_RESULT;
556 typedef struct
558 FILETIME ftExpiry;
559 FILETIME ftStart;
560 LPWSTR lpszSubjectInfo;
561 LPWSTR lpszIssuerInfo;
562 LPWSTR lpszProtocolName;
563 LPWSTR lpszSignatureAlgName;
564 LPWSTR lpszEncryptionAlgName;
565 DWORD dwKeySize;
566 } WINHTTP_CERTIFICATE_INFO;
568 typedef struct
570 DWORD dwAccessType;
571 LPWSTR lpszProxy;
572 LPWSTR lpszProxyBypass;
573 } WINHTTP_PROXY_INFO, *LPWINHTTP_PROXY_INFO;
574 typedef WINHTTP_PROXY_INFO WINHTTP_PROXY_INFOW;
575 typedef LPWINHTTP_PROXY_INFO LPWINHTTP_PROXY_INFOW;
577 typedef struct
579 BOOL fAutoDetect;
580 LPWSTR lpszAutoConfigUrl;
581 LPWSTR lpszProxy;
582 LPWSTR lpszProxyBypass;
583 } WINHTTP_CURRENT_USER_IE_PROXY_CONFIG;
585 typedef VOID (CALLBACK *WINHTTP_STATUS_CALLBACK)(HINTERNET,DWORD_PTR,DWORD,LPVOID,DWORD);
586 typedef WINHTTP_STATUS_CALLBACK * LPWINHTTP_STATUS_CALLBACK;
588 #define WINHTTP_AUTO_DETECT_TYPE_DHCP 0x00000001
589 #define WINHTTP_AUTO_DETECT_TYPE_DNS_A 0x00000002
591 #define WINHTTP_AUTOPROXY_AUTO_DETECT 0x00000001
592 #define WINHTTP_AUTOPROXY_CONFIG_URL 0x00000002
593 #define WINHTTP_AUTOPROXY_HOST_KEEPCASE 0x00000004
594 #define WINHTTP_AUTOPROXY_HOST_LOWERCASE 0x00000008
595 #define WINHTTP_AUTOPROXY_ALLOW_AUTOCONFIG 0x00000100
596 #define WINHTTP_AUTOPROXY_ALLOW_STATIC 0x00000200
597 #define WINHTTP_AUTOPROXY_ALLOW_CM 0x00000400
598 #define WINHTTP_AUTOPROXY_RUN_INPROCESS 0x00010000
599 #define WINHTTP_AUTOPROXY_RUN_OUTPROCESS_ONLY 0x00020000
600 #define WINHTTP_AUTOPROXY_NO_DIRECTACCESS 0x00040000
601 #define WINHTTP_AUTOPROXY_NO_CACHE_CLIENT 0x00080000
602 #define WINHTTP_AUTOPROXY_NO_CACHE_SVC 0x00100000
603 #define WINHTTP_AUTOPROXY_SORT_RESULTS 0x00400000
605 typedef struct
607 DWORD dwFlags;
608 DWORD dwAutoDetectFlags;
609 LPCWSTR lpszAutoConfigUrl;
610 LPVOID lpvReserved;
611 DWORD dwReserved;
612 BOOL fAutoLogonIfChallenged;
613 } WINHTTP_AUTOPROXY_OPTIONS;
615 typedef struct _WINHTTP_PROXY_RESULT_ENTRY
617 BOOL fProxy;
618 BOOL fBypass;
619 INTERNET_SCHEME ProxyScheme;
620 PWSTR pwszProxy;
621 INTERNET_PORT ProxyPort;
622 } WINHTTP_PROXY_RESULT_ENTRY;
624 typedef struct _WINHTTP_PROXY_RESULT
626 DWORD cEntries;
627 WINHTTP_PROXY_RESULT_ENTRY *pEntries;
628 } WINHTTP_PROXY_RESULT;
630 typedef struct _WINHTTP_PROXY_RESULT_EX
632 DWORD cEntries;
633 WINHTTP_PROXY_RESULT_ENTRY *pEntries;
634 HANDLE hProxyDetectionHandle;
635 DWORD dwProxyInterfaceAffinity;
636 } WINHTTP_PROXY_RESULT_EX;
638 #define NETWORKING_KEY_BUFSIZE 128
640 typedef struct _WinHttpProxyNetworkKey
642 unsigned char pbBuffer[NETWORKING_KEY_BUFSIZE];
643 } WINHTTP_PROXY_NETWORKING_KEY, *PWINHTTP_PROXY_NETWORKING_KEY;
645 typedef struct _WINHTTP_PROXY_SETTINGS
647 DWORD dwStructSize;
648 DWORD dwFlags;
649 DWORD dwCurrentSettingsVersion;
650 PWSTR pwszConnectionName;
651 PWSTR pwszProxy;
652 PWSTR pwszProxyBypass;
653 PWSTR pwszAutoconfigUrl;
654 PWSTR pwszAutoconfigSecondaryUrl;
655 DWORD dwAutoDiscoveryFlags;
656 PWSTR pwszLastKnownGoodAutoConfigUrl;
657 DWORD dwAutoconfigReloadDelayMins;
658 FILETIME ftLastKnownDetectTime;
659 DWORD dwDetectedInterfaceIpCount;
660 PDWORD pdwDetectedInterfaceIp;
661 DWORD cNetworkKeys;
662 PWINHTTP_PROXY_NETWORKING_KEY pNetworkKeys;
663 } WINHTTP_PROXY_SETTINGS, *PWINHTTP_PROXY_SETTINGS;
665 typedef struct
667 DWORD dwMajorVersion;
668 DWORD dwMinorVersion;
669 } HTTP_VERSION_INFO, *LPHTTP_VERSION_INFO;
671 #ifdef _WS2DEF_
672 typedef struct
674 DWORD cbSize;
675 SOCKADDR_STORAGE LocalAddress;
676 SOCKADDR_STORAGE RemoteAddress;
677 } WINHTTP_CONNECTION_INFO;
678 #endif
680 typedef enum _WINHTTP_REQUEST_TIME_ENTRY
682 WinHttpProxyDetectionStart = 0,
683 WinHttpProxyDetectionEnd,
684 WinHttpConnectionAcquireStart,
685 WinHttpConnectionAcquireWaitEnd,
686 WinHttpConnectionAcquireEnd,
687 WinHttpNameResolutionStart,
688 WinHttpNameResolutionEnd,
689 WinHttpConnectionEstablishmentStart,
690 WinHttpConnectionEstablishmentEnd,
691 WinHttpTlsHandshakeClientLeg1Start,
692 WinHttpTlsHandshakeClientLeg1End,
693 WinHttpTlsHandshakeClientLeg2Start,
694 WinHttpTlsHandshakeClientLeg2End,
695 WinHttpTlsHandshakeClientLeg3Start,
696 WinHttpTlsHandshakeClientLeg3End,
697 WinHttpStreamWaitStart,
698 WinHttpStreamWaitEnd,
699 WinHttpSendRequestStart,
700 WinHttpSendRequestHeadersCompressionStart,
701 WinHttpSendRequestHeadersCompressionEnd,
702 WinHttpSendRequestHeadersEnd,
703 WinHttpSendRequestEnd,
704 WinHttpReceiveResponseStart,
705 WinHttpReceiveResponseHeadersDecompressionStart,
706 WinHttpReceiveResponseHeadersDecompressionEnd,
707 WinHttpReceiveResponseHeadersEnd,
708 WinHttpReceiveResponseBodyDecompressionDelta,
709 WinHttpReceiveResponseEnd,
710 WinHttpProxyTunnelStart,
711 WinHttpProxyTunnelEnd,
712 WinHttpProxyTlsHandshakeClientLeg1Start,
713 WinHttpProxyTlsHandshakeClientLeg1End,
714 WinHttpProxyTlsHandshakeClientLeg2Start,
715 WinHttpProxyTlsHandshakeClientLeg2End,
716 WinHttpProxyTlsHandshakeClientLeg3Start,
717 WinHttpProxyTlsHandshakeClientLeg3End,
718 WinHttpRequestTimeLast,
719 WinHttpRequestTimeMax = 64
720 } WINHTTP_REQUEST_TIME_ENTRY;
722 typedef struct _WINHTTP_REQUEST_TIMES
724 ULONG cTimes;
725 ULONGLONG rgullTimes[WinHttpRequestTimeMax];
726 } WINHTTP_REQUEST_TIMES, *PWINHTTP_REQUEST_TIMES;
728 typedef enum _WINHTTP_REQUEST_STAT_ENTRY
730 WinHttpConnectFailureCount = 0,
731 WinHttpProxyFailureCount,
732 WinHttpTlsHandshakeClientLeg1Size,
733 WinHttpTlsHandshakeServerLeg1Size,
734 WinHttpTlsHandshakeClientLeg2Size,
735 WinHttpTlsHandshakeServerLeg2Size,
736 WinHttpRequestHeadersSize,
737 WinHttpRequestHeadersCompressedSize,
738 WinHttpResponseHeadersSize,
739 WinHttpResponseHeadersCompressedSize,
740 WinHttpResponseBodySize,
741 WinHttpResponseBodyCompressedSize,
742 WinHttpProxyTlsHandshakeClientLeg1Size,
743 WinHttpProxyTlsHandshakeServerLeg1Size,
744 WinHttpProxyTlsHandshakeClientLeg2Size,
745 WinHttpProxyTlsHandshakeServerLeg2Size,
746 WinHttpRequestStatLast,
747 WinHttpRequestStatMax = 32
748 } WINHTTP_REQUEST_STAT_ENTRY;
750 #define WINHTTP_REQUEST_STAT_FLAG_TCP_FAST_OPEN 0x00000001
751 #define WINHTTP_REQUEST_STAT_FLAG_TLS_SESSION_RESUMPTION 0x00000002
752 #define WINHTTP_REQUEST_STAT_FLAG_TLS_FALSE_START 0x00000004
753 #define WINHTTP_REQUEST_STAT_FLAG_PROXY_TLS_SESSION_RESUMPTION 0x00000008
754 #define WINHTTP_REQUEST_STAT_FLAG_PROXY_TLS_FALSE_START 0x00000010
755 #define WINHTTP_REQUEST_STAT_FLAG_FIRST_REQUEST 0x00000020
757 typedef struct _WINHTTP_REQUEST_STATS
759 ULONGLONG ullFlags;
760 ULONG ulIndex;
761 ULONG cStats;
762 ULONGLONG rgullStats[WinHttpRequestStatMax];
763 } WINHTTP_REQUEST_STATS, *PWINHTTP_REQUEST_STATS;
765 typedef enum _WINHTTP_WEB_SOCKET_OPERATION
767 WINHTTP_WEB_SOCKET_SEND_OPERATION = 0,
768 WINHTTP_WEB_SOCKET_RECEIVE_OPERATION = 1,
769 WINHTTP_WEB_SOCKET_CLOSE_OPERATION = 2,
770 WINHTTP_WEB_SOCKET_SHUTDOWN_OPERATION = 3
771 } WINHTTP_WEB_SOCKET_OPERATION;
773 typedef enum _WINHTTP_WEB_SOCKET_BUFFER_TYPE
775 WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE = 0,
776 WINHTTP_WEB_SOCKET_BINARY_FRAGMENT_BUFFER_TYPE = 1,
777 WINHTTP_WEB_SOCKET_UTF8_MESSAGE_BUFFER_TYPE = 2,
778 WINHTTP_WEB_SOCKET_UTF8_FRAGMENT_BUFFER_TYPE = 3,
779 WINHTTP_WEB_SOCKET_CLOSE_BUFFER_TYPE = 4
780 } WINHTTP_WEB_SOCKET_BUFFER_TYPE;
782 typedef enum _WINHTTP_WEB_SOCKET_CLOSE_STATUS
784 WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS = 1000,
785 WINHTTP_WEB_SOCKET_ENDPOINT_TERMINATED_CLOSE_STATUS = 1001,
786 WINHTTP_WEB_SOCKET_PROTOCOL_ERROR_CLOSE_STATUS = 1002,
787 WINHTTP_WEB_SOCKET_INVALID_DATA_TYPE_CLOSE_STATUS = 1003,
788 WINHTTP_WEB_SOCKET_EMPTY_CLOSE_STATUS = 1005,
789 WINHTTP_WEB_SOCKET_ABORTED_CLOSE_STATUS = 1006,
790 WINHTTP_WEB_SOCKET_INVALID_PAYLOAD_CLOSE_STATUS = 1007,
791 WINHTTP_WEB_SOCKET_POLICY_VIOLATION_CLOSE_STATUS = 1008,
792 WINHTTP_WEB_SOCKET_MESSAGE_TOO_BIG_CLOSE_STATUS = 1009,
793 WINHTTP_WEB_SOCKET_UNSUPPORTED_EXTENSIONS_CLOSE_STATUS = 1010,
794 WINHTTP_WEB_SOCKET_SERVER_ERROR_CLOSE_STATUS = 1011,
795 WINHTTP_WEB_SOCKET_SECURE_HANDSHAKE_ERROR_CLOSE_STATUS = 1015
796 } WINHTTP_WEB_SOCKET_CLOSE_STATUS;
798 typedef struct _WINHTTP_WEB_SOCKET_ASYNC_RESULT
800 WINHTTP_ASYNC_RESULT AsyncResult;
801 WINHTTP_WEB_SOCKET_OPERATION Operation;
802 } WINHTTP_WEB_SOCKET_ASYNC_RESULT;
804 typedef struct _WINHTTP_WEB_SOCKET_STATUS
806 DWORD dwBytesTransferred;
807 WINHTTP_WEB_SOCKET_BUFFER_TYPE eBufferType;
808 } WINHTTP_WEB_SOCKET_STATUS;
810 #define WINHTTP_WEB_SOCKET_MAX_CLOSE_REASON_LENGTH 123
811 #define WINHTTP_WEB_SOCKET_MIN_KEEPALIVE_VALUE 15000
813 #ifdef __cplusplus
814 extern "C" {
815 #endif
817 BOOL WINAPI WinHttpAddRequestHeaders(HINTERNET,LPCWSTR,DWORD,DWORD);
818 BOOL WINAPI WinHttpDetectAutoProxyConfigUrl(DWORD,LPWSTR*);
819 BOOL WINAPI WinHttpCheckPlatform(void);
820 BOOL WINAPI WinHttpCloseHandle(HINTERNET);
821 HINTERNET WINAPI WinHttpConnect(HINTERNET,LPCWSTR,INTERNET_PORT,DWORD);
822 BOOL WINAPI WinHttpCrackUrl(LPCWSTR,DWORD,DWORD,LPURL_COMPONENTS);
823 DWORD WINAPI WinHttpCreateProxyResolver(HINTERNET,HINTERNET*);
824 BOOL WINAPI WinHttpCreateUrl(LPURL_COMPONENTS,DWORD,LPWSTR,LPDWORD);
825 VOID WINAPI WinHttpFreeProxyResult(WINHTTP_PROXY_RESULT*);
826 VOID WINAPI WinHttpFreeProxyResultEx(WINHTTP_PROXY_RESULT_EX*);
827 VOID WINAPI WinHttpFreeProxySettings(WINHTTP_PROXY_SETTINGS*);
828 BOOL WINAPI WinHttpGetDefaultProxyConfiguration(WINHTTP_PROXY_INFO*);
829 BOOL WINAPI WinHttpGetIEProxyConfigForCurrentUser(WINHTTP_CURRENT_USER_IE_PROXY_CONFIG*);
830 BOOL WINAPI WinHttpGetProxyForUrl(HINTERNET,LPCWSTR,WINHTTP_AUTOPROXY_OPTIONS*,WINHTTP_PROXY_INFO*);
831 DWORD WINAPI WinHttpGetProxyForUrlEx(HINTERNET,PCWSTR,WINHTTP_AUTOPROXY_OPTIONS*,DWORD_PTR);
832 DWORD WINAPI WinHttpGetProxyForUrlEx2(HINTERNET,PCWSTR,WINHTTP_AUTOPROXY_OPTIONS*,DWORD,BYTE*,DWORD_PTR);
833 DWORD WINAPI WinHttpGetProxyResult(HINTERNET,WINHTTP_PROXY_RESULT*);
834 DWORD WINAPI WinHttpGetProxyResultEx(HINTERNET,WINHTTP_PROXY_RESULT_EX*);
835 DWORD WINAPI WinHttpGetProxySettingsVersion(HINTERNET,DWORD*);
836 DWORD WINAPI WinHttpIsHostInProxyBypassList(const WINHTTP_PROXY_INFO*,PCWSTR,INTERNET_SCHEME,INTERNET_PORT,BOOL*);
837 HINTERNET WINAPI WinHttpOpen(LPCWSTR,DWORD,LPCWSTR,LPCWSTR,DWORD);
838 HINTERNET WINAPI WinHttpOpenRequest(HINTERNET,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR*,DWORD);
839 BOOL WINAPI WinHttpQueryAuthParams(HINTERNET,DWORD,LPVOID*);
840 BOOL WINAPI WinHttpQueryAuthSchemes(HINTERNET,LPDWORD,LPDWORD,LPDWORD);
841 BOOL WINAPI WinHttpQueryDataAvailable(HINTERNET,LPDWORD);
842 BOOL WINAPI WinHttpQueryHeaders(HINTERNET,DWORD,LPCWSTR,LPVOID,LPDWORD,LPDWORD);
843 BOOL WINAPI WinHttpQueryOption(HINTERNET,DWORD,LPVOID,LPDWORD);
844 BOOL WINAPI WinHttpReadData(HINTERNET,LPVOID,DWORD,LPDWORD);
845 DWORD WINAPI WinHttpReadProxySettings(HINTERNET,PCWSTR,BOOL,BOOL,DWORD*,BOOL*,WINHTTP_PROXY_SETTINGS*);
846 BOOL WINAPI WinHttpReceiveResponse(HINTERNET,LPVOID);
847 DWORD WINAPI WinHttpResetAutoProxy(HINTERNET,DWORD);
848 BOOL WINAPI WinHttpSendRequest(HINTERNET,LPCWSTR,DWORD,LPVOID,DWORD,DWORD,DWORD_PTR);
849 BOOL WINAPI WinHttpSetDefaultProxyConfiguration(WINHTTP_PROXY_INFO*);
850 BOOL WINAPI WinHttpSetCredentials(HINTERNET,DWORD,DWORD,LPCWSTR,LPCWSTR,LPVOID);
851 BOOL WINAPI WinHttpSetOption(HINTERNET,DWORD,LPVOID,DWORD);
852 WINHTTP_STATUS_CALLBACK WINAPI WinHttpSetStatusCallback(HINTERNET,WINHTTP_STATUS_CALLBACK,DWORD,DWORD_PTR);
853 BOOL WINAPI WinHttpSetTimeouts(HINTERNET,int,int,int,int);
854 BOOL WINAPI WinHttpTimeFromSystemTime(const SYSTEMTIME *,LPWSTR);
855 BOOL WINAPI WinHttpTimeToSystemTime(LPCWSTR,SYSTEMTIME*);
856 DWORD WINAPI WinHttpWebSocketClose(HINTERNET,USHORT,void *,DWORD);
857 HINTERNET WINAPI WinHttpWebSocketCompleteUpgrade(HINTERNET,DWORD_PTR);
858 DWORD WINAPI WinHttpWebSocketQueryCloseStatus(HINTERNET,USHORT*,void*,DWORD,DWORD*);
859 DWORD WINAPI WinHttpWebSocketReceive(HINTERNET,void*,DWORD,DWORD*,WINHTTP_WEB_SOCKET_BUFFER_TYPE*);
860 DWORD WINAPI WinHttpWebSocketSend(HINTERNET,WINHTTP_WEB_SOCKET_BUFFER_TYPE,void*,DWORD);
861 DWORD WINAPI WinHttpWebSocketShutdown(HINTERNET,USHORT,void*,DWORD);
862 BOOL WINAPI WinHttpWriteData(HINTERNET,LPCVOID,DWORD,LPDWORD);
863 DWORD WINAPI WinHttpWriteProxySettings(HINTERNET,BOOL,WINHTTP_PROXY_SETTINGS*);
865 #ifdef __cplusplus
867 #endif
869 #include <poppack.h>
871 #endif /* __WINE_WINHTTP_H */