ifndef _WINHTTPX_
define _WINHTTPX_

include winapifamily.inc

if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)

.pragma pack(push, size_t)

define WINHTTPAPI

HINTERNET		typedef ptr
LPHINTERNET		typedef ptr HINTERNET

INTERNET_PORT		typedef WORD
LPINTERNET_PORT		typedef ptr INTERNET_PORT

INTERNET_DEFAULT_PORT	equ 0
INTERNET_DEFAULT_HTTP_PORT equ 80
INTERNET_DEFAULT_HTTPS_PORT equ 443

WINHTTP_FLAG_ASYNC	equ 0x10000000

WINHTTP_FLAG_SECURE	equ 0x00800000
WINHTTP_FLAG_ESCAPE_PERCENT equ 0x00000004
WINHTTP_FLAG_NULL_CODEPAGE equ 0x00000008
WINHTTP_FLAG_BYPASS_PROXY_CACHE equ 0x00000100
WINHTTP_FLAG_REFRESH	equ WINHTTP_FLAG_BYPASS_PROXY_CACHE
WINHTTP_FLAG_ESCAPE_DISABLE equ 0x00000040
WINHTTP_FLAG_ESCAPE_DISABLE_QUERY equ 0x00000080


SECURITY_FLAG_IGNORE_UNKNOWN_CA equ 0x00000100
SECURITY_FLAG_IGNORE_CERT_DATE_INVALID equ 0x00002000
SECURITY_FLAG_IGNORE_CERT_CN_INVALID equ 0x00001000
SECURITY_FLAG_IGNORE_CERT_WRONG_USAGE equ 0x00000200


WINHTTP_ASYNC_RESULT	STRUC
dwResult		dd ?
dwError			dd ?
WINHTTP_ASYNC_RESULT	ENDS
LPWINHTTP_ASYNC_RESULT	typedef ptr WINHTTP_ASYNC_RESULT

HTTP_VERSION_INFO	STRUC
dwMajorVersion		dd ?
dwMinorVersion		dd ?
HTTP_VERSION_INFO	ENDS
LPHTTP_VERSION_INFO	typedef ptr HTTP_VERSION_INFO

INTERNET_SCHEME		typedef int_t
LPINTERNET_SCHEME	typedef ptr int_t

INTERNET_SCHEME_HTTP	equ (1)
INTERNET_SCHEME_HTTPS	equ (2)
INTERNET_SCHEME_FTP	equ (3)
INTERNET_SCHEME_SOCKS	equ (4)

URL_COMPONENTS		STRUC
dwStructSize		dd ?
lpszScheme		LPWSTR ?
dwSchemeLength		dd ?
nScheme			INTERNET_SCHEME ?
lpszHostName		LPWSTR ?
dwHostNameLength	dd ?
nPort			INTERNET_PORT ?
lpszUserName		LPWSTR ?
dwUserNameLength	dd ?
lpszPassword		LPWSTR ?
dwPasswordLength	dd ?
lpszUrlPath		LPWSTR ?
dwUrlPathLength		dd ?
lpszExtraInfo		LPWSTR ?
dwExtraInfoLength	dd ?
URL_COMPONENTS		ENDS
LPURL_COMPONENTS	typedef ptr URL_COMPONENTS

URL_COMPONENTSW		typedef URL_COMPONENTS
LPURL_COMPONENTSW	typedef LPURL_COMPONENTS

WINHTTP_PROXY_INFO	STRUC
dwAccessType		dd ?
lpszProxy		LPWSTR ?
lpszProxyBypass		LPWSTR ?
WINHTTP_PROXY_INFO	ENDS
LPWINHTTP_PROXY_INFO	typedef ptr WINHTTP_PROXY_INFO

WINHTTP_PROXY_INFOW	typedef WINHTTP_PROXY_INFO
LPWINHTTP_PROXY_INFOW	typedef LPWINHTTP_PROXY_INFO

WINHTTP_AUTOPROXY_OPTIONS STRUC
dwFlags			dd ?
dwAutoDetectFlags	dd ?
lpszAutoConfigUrl	LPCWSTR ?
lpvReserved		LPVOID ?
dwReserved		dd ?
fAutoLogonIfChallenged	BOOL ?
WINHTTP_AUTOPROXY_OPTIONS ENDS


WINHTTP_AUTOPROXY_AUTO_DETECT equ 0x00000001
WINHTTP_AUTOPROXY_CONFIG_URL equ 0x00000002
WINHTTP_AUTOPROXY_HOST_KEEPCASE equ 0x00000004
WINHTTP_AUTOPROXY_HOST_LOWERCASE equ 0x00000008
WINHTTP_AUTOPROXY_RUN_INPROCESS equ 0x00010000
WINHTTP_AUTOPROXY_RUN_OUTPROCESS_ONLY equ 0x00020000
WINHTTP_AUTOPROXY_NO_DIRECTACCESS equ 0x00040000
WINHTTP_AUTOPROXY_NO_CACHE_CLIENT equ 0x00080000
WINHTTP_AUTOPROXY_NO_CACHE_SVC equ 0x00100000

WINHTTP_AUTOPROXY_SORT_RESULTS equ 0x00400000

WINHTTP_AUTO_DETECT_TYPE_DHCP equ 0x00000001
WINHTTP_AUTO_DETECT_TYPE_DNS_A equ 0x00000002


WINHTTP_PROXY_RESULT_ENTRY STRUC
fProxy			BOOL ?
fBypass			BOOL ?
ProxyScheme		INTERNET_SCHEME ?
pwszProxy		PWSTR ?
ProxyPort		INTERNET_PORT ?
WINHTTP_PROXY_RESULT_ENTRY ENDS
LPWINHTTP_PROXY_RESULT_ENTRY typedef ptr WINHTTP_PROXY_RESULT_ENTRY

WINHTTP_PROXY_RESULT	STRUC
cEntries		dd ?
pEntries		LPWINHTTP_PROXY_RESULT_ENTRY ?
WINHTTP_PROXY_RESULT	ENDS

