Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

428 lines
19 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. inethttp.h
  5. Abstract:
  6. This header maps some wininet API to winhttp
  7. --*/
  8. // API mappings
  9. #define INTERNET_MAX_URL_LENGTH 2200
  10. #define INTERNET_MAX_HOST_NAME_LENGTH 256
  11. #define INTERNET_RFC1123_BUFSIZE WINHTTP_TIME_FORMAT_BUFSIZE
  12. #define INTERNET_RFC1123_FORMAT 0
  13. inline BOOL __stdcall
  14. InternetTimeFromSystemTime(
  15. IN CONST SYSTEMTIME *pst, // input GMT time
  16. IN DWORD dwRFC, // RFC format
  17. OUT LPWSTR lpszTime, // output string buffer
  18. IN DWORD cbTime // output buffer size
  19. )
  20. {
  21. if (cbTime < WINHTTP_TIME_FORMAT_BUFSIZE)
  22. {
  23. return ERROR_BUFFER_OVERFLOW;
  24. }
  25. return WinHttpTimeFromSystemTime( pst, lpszTime );
  26. }
  27. #define InternetTimeToSystemTime WinHttpTimeToSystemTime
  28. #define InternetCrackUrl WinHttpCrackUrl
  29. #define InternetCreateUrl WinHttpCreateUrl
  30. #define INTERNET_OPEN_TYPE_PRECONFIG WINHTTP_ACCESS_TYPE_DEFAULT_PROXY
  31. #define INTERNET_OPEN_TYPE_DIRECT WINHTTP_ACCESS_TYPE_NO_PROXY
  32. #define INTERNET_OPEN_TYPE_PROXY WINHTTP_ACCESS_TYPE_NAMED_PROXY
  33. #define InternetOpen WinHttpOpen
  34. #define InternetSetStatusCallback(h, pcb)\
  35. WinHttpSetStatusCallback(h, pcb, WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS, 0)
  36. #define INTERNET_OPTION_END_BROWSER_SESSION 42
  37. inline BOOL __stdcall
  38. InternetSetOption(
  39. IN HINTERNET hInternet,
  40. IN DWORD dwOption,
  41. IN LPVOID lpBuffer,
  42. IN DWORD dwBufferLength
  43. )
  44. {
  45. if (dwOption == INTERNET_OPTION_END_BROWSER_SESSION)
  46. {
  47. return TRUE;
  48. }
  49. return WinHttpSetOption( hInternet, dwOption, lpBuffer, dwBufferLength );
  50. }
  51. #define InternetQueryOption WinHttpQueryOption
  52. #define INTERNET_SERVICE_HTTP 3
  53. inline HINTERNET __stdcall
  54. InternetConnect(
  55. IN HINTERNET hInternet,
  56. IN LPCWSTR lpszServerName,
  57. IN INTERNET_PORT nServerPort,
  58. IN LPCWSTR lpszUserName OPTIONAL,
  59. IN LPCWSTR lpszPassword OPTIONAL,
  60. IN DWORD dwService,
  61. IN DWORD dwFlags,
  62. IN DWORD_PTR dwContext
  63. )
  64. {
  65. return WinHttpConnect( hInternet,
  66. lpszServerName,
  67. nServerPort,
  68. 0 );
  69. }
  70. inline HINTERNET __stdcall
  71. HttpOpenRequest(
  72. IN HINTERNET hConnect,
  73. IN LPCWSTR lpszVerb,
  74. IN LPCWSTR lpszObjectName,
  75. IN LPCWSTR lpszVersion,
  76. IN LPCWSTR lpszReferrer OPTIONAL,
  77. IN LPCWSTR FAR * lplpszAcceptTypes OPTIONAL,
  78. IN DWORD dwFlags,
  79. IN DWORD_PTR dwContext
  80. )
  81. {
  82. return WinHttpOpenRequest( hConnect,
  83. lpszVerb,
  84. lpszObjectName,
  85. lpszVersion,
  86. lpszReferrer,
  87. lplpszAcceptTypes,
  88. dwFlags
  89. );
  90. }
  91. #define HttpAddRequestHeaders WinHttpAddRequestHeaders
  92. typedef struct _INTERNET_BUFFERS {
  93. DWORD dwStructSize; // used for API versioning. Set to sizeof(INTERNET_BUFFERS)
  94. struct _INTERNET_BUFFERSW * Next; // chain of buffers
  95. LPCWSTR lpcszHeader; // pointer to headers (may be NULL)
  96. DWORD dwHeadersLength; // length of headers if not NULL
  97. DWORD dwHeadersTotal; // size of headers if not enough buffer
  98. LPVOID lpvBuffer; // pointer to data buffer (may be NULL)
  99. DWORD dwBufferLength; // length of data buffer if not NULL
  100. DWORD dwBufferTotal; // total size of chunk, or content-length if not chunked
  101. DWORD dwOffsetLow; // used for read-ranges (only used in HttpSendRequest2)
  102. DWORD dwOffsetHigh;
  103. } INTERNET_BUFFERS, * LPINTERNET_BUFFERS;
  104. #define HSR_INITIATE 8
  105. inline BOOL __stdcall
  106. HttpSendRequestEx(
  107. IN HINTERNET hRequest,
  108. IN LPINTERNET_BUFFERS lpBuffersIn OPTIONAL,
  109. OUT LPINTERNET_BUFFERS lpBuffersOut OPTIONAL,
  110. IN DWORD dwFlags,
  111. IN DWORD_PTR dwContext
  112. )
  113. {
  114. if (dwFlags != HSR_INITIATE ||
  115. lpBuffersOut)
  116. {
  117. return ERROR_CALL_NOT_IMPLEMENTED;
  118. }
  119. return WinHttpSendRequest( hRequest,
  120. NULL,
  121. 0,
  122. NULL,
  123. WINHTTP_NO_REQUEST_DATA,
  124. lpBuffersIn->dwBufferTotal,
  125. 0
  126. );
  127. }
  128. inline BOOL __stdcall
  129. HttpEndRequest(
  130. IN HINTERNET hRequest,
  131. OUT INTERNET_BUFFERS * lpBuffersOut OPTIONAL,
  132. IN DWORD dwFlags,
  133. IN DWORD_PTR dwContext
  134. )
  135. {
  136. DWORD dwStatus = 0;
  137. DWORD dwLength = sizeof(DWORD);
  138. if (lpBuffersOut || dwFlags)
  139. {
  140. return ERROR_CALL_NOT_IMPLEMENTED;
  141. }
  142. if (!WinHttpReceiveResponse(hRequest,0))
  143. {
  144. return FALSE;
  145. }
  146. //
  147. // On slow connections, it is possible that the server will send a 100 Continue
  148. // status after receiving the headers. If that happens, then we want to skip
  149. // that response and receive again to get the final response/status.
  150. //
  151. if (!WinHttpQueryHeaders(hRequest,
  152. WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER,
  153. NULL,
  154. &dwStatus,
  155. &dwLength,
  156. NULL))
  157. {
  158. return FALSE;
  159. }
  160. if (dwStatus == HTTP_STATUS_CONTINUE)
  161. {
  162. return WinHttpReceiveResponse(hRequest,0);
  163. }
  164. return TRUE;
  165. }
  166. #define InternetWriteFile(h,p,cb,pcb) WinHttpWriteData(h,p,cb,pcb)
  167. #define HttpQueryInfo(h,dw,pb,pcb,ndx)\
  168. WinHttpQueryHeaders(h,dw,((LPCWSTR) pb),pb,pcb,ndx)
  169. #define InternetQueryDataAvailable WinHttpQueryDataAvailable
  170. #define InternetReadFile(h,p,cb,pcb) WinHttpReadData(h,p,cb,pcb)
  171. #define InternetCloseHandle WinHttpCloseHandle
  172. inline HINTERNET __stdcall
  173. InternetOpenUrl(
  174. IN HINTERNET hInternet,
  175. IN LPCWSTR lpszUrl,
  176. IN LPCWSTR lpszHeaders OPTIONAL,
  177. IN DWORD dwHeadersLength,
  178. IN DWORD dwFlags,
  179. IN DWORD_PTR dwContext
  180. )
  181. {
  182. SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
  183. return NULL;
  184. }
  185. // InternetSetOption values
  186. #define INTERNET_FIRST_OPTION WINHTTP_FIRST_OPTION
  187. #define INTERNET_OPTION_CALLBACK WINHTTP_OPTION_CALLBACK
  188. #define INTERNET_OPTION_RESOLVE_TIMEOUT WINHTTP_OPTION_RESOLVE_TIMEOUT
  189. #define INTERNET_OPTION_CONNECT_TIMEOUT WINHTTP_OPTION_CONNECT_TIMEOUT
  190. #define INTERNET_OPTION_CONNECT_RETRIES WINHTTP_OPTION_CONNECT_RETRIES
  191. #define INTERNET_OPTION_SEND_TIMEOUT WINHTTP_OPTION_SEND_TIMEOUT
  192. #define INTERNET_OPTION_RECEIVE_TIMEOUT WINHTTP_OPTION_RECEIVE_TIMEOUT
  193. #define INTERNET_OPTION_HANDLE_TYPE WINHTTP_OPTION_HANDLE_TYPE
  194. #define INTERNET_OPTION_READ_BUFFER_SIZE WINHTTP_OPTION_READ_BUFFER_SIZE
  195. #define INTERNET_OPTION_WRITE_BUFFER_SIZE WINHTTP_OPTION_WRITE_BUFFER_SIZE
  196. #define INTERNET_OPTION_PARENT_HANDLE WINHTTP_OPTION_PARENT_HANDLE
  197. #define INTERNET_OPTION_REQUEST_FLAGS WINHTTP_OPTION_REQUEST_FLAGS
  198. #define INTERNET_OPTION_EXTENDED_ERROR WINHTTP_OPTION_EXTENDED_ERROR
  199. #define INTERNET_OPTION_SECURITY_FLAGS WINHTTP_OPTION_SECURITY_FLAGS
  200. #define INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT WINHTTP_OPTION_SECURITY_CERTIFICATE_STRUCT
  201. #define INTERNET_OPTION_URL WINHTTP_OPTION_URL
  202. #define INTERNET_OPTION_SECURITY_KEY_BITNESS WINHTTP_OPTION_SECURITY_KEY_BITNESS
  203. #define INTERNET_OPTION_PROXY WINHTTP_OPTION_PROXY
  204. #define INTERNET_OPTION_VERSION WINHTTP_OPTION_VERSION
  205. #define INTERNET_OPTION_USER_AGENT WINHTTP_OPTION_USER_AGENT
  206. #define INTERNET_OPTION_CONTEXT_VALUE WINHTTP_OPTION_CONTEXT_VALUE
  207. #define INTERNET_OPTION_CLIENT_CERT_CONTEXT WINHTTP_OPTION_CLIENT_CERT_CONTEXT
  208. #define INTERNET_OPTION_POLICY WINHTTP_OPTION_POLICY
  209. #define INTERNET_OPTION_REQUEST_PRIORITY WINHTTP_OPTION_REQUEST_PRIORITY
  210. #define INTERNET_OPTION_HTTP_VERSION WINHTTP_OPTION_HTTP_VERSION
  211. #define INTERNET_OPTION_ERROR_MASK WINHTTP_OPTION_ERROR_MASK
  212. #define INTERNET_OPTION_CONTROL_SEND_TIMEOUT WINHTTP_OPTION_SEND_TIMEOUT
  213. #define INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT WINHTTP_OPTION_RECEIVE_TIMEOUT
  214. #define INTERNET_OPTION_DATA_SEND_TIMEOUT WINHTTP_OPTION_SEND_TIMEOUT
  215. #define INTERNET_OPTION_DATA_RECEIVE_TIMEOUT WINHTTP_OPTION_RECEIVE_TIMEOUT
  216. #define INTERNET_OPTION_CODEPAGE WINHTTP_OPTION_CODEPAGE
  217. #define INTERNET_OPTION_MAX_CONNS_PER_SERVER WINHTTP_OPTION_MAX_CONNS_PER_SERVER
  218. #define INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER WINHTTP_OPTION_MAX_CONNS_PER_1_0_SERVER
  219. #define INTERNET_OPTION_PER_CONNECTION_OPTION WINHTTP_OPTION_PER_CONNECTION_OPTION
  220. #define INTERNET_OPTION_DIGEST_AUTH_UNLOAD WINHTTP_OPTION_DIGEST_AUTH_UNLOAD
  221. #define INTERNET_LAST_OPTION WINHTTP_LAST_OPTION
  222. // status callback
  223. #define INTERNET_ASYNC_RESULT WINHTTP_ASYNC_RESULT
  224. #define LPINTERNET_ASYNC_RESULT LPWINHTTP_ASYNC_RESULT
  225. #define INTERNET_STATUS_RESOLVING_NAME WINHTTP_STATUS_RESOLVING_NAME
  226. #define INTERNET_STATUS_NAME_RESOLVED WINHTTP_STATUS_NAME_RESOLVED
  227. #define INTERNET_STATUS_CONNECTING_TO_SERVER WINHTTP_STATUS_CONNECTING_TO_SERVER
  228. #define INTERNET_STATUS_CONNECTED_TO_SERVER WINHTTP_STATUS_CONNECTED_TO_SERVER
  229. #define INTERNET_STATUS_SENDING_REQUEST WINHTTP_STATUS_SENDING_REQUEST
  230. #define INTERNET_STATUS_REQUEST_SENT WINHTTP_STATUS_REQUEST_SENT
  231. #define INTERNET_STATUS_RECEIVING_RESPONSE WINHTTP_STATUS_RECEIVING_RESPONSE
  232. #define INTERNET_STATUS_RESPONSE_RECEIVED WINHTTP_STATUS_RESPONSE_RECEIVED
  233. #define INTERNET_STATUS_CLOSING_CONNECTION WINHTTP_STATUS_CLOSING_CONNECTION
  234. #define INTERNET_STATUS_CONNECTION_CLOSED WINHTTP_STATUS_CONNECTION_CLOSED
  235. #define INTERNET_STATUS_HANDLE_CREATED WINHTTP_STATUS_HANDLE_CREATED
  236. #define INTERNET_STATUS_HANDLE_CLOSING WINHTTP_STATUS_HANDLE_CLOSING
  237. #define INTERNET_STATUS_DETECTING_PROXY WINHTTP_STATUS_DETECTING_PROXY
  238. #define INTERNET_STATUS_REQUEST_COMPLETE WINHTTP_STATUS_REQUEST_COMPLETE
  239. #define INTERNET_STATUS_REDIRECT WINHTTP_STATUS_REDIRECT
  240. #define INTERNET_STATUS_INTERMEDIATE_RESPONSE WINHTTP_STATUS_INTERMEDIATE_RESPONSE
  241. #define INTERNET_STATUS_CALLBACK WINHTTP_STATUS_CALLBACK
  242. #define LPINTERNET_STATUS_CALLBACK LPWINHTTP_STATUS_CALLBACK
  243. #define INTERNET_INVALID_STATUS_CALLBACK WINHTTP_INVALID_STATUS_CALLBACK
  244. #define INTERNET_NO_CALLBACK 0
  245. // flags
  246. #define INTERNET_FLAG_PRAGMA_NO_CACHE WINHTTP_FLAG_REFRESH
  247. #define INTERNET_FLAG_DONT_CACHE WINHTTP_FLAG_REFRESH
  248. #define INTERNET_FLAG_SECURE WINHTTP_FLAG_SECURE
  249. #define INTERNET_FLAG_NO_UI 0
  250. #define INTERNET_FLAG_RELOAD 0
  251. // handle types
  252. #define INTERNET_HANDLE_TYPE_INTERNET WINHTTP_HANDLE_TYPE_SESSION
  253. #define INTERNET_HANDLE_TYPE_CONNECT_HTTP WINHTTP_HANDLE_TYPE_CONNECT
  254. #define INTERNET_HANDLE_TYPE_HTTP_REQUEST WINHTTP_HANDLE_TYPE_REQUEST
  255. #define HTTP_ADDREQ_INDEX_MASK WINHTTP_ADDREQ_INDEX_MASK
  256. #define HTTP_ADDREQ_FLAGS_MASK WINHTTP_ADDREQ_FLAGS_MASK
  257. #define HTTP_ADDREQ_FLAG_ADD_IF_NEW WINHTTP_ADDREQ_FLAG_ADD_IF_NEW
  258. #define HTTP_ADDREQ_FLAG_ADD WINHTTP_ADDREQ_FLAG_ADD
  259. #define HTTP_ADDREQ_FLAG_REPLACE WINHTTP_ADDREQ_FLAG_REPLACE
  260. #define HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA WINHTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA
  261. #define HTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON WINHTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON
  262. #define HTTP_ADDREQ_FLAG_COALESCE WINHTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA
  263. #define HTTP_QUERY_MIME_VERSION WINHTTP_QUERY_MIME_VERSION
  264. #define HTTP_QUERY_CONTENT_TYPE WINHTTP_QUERY_CONTENT_TYPE
  265. #define HTTP_QUERY_CONTENT_TRANSFER_ENCODING WINHTTP_QUERY_CONTENT_TRANSFER_ENCODING
  266. #define HTTP_QUERY_CONTENT_ID WINHTTP_QUERY_CONTENT_ID
  267. #define HTTP_QUERY_CONTENT_DESCRIPTION WINHTTP_QUERY_CONTENT_DESCRIPTION
  268. #define HTTP_QUERY_CONTENT_LENGTH WINHTTP_QUERY_CONTENT_LENGTH
  269. #define HTTP_QUERY_CONTENT_LANGUAGE WINHTTP_QUERY_CONTENT_LANGUAGE
  270. #define HTTP_QUERY_ALLOW WINHTTP_QUERY_ALLOW
  271. #define HTTP_QUERY_PUBLIC WINHTTP_QUERY_PUBLIC
  272. #define HTTP_QUERY_DATE WINHTTP_QUERY_DATE
  273. #define HTTP_QUERY_EXPIRES WINHTTP_QUERY_EXPIRES
  274. #define HTTP_QUERY_LAST_MODIFIED WINHTTP_QUERY_LAST_MODIFIED
  275. #define HTTP_QUERY_MESSAGE_ID WINHTTP_QUERY_MESSAGE_ID
  276. #define HTTP_QUERY_URI WINHTTP_QUERY_URI
  277. #define HTTP_QUERY_DERIVED_FROM WINHTTP_QUERY_DERIVED_FROM
  278. #define HTTP_QUERY_COST WINHTTP_QUERY_COST
  279. #define HTTP_QUERY_LINK WINHTTP_QUERY_LINK
  280. #define HTTP_QUERY_PRAGMA WINHTTP_QUERY_PRAGMA
  281. #define HTTP_QUERY_VERSION WINHTTP_QUERY_VERSION
  282. #define HTTP_QUERY_STATUS_CODE WINHTTP_QUERY_STATUS_CODE
  283. #define HTTP_QUERY_STATUS_TEXT WINHTTP_QUERY_STATUS_TEXT
  284. #define HTTP_QUERY_RAW_HEADERS WINHTTP_QUERY_RAW_HEADERS
  285. #define HTTP_QUERY_RAW_HEADERS_CRLF WINHTTP_QUERY_RAW_HEADERS_CRLF
  286. #define HTTP_QUERY_CONNECTION WINHTTP_QUERY_CONNECTION
  287. #define HTTP_QUERY_ACCEPT WINHTTP_QUERY_ACCEPT
  288. #define HTTP_QUERY_ACCEPT_CHARSET WINHTTP_QUERY_ACCEPT_CHARSET
  289. #define HTTP_QUERY_ACCEPT_ENCODING WINHTTP_QUERY_ACCEPT_ENCODING
  290. #define HTTP_QUERY_ACCEPT_LANGUAGE WINHTTP_QUERY_ACCEPT_LANGUAGE
  291. #define HTTP_QUERY_AUTHORIZATION WINHTTP_QUERY_AUTHORIZATION
  292. #define HTTP_QUERY_CONTENT_ENCODING WINHTTP_QUERY_CONTENT_ENCODING
  293. #define HTTP_QUERY_FORWARDED WINHTTP_QUERY_FORWARDED
  294. #define HTTP_QUERY_FROM WINHTTP_QUERY_FROM
  295. #define HTTP_QUERY_IF_MODIFIED_SINCE WINHTTP_QUERY_IF_MODIFIED_SINCE
  296. #define HTTP_QUERY_LOCATION WINHTTP_QUERY_LOCATION
  297. #define HTTP_QUERY_ORIG_URI WINHTTP_QUERY_ORIG_URI
  298. #define HTTP_QUERY_REFERER WINHTTP_QUERY_REFERER
  299. #define HTTP_QUERY_RETRY_AFTER WINHTTP_QUERY_RETRY_AFTER
  300. #define HTTP_QUERY_SERVER WINHTTP_QUERY_SERVER
  301. #define HTTP_QUERY_TITLE WINHTTP_QUERY_TITLE
  302. #define HTTP_QUERY_USER_AGENT WINHTTP_QUERY_USER_AGENT
  303. #define HTTP_QUERY_WWW_AUTHENTICATE WINHTTP_QUERY_WWW_AUTHENTICATE
  304. #define HTTP_QUERY_PROXY_AUTHENTICATE WINHTTP_QUERY_PROXY_AUTHENTICATE
  305. #define HTTP_QUERY_ACCEPT_RANGES WINHTTP_QUERY_ACCEPT_RANGES
  306. #define HTTP_QUERY_SET_COOKIE WINHTTP_QUERY_SET_COOKIE
  307. #define HTTP_QUERY_COOKIE WINHTTP_QUERY_COOKIE
  308. #define HTTP_QUERY_REQUEST_METHOD WINHTTP_QUERY_REQUEST_METHOD
  309. #define HTTP_QUERY_REFRESH WINHTTP_QUERY_REFRESH
  310. #define HTTP_QUERY_CONTENT_DISPOSITION WINHTTP_QUERY_CONTENT_DISPOSITION
  311. #define HTTP_QUERY_AGE WINHTTP_QUERY_AGE
  312. #define HTTP_QUERY_CACHE_CONTROL WINHTTP_QUERY_CACHE_CONTROL
  313. #define HTTP_QUERY_CONTENT_BASE WINHTTP_QUERY_CONTENT_BASE
  314. #define HTTP_QUERY_CONTENT_LOCATION WINHTTP_QUERY_CONTENT_LOCATION
  315. #define HTTP_QUERY_CONTENT_MD5 WINHTTP_QUERY_CONTENT_MD5
  316. #define HTTP_QUERY_CONTENT_RANGE WINHTTP_QUERY_CONTENT_RANGE
  317. #define HTTP_QUERY_ETAG WINHTTP_QUERY_ETAG
  318. #define HTTP_QUERY_HOST WINHTTP_QUERY_HOST
  319. #define HTTP_QUERY_IF_MATCH WINHTTP_QUERY_IF_MATCH
  320. #define HTTP_QUERY_IF_NONE_MATCH WINHTTP_QUERY_IF_NONE_MATCH
  321. #define HTTP_QUERY_IF_RANGE WINHTTP_QUERY_IF_RANGE
  322. #define HTTP_QUERY_IF_UNMODIFIED_SINCE WINHTTP_QUERY_IF_UNMODIFIED_SINCE
  323. #define HTTP_QUERY_MAX_FORWARDS WINHTTP_QUERY_MAX_FORWARDS
  324. #define HTTP_QUERY_PROXY_AUTHORIZATION WINHTTP_QUERY_PROXY_AUTHORIZATION
  325. #define HTTP_QUERY_RANGE WINHTTP_QUERY_RANGE
  326. #define HTTP_QUERY_TRANSFER_ENCODING WINHTTP_QUERY_TRANSFER_ENCODING
  327. #define HTTP_QUERY_UPGRADE WINHTTP_QUERY_UPGRADE
  328. #define HTTP_QUERY_VARY WINHTTP_QUERY_VARY
  329. #define HTTP_QUERY_VIA WINHTTP_QUERY_VIA
  330. #define HTTP_QUERY_WARNING WINHTTP_QUERY_WARNING
  331. #define HTTP_QUERY_EXPECT WINHTTP_QUERY_EXPECT
  332. #define HTTP_QUERY_PROXY_CONNECTION WINHTTP_QUERY_PROXY_CONNECTION
  333. #define HTTP_QUERY_UNLESS_MODIFIED_SINCE WINHTTP_QUERY_UNLESS_MODIFIED_SINCE
  334. #define HTTP_QUERY_ECHO_REQUEST WINHTTP_QUERY_ECHO_REQUEST
  335. #define HTTP_QUERY_ECHO_REPLY WINHTTP_QUERY_ECHO_REPLY
  336. #define HTTP_QUERY_ECHO_HEADERS WINHTTP_QUERY_ECHO_HEADERS
  337. #define HTTP_QUERY_ECHO_HEADERS_CRLF WINHTTP_QUERY_ECHO_HEADERS_CRLF
  338. #define HTTP_QUERY_PROXY_SUPPORT WINHTTP_QUERY_PROXY_SUPPORT
  339. #define HTTP_QUERY_AUTHENTICATION_INFO WINHTTP_QUERY_AUTHENTICATION_INFO
  340. #define HTTP_QUERY_MAX WINHTTP_QUERY_MAX
  341. #define HTTP_QUERY_CUSTOM WINHTTP_QUERY_CUSTOM
  342. #define HTTP_QUERY_FLAG_REQUEST_HEADERS WINHTTP_QUERY_FLAG_REQUEST_HEADERS
  343. #define HTTP_QUERY_FLAG_SYSTEMTIME WINHTTP_QUERY_FLAG_SYSTEMTIME
  344. #define HTTP_QUERY_FLAG_NUMBER WINHTTP_QUERY_FLAG_NUMBER
  345. #define ERROR_INTERNET_FORCE_RETRY ERROR_WINHTTP_RESEND_REQUEST
  346. #define ERROR_HTTP_HEADER_NOT_FOUND ERROR_WINHTTP_HEADER_NOT_FOUND
  347. #define ERROR_INTERNET_CONNECTION_RESET ERROR_WINHTTP_CONNECTION_ERROR
  348. #define INTERNET_ERROR_BASE WINHTTP_ERROR_BASE
  349. #define ERROR_INTERNET_INTERNAL_ERROR (INTERNET_ERROR_BASE + 4)
  350. #define ERROR_INTERNET_SEC_CERT_DATE_INVALID (INTERNET_ERROR_BASE + 37)
  351. #define ERROR_INTERNET_SEC_CERT_CN_INVALID (INTERNET_ERROR_BASE + 38)
  352. #define ERROR_INTERNET_INVALID_CA (INTERNET_ERROR_BASE + 45)
  353. #define ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP (INTERNET_ERROR_BASE + 46)
  354. #define ERROR_INTERNET_SEC_CERT_ERRORS (INTERNET_ERROR_BASE + 55)
  355. #define ERROR_INTERNET_SEC_CERT_NO_REV (INTERNET_ERROR_BASE + 56)
  356. #define ERROR_INTERNET_SEC_CERT_REV_FAILED (INTERNET_ERROR_BASE + 57)
  357. #define ERROR_INTERNET_SEC_INVALID_CERT (INTERNET_ERROR_BASE + 169)
  358. #define ERROR_INTERNET_SEC_CERT_REVOKED (INTERNET_ERROR_BASE + 170)