|
|
/*++
Copyright (c) 1995-2000 Microsoft Corporation
Module Name:
winhttpx.h
Abstract:
Contains manifests, macros, types and prototypes for Microsoft Windows Internet Extensions
--*/
#if !defined(_WINHTTPX_) #define _WINHTTPX_
;begin_internal #if !defined(_WINHTTPXEX_) #define _WINHTTPXEX_ ;end_internal
/* * Set up Structure Packing to be 4 bytes * for all wininet structures */ #if defined(_WIN64) #include <pshpack8.h> #else #include <pshpack4.h> #endif
;begin_both
#if defined(__cplusplus) extern "C" { #endif
;end_both
#if !defined(_WINX32_) #define INTERNETAPI DECLSPEC_IMPORT #else #define INTERNETAPI #endif
#define BOOLAPI INTERNETAPI BOOL WINAPI
#ifdef MAP_WININET_TO_WINHTTP // assumes #ifdef UNICODE
#define InternetTimeFromSystemTime WinHttpTimeFromSystemTime #define InternetTimeToSystemTime WinHttpTimeToSystemTime #define InternetCrackUrl WinHttpCrackUrl #define InternetCreateUrl WinHttpCreateUrl #define InternetOpen WinHttpOpen #define InternetSetStatusCallback WinHttpSetStatusCallback #define InternetSetOption WinHttpSetOption #define InternetQueryOption WinHttpQueryOption
#define InternetConnect(h,s,port,user,pass,svc,flag,ctx) \ WinHttpConnect(h,s,port,flag,ctx)
#define HttpOpenRequest WinHttpOpenRequest #define HttpAddRequestHeaders WinHttpAddRequestHeaders #define HttpSendRequest(h,ph,cbh,pr,cbr)\ WinHttpSendRequest(h,ph,cbh,pr,cbr,cbr,0)
#define HttpSendRequestEx(h,pbi,pbo,dw,c)\ WinHttpSendRequest(h, \ (pbi)->lpcszHeader, \ (pbi)->dwHeadersLength, \ (pbi)->lpvBuffer, \ (pbi)->dwBufferLength, \ (pbi)->dwBufferTotal, \ 0)
#define InternetWriteFile(h,p,cb,pcb)\ WinHttpWriteData(h,p,cb,pcb,0) #define HttpEndRequest WinHttpReceiveResponse #define HttpQueryInfo WinHttpQueryHeaders #define InternetQueryDataAvailable WinHttpQueryDataAvailable #define InternetReadFile(h,p,cb,pcb)\ WinHttpReadData(h,p,cb,pcb,0) #define InternetCloseHandle WinHttpCloseHandle #define InternetOpenUrl WinHttpOpenUrl
#endif // MAP_WININET_TO_WINHTTP
// // internet types //
typedef LPVOID HINTERNET; typedef HINTERNET * LPHINTERNET;
typedef WORD INTERNET_PORT; typedef INTERNET_PORT * LPINTERNET_PORT;
// // WinHttp APIs //
// // manifests //
#define INTERNET_INVALID_PORT_NUMBER 0 // use the protocol-specific default
#define INTERNET_DEFAULT_FTP_PORT 21 // default for FTP servers #define INTERNET_DEFAULT_GOPHER_PORT 70 // " " gopher " #define INTERNET_DEFAULT_HTTP_PORT 80 // " " HTTP " #define INTERNET_DEFAULT_HTTPS_PORT 443 // " " HTTPS " #define INTERNET_DEFAULT_SOCKS_PORT 1080 // default for SOCKS firewall servers.
// // maximum field lengths (arbitrary) //
#define INTERNET_MAX_HOST_NAME_LENGTH 256 #define INTERNET_MAX_USER_NAME_LENGTH 128 #define INTERNET_MAX_PASSWORD_LENGTH 128 #define INTERNET_MAX_REALM_LENGTH 128 #define INTERNET_MAX_PORT_NUMBER_LENGTH 5 // INTERNET_PORT is unsigned short #define INTERNET_MAX_PORT_NUMBER_VALUE 65535 // maximum unsigned short value #define INTERNET_MAX_PATH_LENGTH 2048 #define INTERNET_MAX_SCHEME_LENGTH 32 // longest protocol name length #define INTERNET_MAX_URL_LENGTH (INTERNET_MAX_SCHEME_LENGTH \ + sizeof("://") \ + INTERNET_MAX_PATH_LENGTH)
// // values returned by WinHttpQueryOption() with INTERNET_OPTION_KEEP_CONNECTION: //
#define INTERNET_KEEP_ALIVE_UNKNOWN ((DWORD)-1) #define INTERNET_KEEP_ALIVE_ENABLED 1 #define INTERNET_KEEP_ALIVE_DISABLED 0
// // flags returned by WinHttpQueryOption() with INTERNET_OPTION_REQUEST_FLAGS //
#define INTERNET_REQFLAG_FROM_CACHE 0x00000001 // response came from cache #define INTERNET_REQFLAG_ASYNC 0x00000002 // request was made asynchronously #define INTERNET_REQFLAG_VIA_PROXY 0x00000004 // request was made via a proxy #define INTERNET_REQFLAG_NO_HEADERS 0x00000008 // orginal response contained no headers #define INTERNET_REQFLAG_PASSIVE 0x00000010 // FTP: passive-mode connection #define INTERNET_REQFLAG_CACHE_WRITE_DISABLED 0x00000040 // HTTPS: this request not cacheable #define INTERNET_REQFLAG_NET_TIMEOUT 0x00000080 // w/ _FROM_CACHE: net request timed out
// // manifest value for INTERNET_OPTION_MAX_CONNS_PER_SERVER and INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER // #define INTERNET_CONNS_PER_SERVER_UNLIMITED 0xFFFFFFFF
// // flags common to open functions (not WinHttpOpen()): //
#define INTERNET_FLAG_RELOAD 0x80000000 // retrieve the original item
// // flags for WinHttpOpenUrl(): //
#define INTERNET_FLAG_RAW_DATA 0x40000000 // FTP/gopher find: receive the item as raw (structured) data #define INTERNET_FLAG_EXISTING_CONNECT 0x20000000 // FTP: use existing WinHttpConnect handle for server if possible
// // additional cache flags //
#define INTERNET_FLAG_NO_CACHE_WRITE 0x04000000 // don't write this item to the cache #define INTERNET_FLAG_DONT_CACHE INTERNET_FLAG_NO_CACHE_WRITE #define INTERNET_FLAG_MAKE_PERSISTENT 0x02000000 // make this item persistent in cache #define INTERNET_FLAG_FROM_CACHE 0x01000000 // use offline semantics #define INTERNET_FLAG_OFFLINE INTERNET_FLAG_FROM_CACHE
// // additional flags //
#define INTERNET_FLAG_SECURE 0x00800000 // use PCT/SSL if applicable (HTTP) #define INTERNET_FLAG_KEEP_CONNECTION 0x00400000 // use keep-alive semantics #define INTERNET_FLAG_NO_AUTO_REDIRECT 0x00200000 // don't handle redirections automatically #define INTERNET_FLAG_READ_PREFETCH 0x00100000 // do background read prefetch #define INTERNET_FLAG_NO_COOKIES 0x00080000 // no automatic cookie handling #define INTERNET_FLAG_NO_AUTH 0x00040000 // no automatic authentication handling ;begin_internal #define INTERNET_FLAG_UNUSED_1 0x00020000 ;end_internal #define INTERNET_FLAG_CACHE_IF_NET_FAIL 0x00010000 // return cache file if net request fails
// // Security Ignore Flags, Allow HttpOpenRequest to overide // Secure Channel (SSL/PCT) failures of the following types. //
#define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP 0x00008000 // ex: https:// to http:// #define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS 0x00004000 // ex: http:// to https:// #define INTERNET_FLAG_IGNORE_CERT_DATE_INVALID 0x00002000 // expired X509 Cert. #define INTERNET_FLAG_IGNORE_CERT_CN_INVALID 0x00001000 // bad common name in X509 Cert.
// // more caching flags //
#define INTERNET_FLAG_RESYNCHRONIZE 0x00000800 // asking wininet to update an item if it is newer #define INTERNET_FLAG_HYPERLINK 0x00000400 // asking wininet to do hyperlinking semantic which works right for scripts #define INTERNET_FLAG_NO_UI 0x00000200 // no cookie popup #define INTERNET_FLAG_PRAGMA_NOCACHE 0x00000100 // asking wininet to add "pragma: no-cache" #define INTERNET_FLAG_CACHE_ASYNC 0x00000080 // ok to perform lazy cache-write #define INTERNET_FLAG_FORMS_SUBMIT 0x00000040 // this is a forms submit #define INTERNET_FLAG_FWD_BACK 0x00000020 // fwd-back button op #define INTERNET_FLAG_NEED_FILE 0x00000010 // need a file for this request #define INTERNET_FLAG_MUST_CACHE_REQUEST INTERNET_FLAG_NEED_FILE
;begin_internal // //Note that INTERNET_FLAG_BGUPDATE has the same value //as INTERNET_FLAG_DONT_DECODE // #define INTERNET_FLAG_BGUPDATE 0x00000008 ;end_internal
// flags and values for codepages and escaping of object #define INTERNET_FLAG_ESCAPE_PERCENT 0x00000004 #define INTERNET_FLAG_DONT_DECODE 0x00000008
;begin_internal // //Note that INTERNET_FLAG_DEFAULT_ESCAPE has the same value //as INTERNET_FLAG_NEED_FILE //Note that INTERNET_FLAG_VALID_HOSTNAME has the same value //as INTERNET_FLAG_FWD_BACK // #define INTERNET_FLAG_DEFAULT_ESCAPE 0x00000010 #define INTERNET_FLAG_VALID_HOSTNAME 0x00000020 ;end_internal
// // flags field masks //
#define SECURITY_INTERNET_MASK (INTERNET_FLAG_IGNORE_CERT_CN_INVALID | \ INTERNET_FLAG_IGNORE_CERT_DATE_INVALID | \ INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS | \ INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP )
#define INTERNET_FLAGS_MASK (INTERNET_FLAG_RELOAD \ | INTERNET_FLAG_RAW_DATA \ | INTERNET_FLAG_EXISTING_CONNECT \ | INTERNET_FLAG_NO_CACHE_WRITE \ | INTERNET_FLAG_MAKE_PERSISTENT \ | INTERNET_FLAG_FROM_CACHE \ | INTERNET_FLAG_SECURE \ | INTERNET_FLAG_KEEP_CONNECTION \ | INTERNET_FLAG_NO_AUTO_REDIRECT \ | INTERNET_FLAG_READ_PREFETCH \ | INTERNET_FLAG_NO_COOKIES \ | INTERNET_FLAG_NO_AUTH \ | INTERNET_FLAG_CACHE_IF_NET_FAIL \ | SECURITY_INTERNET_MASK \ | INTERNET_FLAG_RESYNCHRONIZE \ | INTERNET_FLAG_HYPERLINK \ | INTERNET_FLAG_NO_UI \ | INTERNET_FLAG_PRAGMA_NOCACHE \ | INTERNET_FLAG_CACHE_ASYNC \ | INTERNET_FLAG_FORMS_SUBMIT \ | INTERNET_FLAG_NEED_FILE \ | INTERNET_FLAG_FWD_BACK \ | INTERNET_FLAG_BGUPDATE \ | INTERNET_FLAG_ESCAPE_PERCENT \ )
#define INTERNET_ERROR_MASK_INSERT_CDROM 0x1 #define INTERNET_ERROR_MASK_COMBINED_SEC_CERT 0x2 #define INTERNET_ERROR_MASK_NEED_MSN_SSPI_PKG 0X4 #define INTERNET_ERROR_MASK_LOGIN_FAILURE_DISPLAY_ENTITY_BODY 0x8
#define INTERNET_OPTIONS_MASK (~INTERNET_FLAGS_MASK)
// // common per-API flags (new APIs) //
#define WININET_API_FLAG_ASYNC 0x00000001 // force async operation #define WININET_API_FLAG_SYNC 0x00000004 // force sync operation #define WININET_API_FLAG_USE_CONTEXT 0x00000008 // use value supplied in dwContext (even if 0)
// // INTERNET_NO_CALLBACK - if this value is presented as the dwContext parameter // then no call-backs will be made for that API //
#define INTERNET_NO_CALLBACK 0
// // structures/types //
// // INTERNET_SCHEME - enumerated URL scheme type //
typedef enum { INTERNET_SCHEME_PARTIAL = -2, INTERNET_SCHEME_UNKNOWN = -1, INTERNET_SCHEME_DEFAULT = 0, INTERNET_SCHEME_HTTP, INTERNET_SCHEME_HTTPS, INTERNET_SCHEME_FILE, INTERNET_SCHEME_SOCKS, INTERNET_SCHEME_RES, INTERNET_SCHEME_FIRST = INTERNET_SCHEME_HTTP, INTERNET_SCHEME_LAST = INTERNET_SCHEME_RES } INTERNET_SCHEME, * LPINTERNET_SCHEME;
// // INTERNET_ASYNC_RESULT - this structure is returned to the application via // the callback with INTERNET_STATUS_REQUEST_COMPLETE. It is not sufficient to // just return the result of the async operation. If the API failed then the // app cannot call GetLastError() because the thread context will be incorrect. // Both the value returned by the async API and any resultant error code are // made available. The app need not check dwError if dwResult indicates that // the API succeeded (in this case dwError will be ERROR_SUCCESS) //
typedef struct {
// // dwResult - the HINTERNET, DWORD or BOOL return code from an async API //
DWORD dwResult;
// // dwError - the error code if the API failed //
DWORD dwError; } INTERNET_ASYNC_RESULT, * LPINTERNET_ASYNC_RESULT;
;begin_internal
// // INTERNET_DIAGNOSTIC_SOCKET_INFO - info about the socket in use // (diagnostic purposes only, hence internal) //
typedef struct { DWORD_PTR Socket; DWORD SourcePort; DWORD DestPort; DWORD Flags; } INTERNET_DIAGNOSTIC_SOCKET_INFO, * LPINTERNET_DIAGNOSTIC_SOCKET_INFO;
// // INTERNET_DIAGNOSTIC_SOCKET_INFO.Flags definitions //
#define IDSI_FLAG_KEEP_ALIVE 0x00000001 // set if from keep-alive pool #define IDSI_FLAG_SECURE 0x00000002 // set if secure connection #define IDSI_FLAG_PROXY 0x00000004 // set if using proxy #define IDSI_FLAG_TUNNEL 0x00000008 // set if tunnelling through proxy
;end_internal
// // INTERNET_PROXY_INFO - structure supplied with INTERNET_OPTION_PROXY to get/ // set proxy information on a WinHttpOpen() handle //
typedef struct {
// // dwAccessType - INTERNET_OPEN_TYPE_DIRECT, INTERNET_OPEN_TYPE_PROXY, or // INTERNET_OPEN_TYPE_PRECONFIG (set only) //
DWORD dwAccessType;
// // lpszProxy - proxy server list //
LPCTSTR lpszProxy;
// // lpszProxyBypass - proxy bypass list //
LPCTSTR lpszProxyBypass; } INTERNET_PROXY_INFO, * LPINTERNET_PROXY_INFO;
// // INTERNET_PER_CONN_OPTION_LIST - set per-connection options such as proxy // and autoconfig info // // Set and queried using WinHttp[Set|Query]Option with // INTERNET_OPTION_PER_CONNECTION_OPTION //
typedef struct { DWORD dwOption; // option to be queried or set union { DWORD dwValue; // dword value for the option LPWSTR pszValue; // pointer to string value for the option FILETIME ftValue; // file-time value for the option } Value; } INTERNET_PER_CONN_OPTIONW, * LPINTERNET_PER_CONN_OPTIONW;
#ifdef UNICODE typedef INTERNET_PER_CONN_OPTIONW INTERNET_PER_CONN_OPTION; typedef LPINTERNET_PER_CONN_OPTIONW LPINTERNET_PER_CONN_OPTION; #endif // UNICODE
typedef struct { DWORD dwSize; // size of the INTERNET_PER_CONN_OPTION_LIST struct LPWSTR pszConnection; // connection name to set/query options DWORD dwOptionCount; // number of options to set/query DWORD dwOptionError; // on error, which option failed LPINTERNET_PER_CONN_OPTIONW pOptions; // array of options to set/query } INTERNET_PER_CONN_OPTION_LISTW, * LPINTERNET_PER_CONN_OPTION_LISTW;
#ifdef UNICODE typedef INTERNET_PER_CONN_OPTION_LISTW INTERNET_PER_CONN_OPTION_LIST; typedef LPINTERNET_PER_CONN_OPTION_LISTW LPINTERNET_PER_CONN_OPTION_LIST; #endif // UNICODE
// // Options used in INTERNET_PER_CONN_OPTON struct // #define INTERNET_PER_CONN_FLAGS 1 #define INTERNET_PER_CONN_PROXY_SERVER 2 #define INTERNET_PER_CONN_PROXY_BYPASS 3 #define INTERNET_PER_CONN_AUTOCONFIG_URL 4 #define INTERNET_PER_CONN_AUTODISCOVERY_FLAGS 5 ;begin_internal #define INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL 6 #define INTERNET_PER_CONN_AUTOCONFIG_RELOAD_DELAY_MINS 7 #define INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME 8 #define INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL 9 ;end_internal
// // PER_CONN_FLAGS // #define PROXY_TYPE_DIRECT 0x00000001 // direct to net #define PROXY_TYPE_PROXY 0x00000002 // via named proxy #define PROXY_TYPE_AUTO_PROXY_URL 0x00000004 // autoproxy URL #define PROXY_TYPE_AUTO_DETECT 0x00000008 // use autoproxy detection
// // INTERNET_VERSION_INFO - version information returned via // WinHttpQueryOption(..., INTERNET_OPTION_VERSION, ...) //
typedef struct { DWORD dwMajorVersion; DWORD dwMinorVersion; } INTERNET_VERSION_INFO, * LPINTERNET_VERSION_INFO;
// // HTTP_VERSION_INFO - query or set global HTTP version (1.0 or 1.1) //
typedef struct { DWORD dwMajorVersion; DWORD dwMinorVersion; } HTTP_VERSION_INFO, * LPHTTP_VERSION_INFO;
// // INTERNET_CONNECTED_INFO - information used to set the global connected state //
typedef struct {
// // dwConnectedState - new connected/disconnected state. // See INTERNET_STATE_CONNECTED, etc. //
DWORD dwConnectedState;
// // dwFlags - flags controlling connected->disconnected (or disconnected-> // connected) transition. See below //
DWORD dwFlags; } INTERNET_CONNECTED_INFO, * LPINTERNET_CONNECTED_INFO;
;begin_internal
#define INTERNET_ONLINE_OFFLINE_INFO INTERNET_CONNECTED_INFO #define LPINTERNET_ONLINE_OFFLINE_INFO LPINTERNET_CONNECTED_INFO #define dwOfflineState dwConnectedState
;end_internal
// // flags for INTERNET_CONNECTED_INFO dwFlags //
// // ISO_FORCE_DISCONNECTED - if set when putting Wininet into disconnected mode, // all outstanding requests will be aborted with a cancelled error //
#define ISO_FORCE_DISCONNECTED 0x00000001
;begin_internal
#define ISO_FORCE_OFFLINE ISO_FORCE_DISCONNECTED
;end_internal
// // URL_COMPONENTS - the constituent parts of an URL. Used in WinHttpCrackUrl() // and WinHttpCreateUrl() // // For WinHttpCrackUrl(), if a pointer field and its corresponding length field // are both 0 then that component is not returned. If the pointer field is NULL // but the length field is not zero, then both the pointer and length fields are // returned if both pointer and corresponding length fields are non-zero then // the pointer field points to a buffer where the component is copied. The // component may be un-escaped, depending on dwFlags // // For WinHttpCreateUrl(), the pointer fields should be NULL if the component // is not required. If the corresponding length field is zero then the pointer // field is the address of a zero-terminated string. If the length field is not // zero then it is the string length of the corresponding pointer field //
#pragma warning( disable : 4121 ) // disable alignment warning
typedef struct { DWORD dwStructSize; // size of this structure. Used in version check LPWSTR lpszScheme; // pointer to scheme name DWORD dwSchemeLength; // length of scheme name INTERNET_SCHEME nScheme; // enumerated scheme type (if known) LPWSTR lpszHostName; // pointer to host name DWORD dwHostNameLength; // length of host name INTERNET_PORT nPort; // converted port number LPWSTR lpszUserName; // pointer to user name DWORD dwUserNameLength; // length of user name LPWSTR lpszPassword; // pointer to password DWORD dwPasswordLength; // length of password LPWSTR lpszUrlPath; // pointer to URL-path DWORD dwUrlPathLength; // length of URL-path LPWSTR lpszExtraInfo; // pointer to extra information (e.g. ?foo or #foo) DWORD dwExtraInfoLength; // length of extra information } URL_COMPONENTSW, * LPURL_COMPONENTSW;
#ifdef UNICODE typedef URL_COMPONENTSW URL_COMPONENTS; typedef LPURL_COMPONENTSW LPURL_COMPONENTS; #endif // UNICODE
#pragma warning( default : 4121 ) // restore alignment warning
// // INTERNET_CERTIFICATE_INFO lpBuffer - contains the certificate returned from // the server //
typedef struct {
// // ftExpiry - date the certificate expires. //
FILETIME ftExpiry;
// // ftStart - date the certificate becomes valid. //
FILETIME ftStart;
// // lpszSubjectInfo - the name of organization, site, and server // the cert. was issued for. //
LPTSTR lpszSubjectInfo;
// // lpszIssuerInfo - the name of orgainzation, site, and server // the cert was issues by. //
LPTSTR lpszIssuerInfo;
// // lpszProtocolName - the name of the protocol used to provide the secure // connection. //
LPTSTR lpszProtocolName;
// // lpszSignatureAlgName - the name of the algorithm used for signing // the certificate. //
LPTSTR lpszSignatureAlgName;
// // lpszEncryptionAlgName - the name of the algorithm used for // doing encryption over the secure channel (SSL/PCT) connection. //
LPTSTR lpszEncryptionAlgName;
// // dwKeySize - size of the key. //
DWORD dwKeySize;
} INTERNET_CERTIFICATE_INFO, * LPINTERNET_CERTIFICATE_INFO;
;begin_internal
#ifdef __WINCRYPT_H__ #ifdef ALGIDDEF // // INTERNET_SECURITY_INFO - contains information about certificate // and encryption settings for a connection. //
#define INTERNET_SECURITY_INFO_DEFINED
typedef struct {
// // dwSize - Size of INTERNET_SECURITY_INFO structure. //
DWORD dwSize;
// // pCertificate - Cert context pointing to leaf of certificate chain. //
PCCERT_CONTEXT pCertificate;
// // Start SecPkgContext_ConnectionInfo // The following members must match those // of the SecPkgContext_ConnectionInfo // sspi structure (schnlsp.h) //
// // dwProtocol - Protocol that this connection was made with // (PCT, SSL2, SSL3, etc) //
DWORD dwProtocol;
// // aiCipher - Cipher that this connection as made with //
ALG_ID aiCipher;
// // dwCipherStrength - Strength (in bits) that this connection // was made with; //
DWORD dwCipherStrength;
// // aiHash - Hash that this connection as made with //
ALG_ID aiHash;
// // dwHashStrength - Strength (in bits) that this connection // was made with; //
DWORD dwHashStrength;
// // aiExch - Key Exchange type that this connection as made with //
ALG_ID aiExch;
// // dwExchStrength - Strength (in bits) that this connection // was made with; //
DWORD dwExchStrength;
} INTERNET_SECURITY_INFO, * LPINTERNET_SECURITY_INFO;
typedef struct { // // dwSize - size of INTERNET_SECURITY_CONNECTION_INFO // DWORD dwSize;
// fSecure - Is this a secure connection. BOOL fSecure;
// // dwProtocol - Protocol that this connection was made with // (PCT, SSL2, SSL3, etc) //
DWORD dwProtocol;
// // aiCipher - Cipher that this connection as made with //
ALG_ID aiCipher;
// // dwCipherStrength - Strength (in bits) that this connection // was made with; //
DWORD dwCipherStrength;
// // aiHash - Hash that this connection as made with //
ALG_ID aiHash;
// // dwHashStrength - Strength (in bits) that this connection // was made with; //
DWORD dwHashStrength;
// // aiExch - Key Exchange type that this connection as made with //
ALG_ID aiExch;
// // dwExchStrength - Strength (in bits) that this connection // was made with; //
DWORD dwExchStrength;
} INTERNET_SECURITY_CONNECTION_INFO , * LPINTERNET_SECURITY_CONNECTION_INFO; #endif // ALGIDDEF #endif // __WINCRYPT_H__ ;end_internal
// // INTERNET_BUFFERS - combines headers and data. May be chained for e.g. file // upload or scatter/gather operations. For chunked read/write, lpcszHeader // contains the chunked-ext //
typedef struct _INTERNET_BUFFERSW { DWORD dwStructSize; // used for API versioning. Set to sizeof(INTERNET_BUFFERS) struct _INTERNET_BUFFERSW * Next; // chain of buffers LPCWSTR lpcszHeader; // pointer to headers (may be NULL) DWORD dwHeadersLength; // length of headers if not NULL DWORD dwHeadersTotal; // size of headers if not enough buffer LPVOID lpvBuffer; // pointer to data buffer (may be NULL) DWORD dwBufferLength; // length of data buffer if not NULL DWORD dwBufferTotal; // total size of chunk, or content-length if not chunked DWORD dwOffsetLow; // used for read-ranges (only used in HttpSendRequest2) DWORD dwOffsetHigh; } INTERNET_BUFFERSW, * LPINTERNET_BUFFERSW;
#ifdef UNICODE typedef INTERNET_BUFFERSW INTERNET_BUFFERS; typedef LPINTERNET_BUFFERSW LPINTERNET_BUFFERS; #endif // UNICODE
// // prototypes //
BOOLAPI WinHttpTimeFromSystemTime( IN CONST SYSTEMTIME *pst, // input GMT time IN DWORD dwRFC, // RFC format OUT LPWSTR lpszTime, // output string buffer IN DWORD cbTime // output buffer size );
// // constants for WinHttpTimeFromSystemTime //
#define INTERNET_RFC1123_FORMAT 0 #define INTERNET_RFC1123_BUFSIZE 30
BOOLAPI WinHttpTimeToSystemTime( IN LPCWSTR lpszTime, // NULL terminated string OUT SYSTEMTIME *pst, // output in GMT time IN DWORD dwReserved );
;begin_internal
BOOLAPI InternetDebugGetLocalTime( OUT SYSTEMTIME * pstLocalTime, OUT DWORD * pdwReserved );
;end_internal
// // flags for CrackUrl() and CombineUrl() //
#define ICU_NO_ENCODE 0x20000000 // Don't convert unsafe characters to escape sequence #define ICU_DECODE 0x10000000 // Convert %XX escape sequences to characters #define ICU_NO_META 0x08000000 // Don't convert .. etc. meta path sequences #define ICU_ENCODE_SPACES_ONLY 0x04000000 // Encode spaces only #define ICU_BROWSER_MODE 0x02000000 // Special encode/decode rules for browser #define ICU_ENCODE_PERCENT 0x00001000 // Encode any percent (ASCII25) // signs encountered, default is to not encode percent.
BOOLAPI WinHttpCrackUrl( IN LPCWSTR lpszUrl, IN DWORD dwUrlLength, IN DWORD dwFlags, IN OUT LPURL_COMPONENTSW lpUrlComponents ); BOOLAPI WinHttpCreateUrl( IN LPURL_COMPONENTSW lpUrlComponents, IN DWORD dwFlags, OUT LPWSTR lpszUrl, IN OUT LPDWORD lpdwUrlLength );
// // flags for WinHttpCrackUrl() and WinHttpCreateUrl() //
#define ICU_ESCAPE 0x80000000 // (un)escape URL characters #define ICU_USERNAME 0x40000000 // use internal username & password
INTERNETAPI HINTERNET WINAPI WinHttpOpen( IN LPCWSTR lpszAgent, IN DWORD dwAccessType, IN LPCWSTR lpszProxy OPTIONAL, IN LPCWSTR lpszProxyBypass OPTIONAL, IN DWORD dwFlags );
// // access types for WinHttpOpen() //
#define INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY 0 // prevent using java/script/INS #define INTERNET_OPEN_TYPE_DIRECT 1 // direct to net #define INTERNET_OPEN_TYPE_PROXY 3 // via named proxy // no autoproxy support in WinHttp, so PRECONFIG is equivalent to PRECONFIG_WITH_NO_AUTOPROXY #define INTERNET_OPEN_TYPE_PRECONFIG INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY
// // old names for access types //
#define PRE_CONFIG_INTERNET_ACCESS INTERNET_OPEN_TYPE_PRECONFIG #define LOCAL_INTERNET_ACCESS INTERNET_OPEN_TYPE_DIRECT #define CERN_PROXY_INTERNET_ACCESS INTERNET_OPEN_TYPE_PROXY
BOOLAPI WinHttpCloseHandle( IN HINTERNET hInternet );
INTERNETAPI HINTERNET WINAPI WinHttpConnect( IN HINTERNET hInternet, IN LPCWSTR lpszServerName, IN INTERNET_PORT nServerPort, IN DWORD dwFlags, IN DWORD_PTR dwContext );
// service types for WinHttpConnect() #define INTERNET_SERVICE_HTTP 3
INTERNETAPI HINTERNET WINAPI WinHttpOpenUrl( IN HINTERNET hInternet, IN LPCWSTR lpszUrl, IN LPCWSTR lpszHeaders OPTIONAL, IN DWORD dwHeadersLength, IN DWORD dwFlags, IN DWORD_PTR dwContext );
BOOLAPI WinHttpReadData( IN HINTERNET hFile, IN LPVOID lpBuffer, IN DWORD dwNumberOfBytesToRead, OUT LPDWORD lpdwNumberOfBytesRead, IN DWORD dwFlags );
;begin_internal
// // flags for InternetReadFileEx() //
#define IRF_ASYNC WININET_API_FLAG_ASYNC #define IRF_SYNC WININET_API_FLAG_SYNC #define IRF_USE_CONTEXT WININET_API_FLAG_USE_CONTEXT #define IRF_NO_WAIT 0x00000008
;end_internal
BOOLAPI WinHttpWriteData( IN HINTERNET hFile, IN LPCVOID lpBuffer, IN DWORD dwNumberOfBytesToWrite, OUT LPDWORD lpdwNumberOfBytesWritten, DWORD dwFlags );
BOOLAPI WinHttpQueryDataAvailable( IN HINTERNET hFile, OUT LPDWORD lpdwNumberOfBytesAvailable OPTIONAL, IN DWORD dwFlags, IN DWORD_PTR dwContext );
BOOLAPI WinHttpQueryOption( IN HINTERNET hInternet OPTIONAL, IN DWORD dwOption, OUT LPVOID lpBuffer OPTIONAL, IN OUT LPDWORD lpdwBufferLength ); BOOLAPI WinHttpSetOption( IN HINTERNET hInternet OPTIONAL, IN DWORD dwOption, IN LPVOID lpBuffer, IN DWORD dwBufferLength );
BOOLAPI WinHttpSetTimeouts( IN HINTERNET hInternet, // Session/Request handle. IN DWORD dwResolveTimeout, IN DWORD dwConnectTimeout, IN DWORD dwSendTimeout, IN DWORD dwReceiveTimeout );
// // options manifests for WinHttp{Query|Set}Option //
#define INTERNET_OPTION_USERNAME 0x1000 #define INTERNET_OPTION_PASSWORD 0x1001 #define INTERNET_OPTION_PROXY_USERNAME 0x1002 #define INTERNET_OPTION_PROXY_PASSWORD 0x1003 ;begin_internal #define INTERNET_OPTION_MASK 0x0fff #define MAX_INTERNET_STRING_OPTION (INTERNET_OPTION_PROXY_PASSWORD & INTERNET_OPTION_MASK) #define NUM_INTERNET_STRING_OPTION (MAX_INTERNET_STRING_OPTION + 1) ;end_internal
#ifdef MAP_WININET_TO_WINHTTP
#define INTERNET_FIRST_OPTION WINHTTP_FIRST_OPTION #define INTERNET_OPTION_CALLBACK WINHTTP_OPTION_CALLBACK #define INTERNET_OPTION_RESOLVE_TIMEOUT WINHTTP_OPTION_RESOLVE_TIMEOUT #define INTERNET_OPTION_CONNECT_TIMEOUT WINHTTP_OPTION_CONNECT_TIMEOUT #define INTERNET_OPTION_CONNECT_RETRIES WINHTTP_OPTION_CONNECT_RETRIES #define INTERNET_OPTION_SEND_TIMEOUT WINHTTP_OPTION_SEND_TIMEOUT #define INTERNET_OPTION_RECEIVE_TIMEOUT WINHTTP_OPTION_RECEIVE_TIMEOUT #define INTERNET_OPTION_HANDLE_TYPE WINHTTP_OPTION_HANDLE_TYPE #define INTERNET_OPTION_READ_BUFFER_SIZE WINHTTP_OPTION_READ_BUFFER_SIZE #define INTERNET_OPTION_WRITE_BUFFER_SIZE WINHTTP_OPTION_WRITE_BUFFER_SIZE #define INTERNET_OPTION_PARENT_HANDLE WINHTTP_OPTION_PARENT_HANDLE #define INTERNET_OPTION_REQUEST_FLAGS WINHTTP_OPTION_REQUEST_FLAGS #define INTERNET_OPTION_EXTENDED_ERROR WINHTTP_OPTION_EXTENDED_ERROR #define INTERNET_OPTION_SECURITY_FLAGS WINHTTP_OPTION_SECURITY_FLAGS #define INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT WINHTTP_OPTION_SECURITY_CERTIFICATE_STRUCT #define INTERNET_OPTION_URL WINHTTP_OPTION_URL #define INTERNET_OPTION_SECURITY_CERTIFICATE WINHTTP_OPTION_SECURITY_CERTIFICATE #define INTERNET_OPTION_SECURITY_KEY_BITNESS WINHTTP_OPTION_SECURITY_KEY_BITNESS #define INTERNET_OPTION_PROXY WINHTTP_OPTION_PROXY #define INTERNET_OPTION_VERSION WINHTTP_OPTION_VERSION #define INTERNET_OPTION_USER_AGENT WINHTTP_OPTION_USER_AGENT #define INTERNET_OPTION_CONTEXT_VALUE WINHTTP_OPTION_CONTEXT_VALUE #define INTERNET_OPTION_CLIENT_CERT_CONTEXT WINHTTP_OPTION_CLIENT_CERT_CONTEXT #define INTERNET_OPTION_POLICY WINHTTP_OPTION_POLICY #define INTERNET_OPTION_REQUEST_PRIORITY WINHTTP_OPTION_REQUEST_PRIORITY #define INTERNET_OPTION_HTTP_VERSION WINHTTP_OPTION_HTTP_VERSION #define INTERNET_OPTION_ERROR_MASK WINHTTP_OPTION_ERROR_MASK #define INTERNET_OPTION_CONTROL_SEND_TIMEOUT WINHTTP_OPTION_SEND_TIMEOUT #define INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT WINHTTP_OPTION_RECEIVE_TIMEOUT #define INTERNET_OPTION_DATA_SEND_TIMEOUT WINHTTP_OPTION_SEND_TIMEOUT #define INTERNET_OPTION_DATA_RECEIVE_TIMEOUT WINHTTP_OPTION_RECEIVE_TIMEOUT #define INTERNET_OPTION_CODEPAGE WINHTTP_OPTION_CODEPAGE #define INTERNET_OPTION_MAX_CONNS_PER_SERVER WINHTTP_OPTION_MAX_CONNS_PER_SERVER #define INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER WINHTTP_OPTION_MAX_CONNS_PER_1_0_SERVER #define INTERNET_OPTION_PER_CONNECTION_OPTION WINHTTP_OPTION_PER_CONNECTION_OPTION #define INTERNET_OPTION_DIGEST_AUTH_UNLOAD WINHTTP_OPTION_DIGEST_AUTH_UNLOAD #define INTERNET_LAST_OPTION WINHTTP_LAST_OPTION
#endif // def MAP_WININET_TO_WINHTTP
#define WINHTTP_FIRST_OPTION INTERNET_OPTION_CALLBACK
#define WINHTTP_OPTION_CALLBACK 1 #define WINHTTP_OPTION_RESOLVE_TIMEOUT 2 #define WINHTTP_OPTION_CONNECT_TIMEOUT 3 #define WINHTTP_OPTION_CONNECT_RETRIES 4 #define WINHTTP_OPTION_SEND_TIMEOUT 5 #define WINHTTP_OPTION_RECEIVE_TIMEOUT 6 #define WINHTTP_OPTION_HANDLE_TYPE 9 #define WINHTTP_OPTION_READ_BUFFER_SIZE 12 #define WINHTTP_OPTION_WRITE_BUFFER_SIZE 13 #define WINHTTP_OPTION_PARENT_HANDLE 21 #define WINHTTP_OPTION_REQUEST_FLAGS 23 #define WINHTTP_OPTION_EXTENDED_ERROR 24 #define WINHTTP_OPTION_SECURITY_FLAGS 31 #define WINHTTP_OPTION_SECURITY_CERTIFICATE_STRUCT 32 #define WINHTTP_OPTION_URL 34 #define WINHTTP_OPTION_SECURITY_CERTIFICATE 35 #define WINHTTP_OPTION_SECURITY_KEY_BITNESS 36 #define WINHTTP_OPTION_PROXY 38 #define WINHTTP_OPTION_VERSION 40 #define WINHTTP_OPTION_USER_AGENT 41 #define WINHTTP_OPTION_CONTEXT_VALUE 45 #define WINHTTP_OPTION_CLIENT_CERT_CONTEXT 47 #define WINHTTP_OPTION_POLICY 48 #define WINHTTP_OPTION_REQUEST_PRIORITY 58 #define WINHTTP_OPTION_HTTP_VERSION 59 #define WINHTTP_OPTION_ERROR_MASK 62 ;begin_internal // Pass in pointer to INTERNET_SECURITY_CONNECTION_INFO to be filled in. #define WINHTTP_OPTION_SECURITY_CONNECTION_INFO 66 #define WINHTTP_OPTION_DIAGNOSTIC_SOCKET_INFO 67 ;end_internal #define WINHTTP_OPTION_CODEPAGE 68 #define WINHTTP_OPTION_MAX_CONNS_PER_SERVER 73 #define WINHTTP_OPTION_MAX_CONNS_PER_1_0_SERVER 74 #define WINHTTP_OPTION_PER_CONNECTION_OPTION 75 #define WINHTTP_OPTION_DIGEST_AUTH_UNLOAD 76
#define WINHTTP_OPTION_AUTOLOGON_POLICY 77
#define WINHTTP_LAST_OPTION WINHTTP_OPTION_AUTOLOGON_POLICY ;begin_internal #define WINHTTP_LAST_OPTION_INTERNAL WINHTTP_OPTION_AUTOLOGON_POLICY ;end_internal
// // handle types //
#define INTERNET_HANDLE_TYPE_INTERNET 1 #define INTERNET_HANDLE_TYPE_CONNECT_FTP 2 #define INTERNET_HANDLE_TYPE_CONNECT_GOPHER 3 #define INTERNET_HANDLE_TYPE_CONNECT_HTTP 4 #define INTERNET_HANDLE_TYPE_FTP_FIND 5 #define INTERNET_HANDLE_TYPE_FTP_FIND_HTML 6 #define INTERNET_HANDLE_TYPE_FTP_FILE 7 #define INTERNET_HANDLE_TYPE_FTP_FILE_HTML 8 #define INTERNET_HANDLE_TYPE_GOPHER_FIND 9 #define INTERNET_HANDLE_TYPE_GOPHER_FIND_HTML 10 #define INTERNET_HANDLE_TYPE_GOPHER_FILE 11 #define INTERNET_HANDLE_TYPE_GOPHER_FILE_HTML 12 #define INTERNET_HANDLE_TYPE_HTTP_REQUEST 13 #define INTERNET_HANDLE_TYPE_FILE_REQUEST 14
// // values for auth schemes // #define WINHTTP_AUTH_SCHEME_BASIC 0x00000001 #define WINHTTP_AUTH_SCHEME_NTLM 0x00000002 #define WINHTTP_AUTH_SCHEME_PASSPORT 0x00000004 #define WINHTTP_AUTH_SCHEME_DIGEST 0x00000008 #define WINHTTP_AUTH_SCHEME_NEGOTIATE 0x00000010 ;begin_internal #define WINHTTP_AUTH_SCHEME_KERBEROS 0x00000020 ;end_internal // WinHttp supported Authentication Targets
#define WINHTTP_AUTH_TARGET_SERVER 0x00000000 #define WINHTTP_AUTH_TARGET_PROXY 0x00000001
// // values for INTERNET_OPTION_AUTOLOGON_SECURITY_LEVEL // #define WINHTTP_AUTOLOGON_SECURITY_LEVEL_MEDIUM 0 #define WINHTTP_AUTOLOGON_SECURITY_LEVEL_LOW 1 #define WINHTTP_AUTOLOGON_SECURITY_LEVEL_HIGH 2
// // values for INTERNET_OPTION_SECURITY_FLAGS //
// query only #define SECURITY_FLAG_SECURE 0x00000001 // can query only #define SECURITY_FLAG_STRENGTH_WEAK 0x10000000 #define SECURITY_FLAG_STRENGTH_MEDIUM 0x40000000 #define SECURITY_FLAG_STRENGTH_STRONG 0x20000000 #define SECURITY_FLAG_UNKNOWNBIT 0x80000000 #define SECURITY_FLAG_FORTEZZA 0x08000000 #define SECURITY_FLAG_NORMALBITNESS SECURITY_FLAG_STRENGTH_WEAK
// The following are unused #define SECURITY_FLAG_SSL 0x00000002 #define SECURITY_FLAG_SSL3 0x00000004 #define SECURITY_FLAG_PCT 0x00000008 #define SECURITY_FLAG_PCT4 0x00000010 #define SECURITY_FLAG_IETFSSL4 0x00000020
// The following are for backwards compatability only. #define SECURITY_FLAG_40BIT SECURITY_FLAG_STRENGTH_WEAK #define SECURITY_FLAG_128BIT SECURITY_FLAG_STRENGTH_STRONG #define SECURITY_FLAG_56BIT SECURITY_FLAG_STRENGTH_MEDIUM
// setable flags #define SECURITY_FLAG_IGNORE_REVOCATION 0x00000080 #define SECURITY_FLAG_IGNORE_UNKNOWN_CA 0x00000100 #define SECURITY_FLAG_IGNORE_WRONG_USAGE 0x00000200
#define SECURITY_FLAG_IGNORE_CERT_CN_INVALID INTERNET_FLAG_IGNORE_CERT_CN_INVALID #define SECURITY_FLAG_IGNORE_CERT_DATE_INVALID INTERNET_FLAG_IGNORE_CERT_DATE_INVALID
#define SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTPS INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS #define SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTP INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP
#define SECURITY_SET_MASK (SECURITY_FLAG_IGNORE_REVOCATION |\ SECURITY_FLAG_IGNORE_UNKNOWN_CA |\ SECURITY_FLAG_IGNORE_CERT_CN_INVALID |\ SECURITY_FLAG_IGNORE_CERT_DATE_INVALID |\ SECURITY_FLAG_IGNORE_WRONG_USAGE)
// valid autodial modes #define AUTODIAL_MODE_NEVER 1 #define AUTODIAL_MODE_ALWAYS 2 #define AUTODIAL_MODE_NO_NETWORK_PRESENT 4
BOOLAPI InternetGetLastResponseInfo( OUT LPDWORD lpdwError, OUT LPWSTR lpszBuffer OPTIONAL, IN OUT LPDWORD lpdwBufferLength ); #ifdef UNICODE #define InternetGetLastResponseInfo InternetGetLastResponseInfoW #endif // !UNICODE
// // callback function for WinHttpSetStatusCallback //
typedef VOID (CALLBACK * INTERNET_STATUS_CALLBACK)( IN HINTERNET hInternet, IN DWORD_PTR dwContext, IN DWORD dwInternetStatus, IN LPVOID lpvStatusInformation OPTIONAL, IN DWORD dwStatusInformationLength );
typedef INTERNET_STATUS_CALLBACK * LPINTERNET_STATUS_CALLBACK;
INTERNETAPI INTERNET_STATUS_CALLBACK WINAPI WinHttpSetStatusCallback( IN HINTERNET hInternet, IN INTERNET_STATUS_CALLBACK lpfnInternetCallback, IN DWORD dwNotificationFlags, IN DWORD_PTR dwReserved );
// // status manifests for WinHttp status callback //
#define INTERNET_STATUS_RESOLVING_NAME 0x00000001 #define INTERNET_STATUS_NAME_RESOLVED 0x00000002 #define INTERNET_STATUS_CONNECTING_TO_SERVER 0x00000004 #define INTERNET_STATUS_CONNECTED_TO_SERVER 0x00000008 #define INTERNET_STATUS_SENDING_REQUEST 0x00000010 #define INTERNET_STATUS_REQUEST_SENT 0x00000020 #define INTERNET_STATUS_RECEIVING_RESPONSE 0x00000040 #define INTERNET_STATUS_RESPONSE_RECEIVED 0x00000080 #define INTERNET_STATUS_CLOSING_CONNECTION 0x00000100 #define INTERNET_STATUS_CONNECTION_CLOSED 0x00000200 #define INTERNET_STATUS_HANDLE_CREATED 0x00000400 #define INTERNET_STATUS_HANDLE_CLOSING 0x00000800 #define INTERNET_STATUS_DETECTING_PROXY 0x00001000 #define INTERNET_STATUS_REQUEST_COMPLETE 0x00002000 #define INTERNET_STATUS_REDIRECT 0x00004000 #define INTERNET_STATUS_INTERMEDIATE_RESPONSE 0x00008000
#define WINHTTP_CALLBACK_FLAG_RESOLVE_NAME (INTERNET_STATUS_RESOLVING_NAME | INTERNET_STATUS_NAME_RESOLVED) #define WINHTTP_CALLBACK_FLAG_CONNECT_TO_SERVER (INTERNET_STATUS_CONNECTING_TO_SERVER | INTERNET_STATUS_CONNECTED_TO_SERVER) #define WINHTTP_CALLBACK_FLAG_SEND_REQUEST (INTERNET_STATUS_SENDING_REQUEST | INTERNET_STATUS_REQUEST_SENT) #define WINHTTP_CALLBACK_FLAG_RECEIVE_RESPONSE (INTERNET_STATUS_RECEIVING_RESPONSE | INTERNET_STATUS_RESPONSE_RECEIVED) #define WINHTTP_CALLBACK_FLAG_CLOSE_CONNECTION (INTERNET_STATUS_CLOSING_CONNECTION | INTERNET_STATUS_CONNECTION_CLOSED) #define WINHTTP_CALLBACK_FLAG_HANDLES (INTERNET_STATUS_HANDLE_CREATED | INTERNET_STATUS_HANDLE_CLOSING) #define WINHTTP_CALLBACK_FLAG_DETECTING_PROXY INTERNET_STATUS_DETECTING_PROXY #define WINHTTP_CALLBACK_FLAG_REQUEST_COMPLETE INTERNET_STATUS_REQUEST_COMPLETE #define WINHTTP_CALLBACK_FLAG_REDIRECT INTERNET_STATUS_REDIRECT #define WINHTTP_CALLBACK_FLAG_INTERMEDIATE_RESPONSE INTERNET_STATUS_INTERMEDIATE_RESPONSE ;begin_internal //ensure that WINHTTP_CALLBACK_FLAG_ALL always matches OR of all the CALLBACKFLAGS ;end_internal #define WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS 0xffffffff
// // the following can be indicated in a state change notification: //
#define INTERNET_STATE_CONNECTED 0x00000001 // connected state (mutually exclusive with disconnected) #define INTERNET_STATE_DISCONNECTED 0x00000002 // disconnected from network #define INTERNET_STATE_DISCONNECTED_BY_USER 0x00000010 // disconnected by user request #define INTERNET_STATE_IDLE 0x00000100 // no network requests being made (by Wininet) #define INTERNET_STATE_BUSY 0x00000200 // network requests being made (by Wininet)
;begin_internal
#define INTERNET_STATE_ONLINE INTERNET_STATE_CONNECTED #define INTERNET_STATE_OFFLINE INTERNET_STATE_DISCONNECTED #define INTERNET_STATE_OFFLINE_USER INTERNET_STATE_DISCONNECTED_BY_USER #define INTERNET_LINE_STATE_MASK (INTERNET_STATE_ONLINE | INTERNET_STATE_OFFLINE) #define INTERNET_BUSY_STATE_MASK (INTERNET_STATE_IDLE | INTERNET_STATE_BUSY)
;end_internal
// // if the following value is returned by WinHttpSetStatusCallback, then // probably an invalid (non-code) address was supplied for the callback //
#define INTERNET_INVALID_STATUS_CALLBACK ((INTERNET_STATUS_CALLBACK)(-1L))
// // HTTP //
// // manifests //
// // the default major/minor HTTP version numbers //
#define HTTP_MAJOR_VERSION 1 #define HTTP_MINOR_VERSION 0
#define HTTP_VERSIONW L"HTTP/1.0"
#ifdef UNICODE #define HTTP_VERSION HTTP_VERSIONW #endif
// // WinHttpQueryHeaders info levels. Generally, there is one info level // for each potential RFC822/HTTP/MIME header that an HTTP server // may send as part of a request response. // // The HTTP_QUERY_RAW_HEADERS info level is provided for clients // that choose to perform their own header parsing. //
;begin_internal
// // Note that adding any HTTP_QUERY_* codes here must be followed // by an equivlent line in wininet\http\hashgen\hashgen.cpp // please see that file for further information regarding // the addition of new HTTP headers //
;end_internal
#define HTTP_QUERY_MIME_VERSION 0 #define HTTP_QUERY_CONTENT_TYPE 1 #define HTTP_QUERY_CONTENT_TRANSFER_ENCODING 2 #define HTTP_QUERY_CONTENT_ID 3 #define HTTP_QUERY_CONTENT_DESCRIPTION 4 #define HTTP_QUERY_CONTENT_LENGTH 5 #define HTTP_QUERY_CONTENT_LANGUAGE 6 #define HTTP_QUERY_ALLOW 7 #define HTTP_QUERY_PUBLIC 8 #define HTTP_QUERY_DATE 9 #define HTTP_QUERY_EXPIRES 10 #define HTTP_QUERY_LAST_MODIFIED 11 #define HTTP_QUERY_MESSAGE_ID 12 #define HTTP_QUERY_URI 13 #define HTTP_QUERY_DERIVED_FROM 14 #define HTTP_QUERY_COST 15 #define HTTP_QUERY_LINK 16 #define HTTP_QUERY_PRAGMA 17 #define HTTP_QUERY_VERSION 18 // special: part of status line #define HTTP_QUERY_STATUS_CODE 19 // special: part of status line #define HTTP_QUERY_STATUS_TEXT 20 // special: part of status line #define HTTP_QUERY_RAW_HEADERS 21 // special: all headers as ASCIIZ #define HTTP_QUERY_RAW_HEADERS_CRLF 22 // special: all headers #define HTTP_QUERY_CONNECTION 23 #define HTTP_QUERY_ACCEPT 24 #define HTTP_QUERY_ACCEPT_CHARSET 25 #define HTTP_QUERY_ACCEPT_ENCODING 26 #define HTTP_QUERY_ACCEPT_LANGUAGE 27 #define HTTP_QUERY_AUTHORIZATION 28 #define HTTP_QUERY_CONTENT_ENCODING 29 #define HTTP_QUERY_FORWARDED 30 #define HTTP_QUERY_FROM 31 #define HTTP_QUERY_IF_MODIFIED_SINCE 32 #define HTTP_QUERY_LOCATION 33 #define HTTP_QUERY_ORIG_URI 34 #define HTTP_QUERY_REFERER 35 #define HTTP_QUERY_RETRY_AFTER 36 #define HTTP_QUERY_SERVER 37 #define HTTP_QUERY_TITLE 38 #define HTTP_QUERY_USER_AGENT 39 #define HTTP_QUERY_WWW_AUTHENTICATE 40 #define HTTP_QUERY_PROXY_AUTHENTICATE 41 #define HTTP_QUERY_ACCEPT_RANGES 42 #define HTTP_QUERY_SET_COOKIE 43 #define HTTP_QUERY_COOKIE 44 #define HTTP_QUERY_REQUEST_METHOD 45 // special: GET/POST etc. #define HTTP_QUERY_REFRESH 46 #define HTTP_QUERY_CONTENT_DISPOSITION 47
// // HTTP 1.1 defined headers //
#define HTTP_QUERY_AGE 48 #define HTTP_QUERY_CACHE_CONTROL 49 #define HTTP_QUERY_CONTENT_BASE 50 #define HTTP_QUERY_CONTENT_LOCATION 51 #define HTTP_QUERY_CONTENT_MD5 52 #define HTTP_QUERY_CONTENT_RANGE 53 #define HTTP_QUERY_ETAG 54 #define HTTP_QUERY_HOST 55 #define HTTP_QUERY_IF_MATCH 56 #define HTTP_QUERY_IF_NONE_MATCH 57 #define HTTP_QUERY_IF_RANGE 58 #define HTTP_QUERY_IF_UNMODIFIED_SINCE 59 #define HTTP_QUERY_MAX_FORWARDS 60 #define HTTP_QUERY_PROXY_AUTHORIZATION 61 #define HTTP_QUERY_RANGE 62 #define HTTP_QUERY_TRANSFER_ENCODING 63 #define HTTP_QUERY_UPGRADE 64 #define HTTP_QUERY_VARY 65 #define HTTP_QUERY_VIA 66 #define HTTP_QUERY_WARNING 67 #define HTTP_QUERY_EXPECT 68 #define HTTP_QUERY_PROXY_CONNECTION 69 #define HTTP_QUERY_UNLESS_MODIFIED_SINCE 70
;begin_internal
// These are not part of HTTP 1.1 yet. We will propose these to the // HTTP extensions working group. These are required for the client-caps support // we are doing in conjuntion with IIS.
;end_internal
#define HTTP_QUERY_ECHO_REQUEST 71 #define HTTP_QUERY_ECHO_REPLY 72
// These are the set of headers that should be added back to a request when // re-doing a request after a RETRY_WITH response. #define HTTP_QUERY_ECHO_HEADERS 73 #define HTTP_QUERY_ECHO_HEADERS_CRLF 74 #define HTTP_QUERY_PROXY_SUPPORT 75 #define HTTP_QUERY_AUTHENTICATION_INFO 76
#define HTTP_QUERY_MAX 76
// // HTTP_QUERY_CUSTOM - if this special value is supplied as the dwInfoLevel // parameter of WinHttpQueryHeaders() then the lpBuffer parameter contains the name // of the header we are to query //
#define HTTP_QUERY_CUSTOM 65535
// // HTTP_QUERY_FLAG_REQUEST_HEADERS - if this bit is set in the dwInfoLevel // parameter of WinHttpQueryHeaders() then the request headers will be queried for the // request information //
#define HTTP_QUERY_FLAG_REQUEST_HEADERS 0x80000000
// // HTTP_QUERY_FLAG_SYSTEMTIME - if this bit is set in the dwInfoLevel parameter // of WinHttpQueryHeaders() AND the header being queried contains date information, // e.g. the "Expires:" header then lpBuffer will contain a SYSTEMTIME structure // containing the date and time information converted from the header string //
#define HTTP_QUERY_FLAG_SYSTEMTIME 0x40000000
// // HTTP_QUERY_FLAG_NUMBER - if this bit is set in the dwInfoLevel parameter of // HttpQueryHeader(), then the value of the header will be converted to a number // before being returned to the caller, if applicable //
#define HTTP_QUERY_FLAG_NUMBER 0x20000000
// // HTTP_QUERY_FLAG_COALESCE - combine the values from several headers of the // same name into the output buffer //
#define HTTP_QUERY_FLAG_COALESCE 0x10000000
#define HTTP_QUERY_MODIFIER_FLAGS_MASK (HTTP_QUERY_FLAG_REQUEST_HEADERS \ | HTTP_QUERY_FLAG_SYSTEMTIME \ | HTTP_QUERY_FLAG_NUMBER \ | HTTP_QUERY_FLAG_COALESCE \ )
#define HTTP_QUERY_HEADER_MASK (~HTTP_QUERY_MODIFIER_FLAGS_MASK)
// // HTTP Response Status Codes: //
#define HTTP_STATUS_CONTINUE 100 // OK to continue with request #define HTTP_STATUS_SWITCH_PROTOCOLS 101 // server has switched protocols in upgrade header
#define HTTP_STATUS_OK 200 // request completed #define HTTP_STATUS_CREATED 201 // object created, reason = new URI #define HTTP_STATUS_ACCEPTED 202 // async completion (TBS) #define HTTP_STATUS_PARTIAL 203 // partial completion #define HTTP_STATUS_NO_CONTENT 204 // no info to return #define HTTP_STATUS_RESET_CONTENT 205 // request completed, but clear form #define HTTP_STATUS_PARTIAL_CONTENT 206 // partial GET furfilled
#define HTTP_STATUS_AMBIGUOUS 300 // server couldn't decide what to return #define HTTP_STATUS_MOVED 301 // object permanently moved #define HTTP_STATUS_REDIRECT 302 // object temporarily moved #define HTTP_STATUS_REDIRECT_METHOD 303 // redirection w/ new access method #define HTTP_STATUS_NOT_MODIFIED 304 // if-modified-since was not modified #define HTTP_STATUS_USE_PROXY 305 // redirection to proxy, location header specifies proxy to use #define HTTP_STATUS_REDIRECT_KEEP_VERB 307 // HTTP/1.1: keep same verb
#define HTTP_STATUS_BAD_REQUEST 400 // invalid syntax #define HTTP_STATUS_DENIED 401 // access denied #define HTTP_STATUS_PAYMENT_REQ 402 // payment required #define HTTP_STATUS_FORBIDDEN 403 // request forbidden #define HTTP_STATUS_NOT_FOUND 404 // object not found #define HTTP_STATUS_BAD_METHOD 405 // method is not allowed #define HTTP_STATUS_NONE_ACCEPTABLE 406 // no response acceptable to client found #define HTTP_STATUS_PROXY_AUTH_REQ 407 // proxy authentication required #define HTTP_STATUS_REQUEST_TIMEOUT 408 // server timed out waiting for request #define HTTP_STATUS_CONFLICT 409 // user should resubmit with more info #define HTTP_STATUS_GONE 410 // the resource is no longer available #define HTTP_STATUS_LENGTH_REQUIRED 411 // the server refused to accept request w/o a length #define HTTP_STATUS_PRECOND_FAILED 412 // precondition given in request failed #define HTTP_STATUS_REQUEST_TOO_LARGE 413 // request entity was too large #define HTTP_STATUS_URI_TOO_LONG 414 // request URI too long #define HTTP_STATUS_UNSUPPORTED_MEDIA 415 // unsupported media type #define HTTP_STATUS_RETRY_WITH 449 // retry after doing the appropriate action.
#define HTTP_STATUS_SERVER_ERROR 500 // internal server error #define HTTP_STATUS_NOT_SUPPORTED 501 // required not supported #define HTTP_STATUS_BAD_GATEWAY 502 // error response received from gateway #define HTTP_STATUS_SERVICE_UNAVAIL 503 // temporarily overloaded #define HTTP_STATUS_GATEWAY_TIMEOUT 504 // timed out waiting for gateway #define HTTP_STATUS_VERSION_NOT_SUP 505 // HTTP version not supported
#define HTTP_STATUS_FIRST HTTP_STATUS_CONTINUE #define HTTP_STATUS_LAST HTTP_STATUS_VERSION_NOT_SUP
// // prototypes // INTERNETAPI HINTERNET WINAPI WinHttpOpenRequest( IN HINTERNET hConnect, IN LPCWSTR lpszVerb, IN LPCWSTR lpszObjectName, IN LPCWSTR lpszVersion, IN LPCWSTR lpszReferrer OPTIONAL, IN LPCWSTR FAR * lplpszAcceptTypes OPTIONAL, IN DWORD dwFlags, IN DWORD_PTR dwContext );
BOOLAPI WinHttpAddRequestHeaders( IN HINTERNET hRequest, IN LPCWSTR lpszHeaders, IN DWORD dwHeadersLength, IN DWORD dwModifiers );
// // values for dwModifiers parameter of HttpAddRequestHeaders() //
#define HTTP_ADDREQ_INDEX_MASK 0x0000FFFF #define HTTP_ADDREQ_FLAGS_MASK 0xFFFF0000
// // HTTP_ADDREQ_FLAG_ADD_IF_NEW - the header will only be added if it doesn't // already exist //
#define HTTP_ADDREQ_FLAG_ADD_IF_NEW 0x10000000
// // HTTP_ADDREQ_FLAG_ADD - if HTTP_ADDREQ_FLAG_REPLACE is set but the header is // not found then if this flag is set, the header is added anyway, so long as // there is a valid header-value //
#define HTTP_ADDREQ_FLAG_ADD 0x20000000
// // HTTP_ADDREQ_FLAG_COALESCE - coalesce headers with same name. e.g. // "Accept: text/*" and "Accept: audio/*" with this flag results in a single // header: "Accept: text/*, audio/*" //
#define HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA 0x40000000 #define HTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON 0x01000000 #define HTTP_ADDREQ_FLAG_COALESCE HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA
// // HTTP_ADDREQ_FLAG_REPLACE - replaces the specified header. Only one header can // be supplied in the buffer. If the header to be replaced is not the first // in a list of headers with the same name, then the relative index should be // supplied in the low 8 bits of the dwModifiers parameter. If the header-value // part is missing, then the header is removed //
#define HTTP_ADDREQ_FLAG_REPLACE 0x80000000
BOOLAPI WinHttpSendRequest( IN HINTERNET hRequest, IN LPCWSTR lpszHeaders OPTIONAL, IN DWORD dwHeadersLength, IN LPVOID lpOptional OPTIONAL, IN DWORD dwOptionalLength, IN DWORD dwTotalLength, IN DWORD dwFlags );
BOOLAPI WinHttpSetCredentials ( IN HINTERNET hRequest, // HINTERNET handle returned by WinHttpOpenRequest. IN DWORD AuthTargets, // Only WINHTTP_AUTH_TARGET_SERVER and // WINHTTP_AUTH_TARGET_PROXY are supported // in this version and they are mutually // exclusive IN DWORD AuthScheme, // must be one of the supported Auth Schemes // returned from WinHttpQueryAuthSchemes(), Apps // should use the Preferred Scheme returned IN LPCWSTR pszUserName, // 1) NULL if default creds is to be used, in // which case pszPassword will be ignored IN LPCWSTR pszPassword, // 1) "" == Blank Password; 2)Parameter ignored // if pszUserName is NULL; 3) Invalid to pass in // NULL if pszUserName is not NULL IN LPVOID pAuthParams );
BOOLAPI WinHttpQueryAuthSchemes ( IN HINTERNET hRequest, // HINTERNET handle returned by WinHttpOpenRequest OUT LPDWORD lpdwSupportedSchemes, // a bitmap of available Authentication Schemes OUT LPDWORD lpdwPreferredScheme, // WinHttp's preferred Authentication Method OUT LPDWORD pdwAuthTarget );
BOOLAPI WinHttpQueryAuthParams( IN HINTERNET hRequest, // HINTERNET handle returned by WinHttpOpenRequest IN DWORD AuthScheme, OUT LPVOID* pAuthParams // Scheme-specific Advanced auth parameters );
// // bogus flags //
#define HSR_ASYNC WININET_API_FLAG_ASYNC // force async #define HSR_SYNC WININET_API_FLAG_SYNC // force sync #define HSR_USE_CONTEXT WININET_API_FLAG_USE_CONTEXT // use dwContext value #define HSR_INITIATE 0x00000008 // iterative operation (completed by HttpEndRequest) #define HSR_DOWNLOAD 0x00000010 // download to file #define HSR_CHUNKED 0x00000020 // operation is send of chunked data
INTERNETAPI BOOL WINAPI WinHttpReceiveResponse( IN HINTERNET hRequest, OUT LPINTERNET_BUFFERSW lpBuffersOut OPTIONAL, IN DWORD dwFlags, IN DWORD_PTR dwContext );
BOOLAPI WinHttpQueryHeaders( IN HINTERNET hRequest, IN DWORD dwInfoLevel, IN OUT LPVOID lpBuffer OPTIONAL, IN OUT LPDWORD lpdwBufferLength, IN OUT LPDWORD lpdwIndex OPTIONAL );
;begin_internal typedef struct _INTERNET_COOKIE { DWORD cbSize; LPSTR pszName; LPSTR pszData; LPSTR pszDomain; LPSTR pszPath; FILETIME *pftExpires; DWORD dwFlags; LPSTR pszUrl; } INTERNET_COOKIE, *PINTERNET_COOKIE;
#define INTERNET_COOKIE_IS_SECURE 0x01 #define INTERNET_COOKIE_IS_SESSION 0x02
// // If SERIALIZE_DIALOGS flag set, client should implement thread-safe non-blocking callback... //
DWORD InternetAuthNotifyCallback ( DWORD_PTR dwContext, // as passed to InternetErrorDlg DWORD dwReturn, // error code: success, resend, or cancel LPVOID lpReserved // reserved: will be set to null ); typedef DWORD (CALLBACK * PFN_AUTH_NOTIFY) (DWORD_PTR, DWORD, LPVOID);
// // ... and last parameter of InternetErrorDlg should point to... //
typedef struct { DWORD cbStruct; // size of this structure DWORD dwOptions; // reserved: must set to 0 PFN_AUTH_NOTIFY pfnNotify; // notification callback to retry InternetErrorDlg DWORD_PTR dwContext; // context to pass to to notification function } INTERNET_AUTH_NOTIFY_DATA;
;end_internal
//#if !defined(_WINERROR_)
// // WinHttp API error returns //
#define INTERNET_ERROR_BASE 12000
#define ERROR_INTERNET_OUT_OF_HANDLES (INTERNET_ERROR_BASE + 1) #define ERROR_INTERNET_TIMEOUT (INTERNET_ERROR_BASE + 2) #define ERROR_INTERNET_EXTENDED_ERROR (INTERNET_ERROR_BASE + 3) #define ERROR_INTERNET_INTERNAL_ERROR (INTERNET_ERROR_BASE + 4) #define ERROR_INTERNET_INVALID_URL (INTERNET_ERROR_BASE + 5) #define ERROR_INTERNET_UNRECOGNIZED_SCHEME (INTERNET_ERROR_BASE + 6) #define ERROR_INTERNET_NAME_NOT_RESOLVED (INTERNET_ERROR_BASE + 7) #define ERROR_INTERNET_PROTOCOL_NOT_FOUND (INTERNET_ERROR_BASE + 8) #define ERROR_INTERNET_INVALID_OPTION (INTERNET_ERROR_BASE + 9) #define ERROR_INTERNET_BAD_OPTION_LENGTH (INTERNET_ERROR_BASE + 10) #define ERROR_INTERNET_OPTION_NOT_SETTABLE (INTERNET_ERROR_BASE + 11) #define ERROR_INTERNET_SHUTDOWN (INTERNET_ERROR_BASE + 12) #define ERROR_INTERNET_INCORRECT_USER_NAME (INTERNET_ERROR_BASE + 13) #define ERROR_INTERNET_INCORRECT_PASSWORD (INTERNET_ERROR_BASE + 14) #define ERROR_INTERNET_LOGIN_FAILURE (INTERNET_ERROR_BASE + 15) #define ERROR_INTERNET_INVALID_OPERATION (INTERNET_ERROR_BASE + 16) #define ERROR_INTERNET_OPERATION_CANCELLED (INTERNET_ERROR_BASE + 17) #define ERROR_INTERNET_INCORRECT_HANDLE_TYPE (INTERNET_ERROR_BASE + 18) #define ERROR_INTERNET_INCORRECT_HANDLE_STATE (INTERNET_ERROR_BASE + 19) #define ERROR_INTERNET_NOT_PROXY_REQUEST (INTERNET_ERROR_BASE + 20) #define ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND (INTERNET_ERROR_BASE + 21) #define ERROR_INTERNET_BAD_REGISTRY_PARAMETER (INTERNET_ERROR_BASE + 22) #define ERROR_INTERNET_NO_DIRECT_ACCESS (INTERNET_ERROR_BASE + 23) #define ERROR_INTERNET_NO_CONTEXT (INTERNET_ERROR_BASE + 24) #define ERROR_INTERNET_NO_CALLBACK (INTERNET_ERROR_BASE + 25) #define ERROR_INTERNET_REQUEST_PENDING (INTERNET_ERROR_BASE + 26) #define ERROR_INTERNET_INCORRECT_FORMAT (INTERNET_ERROR_BASE + 27) #define ERROR_INTERNET_ITEM_NOT_FOUND (INTERNET_ERROR_BASE + 28) #define ERROR_INTERNET_CANNOT_CONNECT (INTERNET_ERROR_BASE + 29) #define ERROR_INTERNET_CONNECTION_ABORTED (INTERNET_ERROR_BASE + 30) #define ERROR_INTERNET_CONNECTION_RESET (INTERNET_ERROR_BASE + 31) #define ERROR_INTERNET_FORCE_RETRY (INTERNET_ERROR_BASE + 32) #define ERROR_INTERNET_INVALID_PROXY_REQUEST (INTERNET_ERROR_BASE + 33) #define ERROR_INTERNET_NEED_UI (INTERNET_ERROR_BASE + 34)
#define ERROR_INTERNET_HANDLE_EXISTS (INTERNET_ERROR_BASE + 36) #define ERROR_INTERNET_SEC_CERT_DATE_INVALID (INTERNET_ERROR_BASE + 37) #define ERROR_INTERNET_SEC_CERT_CN_INVALID (INTERNET_ERROR_BASE + 38) #define ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR (INTERNET_ERROR_BASE + 39) #define ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR (INTERNET_ERROR_BASE + 40) #define ERROR_INTERNET_MIXED_SECURITY (INTERNET_ERROR_BASE + 41) #define ERROR_INTERNET_CHG_POST_IS_NON_SECURE (INTERNET_ERROR_BASE + 42) #define ERROR_INTERNET_POST_IS_NON_SECURE (INTERNET_ERROR_BASE + 43) #define ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED (INTERNET_ERROR_BASE + 44) #define ERROR_INTERNET_INVALID_CA (INTERNET_ERROR_BASE + 45) #define ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP (INTERNET_ERROR_BASE + 46) #define ERROR_INTERNET_ASYNC_THREAD_FAILED (INTERNET_ERROR_BASE + 47) #define ERROR_INTERNET_REDIRECT_SCHEME_CHANGE (INTERNET_ERROR_BASE + 48) #define ERROR_INTERNET_DIALOG_PENDING (INTERNET_ERROR_BASE + 49) #define ERROR_INTERNET_RETRY_DIALOG (INTERNET_ERROR_BASE + 50) ;begin_internal #define ERROR_INTERNET_NO_NEW_CONTAINERS (INTERNET_ERROR_BASE + 51) ;end_internal #define ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR (INTERNET_ERROR_BASE + 52) #define ERROR_INTERNET_INSERT_CDROM (INTERNET_ERROR_BASE + 53) #define ERROR_INTERNET_FORTEZZA_LOGIN_NEEDED (INTERNET_ERROR_BASE + 54) #define ERROR_INTERNET_SEC_CERT_ERRORS (INTERNET_ERROR_BASE + 55) #define ERROR_INTERNET_SEC_CERT_NO_REV (INTERNET_ERROR_BASE + 56) #define ERROR_INTERNET_SEC_CERT_REV_FAILED (INTERNET_ERROR_BASE + 57)
// // HTTP API errors //
#define ERROR_HTTP_HEADER_NOT_FOUND (INTERNET_ERROR_BASE + 150) #define ERROR_HTTP_DOWNLEVEL_SERVER (INTERNET_ERROR_BASE + 151) #define ERROR_HTTP_INVALID_SERVER_RESPONSE (INTERNET_ERROR_BASE + 152) #define ERROR_HTTP_INVALID_HEADER (INTERNET_ERROR_BASE + 153) #define ERROR_HTTP_INVALID_QUERY_REQUEST (INTERNET_ERROR_BASE + 154) #define ERROR_HTTP_HEADER_ALREADY_EXISTS (INTERNET_ERROR_BASE + 155) #define ERROR_HTTP_REDIRECT_FAILED (INTERNET_ERROR_BASE + 156) #define ERROR_HTTP_NOT_REDIRECTED (INTERNET_ERROR_BASE + 160) #define ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION (INTERNET_ERROR_BASE + 161) #define ERROR_HTTP_COOKIE_DECLINED (INTERNET_ERROR_BASE + 162) #define ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION (INTERNET_ERROR_BASE + 168)
// // additional WinHttp API error codes //
#define ERROR_INTERNET_SECURITY_CHANNEL_ERROR (INTERNET_ERROR_BASE + 157) #define ERROR_INTERNET_UNABLE_TO_CACHE_FILE (INTERNET_ERROR_BASE + 158) #define ERROR_INTERNET_TCPIP_NOT_INSTALLED (INTERNET_ERROR_BASE + 159) #define ERROR_INTERNET_DISCONNECTED (INTERNET_ERROR_BASE + 163) #define ERROR_INTERNET_SERVER_UNREACHABLE (INTERNET_ERROR_BASE + 164) #define ERROR_INTERNET_PROXY_SERVER_UNREACHABLE (INTERNET_ERROR_BASE + 165)
#define ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT (INTERNET_ERROR_BASE + 166) #define ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT (INTERNET_ERROR_BASE + 167) #define ERROR_INTERNET_SEC_INVALID_CERT (INTERNET_ERROR_BASE + 169) #define ERROR_INTERNET_SEC_CERT_REVOKED (INTERNET_ERROR_BASE + 170)
#define ERROR_INTERNET_FAILED_DUETOSECURITYCHECK (INTERNET_ERROR_BASE + 171) #define ERROR_INTERNET_NOT_INITIALIZED (INTERNET_ERROR_BASE + 172) #define ERROR_INTERNET_NEED_MSN_SSPI_PKG (INTERNET_ERROR_BASE + 173) #define ERROR_INTERNET_LOGIN_FAILURE_DISPLAY_ENTITY_BODY (INTERNET_ERROR_BASE + 174)
#define INTERNET_ERROR_LAST ERROR_INTERNET_LOGIN_FAILURE_DISPLAY_ENTITY_BODY
;begin_internal
#define ERROR_INTERNET_OFFLINE ERROR_INTERNET_DISCONNECTED
// // internal error codes that are used to communicate specific information inside // of Wininet but which are meaningless at the interface //
#define INTERNET_INTERNAL_ERROR_BASE (INTERNET_ERROR_BASE + 900)
#define ERROR_INTERNET_INTERNAL_SOCKET_ERROR (INTERNET_INTERNAL_ERROR_BASE + 1) #define ERROR_INTERNET_CONNECTION_AVAILABLE (INTERNET_INTERNAL_ERROR_BASE + 2) #define ERROR_INTERNET_NO_KNOWN_SERVERS (INTERNET_INTERNAL_ERROR_BASE + 3) #define ERROR_INTERNET_PING_FAILED (INTERNET_INTERNAL_ERROR_BASE + 4) #define ERROR_INTERNET_NO_PING_SUPPORT (INTERNET_INTERNAL_ERROR_BASE + 5) #define ERROR_INTERNET_CACHE_SUCCESS (INTERNET_INTERNAL_ERROR_BASE + 6) ;end_internal
//#endif // !defined(_WINERROR_)
;begin_internal
// Used by security manager.
INTERNETAPI BOOL WINAPI IsHostInProxyBypassList( IN INTERNET_SCHEME tScheme, IN LPCSTR lpszHost, IN DWORD cchHost);
;end_internal
#define INTERNET_SUPPRESS_RESET_ALL 0x00 #define INTERNET_SUPPRESS_COOKIE_POLICY 0x01 #define INTERNET_SUPPRESS_COOKIE_POLICY_RESET 0x02
;begin_both
#if defined(__cplusplus) } #endif
;end_both
/* * Return packing to whatever it was before we * entered this file */ #include <poppack.h>
;begin_internal #endif // !define(_WINHTTPXEX_) ;end_internal
#endif // !defined(_WINHTTPX_)
|