WINHTTP_CERTIFICATE_INFO STRUC
ftExpiry		FILETIME <>
ftStart			FILETIME <>
lpszSubjectInfo		LPWSTR ?
lpszIssuerInfo		LPWSTR ?
lpszProtocolName	LPWSTR ?
lpszSignatureAlgName	LPWSTR ?
lpszEncryptionAlgName	LPWSTR ?
dwKeySize		dd ?
WINHTTP_CERTIFICATE_INFO ENDS


ifdef _WS2DEF_

WINHTTP_CONNECTION_INFO STRUC
cbSize			dd ?
LocalAddress		SOCKADDR_STORAGE <>
RemoteAddress		SOCKADDR_STORAGE <>
WINHTTP_CONNECTION_INFO ENDS

endif


WINHTTP_TIME_FORMAT_BUFSIZE equ 62
WINHTTP_FIRST_OPTION	equ WINHTTP_OPTION_CALLBACK

WINHTTP_OPTION_CALLBACK equ 1
WINHTTP_OPTION_RESOLVE_TIMEOUT equ 2
WINHTTP_OPTION_CONNECT_TIMEOUT equ 3
WINHTTP_OPTION_CONNECT_RETRIES equ 4
WINHTTP_OPTION_SEND_TIMEOUT equ 5
WINHTTP_OPTION_RECEIVE_TIMEOUT equ 6
WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT equ 7
WINHTTP_OPTION_HANDLE_TYPE equ 9
WINHTTP_OPTION_READ_BUFFER_SIZE equ 12
WINHTTP_OPTION_WRITE_BUFFER_SIZE equ 13
WINHTTP_OPTION_PARENT_HANDLE equ 21
WINHTTP_OPTION_EXTENDED_ERROR equ 24
WINHTTP_OPTION_SECURITY_FLAGS equ 31
WINHTTP_OPTION_SECURITY_CERTIFICATE_STRUCT equ 32
WINHTTP_OPTION_URL	equ 34
WINHTTP_OPTION_SECURITY_KEY_BITNESS equ 36
WINHTTP_OPTION_PROXY	equ 38
WINHTTP_OPTION_PROXY_RESULT_ENTRY equ 39


WINHTTP_OPTION_USER_AGENT equ 41
WINHTTP_OPTION_CONTEXT_VALUE equ 45
WINHTTP_OPTION_CLIENT_CERT_CONTEXT equ 47
WINHTTP_OPTION_REQUEST_PRIORITY equ 58
WINHTTP_OPTION_HTTP_VERSION equ 59
WINHTTP_OPTION_DISABLE_FEATURE equ 63

WINHTTP_OPTION_CODEPAGE equ 68
WINHTTP_OPTION_MAX_CONNS_PER_SERVER equ 73
WINHTTP_OPTION_MAX_CONNS_PER_1_0_SERVER equ 74
WINHTTP_OPTION_AUTOLOGON_POLICY equ 77
WINHTTP_OPTION_SERVER_CERT_CONTEXT equ 78
WINHTTP_OPTION_ENABLE_FEATURE equ 79
WINHTTP_OPTION_WORKER_THREAD_COUNT equ 80
WINHTTP_OPTION_PASSPORT_COBRANDING_TEXT equ 81
WINHTTP_OPTION_PASSPORT_COBRANDING_URL equ 82
WINHTTP_OPTION_CONFIGURE_PASSPORT_AUTH equ 83
WINHTTP_OPTION_SECURE_PROTOCOLS equ 84
WINHTTP_OPTION_ENABLETRACING equ 85
WINHTTP_OPTION_PASSPORT_SIGN_OUT equ 86
WINHTTP_OPTION_PASSPORT_RETURN_URL equ 87
WINHTTP_OPTION_REDIRECT_POLICY equ 88
WINHTTP_OPTION_MAX_HTTP_AUTOMATIC_REDIRECTS equ 89
WINHTTP_OPTION_MAX_HTTP_STATUS_CONTINUE equ 90
WINHTTP_OPTION_MAX_RESPONSE_HEADER_SIZE equ 91
WINHTTP_OPTION_MAX_RESPONSE_DRAIN_SIZE equ 92
WINHTTP_OPTION_CONNECTION_INFO equ 93
WINHTTP_OPTION_CLIENT_CERT_ISSUER_LIST equ 94
WINHTTP_OPTION_SPN	equ 96

WINHTTP_OPTION_GLOBAL_PROXY_CREDS equ 97
WINHTTP_OPTION_GLOBAL_SERVER_CREDS equ 98

WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT equ 99
WINHTTP_OPTION_REJECT_USERPWD_IN_URL equ 100
WINHTTP_OPTION_USE_GLOBAL_SERVER_CREDENTIALS equ 101

WINHTTP_OPTION_RECEIVE_PROXY_CONNECT_RESPONSE equ 103
WINHTTP_OPTION_IS_PROXY_CONNECT_RESPONSE equ 104

WINHTTP_OPTION_SERVER_SPN_USED equ 106
WINHTTP_OPTION_PROXY_SPN_USED equ 107

WINHTTP_OPTION_SERVER_CBT equ 108

WINHTTP_OPTION_UNSAFE_HEADER_PARSING equ 110
WINHTTP_OPTION_ASSURED_NON_BLOCKING_CALLBACKS equ 111

WINHTTP_OPTION_UPGRADE_TO_WEB_SOCKET equ 114
WINHTTP_OPTION_WEB_SOCKET_CLOSE_TIMEOUT equ 115
WINHTTP_OPTION_WEB_SOCKET_KEEPALIVE_INTERVAL equ 116

WINHTTP_OPTION_DECOMPRESSION equ 118

WINHTTP_OPTION_WEB_SOCKET_RECEIVE_BUFFER_SIZE equ 122
WINHTTP_OPTION_WEB_SOCKET_SEND_BUFFER_SIZE equ 123

WINHTTP_LAST_OPTION	equ WINHTTP_OPTION_WEB_SOCKET_SEND_BUFFER_SIZE

WINHTTP_OPTION_USERNAME equ 0x1000
WINHTTP_OPTION_PASSWORD equ 0x1001
WINHTTP_OPTION_PROXY_USERNAME equ 0x1002
WINHTTP_OPTION_PROXY_PASSWORD equ 0x1003

