2 * Copyright 2011 Hans Leidekker for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "httprequestid.h"
24 #define threading(model)
29 uuid(662901fc-6951-4854-9eb2-d9a2570f2b2e),
30 helpstring("Microsoft WinHTTP Services, version 5.1"),
36 importlib ("stdole2.tlb");
38 typedef [public] LONG HTTPREQUEST_PROXY_SETTING;
39 const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_DEFAULT = 0x00000000;
40 const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_PRECONFIG = 0x00000000;
41 const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_DIRECT = 0x00000001;
42 const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_PROXY = 0x00000002;
44 typedef [public] LONG HTTPREQUEST_SETCREDENTIALS_FLAGS;
45 const HTTPREQUEST_SETCREDENTIALS_FLAGS HTTPREQUEST_SETCREDENTIALS_FOR_SERVER = 0x00000000;
46 const HTTPREQUEST_SETCREDENTIALS_FLAGS HTTPREQUEST_SETCREDENTIALS_FOR_PROXY = 0x00000001;
49 [uuid(12782009-fe90-4877-9730-e5e183669b19)]
50 enum WinHttpRequestOption
52 WinHttpRequestOption_UserAgentString,
53 WinHttpRequestOption_URL,
54 WinHttpRequestOption_URLCodePage,
55 WinHttpRequestOption_EscapePercentInURL,
56 WinHttpRequestOption_SslErrorIgnoreFlags,
57 WinHttpRequestOption_SelectCertificate,
58 WinHttpRequestOption_EnableRedirects,
59 WinHttpRequestOption_UrlEscapeDisable,
60 WinHttpRequestOption_UrlEscapeDisableQuery,
61 WinHttpRequestOption_SecureProtocols,
62 WinHttpRequestOption_EnableTracing,
63 WinHttpRequestOption_RevertImpersonationOverSsl,
64 WinHttpRequestOption_EnableHttpsToHttpRedirects,
65 WinHttpRequestOption_EnablePassportAuthentication,
66 WinHttpRequestOption_MaxAutomaticRedirects,
67 WinHttpRequestOption_MaxResponseHeaderSize,
68 WinHttpRequestOption_MaxResponseDrainSize,
69 WinHttpRequestOption_EnableHttp1_1,
70 WinHttpRequestOption_EnableCertificateRevocationCheck,
71 WinHttpRequestOption_RejectUserpwd
72 } WinHttpRequestOption;
75 [uuid(9d8a6df8-13de-4b1f-a330-67c719d62514)]
76 enum WinHttpRequestAutoLogonPolicy
78 AutoLogonPolicy_Always,
79 AutoLogonPolicy_OnlyIfBypassProxy,
81 } WinHttpRequestAutoLogonPolicy;
85 uuid(016fe2ec-b2c8-45f8-b23b-39e53a75396b),
90 pointer_default(unique)
92 interface IWinHttpRequest : IDispatch
94 [id(DISPID_HTTPREQUEST_SETPROXY)]
96 [in] HTTPREQUEST_PROXY_SETTING proxy_setting,
97 [in, optional] VARIANT proxy_server,
98 [in, optional] VARIANT bypass_list);
100 [id(DISPID_HTTPREQUEST_SETCREDENTIALS)]
101 HRESULT SetCredentials(
104 [in] HTTPREQUEST_SETCREDENTIALS_FLAGS flags);
106 [id(DISPID_HTTPREQUEST_OPEN)]
110 [in, optional] VARIANT async);
112 [id(DISPID_HTTPREQUEST_SETREQUESTHEADER)]
113 HRESULT SetRequestHeader(
117 [id(DISPID_HTTPREQUEST_GETRESPONSEHEADER)]
118 HRESULT GetResponseHeader(
120 [out, retval] BSTR *value);
122 [id(DISPID_HTTPREQUEST_GETALLRESPONSEHEADERS)]
123 HRESULT GetAllResponseHeaders(
124 [out, retval] BSTR *headers);
126 [id(DISPID_HTTPREQUEST_SEND)]
128 [in, optional] VARIANT body);
130 [propget, id(DISPID_HTTPREQUEST_STATUS)]
132 [out, retval] LONG *status);
134 [propget, id(DISPID_HTTPREQUEST_STATUSTEXT)]
136 [out, retval] BSTR *status);
138 [propget, id(DISPID_HTTPREQUEST_RESPONSETEXT)]
139 HRESULT ResponseText(
140 [out, retval] BSTR *body);
142 [propget, id(DISPID_HTTPREQUEST_RESPONSEBODY)]
143 HRESULT ResponseBody(
144 [out, retval] VARIANT *body);
146 [propget, id(DISPID_HTTPREQUEST_RESPONSESTREAM)]
147 HRESULT ResponseStream(
148 [out, retval] VARIANT *body);
150 [propget, id(DISPID_HTTPREQUEST_OPTION)]
152 [in] WinHttpRequestOption option,
153 [out, retval] VARIANT *value);
155 [propput, id(DISPID_HTTPREQUEST_OPTION)]
157 [in] WinHttpRequestOption option,
160 [id(DISPID_HTTPREQUEST_WAITFORRESPONSE)]
161 HRESULT WaitForResponse(
162 [in, optional] VARIANT timeout,
163 [out, retval] VARIANT_BOOL *succeeded);
165 [id(DISPID_HTTPREQUEST_ABORT)]
168 [id(DISPID_HTTPREQUEST_SETTIMEOUTS)]
170 [in] LONG resolve_timeout,
171 [in] LONG connect_timeout,
172 [in] LONG send_timeout,
173 [in] LONG receive_timeout);
175 [id(DISPID_HTTPREQUEST_SETCLIENTCERTIFICATE)]
176 HRESULT SetClientCertificate(
177 [in] BSTR certificate);
179 [id(DISPID_HTTPREQUEST_SETAUTOLOGONPOLICY)]
180 HRESULT SetAutoLogonPolicy(
181 [in] WinHttpRequestAutoLogonPolicy policy);
184 helpstring("WinHttpRequest Component version 5.1"),
185 threading(apartment),
186 progid("WinHttp.WinHttpRequest.5.1"),
187 uuid(2087c2f4-2cef-4953-a8ab-66779b670495)
189 coclass WinHttpRequest { interface IWinHttpRequest; }