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