WINHTTP_CONNS_PER_SERVER_UNLIMITED equ 0xFFFFFFFF

WINHTTP_DECOMPRESSION_FLAG_GZIP equ 0x00000001
WINHTTP_DECOMPRESSION_FLAG_DEFLATE equ 0x00000002

WINHTTP_DECOMPRESSION_FLAG_ALL equ \
    WINHTTP_DECOMPRESSION_FLAG_GZIP or \
    WINHTTP_DECOMPRESSION_FLAG_DEFLATE

WINHTTP_AUTOLOGON_SECURITY_LEVEL_MEDIUM equ 0
WINHTTP_AUTOLOGON_SECURITY_LEVEL_LOW equ 1
WINHTTP_AUTOLOGON_SECURITY_LEVEL_HIGH equ 2

WINHTTP_AUTOLOGON_SECURITY_LEVEL_DEFAULT equ WINHTTP_AUTOLOGON_SECURITY_LEVEL_MEDIUM

WINHTTP_OPTION_REDIRECT_POLICY_NEVER equ 0
WINHTTP_OPTION_REDIRECT_POLICY_DISALLOW_HTTPS_TO_HTTP equ 1
WINHTTP_OPTION_REDIRECT_POLICY_ALWAYS equ 2

WINHTTP_OPTION_REDIRECT_POLICY_LAST equ WINHTTP_OPTION_REDIRECT_POLICY_ALWAYS
WINHTTP_OPTION_REDIRECT_POLICY_DEFAULT equ WINHTTP_OPTION_REDIRECT_POLICY_DISALLOW_HTTPS_TO_HTTP

WINHTTP_DISABLE_PASSPORT_AUTH equ 0x00000000
WINHTTP_ENABLE_PASSPORT_AUTH equ 0x10000000
WINHTTP_DISABLE_PASSPORT_KEYRING equ 0x20000000
WINHTTP_ENABLE_PASSPORT_KEYRING equ 0x40000000

WINHTTP_DISABLE_COOKIES equ 0x00000001
WINHTTP_DISABLE_REDIRECTS equ 0x00000002
WINHTTP_DISABLE_AUTHENTICATION equ 0x00000004
WINHTTP_DISABLE_KEEP_ALIVE equ 0x00000008

WINHTTP_ENABLE_SSL_REVOCATION equ 0x00000001
WINHTTP_ENABLE_SSL_REVERT_IMPERSONATION equ 0x00000002

WINHTTP_DISABLE_SPN_SERVER_PORT equ 0x00000000
WINHTTP_ENABLE_SPN_SERVER_PORT equ 0x00000001
WINHTTP_OPTION_SPN_MASK equ WINHTTP_ENABLE_SPN_SERVER_PORT

WINHTTP_CREDS		STRUC
lpszUserName		LPSTR ?
lpszPassword		LPSTR ?
lpszRealm		LPSTR ?
dwAuthScheme		dd ?
lpszHostName		LPSTR ?
dwPort			dd ?
WINHTTP_CREDS		ENDS
PWINHTTP_CREDS		typedef ptr WINHTTP_CREDS

WINHTTP_CREDS_EX	STRUC
lpszUserName		LPSTR ?
lpszPassword		LPSTR ?
lpszRealm		LPSTR ?
dwAuthScheme		dd ?
lpszHostName		LPSTR ?
dwPort			dd ?
lpszUrl			LPSTR ?
WINHTTP_CREDS_EX	ENDS
PWINHTTP_CREDS_EX	typedef ptr WINHTTP_CREDS_EX

WINHTTP_HANDLE_TYPE_SESSION equ 1
WINHTTP_HANDLE_TYPE_CONNECT equ 2
WINHTTP_HANDLE_TYPE_REQUEST equ 3

WINHTTP_AUTH_SCHEME_BASIC equ 0x00000001
WINHTTP_AUTH_SCHEME_NTLM equ 0x00000002
WINHTTP_AUTH_SCHEME_PASSPORT equ 0x00000004
WINHTTP_AUTH_SCHEME_DIGEST equ 0x00000008
WINHTTP_AUTH_SCHEME_NEGOTIATE equ 0x00000010

WINHTTP_AUTH_TARGET_SERVER equ 0x00000000
WINHTTP_AUTH_TARGET_PROXY equ 0x00000001

SECURITY_FLAG_SECURE	equ 0x00000001
SECURITY_FLAG_STRENGTH_WEAK equ 0x10000000
SECURITY_FLAG_STRENGTH_MEDIUM equ 0x40000000
SECURITY_FLAG_STRENGTH_STRONG equ 0x20000000

WINHTTP_CALLBACK_STATUS_FLAG_CERT_REV_FAILED equ 0x00000001
WINHTTP_CALLBACK_STATUS_FLAG_INVALID_CERT equ 0x00000002
WINHTTP_CALLBACK_STATUS_FLAG_CERT_REVOKED equ 0x00000004
WINHTTP_CALLBACK_STATUS_FLAG_INVALID_CA equ 0x00000008
WINHTTP_CALLBACK_STATUS_FLAG_CERT_CN_INVALID equ 0x00000010
WINHTTP_CALLBACK_STATUS_FLAG_CERT_DATE_INVALID equ 0x00000020
WINHTTP_CALLBACK_STATUS_FLAG_CERT_WRONG_USAGE equ 0x00000040
WINHTTP_CALLBACK_STATUS_FLAG_SECURITY_CHANNEL_ERROR equ 0x80000000

WINHTTP_FLAG_SECURE_PROTOCOL_SSL2 equ 0x00000008
WINHTTP_FLAG_SECURE_PROTOCOL_SSL3 equ 0x00000020
WINHTTP_FLAG_SECURE_PROTOCOL_TLS1 equ 0x00000080
WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 equ 0x00000200
WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2 equ 0x00000800
WINHTTP_FLAG_SECURE_PROTOCOL_ALL equ (WINHTTP_FLAG_SECURE_PROTOCOL_SSL2 OR \
				      WINHTTP_FLAG_SECURE_PROTOCOL_SSL3 OR \
				      WINHTTP_FLAG_SECURE_PROTOCOL_TLS1)

