1 // Licensed under the Apache License, Version 2.0 2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. 4 // All files in the project carrying such notice may not be copied, modified, or distributed 5 // except according to those terms. 6 //! Windows HTTP Services API constant definitions and macros 7 use ctypes::c_int; 8 use shared::basetsd::DWORD_PTR; 9 use shared::minwindef::{BOOL, DWORD, LPCVOID, LPDWORD, LPVOID, USHORT, WORD}; 10 use um::minwinbase::SYSTEMTIME; 11 use um::winnt::{LPCWSTR, LPWSTR, PCWSTR, PVOID, PWSTR}; 12 pub type HINTERNET = LPVOID; 13 pub type LPHINTERNET = *mut HINTERNET; 14 pub type INTERNET_PORT = WORD; 15 pub type LPINTERNET_PORT = *mut INTERNET_PORT; 16 pub const INTERNET_DEFAULT_PORT: INTERNET_PORT = 0; 17 pub const INTERNET_DEFAULT_HTTP_PORT: INTERNET_PORT = 80; 18 pub const INTERNET_DEFAULT_HTTPS_PORT: INTERNET_PORT = 443; 19 pub const WINHTTP_FLAG_ASYNC: DWORD = 0x10000000; 20 pub const WINHTTP_FLAG_SECURE: DWORD = 0x00800000; 21 pub const WINHTTP_FLAG_ESCAPE_PERCENT: DWORD = 0x00000004; 22 pub const WINHTTP_FLAG_NULL_CODEPAGE: DWORD = 0x00000008; 23 pub const WINHTTP_FLAG_BYPASS_PROXY_CACHE: DWORD = 0x00000100; 24 pub const WINHTTP_FLAG_REFRESH: DWORD = WINHTTP_FLAG_BYPASS_PROXY_CACHE; 25 pub const WINHTTP_FLAG_ESCAPE_DISABLE: DWORD = 0x00000040; 26 pub const WINHTTP_FLAG_ESCAPE_DISABLE_QUERY: DWORD = 0x00000080; 27 STRUCT!{struct WINHTTP_ASYNC_RESULT { 28 dwResult: DWORD_PTR, 29 dwError: DWORD, 30 }} 31 pub type LPWINHTTP_ASYNC_RESULT = *mut WINHTTP_ASYNC_RESULT; 32 pub type INTERNET_SCHEME = c_int; 33 pub type LPINTERNET_SCHEME = *mut c_int; 34 pub const INTERNET_SCHEME_HTTP: INTERNET_SCHEME = 1; 35 pub const INTERNET_SCHEME_HTTPS: INTERNET_SCHEME = 2; 36 pub const INTERNET_SCHEME_FTP: INTERNET_SCHEME = 3; 37 pub const INTERNET_SCHEME_SOCKS: INTERNET_SCHEME = 4; 38 STRUCT!{struct URL_COMPONENTS { 39 dwStructSize: DWORD, 40 lpszScheme: LPWSTR, 41 dwSchemeLength: DWORD, 42 nScheme: INTERNET_SCHEME, 43 lpszHostName: LPWSTR, 44 dwHostNameLength: DWORD, 45 nPort: INTERNET_PORT, 46 lpszUserName: LPWSTR, 47 dwUserNameLength: DWORD, 48 lpszPassword: LPWSTR, 49 dwPasswordLength: DWORD, 50 lpszUrlPath: LPWSTR, 51 dwUrlPathLength: DWORD, 52 lpszExtraInfo: LPWSTR, 53 dwExtraInfoLength: DWORD, 54 }} 55 pub type LPURL_COMPONENTS = *mut URL_COMPONENTS; 56 pub type URL_COMPONENTSW = URL_COMPONENTS; 57 pub type LPURL_COMPONENTSW = LPURL_COMPONENTS; 58 STRUCT!{struct WINHTTP_PROXY_INFO { 59 dwAccessType: DWORD, 60 lpszProxy: LPWSTR, 61 lpszProxyBypass: LPWSTR, 62 }} 63 pub type LPWINHTTP_PROXY_INFO = *mut WINHTTP_PROXY_INFO; 64 pub type WINHTTP_PROXY_INFOW = WINHTTP_PROXY_INFO; 65 pub type LPWINHTTP_PROXY_INFOW = LPWINHTTP_PROXY_INFO; 66 STRUCT!{struct WINHTTP_AUTOPROXY_OPTIONS { 67 dwFlags: DWORD, 68 dwAutoDetectFlags: DWORD, 69 lpszAutoConfigUrl: LPCWSTR, 70 lpvReserved: LPVOID, 71 dwReserved: DWORD, 72 fAutoLogonIfChallenged: BOOL, 73 }} 74 pub const WINHTTP_AUTOPROXY_AUTO_DETECT: DWORD = 0x00000001; 75 pub const WINHTTP_AUTOPROXY_CONFIG_URL: DWORD = 0x00000002; 76 pub const WINHTTP_AUTOPROXY_HOST_KEEPCASE: DWORD = 0x00000004; 77 pub const WINHTTP_AUTOPROXY_HOST_LOWERCASE: DWORD = 0x00000008; 78 pub const WINHTTP_AUTOPROXY_RUN_INPROCESS: DWORD = 0x00010000; 79 pub const WINHTTP_AUTOPROXY_RUN_OUTPROCESS_ONLY: DWORD = 0x00020000; 80 pub const WINHTTP_AUTOPROXY_NO_DIRECTACCESS: DWORD = 0x00040000; 81 pub const WINHTTP_AUTOPROXY_NO_CACHE_CLIENT: DWORD = 0x00080000; 82 pub const WINHTTP_AUTOPROXY_NO_CACHE_SVC: DWORD = 0x00100000; 83 pub const WINHTTP_AUTOPROXY_SORT_RESULTS: DWORD = 0x00400000; 84 pub const WINHTTP_AUTO_DETECT_TYPE_DHCP: DWORD = 0x00000001; 85 pub const WINHTTP_AUTO_DETECT_TYPE_DNS_A: DWORD = 0x00000002; 86 STRUCT!{struct WINHTTP_PROXY_RESULT_ENTRY { 87 fProxy: BOOL, 88 fBypass: BOOL, 89 ProxyScheme: INTERNET_SCHEME, 90 pwszProxy: PWSTR, 91 ProxyPort: INTERNET_PORT, 92 }} 93 STRUCT!{struct WINHTTP_PROXY_RESULT { 94 cEntries: DWORD, 95 pEntries: *mut WINHTTP_PROXY_RESULT_ENTRY, 96 }} 97 pub const WINHTTP_FIRST_OPTION: DWORD = WINHTTP_OPTION_CALLBACK; 98 pub const WINHTTP_OPTION_CALLBACK: DWORD = 1; 99 pub const WINHTTP_OPTION_RESOLVE_TIMEOUT: DWORD = 2; 100 pub const WINHTTP_OPTION_CONNECT_TIMEOUT: DWORD = 3; 101 pub const WINHTTP_OPTION_CONNECT_RETRIES: DWORD = 4; 102 pub const WINHTTP_OPTION_SEND_TIMEOUT: DWORD = 5; 103 pub const WINHTTP_OPTION_RECEIVE_TIMEOUT: DWORD = 6; 104 pub const WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT: DWORD = 7; 105 pub const WINHTTP_OPTION_HANDLE_TYPE: DWORD = 9; 106 pub const WINHTTP_OPTION_READ_BUFFER_SIZE: DWORD = 12; 107 pub const WINHTTP_OPTION_WRITE_BUFFER_SIZE: DWORD = 13; 108 pub const WINHTTP_OPTION_PARENT_HANDLE: DWORD = 21; 109 pub const WINHTTP_OPTION_EXTENDED_ERROR: DWORD = 24; 110 pub const WINHTTP_OPTION_SECURITY_FLAGS: DWORD = 31; 111 pub const WINHTTP_OPTION_SECURITY_CERTIFICATE_STRUCT: DWORD = 32; 112 pub const WINHTTP_OPTION_URL: DWORD = 34; 113 pub const WINHTTP_OPTION_SECURITY_KEY_BITNESS: DWORD = 36; 114 pub const WINHTTP_OPTION_PROXY: DWORD = 38; 115 pub const WINHTTP_OPTION_PROXY_RESULT_ENTRY: DWORD = 39; 116 pub const WINHTTP_OPTION_USER_AGENT: DWORD = 41; 117 pub const WINHTTP_OPTION_CONTEXT_VALUE: DWORD = 45; 118 pub const WINHTTP_OPTION_CLIENT_CERT_CONTEXT: DWORD = 47; 119 pub const WINHTTP_OPTION_REQUEST_PRIORITY: DWORD = 58; 120 pub const WINHTTP_OPTION_HTTP_VERSION: DWORD = 59; 121 pub const WINHTTP_OPTION_DISABLE_FEATURE: DWORD = 63; 122 pub const WINHTTP_OPTION_CODEPAGE: DWORD = 68; 123 pub const WINHTTP_OPTION_MAX_CONNS_PER_SERVER: DWORD = 73; 124 pub const WINHTTP_OPTION_MAX_CONNS_PER_1_0_SERVER: DWORD = 74; 125 pub const WINHTTP_OPTION_AUTOLOGON_POLICY: DWORD = 77; 126 pub const WINHTTP_OPTION_SERVER_CERT_CONTEXT: DWORD = 78; 127 pub const WINHTTP_OPTION_ENABLE_FEATURE: DWORD = 79; 128 pub const WINHTTP_OPTION_WORKER_THREAD_COUNT: DWORD = 80; 129 pub const WINHTTP_OPTION_PASSPORT_COBRANDING_TEXT: DWORD = 81; 130 pub const WINHTTP_OPTION_PASSPORT_COBRANDING_URL: DWORD = 82; 131 pub const WINHTTP_OPTION_CONFIGURE_PASSPORT_AUTH: DWORD = 83; 132 pub const WINHTTP_OPTION_SECURE_PROTOCOLS: DWORD = 84; 133 pub const WINHTTP_OPTION_ENABLETRACING: DWORD = 85; 134 pub const WINHTTP_OPTION_PASSPORT_SIGN_OUT: DWORD = 86; 135 pub const WINHTTP_OPTION_PASSPORT_RETURN_URL: DWORD = 87; 136 pub const WINHTTP_OPTION_REDIRECT_POLICY: DWORD = 88; 137 pub const WINHTTP_OPTION_MAX_HTTP_AUTOMATIC_REDIRECTS: DWORD = 89; 138 pub const WINHTTP_OPTION_MAX_HTTP_STATUS_CONTINUE: DWORD = 90; 139 pub const WINHTTP_OPTION_MAX_RESPONSE_HEADER_SIZE: DWORD = 91; 140 pub const WINHTTP_OPTION_MAX_RESPONSE_DRAIN_SIZE: DWORD = 92; 141 pub const WINHTTP_OPTION_CONNECTION_INFO: DWORD = 93; 142 pub const WINHTTP_OPTION_CLIENT_CERT_ISSUER_LIST: DWORD = 94; 143 pub const WINHTTP_OPTION_SPN: DWORD = 96; 144 pub const WINHTTP_OPTION_GLOBAL_PROXY_CREDS: DWORD = 97; 145 pub const WINHTTP_OPTION_GLOBAL_SERVER_CREDS: DWORD = 98; 146 pub const WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT: DWORD = 99; 147 pub const WINHTTP_OPTION_REJECT_USERPWD_IN_URL: DWORD = 100; 148 pub const WINHTTP_OPTION_USE_GLOBAL_SERVER_CREDENTIALS: DWORD = 101; 149 pub const WINHTTP_OPTION_RECEIVE_PROXY_CONNECT_RESPONSE: DWORD = 103; 150 pub const WINHTTP_OPTION_IS_PROXY_CONNECT_RESPONSE: DWORD = 104; 151 pub const WINHTTP_OPTION_SERVER_SPN_USED: DWORD = 106; 152 pub const WINHTTP_OPTION_PROXY_SPN_USED: DWORD = 107; 153 pub const WINHTTP_OPTION_SERVER_CBT: DWORD = 108; 154 pub const WINHTTP_OPTION_UNSAFE_HEADER_PARSING: DWORD = 110; 155 pub const WINHTTP_OPTION_ASSURED_NON_BLOCKING_CALLBACKS: DWORD = 111; 156 pub const WINHTTP_OPTION_UPGRADE_TO_WEB_SOCKET: DWORD = 114; 157 pub const WINHTTP_OPTION_WEB_SOCKET_CLOSE_TIMEOUT: DWORD = 115; 158 pub const WINHTTP_OPTION_WEB_SOCKET_KEEPALIVE_INTERVAL: DWORD = 116; 159 pub const WINHTTP_OPTION_DECOMPRESSION: DWORD = 118; 160 pub const WINHTTP_OPTION_WEB_SOCKET_RECEIVE_BUFFER_SIZE: DWORD = 122; 161 pub const WINHTTP_OPTION_WEB_SOCKET_SEND_BUFFER_SIZE: DWORD = 123; 162 pub const WINHTTP_LAST_OPTION: DWORD = WINHTTP_OPTION_WEB_SOCKET_SEND_BUFFER_SIZE; 163 pub const WINHTTP_OPTION_USERNAME: DWORD = 0x1000; 164 pub const WINHTTP_OPTION_PASSWORD: DWORD = 0x1001; 165 pub const WINHTTP_OPTION_PROXY_USERNAME: DWORD = 0x1002; 166 pub const WINHTTP_OPTION_PROXY_PASSWORD: DWORD = 0x1003; 167 //569 168 FN!{stdcall WINHTTP_STATUS_CALLBACK( 169 hInternet: HINTERNET, 170 dwContext: DWORD_PTR, 171 dwInternetStatus: DWORD, 172 lpvStatusInformation: LPVOID, 173 dwStatusInformationLength: DWORD, 174 ) -> ()} 175 pub type LPWINHTTP_STATUS_CALLBACK = *mut WINHTTP_STATUS_CALLBACK; 176 pub const WINHTTP_CALLBACK_STATUS_RESOLVING_NAME: DWORD = 0x00000001; 177 pub const WINHTTP_CALLBACK_STATUS_NAME_RESOLVED: DWORD = 0x00000002; 178 pub const WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER: DWORD = 0x00000004; 179 pub const WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER: DWORD = 0x00000008; 180 pub const WINHTTP_CALLBACK_STATUS_SENDING_REQUEST: DWORD = 0x00000010; 181 pub const WINHTTP_CALLBACK_STATUS_REQUEST_SENT: DWORD = 0x00000020; 182 pub const WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE: DWORD = 0x00000040; 183 pub const WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED: DWORD = 0x00000080; 184 pub const WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION: DWORD = 0x00000100; 185 pub const WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED: DWORD = 0x00000200; 186 pub const WINHTTP_CALLBACK_STATUS_HANDLE_CREATED: DWORD = 0x00000400; 187 pub const WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING: DWORD = 0x00000800; 188 pub const WINHTTP_CALLBACK_STATUS_DETECTING_PROXY: DWORD = 0x00001000; 189 pub const WINHTTP_CALLBACK_STATUS_REDIRECT: DWORD = 0x00004000; 190 pub const WINHTTP_CALLBACK_STATUS_INTERMEDIATE_RESPONSE: DWORD = 0x00008000; 191 pub const WINHTTP_CALLBACK_STATUS_SECURE_FAILURE: DWORD = 0x00010000; 192 pub const WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE: DWORD = 0x00020000; 193 pub const WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE: DWORD = 0x00040000; 194 pub const WINHTTP_CALLBACK_STATUS_READ_COMPLETE: DWORD = 0x00080000; 195 pub const WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE: DWORD = 0x00100000; 196 pub const WINHTTP_CALLBACK_STATUS_REQUEST_ERROR: DWORD = 0x00200000; 197 pub const WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE: DWORD = 0x00400000; 198 pub const WINHTTP_CALLBACK_STATUS_GETPROXYFORURL_COMPLETE: DWORD = 0x01000000; 199 pub const WINHTTP_CALLBACK_STATUS_CLOSE_COMPLETE: DWORD = 0x02000000; 200 pub const WINHTTP_CALLBACK_STATUS_SHUTDOWN_COMPLETE: DWORD = 0x04000000; 201 pub const WINHTTP_CALLBACK_FLAG_RESOLVE_NAME: DWORD = WINHTTP_CALLBACK_STATUS_RESOLVING_NAME 202 | WINHTTP_CALLBACK_STATUS_NAME_RESOLVED; 203 pub const WINHTTP_CALLBACK_FLAG_CONNECT_TO_SERVER: DWORD = 204 WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER | WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER; 205 pub const WINHTTP_CALLBACK_FLAG_SEND_REQUEST: DWORD = 206 WINHTTP_CALLBACK_STATUS_SENDING_REQUEST | WINHTTP_CALLBACK_STATUS_REQUEST_SENT; 207 pub const WINHTTP_CALLBACK_FLAG_RECEIVE_RESPONSE: DWORD = 208 WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE | WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED; 209 pub const WINHTTP_CALLBACK_FLAG_CLOSE_CONNECTION: DWORD = 210 WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION | WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED; 211 pub const WINHTTP_CALLBACK_FLAG_HANDLES: DWORD = 212 WINHTTP_CALLBACK_STATUS_HANDLE_CREATED | WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING; 213 pub const WINHTTP_CALLBACK_FLAG_DETECTING_PROXY: DWORD = WINHTTP_CALLBACK_STATUS_DETECTING_PROXY; 214 pub const WINHTTP_CALLBACK_FLAG_REDIRECT: DWORD = WINHTTP_CALLBACK_STATUS_REDIRECT; 215 pub const WINHTTP_CALLBACK_FLAG_INTERMEDIATE_RESPONSE: DWORD = 216 WINHTTP_CALLBACK_STATUS_INTERMEDIATE_RESPONSE; 217 pub const WINHTTP_CALLBACK_FLAG_SECURE_FAILURE: DWORD = WINHTTP_CALLBACK_STATUS_SECURE_FAILURE; 218 pub const WINHTTP_CALLBACK_FLAG_SENDREQUEST_COMPLETE: DWORD = 219 WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE; 220 pub const WINHTTP_CALLBACK_FLAG_HEADERS_AVAILABLE: DWORD = 221 WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE; 222 pub const WINHTTP_CALLBACK_FLAG_DATA_AVAILABLE: DWORD = WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE; 223 pub const WINHTTP_CALLBACK_FLAG_READ_COMPLETE: DWORD = WINHTTP_CALLBACK_STATUS_READ_COMPLETE; 224 pub const WINHTTP_CALLBACK_FLAG_WRITE_COMPLETE: DWORD = WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE; 225 pub const WINHTTP_CALLBACK_FLAG_REQUEST_ERROR: DWORD = WINHTTP_CALLBACK_STATUS_REQUEST_ERROR; 226 pub const WINHTTP_CALLBACK_FLAG_GETPROXYFORURL_COMPLETE: DWORD = 227 WINHTTP_CALLBACK_STATUS_GETPROXYFORURL_COMPLETE; 228 pub const WINHTTP_CALLBACK_FLAG_ALL_COMPLETIONS: DWORD = 229 WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE | WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE 230 | WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE | WINHTTP_CALLBACK_STATUS_READ_COMPLETE 231 | WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE | WINHTTP_CALLBACK_STATUS_REQUEST_ERROR 232 | WINHTTP_CALLBACK_STATUS_GETPROXYFORURL_COMPLETE; 233 pub const WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS: DWORD = 0xffffffff; 234 pub const WINHTTP_QUERY_MIME_VERSION: DWORD = 0; 235 pub const WINHTTP_QUERY_CONTENT_TYPE: DWORD = 1; 236 pub const WINHTTP_QUERY_CONTENT_TRANSFER_ENCODING: DWORD = 2; 237 pub const WINHTTP_QUERY_CONTENT_ID: DWORD = 3; 238 pub const WINHTTP_QUERY_CONTENT_DESCRIPTION: DWORD = 4; 239 pub const WINHTTP_QUERY_CONTENT_LENGTH: DWORD = 5; 240 pub const WINHTTP_QUERY_CONTENT_LANGUAGE: DWORD = 6; 241 pub const WINHTTP_QUERY_ALLOW: DWORD = 7; 242 pub const WINHTTP_QUERY_PUBLIC: DWORD = 8; 243 pub const WINHTTP_QUERY_DATE: DWORD = 9; 244 pub const WINHTTP_QUERY_EXPIRES: DWORD = 10; 245 pub const WINHTTP_QUERY_LAST_MODIFIED: DWORD = 11; 246 pub const WINHTTP_QUERY_MESSAGE_ID: DWORD = 12; 247 pub const WINHTTP_QUERY_URI: DWORD = 13; 248 pub const WINHTTP_QUERY_DERIVED_FROM: DWORD = 14; 249 pub const WINHTTP_QUERY_COST: DWORD = 15; 250 pub const WINHTTP_QUERY_LINK: DWORD = 16; 251 pub const WINHTTP_QUERY_PRAGMA: DWORD = 17; 252 pub const WINHTTP_QUERY_VERSION: DWORD = 18; 253 pub const WINHTTP_QUERY_STATUS_CODE: DWORD = 19; 254 pub const WINHTTP_QUERY_STATUS_TEXT: DWORD = 20; 255 pub const WINHTTP_QUERY_RAW_HEADERS: DWORD = 21; 256 pub const WINHTTP_QUERY_RAW_HEADERS_CRLF: DWORD = 22; 257 pub const WINHTTP_QUERY_CONNECTION: DWORD = 23; 258 pub const WINHTTP_QUERY_ACCEPT: DWORD = 24; 259 pub const WINHTTP_QUERY_ACCEPT_CHARSET: DWORD = 25; 260 pub const WINHTTP_QUERY_ACCEPT_ENCODING: DWORD = 26; 261 pub const WINHTTP_QUERY_ACCEPT_LANGUAGE: DWORD = 27; 262 pub const WINHTTP_QUERY_AUTHORIZATION: DWORD = 28; 263 pub const WINHTTP_QUERY_CONTENT_ENCODING: DWORD = 29; 264 pub const WINHTTP_QUERY_FORWARDED: DWORD = 30; 265 pub const WINHTTP_QUERY_FROM: DWORD = 31; 266 pub const WINHTTP_QUERY_IF_MODIFIED_SINCE: DWORD = 32; 267 pub const WINHTTP_QUERY_LOCATION: DWORD = 33; 268 pub const WINHTTP_QUERY_ORIG_URI: DWORD = 34; 269 pub const WINHTTP_QUERY_REFERER: DWORD = 35; 270 pub const WINHTTP_QUERY_RETRY_AFTER: DWORD = 36; 271 pub const WINHTTP_QUERY_SERVER: DWORD = 37; 272 pub const WINHTTP_QUERY_TITLE: DWORD = 38; 273 pub const WINHTTP_QUERY_USER_AGENT: DWORD = 39; 274 pub const WINHTTP_QUERY_WWW_AUTHENTICATE: DWORD = 40; 275 pub const WINHTTP_QUERY_PROXY_AUTHENTICATE: DWORD = 41; 276 pub const WINHTTP_QUERY_ACCEPT_RANGES: DWORD = 42; 277 pub const WINHTTP_QUERY_SET_COOKIE: DWORD = 43; 278 pub const WINHTTP_QUERY_COOKIE: DWORD = 44; 279 pub const WINHTTP_QUERY_REQUEST_METHOD: DWORD = 45; 280 pub const WINHTTP_QUERY_REFRESH: DWORD = 46; 281 pub const WINHTTP_QUERY_CONTENT_DISPOSITION: DWORD = 47; 282 pub const WINHTTP_QUERY_AGE: DWORD = 48; 283 pub const WINHTTP_QUERY_CACHE_CONTROL: DWORD = 49; 284 pub const WINHTTP_QUERY_CONTENT_BASE: DWORD = 50; 285 pub const WINHTTP_QUERY_CONTENT_LOCATION: DWORD = 51; 286 pub const WINHTTP_QUERY_CONTENT_MD5: DWORD = 52; 287 pub const WINHTTP_QUERY_CONTENT_RANGE: DWORD = 53; 288 pub const WINHTTP_QUERY_ETAG: DWORD = 54; 289 pub const WINHTTP_QUERY_HOST: DWORD = 55; 290 pub const WINHTTP_QUERY_IF_MATCH: DWORD = 56; 291 pub const WINHTTP_QUERY_IF_NONE_MATCH: DWORD = 57; 292 pub const WINHTTP_QUERY_IF_RANGE: DWORD = 58; 293 pub const WINHTTP_QUERY_IF_UNMODIFIED_SINCE: DWORD = 59; 294 pub const WINHTTP_QUERY_MAX_FORWARDS: DWORD = 60; 295 pub const WINHTTP_QUERY_PROXY_AUTHORIZATION: DWORD = 61; 296 pub const WINHTTP_QUERY_RANGE: DWORD = 62; 297 pub const WINHTTP_QUERY_TRANSFER_ENCODING: DWORD = 63; 298 pub const WINHTTP_QUERY_UPGRADE: DWORD = 64; 299 pub const WINHTTP_QUERY_VARY: DWORD = 65; 300 pub const WINHTTP_QUERY_VIA: DWORD = 66; 301 pub const WINHTTP_QUERY_WARNING: DWORD = 67; 302 pub const WINHTTP_QUERY_EXPECT: DWORD = 68; 303 pub const WINHTTP_QUERY_PROXY_CONNECTION: DWORD = 69; 304 pub const WINHTTP_QUERY_UNLESS_MODIFIED_SINCE: DWORD = 70; 305 pub const WINHTTP_QUERY_PROXY_SUPPORT: DWORD = 75; 306 pub const WINHTTP_QUERY_AUTHENTICATION_INFO: DWORD = 76; 307 pub const WINHTTP_QUERY_PASSPORT_URLS: DWORD = 77; 308 pub const WINHTTP_QUERY_PASSPORT_CONFIG: DWORD = 78; 309 pub const WINHTTP_QUERY_MAX: DWORD = 78; 310 pub const WINHTTP_QUERY_CUSTOM: DWORD = 65535; 311 pub const WINHTTP_QUERY_FLAG_REQUEST_HEADERS: DWORD = 0x80000000; 312 pub const WINHTTP_QUERY_FLAG_SYSTEMTIME: DWORD = 0x40000000; 313 pub const WINHTTP_QUERY_FLAG_NUMBER: DWORD = 0x20000000; 314 pub const HTTP_STATUS_CONTINUE: DWORD = 100; 315 pub const HTTP_STATUS_SWITCH_PROTOCOLS: DWORD = 101; 316 pub const HTTP_STATUS_OK: DWORD = 200; 317 pub const HTTP_STATUS_CREATED: DWORD = 201; 318 pub const HTTP_STATUS_ACCEPTED: DWORD = 202; 319 pub const HTTP_STATUS_PARTIAL: DWORD = 203; 320 pub const HTTP_STATUS_NO_CONTENT: DWORD = 204; 321 pub const HTTP_STATUS_RESET_CONTENT: DWORD = 205; 322 pub const HTTP_STATUS_PARTIAL_CONTENT: DWORD = 206; 323 pub const HTTP_STATUS_WEBDAV_MULTI_STATUS: DWORD = 207; 324 pub const HTTP_STATUS_AMBIGUOUS: DWORD = 300; 325 pub const HTTP_STATUS_MOVED: DWORD = 301; 326 pub const HTTP_STATUS_REDIRECT: DWORD = 302; 327 pub const HTTP_STATUS_REDIRECT_METHOD: DWORD = 303; 328 pub const HTTP_STATUS_NOT_MODIFIED: DWORD = 304; 329 pub const HTTP_STATUS_USE_PROXY: DWORD = 305; 330 pub const HTTP_STATUS_REDIRECT_KEEP_VERB: DWORD = 307; 331 pub const HTTP_STATUS_BAD_REQUEST: DWORD = 400; 332 pub const HTTP_STATUS_DENIED: DWORD = 401; 333 pub const HTTP_STATUS_PAYMENT_REQ: DWORD = 402; 334 pub const HTTP_STATUS_FORBIDDEN: DWORD = 403; 335 pub const HTTP_STATUS_NOT_FOUND: DWORD = 404; 336 pub const HTTP_STATUS_BAD_METHOD: DWORD = 405; 337 pub const HTTP_STATUS_NONE_ACCEPTABLE: DWORD = 406; 338 pub const HTTP_STATUS_PROXY_AUTH_REQ: DWORD = 407; 339 pub const HTTP_STATUS_REQUEST_TIMEOUT: DWORD = 408; 340 pub const HTTP_STATUS_CONFLICT: DWORD = 409; 341 pub const HTTP_STATUS_GONE: DWORD = 410; 342 pub const HTTP_STATUS_LENGTH_REQUIRED: DWORD = 411; 343 pub const HTTP_STATUS_PRECOND_FAILED: DWORD = 412; 344 pub const HTTP_STATUS_REQUEST_TOO_LARGE: DWORD = 413; 345 pub const HTTP_STATUS_URI_TOO_LONG: DWORD = 414; 346 pub const HTTP_STATUS_UNSUPPORTED_MEDIA: DWORD = 415; 347 pub const HTTP_STATUS_RETRY_WITH: DWORD = 449; 348 pub const HTTP_STATUS_SERVER_ERROR: DWORD = 500; 349 pub const HTTP_STATUS_NOT_SUPPORTED: DWORD = 501; 350 pub const HTTP_STATUS_BAD_GATEWAY: DWORD = 502; 351 pub const HTTP_STATUS_SERVICE_UNAVAIL: DWORD = 503; 352 pub const HTTP_STATUS_GATEWAY_TIMEOUT: DWORD = 504; 353 pub const HTTP_STATUS_VERSION_NOT_SUP: DWORD = 505; 354 pub const HTTP_STATUS_FIRST: DWORD = HTTP_STATUS_CONTINUE; 355 pub const HTTP_STATUS_LAST: DWORD = HTTP_STATUS_VERSION_NOT_SUP; 356 pub const WINHTTP_ACCESS_TYPE_DEFAULT_PROXY: DWORD = 0; 357 pub const WINHTTP_ACCESS_TYPE_NO_PROXY: DWORD = 1; 358 pub const WINHTTP_ACCESS_TYPE_NAMED_PROXY: DWORD = 3; 359 pub const WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY: DWORD = 4; 360 STRUCT!{struct WINHTTP_CURRENT_USER_IE_PROXY_CONFIG { 361 fAutoDetect: BOOL, 362 lpszAutoConfigUrl: LPWSTR, 363 lpszProxy: LPWSTR, 364 lpszProxyBypass: LPWSTR, 365 }} 366 pub const WINHTTP_ERROR_BASE: DWORD = 12000; 367 pub const ERROR_WINHTTP_OUT_OF_HANDLES: DWORD = WINHTTP_ERROR_BASE + 1; 368 pub const ERROR_WINHTTP_TIMEOUT: DWORD = WINHTTP_ERROR_BASE + 2; 369 pub const ERROR_WINHTTP_INTERNAL_ERROR: DWORD = WINHTTP_ERROR_BASE + 4; 370 pub const ERROR_WINHTTP_INVALID_URL: DWORD = WINHTTP_ERROR_BASE + 5; 371 pub const ERROR_WINHTTP_UNRECOGNIZED_SCHEME: DWORD = WINHTTP_ERROR_BASE + 6; 372 pub const ERROR_WINHTTP_NAME_NOT_RESOLVED: DWORD = WINHTTP_ERROR_BASE + 7; 373 pub const ERROR_WINHTTP_INVALID_OPTION: DWORD = WINHTTP_ERROR_BASE + 9; 374 pub const ERROR_WINHTTP_OPTION_NOT_SETTABLE: DWORD = WINHTTP_ERROR_BASE + 11; 375 pub const ERROR_WINHTTP_SHUTDOWN: DWORD = WINHTTP_ERROR_BASE + 12; 376 pub const ERROR_WINHTTP_LOGIN_FAILURE: DWORD = WINHTTP_ERROR_BASE + 15; 377 pub const ERROR_WINHTTP_OPERATION_CANCELLED: DWORD = WINHTTP_ERROR_BASE + 17; 378 pub const ERROR_WINHTTP_INCORRECT_HANDLE_TYPE: DWORD = WINHTTP_ERROR_BASE + 18; 379 pub const ERROR_WINHTTP_INCORRECT_HANDLE_STATE: DWORD = WINHTTP_ERROR_BASE + 19; 380 pub const ERROR_WINHTTP_CANNOT_CONNECT: DWORD = WINHTTP_ERROR_BASE + 29; 381 pub const ERROR_WINHTTP_CONNECTION_ERROR: DWORD = WINHTTP_ERROR_BASE + 30; 382 pub const ERROR_WINHTTP_RESEND_REQUEST: DWORD = WINHTTP_ERROR_BASE + 32; 383 pub const ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED: DWORD = WINHTTP_ERROR_BASE + 44; 384 pub const ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN: DWORD = WINHTTP_ERROR_BASE + 100; 385 pub const ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND: DWORD = WINHTTP_ERROR_BASE + 101; 386 pub const ERROR_WINHTTP_CANNOT_CALL_AFTER_SEND: DWORD = WINHTTP_ERROR_BASE + 102; 387 pub const ERROR_WINHTTP_CANNOT_CALL_AFTER_OPEN: DWORD = WINHTTP_ERROR_BASE + 103; 388 pub const ERROR_WINHTTP_HEADER_NOT_FOUND: DWORD = WINHTTP_ERROR_BASE + 150; 389 pub const ERROR_WINHTTP_INVALID_SERVER_RESPONSE: DWORD = WINHTTP_ERROR_BASE + 152; 390 pub const ERROR_WINHTTP_INVALID_HEADER: DWORD = WINHTTP_ERROR_BASE + 153; 391 pub const ERROR_WINHTTP_INVALID_QUERY_REQUEST: DWORD = WINHTTP_ERROR_BASE + 154; 392 pub const ERROR_WINHTTP_HEADER_ALREADY_EXISTS: DWORD = WINHTTP_ERROR_BASE + 155; 393 pub const ERROR_WINHTTP_REDIRECT_FAILED: DWORD = WINHTTP_ERROR_BASE + 156; 394 pub const ERROR_WINHTTP_AUTO_PROXY_SERVICE_ERROR: DWORD = WINHTTP_ERROR_BASE + 178; 395 pub const ERROR_WINHTTP_BAD_AUTO_PROXY_SCRIPT: DWORD = WINHTTP_ERROR_BASE + 166; 396 pub const ERROR_WINHTTP_UNABLE_TO_DOWNLOAD_SCRIPT: DWORD = WINHTTP_ERROR_BASE + 167; 397 pub const ERROR_WINHTTP_UNHANDLED_SCRIPT_TYPE: DWORD = WINHTTP_ERROR_BASE + 176; 398 pub const ERROR_WINHTTP_SCRIPT_EXECUTION_ERROR: DWORD = WINHTTP_ERROR_BASE + 177; 399 pub const ERROR_WINHTTP_NOT_INITIALIZED: DWORD = WINHTTP_ERROR_BASE + 172; 400 pub const ERROR_WINHTTP_SECURE_FAILURE: DWORD = WINHTTP_ERROR_BASE + 175; 401 pub const ERROR_WINHTTP_SECURE_CERT_DATE_INVALID: DWORD = WINHTTP_ERROR_BASE + 37; 402 pub const ERROR_WINHTTP_SECURE_CERT_CN_INVALID: DWORD = WINHTTP_ERROR_BASE + 38; 403 pub const ERROR_WINHTTP_SECURE_INVALID_CA: DWORD = WINHTTP_ERROR_BASE + 45; 404 pub const ERROR_WINHTTP_SECURE_CERT_REV_FAILED: DWORD = WINHTTP_ERROR_BASE + 57; 405 pub const ERROR_WINHTTP_SECURE_CHANNEL_ERROR: DWORD = WINHTTP_ERROR_BASE + 157; 406 pub const ERROR_WINHTTP_SECURE_INVALID_CERT: DWORD = WINHTTP_ERROR_BASE + 169; 407 pub const ERROR_WINHTTP_SECURE_CERT_REVOKED: DWORD = WINHTTP_ERROR_BASE + 170; 408 pub const ERROR_WINHTTP_SECURE_CERT_WRONG_USAGE: DWORD = WINHTTP_ERROR_BASE + 179; 409 pub const ERROR_WINHTTP_AUTODETECTION_FAILED: DWORD = WINHTTP_ERROR_BASE + 180; 410 pub const ERROR_WINHTTP_HEADER_COUNT_EXCEEDED: DWORD = WINHTTP_ERROR_BASE + 181; 411 pub const ERROR_WINHTTP_HEADER_SIZE_OVERFLOW: DWORD = WINHTTP_ERROR_BASE + 182; 412 pub const ERROR_WINHTTP_CHUNKED_ENCODING_HEADER_SIZE_OVERFLOW: DWORD = WINHTTP_ERROR_BASE + 183; 413 pub const ERROR_WINHTTP_RESPONSE_DRAIN_OVERFLOW: DWORD = WINHTTP_ERROR_BASE + 184; 414 pub const ERROR_WINHTTP_CLIENT_CERT_NO_PRIVATE_KEY: DWORD = WINHTTP_ERROR_BASE + 185; 415 pub const ERROR_WINHTTP_CLIENT_CERT_NO_ACCESS_PRIVATE_KEY: DWORD = WINHTTP_ERROR_BASE + 186; 416 pub const WINHTTP_ERROR_LAST: DWORD = WINHTTP_ERROR_BASE + 186; 417 pub const WINHTTP_RESET_STATE: DWORD = 0x00000001; 418 pub const WINHTTP_RESET_SWPAD_CURRENT_NETWORK: DWORD = 0x00000002; 419 pub const WINHTTP_RESET_SWPAD_ALL: DWORD = 0x00000004; 420 pub const WINHTTP_RESET_SCRIPT_CACHE: DWORD = 0x00000008; 421 pub const WINHTTP_RESET_ALL: DWORD = 0x0000FFFF; 422 pub const WINHTTP_RESET_NOTIFY_NETWORK_CHANGED: DWORD = 0x00010000; 423 pub const WINHTTP_RESET_OUT_OF_PROC: DWORD = 0x00020000; 424 extern "system" { WinHttpSetStatusCallback( hInternet: HINTERNET, lpfnInternetCallback: WINHTTP_STATUS_CALLBACK, dwNotificationFlags: DWORD, dwReserved: DWORD_PTR, ) -> WINHTTP_STATUS_CALLBACK425 pub fn WinHttpSetStatusCallback( 426 hInternet: HINTERNET, 427 lpfnInternetCallback: WINHTTP_STATUS_CALLBACK, 428 dwNotificationFlags: DWORD, 429 dwReserved: DWORD_PTR, 430 ) -> WINHTTP_STATUS_CALLBACK; WinHttpTimeFromSystemTime( pst: *const SYSTEMTIME, pwszTime: LPWSTR, ) -> BOOL431 pub fn WinHttpTimeFromSystemTime( 432 pst: *const SYSTEMTIME, 433 pwszTime: LPWSTR, 434 ) -> BOOL; WinHttpTimeToSystemTime( pwszTime: LPCWSTR, pst: *mut SYSTEMTIME, ) -> BOOL435 pub fn WinHttpTimeToSystemTime( 436 pwszTime: LPCWSTR, 437 pst: *mut SYSTEMTIME, 438 ) -> BOOL; WinHttpCrackUrl( pwszUrl: LPCWSTR, dwUrlLength: DWORD, dwFlags: DWORD, lpUrlComponents: LPURL_COMPONENTS, ) -> BOOL439 pub fn WinHttpCrackUrl( 440 pwszUrl: LPCWSTR, 441 dwUrlLength: DWORD, 442 dwFlags: DWORD, 443 lpUrlComponents: LPURL_COMPONENTS, 444 ) -> BOOL; WinHttpCreateUrl( lpUrlComponents: LPURL_COMPONENTS, dwFlags: DWORD, pwszUrl: LPWSTR, pdwUrlLength: LPDWORD, ) -> BOOL445 pub fn WinHttpCreateUrl( 446 lpUrlComponents: LPURL_COMPONENTS, 447 dwFlags: DWORD, 448 pwszUrl: LPWSTR, 449 pdwUrlLength: LPDWORD, 450 ) -> BOOL; WinHttpCheckPlatform() -> BOOL451 pub fn WinHttpCheckPlatform() -> BOOL; WinHttpGetDefaultProxyConfiguration( pProxyInfo: *mut WINHTTP_PROXY_INFO, ) -> BOOL452 pub fn WinHttpGetDefaultProxyConfiguration( 453 pProxyInfo: *mut WINHTTP_PROXY_INFO, 454 ) -> BOOL; WinHttpSetDefaultProxyConfiguration( pProxyInfo: *mut WINHTTP_PROXY_INFO, ) -> BOOL455 pub fn WinHttpSetDefaultProxyConfiguration( 456 pProxyInfo: *mut WINHTTP_PROXY_INFO, 457 ) -> BOOL; WinHttpOpen( pszAgentW: LPCWSTR, dwAccessType: DWORD, pszProxyW: LPCWSTR, pszProxyBypassW: LPCWSTR, dwFlags: DWORD, ) -> HINTERNET458 pub fn WinHttpOpen( 459 pszAgentW: LPCWSTR, 460 dwAccessType: DWORD, 461 pszProxyW: LPCWSTR, 462 pszProxyBypassW: LPCWSTR, 463 dwFlags: DWORD, 464 ) -> HINTERNET; WinHttpCloseHandle( hInternet: HINTERNET, ) -> BOOL465 pub fn WinHttpCloseHandle( 466 hInternet: HINTERNET, 467 ) -> BOOL; WinHttpConnect( hSession: HINTERNET, pswzServerName: LPCWSTR, nServerPort: INTERNET_PORT, dwReserved: DWORD, ) -> HINTERNET468 pub fn WinHttpConnect( 469 hSession: HINTERNET, 470 pswzServerName: LPCWSTR, 471 nServerPort: INTERNET_PORT, 472 dwReserved: DWORD, 473 ) -> HINTERNET; WinHttpReadData( hRequest: HINTERNET, lpBuffer: LPVOID, dwNumberOfBytesToRead: DWORD, lpdwNumberOfBytesRead: LPDWORD, ) -> BOOL474 pub fn WinHttpReadData( 475 hRequest: HINTERNET, 476 lpBuffer: LPVOID, 477 dwNumberOfBytesToRead: DWORD, 478 lpdwNumberOfBytesRead: LPDWORD, 479 ) -> BOOL; WinHttpWriteData( hRequest: HINTERNET, lpBuffer: LPCVOID, dwNumberOfBytesToWrite: DWORD, lpdwNumberOfBytesWritten: LPDWORD, ) -> BOOL480 pub fn WinHttpWriteData( 481 hRequest: HINTERNET, 482 lpBuffer: LPCVOID, 483 dwNumberOfBytesToWrite: DWORD, 484 lpdwNumberOfBytesWritten: LPDWORD, 485 ) -> BOOL; WinHttpQueryDataAvailable( hRequest: HINTERNET, lpdwNumberOfBytesAvailable: LPDWORD, ) -> BOOL486 pub fn WinHttpQueryDataAvailable( 487 hRequest: HINTERNET, 488 lpdwNumberOfBytesAvailable: LPDWORD, 489 ) -> BOOL; WinHttpQueryOption( hInternet: HINTERNET, dwOption: DWORD, lpBuffer: LPVOID, lpdwBufferLength: LPDWORD, ) -> BOOL490 pub fn WinHttpQueryOption( 491 hInternet: HINTERNET, 492 dwOption: DWORD, 493 lpBuffer: LPVOID, 494 lpdwBufferLength: LPDWORD, 495 ) -> BOOL; WinHttpSetOption( hInternet: HINTERNET, dwOption: DWORD, lpBuffer: LPVOID, dwBufferLength: DWORD, ) -> BOOL496 pub fn WinHttpSetOption( 497 hInternet: HINTERNET, 498 dwOption: DWORD, 499 lpBuffer: LPVOID, 500 dwBufferLength: DWORD, 501 ) -> BOOL; WinHttpSetTimeouts( hInternet: HINTERNET, nResolveTimeout: c_int, nConnectTimeout: c_int, nSendTimeout: c_int, nReceiveTimeout: c_int, ) -> BOOL502 pub fn WinHttpSetTimeouts( 503 hInternet: HINTERNET, 504 nResolveTimeout: c_int, 505 nConnectTimeout: c_int, 506 nSendTimeout: c_int, 507 nReceiveTimeout: c_int, 508 ) -> BOOL; WinHttpOpenRequest( hConnect: HINTERNET, pwszVerb: LPCWSTR, pwszObjectName: LPCWSTR, pwszVersion: LPCWSTR, pwszReferrer: LPCWSTR, ppwszAcceptTypes: *mut LPCWSTR, dwFlags: DWORD, ) -> HINTERNET509 pub fn WinHttpOpenRequest( 510 hConnect: HINTERNET, 511 pwszVerb: LPCWSTR, 512 pwszObjectName: LPCWSTR, 513 pwszVersion: LPCWSTR, 514 pwszReferrer: LPCWSTR, 515 ppwszAcceptTypes: *mut LPCWSTR, 516 dwFlags: DWORD, 517 ) -> HINTERNET; WinHttpAddRequestHeaders( hRequest: HINTERNET, lpszHeaders: LPCWSTR, dwHeadersLength: DWORD, dwModifiers: DWORD, ) -> BOOL518 pub fn WinHttpAddRequestHeaders( 519 hRequest: HINTERNET, 520 lpszHeaders: LPCWSTR, 521 dwHeadersLength: DWORD, 522 dwModifiers: DWORD, 523 ) -> BOOL; WinHttpSendRequest( hRequest: HINTERNET, lpszHeaders: LPCWSTR, dwHeadersLength: DWORD, lpOptional: LPVOID, dwOptionalLength: DWORD, dwTotalLength: DWORD, dwContext: DWORD_PTR, ) -> BOOL524 pub fn WinHttpSendRequest( 525 hRequest: HINTERNET, 526 lpszHeaders: LPCWSTR, 527 dwHeadersLength: DWORD, 528 lpOptional: LPVOID, 529 dwOptionalLength: DWORD, 530 dwTotalLength: DWORD, 531 dwContext: DWORD_PTR, 532 ) -> BOOL; WinHttpSetCredentials( hRequest: HINTERNET, AuthTargets: DWORD, AuthScheme: DWORD, pwszUserName: LPCWSTR, pwszPassword: LPCWSTR, pAuthParams: LPVOID, ) -> BOOL533 pub fn WinHttpSetCredentials( 534 hRequest: HINTERNET, 535 AuthTargets: DWORD, 536 AuthScheme: DWORD, 537 pwszUserName: LPCWSTR, 538 pwszPassword: LPCWSTR, 539 pAuthParams: LPVOID, 540 ) -> BOOL; WinHttpQueryAuthSchemes( hRequest: HINTERNET, lpdwSupportedSchemes: LPDWORD, lpdwFirstScheme: LPDWORD, pdwAuthTarget: LPDWORD, ) -> BOOL541 pub fn WinHttpQueryAuthSchemes( 542 hRequest: HINTERNET, 543 lpdwSupportedSchemes: LPDWORD, 544 lpdwFirstScheme: LPDWORD, 545 pdwAuthTarget: LPDWORD, 546 ) -> BOOL; WinHttpReceiveResponse( hRequest: HINTERNET, lpReserved: LPVOID, ) -> BOOL547 pub fn WinHttpReceiveResponse( 548 hRequest: HINTERNET, 549 lpReserved: LPVOID, 550 ) -> BOOL; WinHttpQueryHeaders( hRequest: HINTERNET, dwInfoLevel: DWORD, pwszName: LPCWSTR, lpBuffer: LPVOID, lpdwBufferLength: LPDWORD, lpdwIndex: LPDWORD, ) -> BOOL551 pub fn WinHttpQueryHeaders( 552 hRequest: HINTERNET, 553 dwInfoLevel: DWORD, 554 pwszName: LPCWSTR, 555 lpBuffer: LPVOID, 556 lpdwBufferLength: LPDWORD, 557 lpdwIndex: LPDWORD, 558 ) -> BOOL; WinHttpDetectAutoProxyConfigUrl( dwAutoDetectFlags: DWORD, ppwstrAutoConfigUrl: *mut LPWSTR, ) -> BOOL559 pub fn WinHttpDetectAutoProxyConfigUrl( 560 dwAutoDetectFlags: DWORD, 561 ppwstrAutoConfigUrl: *mut LPWSTR, 562 ) -> BOOL; WinHttpGetProxyForUrl( hSession: HINTERNET, lpcwszUrl: LPCWSTR, pAutoProxyOptions: *mut WINHTTP_AUTOPROXY_OPTIONS, pProxyInfo: *mut WINHTTP_PROXY_INFO, ) -> BOOL563 pub fn WinHttpGetProxyForUrl( 564 hSession: HINTERNET, 565 lpcwszUrl: LPCWSTR, 566 pAutoProxyOptions: *mut WINHTTP_AUTOPROXY_OPTIONS, 567 pProxyInfo: *mut WINHTTP_PROXY_INFO, 568 ) -> BOOL; WinHttpCreateProxyResolver( hSession: HINTERNET, phResolver: *mut HINTERNET, ) -> DWORD569 pub fn WinHttpCreateProxyResolver( 570 hSession: HINTERNET, 571 phResolver: *mut HINTERNET, 572 ) -> DWORD; WinHttpGetProxyForUrlEx( hResolver: HINTERNET, pcwszUrl: PCWSTR, pAutoProxyOptions: *mut WINHTTP_AUTOPROXY_OPTIONS, pContext: DWORD_PTR, ) -> DWORD573 pub fn WinHttpGetProxyForUrlEx( 574 hResolver: HINTERNET, 575 pcwszUrl: PCWSTR, 576 pAutoProxyOptions: *mut WINHTTP_AUTOPROXY_OPTIONS, 577 pContext: DWORD_PTR, 578 ) -> DWORD; WinHttpGetProxyResult( hResolver: HINTERNET, pProxyResult: *mut WINHTTP_PROXY_RESULT, ) -> DWORD579 pub fn WinHttpGetProxyResult( 580 hResolver: HINTERNET, 581 pProxyResult: *mut WINHTTP_PROXY_RESULT, 582 ) -> DWORD; WinHttpFreeProxyResult( pProxyResult: *mut WINHTTP_PROXY_RESULT, )583 pub fn WinHttpFreeProxyResult( 584 pProxyResult: *mut WINHTTP_PROXY_RESULT, 585 ); WinHttpResetAutoProxy( hSession: HINTERNET, dwFlags: DWORD, ) -> DWORD586 pub fn WinHttpResetAutoProxy( 587 hSession: HINTERNET, 588 dwFlags: DWORD, 589 ) -> DWORD; WinHttpGetIEProxyConfigForCurrentUser( pProxyConfig: *mut WINHTTP_CURRENT_USER_IE_PROXY_CONFIG, ) -> BOOL590 pub fn WinHttpGetIEProxyConfigForCurrentUser( 591 pProxyConfig: *mut WINHTTP_CURRENT_USER_IE_PROXY_CONFIG, 592 ) -> BOOL; 593 } 594 ENUM!{enum WINHTTP_WEB_SOCKET_OPERATION { 595 WINHTTP_WEB_SOCKET_SEND_OPERATION = 0, 596 WINHTTP_WEB_SOCKET_RECEIVE_OPERATION = 1, 597 WINHTTP_WEB_SOCKET_CLOSE_OPERATION = 2, 598 WINHTTP_WEB_SOCKET_SHUTDOWN_OPERATION = 3, 599 }} 600 ENUM!{enum WINHTTP_WEB_SOCKET_BUFFER_TYPE { 601 WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE = 0, 602 WINHTTP_WEB_SOCKET_BINARY_FRAGMENT_BUFFER_TYPE = 1, 603 WINHTTP_WEB_SOCKET_UTF8_MESSAGE_BUFFER_TYPE = 2, 604 WINHTTP_WEB_SOCKET_UTF8_FRAGMENT_BUFFER_TYPE = 3, 605 WINHTTP_WEB_SOCKET_CLOSE_BUFFER_TYPE = 4, 606 }} 607 ENUM!{enum WINHTTP_WEB_SOCKET_CLOSE_STATUS { 608 WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS = 1000, 609 WINHTTP_WEB_SOCKET_ENDPOINT_TERMINATED_CLOSE_STATUS = 1001, 610 WINHTTP_WEB_SOCKET_PROTOCOL_ERROR_CLOSE_STATUS = 1002, 611 WINHTTP_WEB_SOCKET_INVALID_DATA_TYPE_CLOSE_STATUS = 1003, 612 WINHTTP_WEB_SOCKET_EMPTY_CLOSE_STATUS = 1005, 613 WINHTTP_WEB_SOCKET_ABORTED_CLOSE_STATUS = 1006, 614 WINHTTP_WEB_SOCKET_INVALID_PAYLOAD_CLOSE_STATUS = 1007, 615 WINHTTP_WEB_SOCKET_POLICY_VIOLATION_CLOSE_STATUS = 1008, 616 WINHTTP_WEB_SOCKET_MESSAGE_TOO_BIG_CLOSE_STATUS = 1009, 617 WINHTTP_WEB_SOCKET_UNSUPPORTED_EXTENSIONS_CLOSE_STATUS = 1010, 618 WINHTTP_WEB_SOCKET_SERVER_ERROR_CLOSE_STATUS = 1011, 619 WINHTTP_WEB_SOCKET_SECURE_HANDSHAKE_ERROR_CLOSE_STATUS = 1015, 620 }} 621 extern "system" { WinHttpWebSocketCompleteUpgrade( hRequest: HINTERNET, pContext: DWORD_PTR, ) -> HINTERNET622 pub fn WinHttpWebSocketCompleteUpgrade( 623 hRequest: HINTERNET, 624 pContext: DWORD_PTR, 625 ) -> HINTERNET; WinHttpWebSocketSend( hWebSocket: HINTERNET, eBufferType: WINHTTP_WEB_SOCKET_BUFFER_TYPE, pvBuffer: PVOID, dwBufferLength: DWORD, ) -> DWORD626 pub fn WinHttpWebSocketSend( 627 hWebSocket: HINTERNET, 628 eBufferType: WINHTTP_WEB_SOCKET_BUFFER_TYPE, 629 pvBuffer: PVOID, 630 dwBufferLength: DWORD, 631 ) -> DWORD; WinHttpWebSocketReceive( hWebSocket: HINTERNET, pvBuffer: PVOID, dwBufferLength: DWORD, pdwBytesRead: *mut DWORD, peBufferType: *mut WINHTTP_WEB_SOCKET_BUFFER_TYPE, ) -> DWORD632 pub fn WinHttpWebSocketReceive( 633 hWebSocket: HINTERNET, 634 pvBuffer: PVOID, 635 dwBufferLength: DWORD, 636 pdwBytesRead: *mut DWORD, 637 peBufferType: *mut WINHTTP_WEB_SOCKET_BUFFER_TYPE, 638 ) -> DWORD; WinHttpWebSocketShutdown( hWebSocket: HINTERNET, usStatus: USHORT, pvReason: PVOID, dwReasonLength: DWORD, ) -> DWORD639 pub fn WinHttpWebSocketShutdown( 640 hWebSocket: HINTERNET, 641 usStatus: USHORT, 642 pvReason: PVOID, 643 dwReasonLength: DWORD, 644 ) -> DWORD; WinHttpWebSocketClose( hWebSocket: HINTERNET, usStatus: USHORT, pvReason: PVOID, dwReasonLength: DWORD, ) -> DWORD645 pub fn WinHttpWebSocketClose( 646 hWebSocket: HINTERNET, 647 usStatus: USHORT, 648 pvReason: PVOID, 649 dwReasonLength: DWORD, 650 ) -> DWORD; WinHttpWebSocketQueryCloseStatus( hWebSocket: HINTERNET, pusStatus: *mut USHORT, pvReason: PVOID, dwReasonLength: DWORD, pdwReasonLengthConsumed: *mut DWORD, ) -> DWORD651 pub fn WinHttpWebSocketQueryCloseStatus( 652 hWebSocket: HINTERNET, 653 pusStatus: *mut USHORT, 654 pvReason: PVOID, 655 dwReasonLength: DWORD, 656 pdwReasonLengthConsumed: *mut DWORD, 657 ) -> DWORD; 658 } 659