1 // Copyright © 2015, skdltmxn 2 // Licensed under the MIT License <LICENSE.md> 3 //! Windows HTTP Services API constant definitions and macros 4 //54 5 pub type HINTERNET = ::LPVOID; 6 pub type LPHINTERNET = *mut HINTERNET; 7 pub type INTERNET_PORT = ::WORD; 8 pub type LPINTERNET_PORT = *mut INTERNET_PORT; 9 pub const INTERNET_DEFAULT_PORT: INTERNET_PORT = 0; 10 pub const INTERNET_DEFAULT_HTTP_PORT: INTERNET_PORT = 80; 11 pub const INTERNET_DEFAULT_HTTPS_PORT: INTERNET_PORT = 443; 12 pub const WINHTTP_FLAG_ASYNC: ::DWORD = 0x10000000; 13 pub const WINHTTP_FLAG_SECURE: ::DWORD = 0x00800000; 14 pub const WINHTTP_FLAG_ESCAPE_PERCENT: ::DWORD = 0x00000004; 15 pub const WINHTTP_FLAG_NULL_CODEPAGE: ::DWORD = 0x00000008; 16 pub const WINHTTP_FLAG_BYPASS_PROXY_CACHE: ::DWORD = 0x00000100; 17 pub const WINHTTP_FLAG_REFRESH: ::DWORD = WINHTTP_FLAG_BYPASS_PROXY_CACHE; 18 pub const WINHTTP_FLAG_ESCAPE_DISABLE: ::DWORD = 0x00000040; 19 pub const WINHTTP_FLAG_ESCAPE_DISABLE_QUERY: ::DWORD = 0x00000080; 20 STRUCT!{struct WINHTTP_ASYNC_RESULT { 21 dwResult: ::DWORD_PTR, 22 dwError: ::DWORD, 23 }} 24 pub type LPWINHTTP_ASYNC_RESULT = *mut WINHTTP_ASYNC_RESULT; 25 pub type INTERNET_SCHEME = ::c_int; 26 pub type LPINTERNET_SCHEME = *mut ::c_int; 27 pub const INTERNET_SCHEME_HTTP: INTERNET_SCHEME = 1; 28 pub const INTERNET_SCHEME_HTTPS: INTERNET_SCHEME = 2; 29 pub const INTERNET_SCHEME_FTP: INTERNET_SCHEME = 3; 30 pub const INTERNET_SCHEME_SOCKS: INTERNET_SCHEME = 4; 31 STRUCT!{struct URL_COMPONENTS { 32 dwStructSize: ::DWORD, 33 lpszScheme: ::LPWSTR, 34 dwSchemeLength: ::DWORD, 35 nScheme: INTERNET_SCHEME, 36 lpszHostName: ::LPWSTR, 37 dwHostNameLength: ::DWORD, 38 nPort: INTERNET_PORT, 39 lpszUserName: ::LPWSTR, 40 dwUserNameLength: ::DWORD, 41 lpszPassword: ::LPWSTR, 42 dwPasswordLength: ::DWORD, 43 lpszUrlPath: ::LPWSTR, 44 dwUrlPathLength: ::DWORD, 45 lpszExtraInfo: ::LPWSTR, 46 dwExtraInfoLength: ::DWORD, 47 }} 48 pub type LPURL_COMPONENTS = *mut URL_COMPONENTS; 49 pub type URL_COMPONENTSW = URL_COMPONENTS; 50 pub type LPURL_COMPONENTSW = LPURL_COMPONENTS; 51 STRUCT!{struct WINHTTP_PROXY_INFO { 52 dwAccessType: ::DWORD, 53 lpszProxy: ::LPWSTR, 54 lpszProxyBypass: ::LPWSTR, 55 }} 56 pub type LPWINHTTP_PROXY_INFO = *mut WINHTTP_PROXY_INFO; 57 pub type WINHTTP_PROXY_INFOW = WINHTTP_PROXY_INFO; 58 pub type LPWINHTTP_PROXY_INFOW = LPWINHTTP_PROXY_INFO; 59 STRUCT!{struct WINHTTP_AUTOPROXY_OPTIONS { 60 dwFlags: ::DWORD, 61 dwAutoDetectFlags: ::DWORD, 62 lpszAutoConfigUrl: ::LPCWSTR, 63 lpvReserved: ::LPVOID, 64 dwReserved: ::DWORD, 65 fAutoLogonIfChallenged: ::BOOL, 66 }} 67 pub const WINHTTP_AUTOPROXY_AUTO_DETECT: ::DWORD = 0x00000001; 68 pub const WINHTTP_AUTOPROXY_CONFIG_URL: ::DWORD = 0x00000002; 69 pub const WINHTTP_AUTOPROXY_HOST_KEEPCASE: ::DWORD = 0x00000004; 70 pub const WINHTTP_AUTOPROXY_HOST_LOWERCASE: ::DWORD = 0x00000008; 71 pub const WINHTTP_AUTOPROXY_RUN_INPROCESS: ::DWORD = 0x00010000; 72 pub const WINHTTP_AUTOPROXY_RUN_OUTPROCESS_ONLY: ::DWORD = 0x00020000; 73 pub const WINHTTP_AUTOPROXY_NO_DIRECTACCESS: ::DWORD = 0x00040000; 74 pub const WINHTTP_AUTOPROXY_NO_CACHE_CLIENT: ::DWORD = 0x00080000; 75 pub const WINHTTP_AUTOPROXY_NO_CACHE_SVC: ::DWORD = 0x00100000; 76 pub const WINHTTP_AUTOPROXY_SORT_RESULTS: ::DWORD = 0x00400000; 77 pub const WINHTTP_AUTO_DETECT_TYPE_DHCP: ::DWORD = 0x00000001; 78 pub const WINHTTP_AUTO_DETECT_TYPE_DNS_A: ::DWORD = 0x00000002; 79 STRUCT!{struct WINHTTP_PROXY_RESULT_ENTRY { 80 fProxy: ::BOOL, 81 fBypass: ::BOOL, 82 ProxyScheme: INTERNET_SCHEME, 83 pwszProxy: ::PWSTR, 84 ProxyPort: INTERNET_PORT, 85 }} 86 STRUCT!{struct WINHTTP_PROXY_RESULT { 87 cEntries: ::DWORD, 88 pEntries: *mut WINHTTP_PROXY_RESULT_ENTRY, 89 }} 90 pub const WINHTTP_FIRST_OPTION: ::DWORD = WINHTTP_OPTION_CALLBACK; 91 pub const WINHTTP_OPTION_CALLBACK: ::DWORD = 1; 92 pub const WINHTTP_OPTION_RESOLVE_TIMEOUT: ::DWORD = 2; 93 pub const WINHTTP_OPTION_CONNECT_TIMEOUT: ::DWORD = 3; 94 pub const WINHTTP_OPTION_CONNECT_RETRIES: ::DWORD = 4; 95 pub const WINHTTP_OPTION_SEND_TIMEOUT: ::DWORD = 5; 96 pub const WINHTTP_OPTION_RECEIVE_TIMEOUT: ::DWORD = 6; 97 pub const WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT: ::DWORD = 7; 98 pub const WINHTTP_OPTION_HANDLE_TYPE: ::DWORD = 9; 99 pub const WINHTTP_OPTION_READ_BUFFER_SIZE: ::DWORD = 12; 100 pub const WINHTTP_OPTION_WRITE_BUFFER_SIZE: ::DWORD = 13; 101 pub const WINHTTP_OPTION_PARENT_HANDLE: ::DWORD = 21; 102 pub const WINHTTP_OPTION_EXTENDED_ERROR: ::DWORD = 24; 103 pub const WINHTTP_OPTION_SECURITY_FLAGS: ::DWORD = 31; 104 pub const WINHTTP_OPTION_SECURITY_CERTIFICATE_STRUCT: ::DWORD = 32; 105 pub const WINHTTP_OPTION_URL: ::DWORD = 34; 106 pub const WINHTTP_OPTION_SECURITY_KEY_BITNESS: ::DWORD = 36; 107 pub const WINHTTP_OPTION_PROXY: ::DWORD = 38; 108 pub const WINHTTP_OPTION_PROXY_RESULT_ENTRY: ::DWORD = 39; 109 pub const WINHTTP_OPTION_USER_AGENT: ::DWORD = 41; 110 pub const WINHTTP_OPTION_CONTEXT_VALUE: ::DWORD = 45; 111 pub const WINHTTP_OPTION_CLIENT_CERT_CONTEXT: ::DWORD = 47; 112 pub const WINHTTP_OPTION_REQUEST_PRIORITY: ::DWORD = 58; 113 pub const WINHTTP_OPTION_HTTP_VERSION: ::DWORD = 59; 114 pub const WINHTTP_OPTION_DISABLE_FEATURE: ::DWORD = 63; 115 pub const WINHTTP_OPTION_CODEPAGE: ::DWORD = 68; 116 pub const WINHTTP_OPTION_MAX_CONNS_PER_SERVER: ::DWORD = 73; 117 pub const WINHTTP_OPTION_MAX_CONNS_PER_1_0_SERVER: ::DWORD = 74; 118 pub const WINHTTP_OPTION_AUTOLOGON_POLICY: ::DWORD = 77; 119 pub const WINHTTP_OPTION_SERVER_CERT_CONTEXT: ::DWORD = 78; 120 pub const WINHTTP_OPTION_ENABLE_FEATURE: ::DWORD = 79; 121 pub const WINHTTP_OPTION_WORKER_THREAD_COUNT: ::DWORD = 80; 122 pub const WINHTTP_OPTION_PASSPORT_COBRANDING_TEXT: ::DWORD = 81; 123 pub const WINHTTP_OPTION_PASSPORT_COBRANDING_URL: ::DWORD = 82; 124 pub const WINHTTP_OPTION_CONFIGURE_PASSPORT_AUTH: ::DWORD = 83; 125 pub const WINHTTP_OPTION_SECURE_PROTOCOLS: ::DWORD = 84; 126 pub const WINHTTP_OPTION_ENABLETRACING: ::DWORD = 85; 127 pub const WINHTTP_OPTION_PASSPORT_SIGN_OUT: ::DWORD = 86; 128 pub const WINHTTP_OPTION_PASSPORT_RETURN_URL: ::DWORD = 87; 129 pub const WINHTTP_OPTION_REDIRECT_POLICY: ::DWORD = 88; 130 pub const WINHTTP_OPTION_MAX_HTTP_AUTOMATIC_REDIRECTS: ::DWORD = 89; 131 pub const WINHTTP_OPTION_MAX_HTTP_STATUS_CONTINUE: ::DWORD = 90; 132 pub const WINHTTP_OPTION_MAX_RESPONSE_HEADER_SIZE: ::DWORD = 91; 133 pub const WINHTTP_OPTION_MAX_RESPONSE_DRAIN_SIZE: ::DWORD = 92; 134 pub const WINHTTP_OPTION_CONNECTION_INFO: ::DWORD = 93; 135 pub const WINHTTP_OPTION_CLIENT_CERT_ISSUER_LIST: ::DWORD = 94; 136 pub const WINHTTP_OPTION_SPN: ::DWORD = 96; 137 pub const WINHTTP_OPTION_GLOBAL_PROXY_CREDS: ::DWORD = 97; 138 pub const WINHTTP_OPTION_GLOBAL_SERVER_CREDS: ::DWORD = 98; 139 pub const WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT: ::DWORD = 99; 140 pub const WINHTTP_OPTION_REJECT_USERPWD_IN_URL: ::DWORD = 100; 141 pub const WINHTTP_OPTION_USE_GLOBAL_SERVER_CREDENTIALS: ::DWORD = 101; 142 pub const WINHTTP_OPTION_RECEIVE_PROXY_CONNECT_RESPONSE: ::DWORD = 103; 143 pub const WINHTTP_OPTION_IS_PROXY_CONNECT_RESPONSE: ::DWORD = 104; 144 pub const WINHTTP_OPTION_SERVER_SPN_USED: ::DWORD = 106; 145 pub const WINHTTP_OPTION_PROXY_SPN_USED: ::DWORD = 107; 146 pub const WINHTTP_OPTION_SERVER_CBT: ::DWORD = 108; 147 pub const WINHTTP_OPTION_UNSAFE_HEADER_PARSING: ::DWORD = 110; 148 pub const WINHTTP_OPTION_ASSURED_NON_BLOCKING_CALLBACKS: ::DWORD = 111; 149 pub const WINHTTP_OPTION_UPGRADE_TO_WEB_SOCKET: ::DWORD = 114; 150 pub const WINHTTP_OPTION_WEB_SOCKET_CLOSE_TIMEOUT: ::DWORD = 115; 151 pub const WINHTTP_OPTION_WEB_SOCKET_KEEPALIVE_INTERVAL: ::DWORD = 116; 152 pub const WINHTTP_OPTION_DECOMPRESSION: ::DWORD = 118; 153 pub const WINHTTP_OPTION_WEB_SOCKET_RECEIVE_BUFFER_SIZE: ::DWORD = 122; 154 pub const WINHTTP_OPTION_WEB_SOCKET_SEND_BUFFER_SIZE: ::DWORD = 123; 155 pub const WINHTTP_LAST_OPTION: ::DWORD = WINHTTP_OPTION_WEB_SOCKET_SEND_BUFFER_SIZE; 156 pub const WINHTTP_OPTION_USERNAME: ::DWORD = 0x1000; 157 pub const WINHTTP_OPTION_PASSWORD: ::DWORD = 0x1001; 158 pub const WINHTTP_OPTION_PROXY_USERNAME: ::DWORD = 0x1002; 159 pub const WINHTTP_OPTION_PROXY_PASSWORD: ::DWORD = 0x1003; 160 //552 161 pub type WINHTTP_STATUS_CALLBACK = Option<unsafe extern "system" fn( 162 hInternet: HINTERNET, dwContext: ::DWORD_PTR, dwInternetStatus: ::DWORD, 163 lpvStatusInformation: ::LPVOID, dwStatusInformationLength: ::DWORD, 164 )>; 165 pub type LPWINHTTP_STATUS_CALLBACK = *mut WINHTTP_STATUS_CALLBACK; 166 pub const WINHTTP_CALLBACK_STATUS_RESOLVING_NAME: ::DWORD = 0x00000001; 167 pub const WINHTTP_CALLBACK_STATUS_NAME_RESOLVED: ::DWORD = 0x00000002; 168 pub const WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER: ::DWORD = 0x00000004; 169 pub const WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER: ::DWORD = 0x00000008; 170 pub const WINHTTP_CALLBACK_STATUS_SENDING_REQUEST: ::DWORD = 0x00000010; 171 pub const WINHTTP_CALLBACK_STATUS_REQUEST_SENT: ::DWORD = 0x00000020; 172 pub const WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE: ::DWORD = 0x00000040; 173 pub const WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED: ::DWORD = 0x00000080; 174 pub const WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION: ::DWORD = 0x00000100; 175 pub const WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED: ::DWORD = 0x00000200; 176 pub const WINHTTP_CALLBACK_STATUS_HANDLE_CREATED: ::DWORD = 0x00000400; 177 pub const WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING: ::DWORD = 0x00000800; 178 pub const WINHTTP_CALLBACK_STATUS_DETECTING_PROXY: ::DWORD = 0x00001000; 179 pub const WINHTTP_CALLBACK_STATUS_REDIRECT: ::DWORD = 0x00004000; 180 pub const WINHTTP_CALLBACK_STATUS_INTERMEDIATE_RESPONSE: ::DWORD = 0x00008000; 181 pub const WINHTTP_CALLBACK_STATUS_SECURE_FAILURE: ::DWORD = 0x00010000; 182 pub const WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE: ::DWORD = 0x00020000; 183 pub const WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE: ::DWORD = 0x00040000; 184 pub const WINHTTP_CALLBACK_STATUS_READ_COMPLETE: ::DWORD = 0x00080000; 185 pub const WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE: ::DWORD = 0x00100000; 186 pub const WINHTTP_CALLBACK_STATUS_REQUEST_ERROR: ::DWORD = 0x00200000; 187 pub const WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE: ::DWORD = 0x00400000; 188 pub const WINHTTP_CALLBACK_STATUS_GETPROXYFORURL_COMPLETE: ::DWORD = 0x01000000; 189 pub const WINHTTP_CALLBACK_STATUS_CLOSE_COMPLETE: ::DWORD = 0x02000000; 190 pub const WINHTTP_CALLBACK_STATUS_SHUTDOWN_COMPLETE: ::DWORD = 0x04000000; 191 pub const WINHTTP_CALLBACK_FLAG_RESOLVE_NAME: ::DWORD = WINHTTP_CALLBACK_STATUS_RESOLVING_NAME 192 | WINHTTP_CALLBACK_STATUS_NAME_RESOLVED; 193 pub const WINHTTP_CALLBACK_FLAG_CONNECT_TO_SERVER: ::DWORD = 194 WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER | WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER; 195 pub const WINHTTP_CALLBACK_FLAG_SEND_REQUEST: ::DWORD = 196 WINHTTP_CALLBACK_STATUS_SENDING_REQUEST | WINHTTP_CALLBACK_STATUS_REQUEST_SENT; 197 pub const WINHTTP_CALLBACK_FLAG_RECEIVE_RESPONSE: ::DWORD = 198 WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE | WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED; 199 pub const WINHTTP_CALLBACK_FLAG_CLOSE_CONNECTION: ::DWORD = 200 WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION | WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED; 201 pub const WINHTTP_CALLBACK_FLAG_HANDLES: ::DWORD = 202 WINHTTP_CALLBACK_STATUS_HANDLE_CREATED | WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING; 203 pub const WINHTTP_CALLBACK_FLAG_DETECTING_PROXY: ::DWORD = WINHTTP_CALLBACK_STATUS_DETECTING_PROXY; 204 pub const WINHTTP_CALLBACK_FLAG_REDIRECT: ::DWORD = WINHTTP_CALLBACK_STATUS_REDIRECT; 205 pub const WINHTTP_CALLBACK_FLAG_INTERMEDIATE_RESPONSE: ::DWORD = 206 WINHTTP_CALLBACK_STATUS_INTERMEDIATE_RESPONSE; 207 pub const WINHTTP_CALLBACK_FLAG_SECURE_FAILURE: ::DWORD = WINHTTP_CALLBACK_STATUS_SECURE_FAILURE; 208 pub const WINHTTP_CALLBACK_FLAG_SENDREQUEST_COMPLETE: ::DWORD = 209 WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE; 210 pub const WINHTTP_CALLBACK_FLAG_HEADERS_AVAILABLE: ::DWORD = 211 WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE; 212 pub const WINHTTP_CALLBACK_FLAG_DATA_AVAILABLE: ::DWORD = WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE; 213 pub const WINHTTP_CALLBACK_FLAG_READ_COMPLETE: ::DWORD = WINHTTP_CALLBACK_STATUS_READ_COMPLETE; 214 pub const WINHTTP_CALLBACK_FLAG_WRITE_COMPLETE: ::DWORD = WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE; 215 pub const WINHTTP_CALLBACK_FLAG_REQUEST_ERROR: ::DWORD = WINHTTP_CALLBACK_STATUS_REQUEST_ERROR; 216 pub const WINHTTP_CALLBACK_FLAG_GETPROXYFORURL_COMPLETE: ::DWORD = 217 WINHTTP_CALLBACK_STATUS_GETPROXYFORURL_COMPLETE; 218 pub const WINHTTP_CALLBACK_FLAG_ALL_COMPLETIONS: ::DWORD = 219 WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE | WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE 220 | WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE | WINHTTP_CALLBACK_STATUS_READ_COMPLETE 221 | WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE | WINHTTP_CALLBACK_STATUS_REQUEST_ERROR 222 | WINHTTP_CALLBACK_STATUS_GETPROXYFORURL_COMPLETE; 223 pub const WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS: ::DWORD = 0xffffffff; 224 pub const WINHTTP_QUERY_MIME_VERSION: ::DWORD = 0; 225 pub const WINHTTP_QUERY_CONTENT_TYPE: ::DWORD = 1; 226 pub const WINHTTP_QUERY_CONTENT_TRANSFER_ENCODING: ::DWORD = 2; 227 pub const WINHTTP_QUERY_CONTENT_ID: ::DWORD = 3; 228 pub const WINHTTP_QUERY_CONTENT_DESCRIPTION: ::DWORD = 4; 229 pub const WINHTTP_QUERY_CONTENT_LENGTH: ::DWORD = 5; 230 pub const WINHTTP_QUERY_CONTENT_LANGUAGE: ::DWORD = 6; 231 pub const WINHTTP_QUERY_ALLOW: ::DWORD = 7; 232 pub const WINHTTP_QUERY_PUBLIC: ::DWORD = 8; 233 pub const WINHTTP_QUERY_DATE: ::DWORD = 9; 234 pub const WINHTTP_QUERY_EXPIRES: ::DWORD = 10; 235 pub const WINHTTP_QUERY_LAST_MODIFIED: ::DWORD = 11; 236 pub const WINHTTP_QUERY_MESSAGE_ID: ::DWORD = 12; 237 pub const WINHTTP_QUERY_URI: ::DWORD = 13; 238 pub const WINHTTP_QUERY_DERIVED_FROM: ::DWORD = 14; 239 pub const WINHTTP_QUERY_COST: ::DWORD = 15; 240 pub const WINHTTP_QUERY_LINK: ::DWORD = 16; 241 pub const WINHTTP_QUERY_PRAGMA: ::DWORD = 17; 242 pub const WINHTTP_QUERY_VERSION: ::DWORD = 18; 243 pub const WINHTTP_QUERY_STATUS_CODE: ::DWORD = 19; 244 pub const WINHTTP_QUERY_STATUS_TEXT: ::DWORD = 20; 245 pub const WINHTTP_QUERY_RAW_HEADERS: ::DWORD = 21; 246 pub const WINHTTP_QUERY_RAW_HEADERS_CRLF: ::DWORD = 22; 247 pub const WINHTTP_QUERY_CONNECTION: ::DWORD = 23; 248 pub const WINHTTP_QUERY_ACCEPT: ::DWORD = 24; 249 pub const WINHTTP_QUERY_ACCEPT_CHARSET: ::DWORD = 25; 250 pub const WINHTTP_QUERY_ACCEPT_ENCODING: ::DWORD = 26; 251 pub const WINHTTP_QUERY_ACCEPT_LANGUAGE: ::DWORD = 27; 252 pub const WINHTTP_QUERY_AUTHORIZATION: ::DWORD = 28; 253 pub const WINHTTP_QUERY_CONTENT_ENCODING: ::DWORD = 29; 254 pub const WINHTTP_QUERY_FORWARDED: ::DWORD = 30; 255 pub const WINHTTP_QUERY_FROM: ::DWORD = 31; 256 pub const WINHTTP_QUERY_IF_MODIFIED_SINCE: ::DWORD = 32; 257 pub const WINHTTP_QUERY_LOCATION: ::DWORD = 33; 258 pub const WINHTTP_QUERY_ORIG_URI: ::DWORD = 34; 259 pub const WINHTTP_QUERY_REFERER: ::DWORD = 35; 260 pub const WINHTTP_QUERY_RETRY_AFTER: ::DWORD = 36; 261 pub const WINHTTP_QUERY_SERVER: ::DWORD = 37; 262 pub const WINHTTP_QUERY_TITLE: ::DWORD = 38; 263 pub const WINHTTP_QUERY_USER_AGENT: ::DWORD = 39; 264 pub const WINHTTP_QUERY_WWW_AUTHENTICATE: ::DWORD = 40; 265 pub const WINHTTP_QUERY_PROXY_AUTHENTICATE: ::DWORD = 41; 266 pub const WINHTTP_QUERY_ACCEPT_RANGES: ::DWORD = 42; 267 pub const WINHTTP_QUERY_SET_COOKIE: ::DWORD = 43; 268 pub const WINHTTP_QUERY_COOKIE: ::DWORD = 44; 269 pub const WINHTTP_QUERY_REQUEST_METHOD: ::DWORD = 45; 270 pub const WINHTTP_QUERY_REFRESH: ::DWORD = 46; 271 pub const WINHTTP_QUERY_CONTENT_DISPOSITION: ::DWORD = 47; 272 pub const WINHTTP_QUERY_AGE: ::DWORD = 48; 273 pub const WINHTTP_QUERY_CACHE_CONTROL: ::DWORD = 49; 274 pub const WINHTTP_QUERY_CONTENT_BASE: ::DWORD = 50; 275 pub const WINHTTP_QUERY_CONTENT_LOCATION: ::DWORD = 51; 276 pub const WINHTTP_QUERY_CONTENT_MD5: ::DWORD = 52; 277 pub const WINHTTP_QUERY_CONTENT_RANGE: ::DWORD = 53; 278 pub const WINHTTP_QUERY_ETAG: ::DWORD = 54; 279 pub const WINHTTP_QUERY_HOST: ::DWORD = 55; 280 pub const WINHTTP_QUERY_IF_MATCH: ::DWORD = 56; 281 pub const WINHTTP_QUERY_IF_NONE_MATCH: ::DWORD = 57; 282 pub const WINHTTP_QUERY_IF_RANGE: ::DWORD = 58; 283 pub const WINHTTP_QUERY_IF_UNMODIFIED_SINCE: ::DWORD = 59; 284 pub const WINHTTP_QUERY_MAX_FORWARDS: ::DWORD = 60; 285 pub const WINHTTP_QUERY_PROXY_AUTHORIZATION: ::DWORD = 61; 286 pub const WINHTTP_QUERY_RANGE: ::DWORD = 62; 287 pub const WINHTTP_QUERY_TRANSFER_ENCODING: ::DWORD = 63; 288 pub const WINHTTP_QUERY_UPGRADE: ::DWORD = 64; 289 pub const WINHTTP_QUERY_VARY: ::DWORD = 65; 290 pub const WINHTTP_QUERY_VIA: ::DWORD = 66; 291 pub const WINHTTP_QUERY_WARNING: ::DWORD = 67; 292 pub const WINHTTP_QUERY_EXPECT: ::DWORD = 68; 293 pub const WINHTTP_QUERY_PROXY_CONNECTION: ::DWORD = 69; 294 pub const WINHTTP_QUERY_UNLESS_MODIFIED_SINCE: ::DWORD = 70; 295 pub const WINHTTP_QUERY_PROXY_SUPPORT: ::DWORD = 75; 296 pub const WINHTTP_QUERY_AUTHENTICATION_INFO: ::DWORD = 76; 297 pub const WINHTTP_QUERY_PASSPORT_URLS: ::DWORD = 77; 298 pub const WINHTTP_QUERY_PASSPORT_CONFIG: ::DWORD = 78; 299 pub const WINHTTP_QUERY_MAX: ::DWORD = 78; 300 pub const WINHTTP_QUERY_CUSTOM: ::DWORD = 65535; 301 pub const WINHTTP_QUERY_FLAG_REQUEST_HEADERS: ::DWORD = 0x80000000; 302 pub const WINHTTP_QUERY_FLAG_SYSTEMTIME: ::DWORD = 0x40000000; 303 pub const WINHTTP_QUERY_FLAG_NUMBER: ::DWORD = 0x20000000; 304 pub const HTTP_STATUS_CONTINUE: ::DWORD = 100; 305 pub const HTTP_STATUS_SWITCH_PROTOCOLS: ::DWORD = 101; 306 pub const HTTP_STATUS_OK: ::DWORD = 200; 307 pub const HTTP_STATUS_CREATED: ::DWORD = 201; 308 pub const HTTP_STATUS_ACCEPTED: ::DWORD = 202; 309 pub const HTTP_STATUS_PARTIAL: ::DWORD = 203; 310 pub const HTTP_STATUS_NO_CONTENT: ::DWORD = 204; 311 pub const HTTP_STATUS_RESET_CONTENT: ::DWORD = 205; 312 pub const HTTP_STATUS_PARTIAL_CONTENT: ::DWORD = 206; 313 pub const HTTP_STATUS_WEBDAV_MULTI_STATUS: ::DWORD = 207; 314 pub const HTTP_STATUS_AMBIGUOUS: ::DWORD = 300; 315 pub const HTTP_STATUS_MOVED: ::DWORD = 301; 316 pub const HTTP_STATUS_REDIRECT: ::DWORD = 302; 317 pub const HTTP_STATUS_REDIRECT_METHOD: ::DWORD = 303; 318 pub const HTTP_STATUS_NOT_MODIFIED: ::DWORD = 304; 319 pub const HTTP_STATUS_USE_PROXY: ::DWORD = 305; 320 pub const HTTP_STATUS_REDIRECT_KEEP_VERB: ::DWORD = 307; 321 pub const HTTP_STATUS_BAD_REQUEST: ::DWORD = 400; 322 pub const HTTP_STATUS_DENIED: ::DWORD = 401; 323 pub const HTTP_STATUS_PAYMENT_REQ: ::DWORD = 402; 324 pub const HTTP_STATUS_FORBIDDEN: ::DWORD = 403; 325 pub const HTTP_STATUS_NOT_FOUND: ::DWORD = 404; 326 pub const HTTP_STATUS_BAD_METHOD: ::DWORD = 405; 327 pub const HTTP_STATUS_NONE_ACCEPTABLE: ::DWORD = 406; 328 pub const HTTP_STATUS_PROXY_AUTH_REQ: ::DWORD = 407; 329 pub const HTTP_STATUS_REQUEST_TIMEOUT: ::DWORD = 408; 330 pub const HTTP_STATUS_CONFLICT: ::DWORD = 409; 331 pub const HTTP_STATUS_GONE: ::DWORD = 410; 332 pub const HTTP_STATUS_LENGTH_REQUIRED: ::DWORD = 411; 333 pub const HTTP_STATUS_PRECOND_FAILED: ::DWORD = 412; 334 pub const HTTP_STATUS_REQUEST_TOO_LARGE: ::DWORD = 413; 335 pub const HTTP_STATUS_URI_TOO_LONG: ::DWORD = 414; 336 pub const HTTP_STATUS_UNSUPPORTED_MEDIA: ::DWORD = 415; 337 pub const HTTP_STATUS_RETRY_WITH: ::DWORD = 449; 338 pub const HTTP_STATUS_SERVER_ERROR: ::DWORD = 500; 339 pub const HTTP_STATUS_NOT_SUPPORTED: ::DWORD = 501; 340 pub const HTTP_STATUS_BAD_GATEWAY: ::DWORD = 502; 341 pub const HTTP_STATUS_SERVICE_UNAVAIL: ::DWORD = 503; 342 pub const HTTP_STATUS_GATEWAY_TIMEOUT: ::DWORD = 504; 343 pub const HTTP_STATUS_VERSION_NOT_SUP: ::DWORD = 505; 344 pub const HTTP_STATUS_FIRST: ::DWORD = HTTP_STATUS_CONTINUE; 345 pub const HTTP_STATUS_LAST: ::DWORD = HTTP_STATUS_VERSION_NOT_SUP; 346 pub const WINHTTP_ACCESS_TYPE_DEFAULT_PROXY: ::DWORD = 0; 347 pub const WINHTTP_ACCESS_TYPE_NO_PROXY: ::DWORD = 1; 348 pub const WINHTTP_ACCESS_TYPE_NAMED_PROXY: ::DWORD = 3; 349 pub const WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY: ::DWORD = 4; 350 pub const WINHTTP_ERROR_BASE: ::DWORD = 12000; 351 pub const ERROR_WINHTTP_OUT_OF_HANDLES: ::DWORD = WINHTTP_ERROR_BASE + 1; 352 pub const ERROR_WINHTTP_TIMEOUT: ::DWORD = WINHTTP_ERROR_BASE + 2; 353 pub const ERROR_WINHTTP_INTERNAL_ERROR: ::DWORD = WINHTTP_ERROR_BASE + 4; 354 pub const ERROR_WINHTTP_INVALID_URL: ::DWORD = WINHTTP_ERROR_BASE + 5; 355 pub const ERROR_WINHTTP_UNRECOGNIZED_SCHEME: ::DWORD = WINHTTP_ERROR_BASE + 6; 356 pub const ERROR_WINHTTP_NAME_NOT_RESOLVED: ::DWORD = WINHTTP_ERROR_BASE + 7; 357 pub const ERROR_WINHTTP_INVALID_OPTION: ::DWORD = WINHTTP_ERROR_BASE + 9; 358 pub const ERROR_WINHTTP_OPTION_NOT_SETTABLE: ::DWORD = WINHTTP_ERROR_BASE + 11; 359 pub const ERROR_WINHTTP_SHUTDOWN: ::DWORD = WINHTTP_ERROR_BASE + 12; 360 pub const ERROR_WINHTTP_LOGIN_FAILURE: ::DWORD = WINHTTP_ERROR_BASE + 15; 361 pub const ERROR_WINHTTP_OPERATION_CANCELLED: ::DWORD = WINHTTP_ERROR_BASE + 17; 362 pub const ERROR_WINHTTP_INCORRECT_HANDLE_TYPE: ::DWORD = WINHTTP_ERROR_BASE + 18; 363 pub const ERROR_WINHTTP_INCORRECT_HANDLE_STATE: ::DWORD = WINHTTP_ERROR_BASE + 19; 364 pub const ERROR_WINHTTP_CANNOT_CONNECT: ::DWORD = WINHTTP_ERROR_BASE + 29; 365 pub const ERROR_WINHTTP_CONNECTION_ERROR: ::DWORD = WINHTTP_ERROR_BASE + 30; 366 pub const ERROR_WINHTTP_RESEND_REQUEST: ::DWORD = WINHTTP_ERROR_BASE + 32; 367 pub const ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED: ::DWORD = WINHTTP_ERROR_BASE + 44; 368 pub const ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN: ::DWORD = WINHTTP_ERROR_BASE + 100; 369 pub const ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND: ::DWORD = WINHTTP_ERROR_BASE + 101; 370 pub const ERROR_WINHTTP_CANNOT_CALL_AFTER_SEND: ::DWORD = WINHTTP_ERROR_BASE + 102; 371 pub const ERROR_WINHTTP_CANNOT_CALL_AFTER_OPEN: ::DWORD = WINHTTP_ERROR_BASE + 103; 372 pub const ERROR_WINHTTP_HEADER_NOT_FOUND: ::DWORD = WINHTTP_ERROR_BASE + 150; 373 pub const ERROR_WINHTTP_INVALID_SERVER_RESPONSE: ::DWORD = WINHTTP_ERROR_BASE + 152; 374 pub const ERROR_WINHTTP_INVALID_HEADER: ::DWORD = WINHTTP_ERROR_BASE + 153; 375 pub const ERROR_WINHTTP_INVALID_QUERY_REQUEST: ::DWORD = WINHTTP_ERROR_BASE + 154; 376 pub const ERROR_WINHTTP_HEADER_ALREADY_EXISTS: ::DWORD = WINHTTP_ERROR_BASE + 155; 377 pub const ERROR_WINHTTP_REDIRECT_FAILED: ::DWORD = WINHTTP_ERROR_BASE + 156; 378 pub const ERROR_WINHTTP_AUTO_PROXY_SERVICE_ERROR: ::DWORD = WINHTTP_ERROR_BASE + 178; 379 pub const ERROR_WINHTTP_BAD_AUTO_PROXY_SCRIPT: ::DWORD = WINHTTP_ERROR_BASE + 166; 380 pub const ERROR_WINHTTP_UNABLE_TO_DOWNLOAD_SCRIPT: ::DWORD = WINHTTP_ERROR_BASE + 167; 381 pub const ERROR_WINHTTP_UNHANDLED_SCRIPT_TYPE: ::DWORD = WINHTTP_ERROR_BASE + 176; 382 pub const ERROR_WINHTTP_SCRIPT_EXECUTION_ERROR: ::DWORD = WINHTTP_ERROR_BASE + 177; 383 pub const ERROR_WINHTTP_NOT_INITIALIZED: ::DWORD = WINHTTP_ERROR_BASE + 172; 384 pub const ERROR_WINHTTP_SECURE_FAILURE: ::DWORD = WINHTTP_ERROR_BASE + 175; 385 pub const ERROR_WINHTTP_SECURE_CERT_DATE_INVALID: ::DWORD = WINHTTP_ERROR_BASE + 37; 386 pub const ERROR_WINHTTP_SECURE_CERT_CN_INVALID: ::DWORD = WINHTTP_ERROR_BASE + 38; 387 pub const ERROR_WINHTTP_SECURE_INVALID_CA: ::DWORD = WINHTTP_ERROR_BASE + 45; 388 pub const ERROR_WINHTTP_SECURE_CERT_REV_FAILED: ::DWORD = WINHTTP_ERROR_BASE + 57; 389 pub const ERROR_WINHTTP_SECURE_CHANNEL_ERROR: ::DWORD = WINHTTP_ERROR_BASE + 157; 390 pub const ERROR_WINHTTP_SECURE_INVALID_CERT: ::DWORD = WINHTTP_ERROR_BASE + 169; 391 pub const ERROR_WINHTTP_SECURE_CERT_REVOKED: ::DWORD = WINHTTP_ERROR_BASE + 170; 392 pub const ERROR_WINHTTP_SECURE_CERT_WRONG_USAGE: ::DWORD = WINHTTP_ERROR_BASE + 179; 393 pub const ERROR_WINHTTP_AUTODETECTION_FAILED: ::DWORD = WINHTTP_ERROR_BASE + 180; 394 pub const ERROR_WINHTTP_HEADER_COUNT_EXCEEDED: ::DWORD = WINHTTP_ERROR_BASE + 181; 395 pub const ERROR_WINHTTP_HEADER_SIZE_OVERFLOW: ::DWORD = WINHTTP_ERROR_BASE + 182; 396 pub const ERROR_WINHTTP_CHUNKED_ENCODING_HEADER_SIZE_OVERFLOW: ::DWORD = WINHTTP_ERROR_BASE + 183; 397 pub const ERROR_WINHTTP_RESPONSE_DRAIN_OVERFLOW: ::DWORD = WINHTTP_ERROR_BASE + 184; 398 pub const ERROR_WINHTTP_CLIENT_CERT_NO_PRIVATE_KEY: ::DWORD = WINHTTP_ERROR_BASE + 185; 399 pub const ERROR_WINHTTP_CLIENT_CERT_NO_ACCESS_PRIVATE_KEY: ::DWORD = WINHTTP_ERROR_BASE + 186; 400 pub const WINHTTP_ERROR_LAST: ::DWORD = WINHTTP_ERROR_BASE + 186; 401 pub const WINHTTP_RESET_STATE: ::DWORD = 0x00000001; 402 pub const WINHTTP_RESET_SWPAD_CURRENT_NETWORK: ::DWORD = 0x00000002; 403 pub const WINHTTP_RESET_SWPAD_ALL: ::DWORD = 0x00000004; 404 pub const WINHTTP_RESET_SCRIPT_CACHE: ::DWORD = 0x00000008; 405 pub const WINHTTP_RESET_ALL: ::DWORD = 0x0000FFFF; 406 pub const WINHTTP_RESET_NOTIFY_NETWORK_CHANGED: ::DWORD = 0x00010000; 407 pub const WINHTTP_RESET_OUT_OF_PROC: ::DWORD = 0x00020000; 408 STRUCT!{struct WINHTTP_CURRENT_USER_IE_PROXY_CONFIG { 409 fAutoDetect: ::BOOL, 410 lpszAutoConfigUrl: ::LPWSTR, 411 lpszProxy: ::LPWSTR, 412 lpszProxyBypass: ::LPWSTR, 413 }} 414 //1370 415 ENUM!{enum WINHTTP_WEB_SOCKET_OPERATION { 416 WINHTTP_WEB_SOCKET_SEND_OPERATION = 0, 417 WINHTTP_WEB_SOCKET_RECEIVE_OPERATION = 1, 418 WINHTTP_WEB_SOCKET_CLOSE_OPERATION = 2, 419 WINHTTP_WEB_SOCKET_SHUTDOWN_OPERATION = 3, 420 }} 421 ENUM!{enum WINHTTP_WEB_SOCKET_BUFFER_TYPE { 422 WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE = 0, 423 WINHTTP_WEB_SOCKET_BINARY_FRAGMENT_BUFFER_TYPE = 1, 424 WINHTTP_WEB_SOCKET_UTF8_MESSAGE_BUFFER_TYPE = 2, 425 WINHTTP_WEB_SOCKET_UTF8_FRAGMENT_BUFFER_TYPE = 3, 426 WINHTTP_WEB_SOCKET_CLOSE_BUFFER_TYPE = 4, 427 }} 428 ENUM!{enum WINHTTP_WEB_SOCKET_CLOSE_STATUS { 429 WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS = 1000, 430 WINHTTP_WEB_SOCKET_ENDPOINT_TERMINATED_CLOSE_STATUS = 1001, 431 WINHTTP_WEB_SOCKET_PROTOCOL_ERROR_CLOSE_STATUS = 1002, 432 WINHTTP_WEB_SOCKET_INVALID_DATA_TYPE_CLOSE_STATUS = 1003, 433 WINHTTP_WEB_SOCKET_EMPTY_CLOSE_STATUS = 1005, 434 WINHTTP_WEB_SOCKET_ABORTED_CLOSE_STATUS = 1006, 435 WINHTTP_WEB_SOCKET_INVALID_PAYLOAD_CLOSE_STATUS = 1007, 436 WINHTTP_WEB_SOCKET_POLICY_VIOLATION_CLOSE_STATUS = 1008, 437 WINHTTP_WEB_SOCKET_MESSAGE_TOO_BIG_CLOSE_STATUS = 1009, 438 WINHTTP_WEB_SOCKET_UNSUPPORTED_EXTENSIONS_CLOSE_STATUS = 1010, 439 WINHTTP_WEB_SOCKET_SERVER_ERROR_CLOSE_STATUS = 1011, 440 WINHTTP_WEB_SOCKET_SECURE_HANDSHAKE_ERROR_CLOSE_STATUS = 1015, 441 }} 442