CALLBACK(WINHTTP_STATUS_CALLBACK, :HINTERNET, :DWORD_PTR, :DWORD, :LPVOID, :DWORD)
LPWINHTTP_STATUS_CALLBACK typedef ptr WINHTTP_STATUS_CALLBACK


WINHTTP_CALLBACK_STATUS_RESOLVING_NAME equ 0x00000001
WINHTTP_CALLBACK_STATUS_NAME_RESOLVED equ 0x00000002
WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER equ 0x00000004
WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER equ 0x00000008
WINHTTP_CALLBACK_STATUS_SENDING_REQUEST equ 0x00000010
WINHTTP_CALLBACK_STATUS_REQUEST_SENT equ 0x00000020
WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE equ 0x00000040
WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED equ 0x00000080
WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION equ 0x00000100
WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED equ 0x00000200
WINHTTP_CALLBACK_STATUS_HANDLE_CREATED equ 0x00000400
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING equ 0x00000800
WINHTTP_CALLBACK_STATUS_DETECTING_PROXY equ 0x00001000
WINHTTP_CALLBACK_STATUS_REDIRECT equ 0x00004000
WINHTTP_CALLBACK_STATUS_INTERMEDIATE_RESPONSE equ 0x00008000
WINHTTP_CALLBACK_STATUS_SECURE_FAILURE equ 0x00010000
WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE equ 0x00020000
WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE equ 0x00040000
WINHTTP_CALLBACK_STATUS_READ_COMPLETE equ 0x00080000
WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE equ 0x00100000
WINHTTP_CALLBACK_STATUS_REQUEST_ERROR equ 0x00200000
WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE equ 0x00400000

WINHTTP_CALLBACK_STATUS_GETPROXYFORURL_COMPLETE equ 0x01000000
WINHTTP_CALLBACK_STATUS_CLOSE_COMPLETE equ 0x02000000
WINHTTP_CALLBACK_STATUS_SHUTDOWN_COMPLETE equ 0x04000000

API_RECEIVE_RESPONSE	equ (1)
API_QUERY_DATA_AVAILABLE equ (2)
API_READ_DATA		equ (3)
API_WRITE_DATA		equ (4)
API_SEND_REQUEST	equ (5)
API_GET_PROXY_FOR_URL	equ (6)

WINHTTP_CALLBACK_FLAG_RESOLVE_NAME equ (WINHTTP_CALLBACK_STATUS_RESOLVING_NAME OR WINHTTP_CALLBACK_STATUS_NAME_RESOLVED)
WINHTTP_CALLBACK_FLAG_CONNECT_TO_SERVER equ (WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER OR WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER)
WINHTTP_CALLBACK_FLAG_SEND_REQUEST equ (WINHTTP_CALLBACK_STATUS_SENDING_REQUEST OR WINHTTP_CALLBACK_STATUS_REQUEST_SENT)
WINHTTP_CALLBACK_FLAG_RECEIVE_RESPONSE equ (WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE OR WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED)
WINHTTP_CALLBACK_FLAG_CLOSE_CONNECTION equ (WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION OR WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED)
WINHTTP_CALLBACK_FLAG_HANDLES equ (WINHTTP_CALLBACK_STATUS_HANDLE_CREATED OR WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING)
WINHTTP_CALLBACK_FLAG_DETECTING_PROXY equ WINHTTP_CALLBACK_STATUS_DETECTING_PROXY
WINHTTP_CALLBACK_FLAG_REDIRECT equ WINHTTP_CALLBACK_STATUS_REDIRECT
WINHTTP_CALLBACK_FLAG_INTERMEDIATE_RESPONSE equ WINHTTP_CALLBACK_STATUS_INTERMEDIATE_RESPONSE
WINHTTP_CALLBACK_FLAG_SECURE_FAILURE equ WINHTTP_CALLBACK_STATUS_SECURE_FAILURE
WINHTTP_CALLBACK_FLAG_SENDREQUEST_COMPLETE equ WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE
WINHTTP_CALLBACK_FLAG_HEADERS_AVAILABLE equ WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE
WINHTTP_CALLBACK_FLAG_DATA_AVAILABLE equ WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE
WINHTTP_CALLBACK_FLAG_READ_COMPLETE equ WINHTTP_CALLBACK_STATUS_READ_COMPLETE
WINHTTP_CALLBACK_FLAG_WRITE_COMPLETE equ WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE
WINHTTP_CALLBACK_FLAG_REQUEST_ERROR equ WINHTTP_CALLBACK_STATUS_REQUEST_ERROR

WINHTTP_CALLBACK_FLAG_GETPROXYFORURL_COMPLETE equ WINHTTP_CALLBACK_STATUS_GETPROXYFORURL_COMPLETE

WINHTTP_CALLBACK_FLAG_ALL_COMPLETIONS equ \
	(WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE or \
	 WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE or \
	 WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE or \
	 WINHTTP_CALLBACK_STATUS_READ_COMPLETE or \
	 WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE or \
	 WINHTTP_CALLBACK_STATUS_REQUEST_ERROR or \
	 WINHTTP_CALLBACK_STATUS_GETPROXYFORURL_COMPLETE)

WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS equ 0xffffffff

WINHTTP_INVALID_STATUS_CALLBACK equ (-1)

WINHTTP_QUERY_MIME_VERSION equ 0
WINHTTP_QUERY_CONTENT_TYPE equ 1
WINHTTP_QUERY_CONTENT_TRANSFER_ENCODING equ 2
WINHTTP_QUERY_CONTENT_ID equ 3
WINHTTP_QUERY_CONTENT_DESCRIPTION equ 4
WINHTTP_QUERY_CONTENT_LENGTH equ 5
WINHTTP_QUERY_CONTENT_LANGUAGE equ 6
WINHTTP_QUERY_ALLOW	equ 7
WINHTTP_QUERY_PUBLIC	equ 8
WINHTTP_QUERY_DATE	equ 9
WINHTTP_QUERY_EXPIRES	equ 10
WINHTTP_QUERY_LAST_MODIFIED equ 11
WINHTTP_QUERY_MESSAGE_ID equ 12
WINHTTP_QUERY_URI	equ 13
WINHTTP_QUERY_DERIVED_FROM equ 14
WINHTTP_QUERY_COST	equ 15
WINHTTP_QUERY_LINK	equ 16
WINHTTP_QUERY_PRAGMA	equ 17
WINHTTP_QUERY_VERSION	equ 18
WINHTTP_QUERY_STATUS_CODE equ 19
WINHTTP_QUERY_STATUS_TEXT equ 20
WINHTTP_QUERY_RAW_HEADERS equ 21
WINHTTP_QUERY_RAW_HEADERS_CRLF equ 22
WINHTTP_QUERY_CONNECTION equ 23
WINHTTP_QUERY_ACCEPT	equ 24
WINHTTP_QUERY_ACCEPT_CHARSET equ 25
WINHTTP_QUERY_ACCEPT_ENCODING equ 26
WINHTTP_QUERY_ACCEPT_LANGUAGE equ 27
WINHTTP_QUERY_AUTHORIZATION equ 28
WINHTTP_QUERY_CONTENT_ENCODING equ 29
WINHTTP_QUERY_FORWARDED equ 30
WINHTTP_QUERY_FROM	equ 31
WINHTTP_QUERY_IF_MODIFIED_SINCE equ 32
WINHTTP_QUERY_LOCATION	equ 33
WINHTTP_QUERY_ORIG_URI	equ 34
WINHTTP_QUERY_REFERER	equ 35
WINHTTP_QUERY_RETRY_AFTER equ 36
WINHTTP_QUERY_SERVER	equ 37
WINHTTP_QUERY_TITLE	equ 38
WINHTTP_QUERY_USER_AGENT equ 39
WINHTTP_QUERY_WWW_AUTHENTICATE equ 40
WINHTTP_QUERY_PROXY_AUTHENTICATE equ 41
WINHTTP_QUERY_ACCEPT_RANGES equ 42
WINHTTP_QUERY_SET_COOKIE equ 43
WINHTTP_QUERY_COOKIE	equ 44
WINHTTP_QUERY_REQUEST_METHOD equ 45
WINHTTP_QUERY_REFRESH	equ 46
WINHTTP_QUERY_CONTENT_DISPOSITION equ 47

WINHTTP_QUERY_AGE	equ 48
WINHTTP_QUERY_CACHE_CONTROL equ 49
WINHTTP_QUERY_CONTENT_BASE equ 50
WINHTTP_QUERY_CONTENT_LOCATION equ 51
WINHTTP_QUERY_CONTENT_MD5 equ 52
WINHTTP_QUERY_CONTENT_RANGE equ 53
WINHTTP_QUERY_ETAG	equ 54
WINHTTP_QUERY_HOST	equ 55
WINHTTP_QUERY_IF_MATCH	equ 56
WINHTTP_QUERY_IF_NONE_MATCH equ 57
WINHTTP_QUERY_IF_RANGE	equ 58
WINHTTP_QUERY_IF_UNMODIFIED_SINCE equ 59
WINHTTP_QUERY_MAX_FORWARDS equ 60
WINHTTP_QUERY_PROXY_AUTHORIZATION equ 61
WINHTTP_QUERY_RANGE	equ 62
WINHTTP_QUERY_TRANSFER_ENCODING equ 63
WINHTTP_QUERY_UPGRADE	equ 64
WINHTTP_QUERY_VARY	equ 65
WINHTTP_QUERY_VIA	equ 66
WINHTTP_QUERY_WARNING	equ 67
WINHTTP_QUERY_EXPECT	equ 68
WINHTTP_QUERY_PROXY_CONNECTION equ 69
WINHTTP_QUERY_UNLESS_MODIFIED_SINCE equ 70

WINHTTP_QUERY_PROXY_SUPPORT equ 75
WINHTTP_QUERY_AUTHENTICATION_INFO equ 76
WINHTTP_QUERY_PASSPORT_URLS equ 77
WINHTTP_QUERY_PASSPORT_CONFIG equ 78

WINHTTP_QUERY_MAX	equ 78

WINHTTP_QUERY_CUSTOM	equ 65535
WINHTTP_QUERY_FLAG_REQUEST_HEADERS equ 0x80000000
WINHTTP_QUERY_FLAG_SYSTEMTIME equ 0x40000000
WINHTTP_QUERY_FLAG_NUMBER equ 0x20000000

HTTP_STATUS_CONTINUE	equ 100
HTTP_STATUS_SWITCH_PROTOCOLS equ 101

HTTP_STATUS_OK		equ 200
HTTP_STATUS_CREATED	equ 201
HTTP_STATUS_ACCEPTED	equ 202
HTTP_STATUS_PARTIAL	equ 203
HTTP_STATUS_NO_CONTENT	equ 204
HTTP_STATUS_RESET_CONTENT equ 205
HTTP_STATUS_PARTIAL_CONTENT equ 206
HTTP_STATUS_WEBDAV_MULTI_STATUS equ 207

HTTP_STATUS_AMBIGUOUS	equ 300
HTTP_STATUS_MOVED	equ 301
HTTP_STATUS_REDIRECT	equ 302
HTTP_STATUS_REDIRECT_METHOD equ 303
HTTP_STATUS_NOT_MODIFIED equ 304
HTTP_STATUS_USE_PROXY	equ 305
HTTP_STATUS_REDIRECT_KEEP_VERB equ 307

HTTP_STATUS_BAD_REQUEST equ 400
HTTP_STATUS_DENIED	equ 401
HTTP_STATUS_PAYMENT_REQ equ 402
HTTP_STATUS_FORBIDDEN	equ 403
HTTP_STATUS_NOT_FOUND	equ 404
HTTP_STATUS_BAD_METHOD	equ 405
HTTP_STATUS_NONE_ACCEPTABLE equ 406
HTTP_STATUS_PROXY_AUTH_REQ equ 407
HTTP_STATUS_REQUEST_TIMEOUT equ 408
HTTP_STATUS_CONFLICT	equ 409
HTTP_STATUS_GONE	equ 410
HTTP_STATUS_LENGTH_REQUIRED equ 411
HTTP_STATUS_PRECOND_FAILED equ 412
HTTP_STATUS_REQUEST_TOO_LARGE equ 413
HTTP_STATUS_URI_TOO_LONG equ 414
HTTP_STATUS_UNSUPPORTED_MEDIA equ 415
HTTP_STATUS_RETRY_WITH	equ 449

HTTP_STATUS_SERVER_ERROR equ 500
HTTP_STATUS_NOT_SUPPORTED equ 501
HTTP_STATUS_BAD_GATEWAY equ 502
HTTP_STATUS_SERVICE_UNAVAIL equ 503
HTTP_STATUS_GATEWAY_TIMEOUT equ 504
HTTP_STATUS_VERSION_NOT_SUP equ 505

HTTP_STATUS_FIRST	equ HTTP_STATUS_CONTINUE
HTTP_STATUS_LAST	equ HTTP_STATUS_VERSION_NOT_SUP

ICU_NO_ENCODE		equ 0x20000000
ICU_DECODE		equ 0x10000000
ICU_NO_META		equ 0x08000000
ICU_ENCODE_SPACES_ONLY	equ 0x04000000
ICU_BROWSER_MODE	equ 0x02000000
ICU_ENCODE_PERCENT	equ 0x00001000

ICU_ESCAPE		equ 0x80000000
ICU_ESCAPE_AUTHORITY	equ 0x00002000
ICU_REJECT_USERPWD	equ 0x00004000

WINHTTP_ACCESS_TYPE_DEFAULT_PROXY equ 0
WINHTTP_ACCESS_TYPE_NO_PROXY equ 1
WINHTTP_ACCESS_TYPE_NAMED_PROXY equ 3
WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY equ 4

WINHTTP_NO_PROXY_NAME	equ NULL
WINHTTP_NO_PROXY_BYPASS equ NULL
WINHTTP_NO_CLIENT_CERT_CONTEXT equ NULL
WINHTTP_NO_REFERER	equ NULL
WINHTTP_DEFAULT_ACCEPT_TYPES equ NULL
WINHTTP_ADDREQ_INDEX_MASK equ 0x0000FFFF
WINHTTP_ADDREQ_FLAGS_MASK equ 0xFFFF0000
WINHTTP_ADDREQ_FLAG_ADD_IF_NEW equ 0x10000000
WINHTTP_ADDREQ_FLAG_ADD equ 0x20000000
WINHTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA equ 0x40000000
WINHTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON equ 0x01000000
WINHTTP_ADDREQ_FLAG_COALESCE equ WINHTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA
WINHTTP_ADDREQ_FLAG_REPLACE equ 0x80000000
WINHTTP_IGNORE_REQUEST_TOTAL_LENGTH equ 0
WINHTTP_NO_ADDITIONAL_HEADERS equ NULL
WINHTTP_NO_REQUEST_DATA equ NULL
WINHTTP_HEADER_NAME_BY_INDEX equ NULL
WINHTTP_NO_OUTPUT_BUFFER equ NULL
WINHTTP_NO_HEADER_INDEX equ NULL

WINHTTP_CURRENT_USER_IE_PROXY_CONFIG STRUC
fAutoDetect		BOOL ?
lpszAutoConfigUrl	LPWSTR ?
lpszProxy		LPWSTR ?
lpszProxyBypass		LPWSTR ?
WINHTTP_CURRENT_USER_IE_PROXY_CONFIG ENDS

WINHTTP_ERROR_BASE	equ 12000

ERROR_WINHTTP_OUT_OF_HANDLES equ (WINHTTP_ERROR_BASE + 1)
ERROR_WINHTTP_TIMEOUT	equ (WINHTTP_ERROR_BASE + 2)
ERROR_WINHTTP_INTERNAL_ERROR equ (WINHTTP_ERROR_BASE + 4)
ERROR_WINHTTP_INVALID_URL equ (WINHTTP_ERROR_BASE + 5)
ERROR_WINHTTP_UNRECOGNIZED_SCHEME equ (WINHTTP_ERROR_BASE + 6)
ERROR_WINHTTP_NAME_NOT_RESOLVED equ (WINHTTP_ERROR_BASE + 7)
ERROR_WINHTTP_INVALID_OPTION equ (WINHTTP_ERROR_BASE + 9)
ERROR_WINHTTP_OPTION_NOT_SETTABLE equ (WINHTTP_ERROR_BASE + 11)
ERROR_WINHTTP_SHUTDOWN	equ (WINHTTP_ERROR_BASE + 12)

ERROR_WINHTTP_LOGIN_FAILURE equ (WINHTTP_ERROR_BASE + 15)
ERROR_WINHTTP_OPERATION_CANCELLED equ (WINHTTP_ERROR_BASE + 17)
ERROR_WINHTTP_INCORRECT_HANDLE_TYPE equ (WINHTTP_ERROR_BASE + 18)
ERROR_WINHTTP_INCORRECT_HANDLE_STATE equ (WINHTTP_ERROR_BASE + 19)
ERROR_WINHTTP_CANNOT_CONNECT equ (WINHTTP_ERROR_BASE + 29)
ERROR_WINHTTP_CONNECTION_ERROR equ (WINHTTP_ERROR_BASE + 30)
ERROR_WINHTTP_RESEND_REQUEST equ (WINHTTP_ERROR_BASE + 32)

ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED equ (WINHTTP_ERROR_BASE + 44)

ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN equ (WINHTTP_ERROR_BASE + 100)
ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND equ (WINHTTP_ERROR_BASE + 101)
ERROR_WINHTTP_CANNOT_CALL_AFTER_SEND equ (WINHTTP_ERROR_BASE + 102)
ERROR_WINHTTP_CANNOT_CALL_AFTER_OPEN equ (WINHTTP_ERROR_BASE + 103)

ERROR_WINHTTP_HEADER_NOT_FOUND equ (WINHTTP_ERROR_BASE + 150)
ERROR_WINHTTP_INVALID_SERVER_RESPONSE equ (WINHTTP_ERROR_BASE + 152)
ERROR_WINHTTP_INVALID_HEADER equ (WINHTTP_ERROR_BASE + 153)
ERROR_WINHTTP_INVALID_QUERY_REQUEST equ (WINHTTP_ERROR_BASE + 154)
ERROR_WINHTTP_HEADER_ALREADY_EXISTS equ (WINHTTP_ERROR_BASE + 155)
ERROR_WINHTTP_REDIRECT_FAILED equ (WINHTTP_ERROR_BASE + 156)

ERROR_WINHTTP_AUTO_PROXY_SERVICE_ERROR equ (WINHTTP_ERROR_BASE + 178)
ERROR_WINHTTP_BAD_AUTO_PROXY_SCRIPT equ (WINHTTP_ERROR_BASE + 166)
ERROR_WINHTTP_UNABLE_TO_DOWNLOAD_SCRIPT equ (WINHTTP_ERROR_BASE + 167)
ERROR_WINHTTP_UNHANDLED_SCRIPT_TYPE equ (WINHTTP_ERROR_BASE + 176)
ERROR_WINHTTP_SCRIPT_EXECUTION_ERROR equ (WINHTTP_ERROR_BASE + 177)

ERROR_WINHTTP_NOT_INITIALIZED equ (WINHTTP_ERROR_BASE + 172)
ERROR_WINHTTP_SECURE_FAILURE equ (WINHTTP_ERROR_BASE + 175)

ERROR_WINHTTP_SECURE_CERT_DATE_INVALID equ (WINHTTP_ERROR_BASE + 37)
ERROR_WINHTTP_SECURE_CERT_CN_INVALID equ (WINHTTP_ERROR_BASE + 38)
ERROR_WINHTTP_SECURE_INVALID_CA equ (WINHTTP_ERROR_BASE + 45)
ERROR_WINHTTP_SECURE_CERT_REV_FAILED equ (WINHTTP_ERROR_BASE + 57)
ERROR_WINHTTP_SECURE_CHANNEL_ERROR equ (WINHTTP_ERROR_BASE + 157)
ERROR_WINHTTP_SECURE_INVALID_CERT equ (WINHTTP_ERROR_BASE + 169)
ERROR_WINHTTP_SECURE_CERT_REVOKED equ (WINHTTP_ERROR_BASE + 170)
ERROR_WINHTTP_SECURE_CERT_WRONG_USAGE equ (WINHTTP_ERROR_BASE + 179)

ERROR_WINHTTP_AUTODETECTION_FAILED equ (WINHTTP_ERROR_BASE + 180)
ERROR_WINHTTP_HEADER_COUNT_EXCEEDED equ (WINHTTP_ERROR_BASE + 181)
ERROR_WINHTTP_HEADER_SIZE_OVERFLOW equ (WINHTTP_ERROR_BASE + 182)
ERROR_WINHTTP_CHUNKED_ENCODING_HEADER_SIZE_OVERFLOW equ (WINHTTP_ERROR_BASE + 183)
ERROR_WINHTTP_RESPONSE_DRAIN_OVERFLOW equ (WINHTTP_ERROR_BASE + 184)
ERROR_WINHTTP_CLIENT_CERT_NO_PRIVATE_KEY equ (WINHTTP_ERROR_BASE + 185)
ERROR_WINHTTP_CLIENT_CERT_NO_ACCESS_PRIVATE_KEY equ (WINHTTP_ERROR_BASE + 186)

WINHTTP_ERROR_LAST	equ (WINHTTP_ERROR_BASE + 186)

WINHTTP_RESET_STATE	equ 0x00000001
WINHTTP_RESET_SWPAD_CURRENT_NETWORK equ 0x00000002
WINHTTP_RESET_SWPAD_ALL equ 0x00000004
WINHTTP_RESET_SCRIPT_CACHE equ 0x00000008
WINHTTP_RESET_ALL	equ 0x0000FFFF
WINHTTP_RESET_NOTIFY_NETWORK_CHANGED equ 0x00010000
WINHTTP_RESET_OUT_OF_PROC equ 0x00020000

WinHttpSetStatusCallback proto WINAPI :HINTERNET, :WINHTTP_STATUS_CALLBACK, :DWORD, :DWORD_PTR
WinHttpTimeFromSystemTime proto WINAPI :ptr, :LPWSTR
WinHttpTimeToSystemTime proto WINAPI :LPCWSTR, :ptr
WinHttpCrackUrl proto WINAPI :LPCWSTR, :DWORD, :DWORD, :LPURL_COMPONENTS
WinHttpCreateUrl proto WINAPI :LPURL_COMPONENTS, :DWORD, :LPWSTR, :LPDWORD
WinHttpCheckPlatform proto WINAPI
WinHttpGetDefaultProxyConfiguration proto WINAPI :ptr WINHTTP_PROXY_INFO
WinHttpSetDefaultProxyConfiguration proto WINAPI :ptr WINHTTP_PROXY_INFO
WinHttpOpen proto WINAPI :LPCWSTR, :DWORD, :LPCWSTR, :LPCWSTR, :DWORD
WinHttpCloseHandle proto WINAPI :HINTERNET
WinHttpConnect proto WINAPI :HINTERNET,:LPCWSTR, :INTERNET_PORT, :DWORD
WinHttpReadData proto WINAPI :HINTERNET, :ptr, :DWORD, :LPDWORD
WinHttpWriteData proto WINAPI :HINTERNET, :ptr, :DWORD, :LPDWORD
WinHttpQueryDataAvailable proto WINAPI :HINTERNET, :LPDWORD
WinHttpQueryOption proto WINAPI :HINTERNET, :DWORD, :ptr, :LPDWORD
WinHttpSetOption proto WINAPI :HINTERNET, :DWORD, :ptr, :DWORD
WinHttpSetTimeouts proto WINAPI :HINTERNET, :SINT, :SINT, :SINT, :SINT
WinHttpIsHostInProxyBypassList proto WINAPI :ptr, :PCWSTR, :INTERNET_SCHEME, :INTERNET_PORT, :ptr
WinHttpOpenRequest proto WINAPI :HINTERNET, :LPCWSTR, :LPCWSTR, :LPCWSTR, :LPCWSTR, :ptr, :DWORD
WinHttpAddRequestHeaders proto WINAPI :HINTERNET, :LPCWSTR, :DWORD, :DWORD
WinHttpSendRequest proto WINAPI :HINTERNET, :LPCWSTR, :DWORD, :ptr, :DWORD, :DWORD, :DWORD_PTR
WinHttpSetCredentials proto WINAPI :HINTERNET, :DWORD, :DWORD, :LPCWSTR, :LPCWSTR, :ptr
WinHttpQueryAuthSchemes proto WINAPI :HINTERNET, :LPDWORD, :LPDWORD, :LPDWORD
WinHttpQueryAuthParams proto WINAPI :HINTERNET, :DWORD, :ptr
WinHttpReceiveResponse proto WINAPI :HINTERNET, :ptr
WinHttpQueryHeaders proto WINAPI :HINTERNET, :DWORD, :LPCWSTR, :ptr, :LPDWORD, :LPDWORD
WinHttpDetectAutoProxyConfigUrl proto WINAPI :DWORD, :ptr
WinHttpGetProxyForUrl proto WINAPI :HINTERNET, :LPCWSTR, :ptr, :ptr
WinHttpCreateProxyResolver proto WINAPI :HINTERNET, :ptr
WinHttpGetProxyForUrlEx proto WINAPI :HINTERNET, :PCWSTR, :ptr, :DWORD_PTR
WinHttpGetProxyResult proto WINAPI :HINTERNET, :ptr
WinHttpFreeProxyResult proto WINAPI :ptr
WinHttpResetAutoProxy proto WINAPI :HINTERNET, :DWORD
WinHttpGetIEProxyConfigForCurrentUser proto WINAPI :ptr

.enum WINHTTP_WEB_SOCKET_OPERATION {
    WINHTTP_WEB_SOCKET_SEND_OPERATION			= 0,
    WINHTTP_WEB_SOCKET_RECEIVE_OPERATION		= 1,
    WINHTTP_WEB_SOCKET_CLOSE_OPERATION			= 2,
    WINHTTP_WEB_SOCKET_SHUTDOWN_OPERATION		= 3
    }

.enum WINHTTP_WEB_SOCKET_BUFFER_TYPE {
    WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE	= 0,
    WINHTTP_WEB_SOCKET_BINARY_FRAGMENT_BUFFER_TYPE	= 1,
    WINHTTP_WEB_SOCKET_UTF8_MESSAGE_BUFFER_TYPE		= 2,
    WINHTTP_WEB_SOCKET_UTF8_FRAGMENT_BUFFER_TYPE	= 3,
    WINHTTP_WEB_SOCKET_CLOSE_BUFFER_TYPE		= 4
    }

.enum WINHTTP_WEB_SOCKET_CLOSE_STATUS {
    WINHTTP_WEB_SOCKET_SUCCESS_CLOSE_STATUS		   = 1000,
    WINHTTP_WEB_SOCKET_ENDPOINT_TERMINATED_CLOSE_STATUS	   = 1001,
    WINHTTP_WEB_SOCKET_PROTOCOL_ERROR_CLOSE_STATUS	   = 1002,
    WINHTTP_WEB_SOCKET_INVALID_DATA_TYPE_CLOSE_STATUS	   = 1003,
    WINHTTP_WEB_SOCKET_EMPTY_CLOSE_STATUS		   = 1005,
    WINHTTP_WEB_SOCKET_ABORTED_CLOSE_STATUS		   = 1006,
    WINHTTP_WEB_SOCKET_INVALID_PAYLOAD_CLOSE_STATUS	   = 1007,
    WINHTTP_WEB_SOCKET_POLICY_VIOLATION_CLOSE_STATUS	   = 1008,
    WINHTTP_WEB_SOCKET_MESSAGE_TOO_BIG_CLOSE_STATUS	   = 1009,
    WINHTTP_WEB_SOCKET_UNSUPPORTED_EXTENSIONS_CLOSE_STATUS = 1010,
    WINHTTP_WEB_SOCKET_SERVER_ERROR_CLOSE_STATUS	   = 1011,
    WINHTTP_WEB_SOCKET_SECURE_HANDSHAKE_ERROR_CLOSE_STATUS = 1015
    }

WINHTTP_WEB_SOCKET_ASYNC_RESULT STRUC
AsyncResult		WINHTTP_ASYNC_RESULT <>
Operation		WINHTTP_WEB_SOCKET_OPERATION ?
WINHTTP_WEB_SOCKET_ASYNC_RESULT ENDS

WINHTTP_WEB_SOCKET_STATUS STRUC
dwBytesTransferred	dd ?
eBufferType		WINHTTP_WEB_SOCKET_BUFFER_TYPE ?
WINHTTP_WEB_SOCKET_STATUS ENDS

WINHTTP_WEB_SOCKET_MAX_CLOSE_REASON_LENGTH equ 123
WINHTTP_WEB_SOCKET_MIN_KEEPALIVE_VALUE equ 15000

WinHttpWebSocketCompleteUpgrade proto WINAPI :HINTERNET, :DWORD_PTR
WinHttpWebSocketSend proto WINAPI :HINTERNET, :WINHTTP_WEB_SOCKET_BUFFER_TYPE, :ptr, :DWORD
WinHttpWebSocketReceive proto WINAPI :HINTERNET, :ptr, :DWORD, :ptr, :ptr
WinHttpWebSocketShutdown proto WINAPI :HINTERNET, :USHORT, :ptr, :DWORD
WinHttpWebSocketClose proto WINAPI :HINTERNET, :USHORT, :ptr, :DWORD
WinHttpWebSocketQueryCloseStatus proto WINAPI :HINTERNET, :ptr, :ptr, :DWORD, :ptr

.pragma pack(pop)

endif
endif
