include: Add IFileDialogCustomize interface declaration.
[wine] / include / urlmon.idl
1 /*
2  * Copyright (C) 2000 Ulrich Czekalla
3  * Copyright (C) 2003 Alexandre Julliard
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18  */
19
20 import "objidl.idl";
21 import "oleidl.idl";
22 import "servprov.idl";
23 import "msxml.idl";
24
25 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
26 cpp_quote("#undef GetUserName")
27 cpp_quote("#undef SetPort")
28 cpp_quote("#endif")
29
30 interface IInternetProtocolSink;
31
32 /*****************************************************************************
33  * IInternet interface
34  */
35 [
36     object,
37     uuid(79eac9e0-baf9-11ce-8c82-00aa004ba90b),
38     pointer_default(unique),
39     local
40 ]
41 interface IInternet : IUnknown
42 {
43     typedef [unique] IInternet *LPIINTERNET;
44 }
45
46 /*****************************************************************************
47  * IBinding interface
48  */
49 [
50     object,
51     uuid(79eac9c0-baf9-11ce-8c82-00aa004ba90b),
52     pointer_default(unique)
53 ]
54 interface IBinding : IUnknown
55 {
56     typedef [unique] IBinding *LPBINDING;
57
58     HRESULT Abort();
59     HRESULT Suspend();
60     HRESULT Resume();
61
62     HRESULT SetPriority(
63         [in] LONG nPriority);
64
65     HRESULT GetPriority(
66         [out] LONG * pnPriority);
67
68     [local]
69     HRESULT GetBindResult(
70         [out] CLSID *pclsidProtocol,
71         [out] DWORD *pdwResult,
72         [out] LPOLESTR *pszResult,
73         [in, out] DWORD *pdwReserved);
74
75     [call_as(GetBindResult)]
76     HRESULT RemoteGetBindResult(
77         [out] CLSID *pclsidProtocol,
78         [out] DWORD *pdwResult,
79         [out] LPOLESTR *pszResult,
80         [in] DWORD dwReserved);
81 }
82
83
84 /*****************************************************************************
85  * IBindStatusCallback interface
86  */
87 [
88     object,
89     uuid(79eac9c1-baf9-11ce-8c82-00aa004ba90b),
90     pointer_default(unique)
91 ]
92 interface IBindStatusCallback : IUnknown
93 {
94     typedef [unique] IBindStatusCallback *LPBINDSTATUSCALLBACK;
95
96     typedef enum
97     {
98         BINDVERB_GET    = 0x00000000,
99         BINDVERB_POST   = 0x00000001,
100         BINDVERB_PUT    = 0x00000002,
101         BINDVERB_CUSTOM = 0x00000003
102     } BINDVERB;
103
104     typedef enum
105     {
106         BINDINFOF_URLENCODESTGMEDDATA = 0x00000001,
107         BINDINFOF_URLENCODEDEXTRAINFO = 0x00000002
108     } BINDINFOF;
109
110     typedef enum
111     {
112         BINDF_ASYNCHRONOUS = 0x00000001,
113         BINDF_ASYNCSTORAGE = 0x00000002,
114         BINDF_NOPROGRESSIVERENDERING = 0x00000004,
115         BINDF_OFFLINEOPERATION = 0x00000008,
116         BINDF_GETNEWESTVERSION = 0x00000010,
117         BINDF_NOWRITECACHE = 0x00000020,
118         BINDF_NEEDFILE = 0x00000040,
119         BINDF_PULLDATA = 0x00000080,
120         BINDF_IGNORESECURITYPROBLEM = 0x00000100,
121         BINDF_RESYNCHRONIZE = 0x00000200,
122         BINDF_HYPERLINK = 0x00000400,
123         BINDF_NO_UI = 0x00000800,
124         BINDF_SILENTOPERATION = 0x00001000,
125         BINDF_PRAGMA_NO_CACHE = 0x00002000,
126         BINDF_GETCLASSOBJECT = 0x00004000,
127         BINDF_RESERVED_1 = 0x00008000,
128         BINDF_FREE_THREADED = 0x00010000,
129         BINDF_DIRECT_READ = 0x00020000,
130         BINDF_FORMS_SUBMIT = 0x00040000,
131         BINDF_GETFROMCACHE_IF_NET_FAIL = 0x00080000,
132         BINDF_FROMURLMON = 0x00100000,
133         BINDF_FWD_BACK = 0x00200000,
134         BINDF_PREFERDEFAULTHANDLER = 0x00400000,
135         BINDF_ENFORCERESTRICTED = 0x00800000
136     } BINDF;
137
138     typedef enum
139     {
140         URL_ENCODING_NONE         = 0x00000000,
141         URL_ENCODING_ENABLE_UTF8  = 0x10000000,
142         URL_ENCODING_DISABLE_UTF8 = 0x20000000
143     } URL_ENCODING;
144
145     typedef struct _tagBINDINFO
146     {
147         ULONG cbSize;
148         LPWSTR szExtraInfo;
149         STGMEDIUM stgmedData;
150         DWORD grfBindInfoF;
151         DWORD dwBindVerb;
152         LPWSTR szCustomVerb;
153         DWORD cbstgmedData;
154         DWORD dwOptions;
155         DWORD dwOptionsFlags;
156         DWORD dwCodePage;
157         SECURITY_ATTRIBUTES securityAttributes;
158         IID iid;
159         IUnknown *pUnk;
160         DWORD dwReserved;
161     } BINDINFO;
162
163     typedef struct _REMSECURITY_ATTRIBUTES
164     {
165         DWORD nLength;
166         DWORD lpSecurityDescriptor;
167         BOOL bInheritHandle;
168     } REMSECURITY_ATTRIBUTES, *PREMSECURITY_ATTRIBUTES, *LPREMSECURITY_ATTRIBUTES;
169
170     typedef struct _tagRemBINDINFO
171     {
172         ULONG cbSize;
173         LPWSTR szExtraInfo;
174         DWORD grfBindInfoF;
175         DWORD dwBindVerb;
176         LPWSTR szCustomVerb;
177         DWORD cbstgmedData;
178         DWORD dwOptions;
179         DWORD dwOptionsFlags;
180         DWORD dwCodePage;
181         REMSECURITY_ATTRIBUTES securityAttributes;
182         IID iid;
183         IUnknown *pUnk;
184         DWORD dwReserved;
185     } RemBINDINFO;
186
187     typedef struct tagRemFORMATETC
188     {
189         DWORD cfFormat;
190         DWORD ptd;
191         DWORD dwAspect;
192         LONG lindex;
193         DWORD tymed;
194     } RemFORMATETC, *LPREMFORMATETC;
195
196     typedef enum
197     {
198         BSCF_FIRSTDATANOTIFICATION = 0x01,
199         BSCF_INTERMEDIATEDATANOTIFICATION = 0x02,
200         BSCF_LASTDATANOTIFICATION = 0x04,
201         BSCF_DATAFULLYAVAILABLE = 0x08,
202         BSCF_AVAILABLEDATASIZEUNKNOWN = 0x10,
203         BSCF_SKIPDRAINDATAFORFILEURLS = 0x20,
204         BSCF_64BITLENGTHDOWNLOAD = 0x40
205     } BSCF;
206
207     typedef enum BINDSTATUS
208     {
209         BINDSTATUS_FINDINGRESOURCE = 1,
210         BINDSTATUS_CONNECTING,
211         BINDSTATUS_REDIRECTING,
212         BINDSTATUS_BEGINDOWNLOADDATA,
213         BINDSTATUS_DOWNLOADINGDATA,
214         BINDSTATUS_ENDDOWNLOADDATA,
215         BINDSTATUS_BEGINDOWNLOADCOMPONENTS,
216         BINDSTATUS_INSTALLINGCOMPONENTS,
217         BINDSTATUS_ENDDOWNLOADCOMPONENTS,
218         BINDSTATUS_USINGCACHEDCOPY,
219         BINDSTATUS_SENDINGREQUEST,
220         BINDSTATUS_CLASSIDAVAILABLE,
221         BINDSTATUS_MIMETYPEAVAILABLE,
222         BINDSTATUS_CACHEFILENAMEAVAILABLE,
223         BINDSTATUS_BEGINSYNCOPERATION,
224         BINDSTATUS_ENDSYNCOPERATION,
225         BINDSTATUS_BEGINUPLOADDATA,
226         BINDSTATUS_UPLOADINGDATA,
227         BINDSTATUS_ENDUPLOADINGDATA,
228         BINDSTATUS_PROTOCOLCLASSID,
229         BINDSTATUS_ENCODING,
230         BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE,
231         BINDSTATUS_CLASSINSTALLLOCATION,
232         BINDSTATUS_DECODING,
233         BINDSTATUS_LOADINGMIMEHANDLER,
234         BINDSTATUS_CONTENTDISPOSITIONATTACH,
235         BINDSTATUS_FILTERREPORTMIMETYPE,
236         BINDSTATUS_CLSIDCANINSTANTIATE,
237         BINDSTATUS_IUNKNOWNAVAILABLE,
238         BINDSTATUS_DIRECTBIND,
239         BINDSTATUS_RAWMIMETYPE,
240         BINDSTATUS_PROXYDETECTING,
241         BINDSTATUS_ACCEPTRANGES,
242         BINDSTATUS_COOKIE_SENT,
243         BINDSTATUS_COMPACT_POLICY_RECEIVED,
244         BINDSTATUS_COOKIE_SUPPRESSED,
245         BINDSTATUS_COOKIE_STATE_UNKNOWN,
246         BINDSTATUS_COOKIE_STATE_ACCEPT,
247         BINDSTATUS_COOKIE_STATE_REJECT,
248         BINDSTATUS_COOKIE_STATE_PROMPT,
249         BINDSTATUS_COOKIE_STATE_LEASH,
250         BINDSTATUS_COOKIE_STATE_DOWNGRADE,
251         BINDSTATUS_POLICY_HREF,
252         BINDSTATUS_P3P_HEADER,
253         BINDSTATUS_SESSION_COOKIE_RECEIVED,
254         BINDSTATUS_PERSISTENT_COOKIE_RECEIVED,
255         BINDSTATUS_SESSION_COOKIES_ALLOWED,
256         BINDSTATUS_CACHECONTROL,
257         BINDSTATUS_CONTENTDISPOSITIONFILENAME,
258         BINDSTATUS_MIMETEXTPLAINMISMATCH,
259         BINDSTATUS_PUBLISHERAVAILABLE,
260         BINDSTATUS_DISPLAYNAMEAVAILABLE
261     } BINDSTATUS;
262
263
264     HRESULT OnStartBinding(
265         [in] DWORD dwReserved,
266         [in] IBinding * pib);
267
268     HRESULT GetPriority(
269         [out] LONG * pnPriority);
270
271     HRESULT OnLowResource(
272         [in] DWORD reserved);
273
274     HRESULT OnProgress(
275         [in] ULONG ulProgress,
276         [in] ULONG ulProgressMax,
277         [in] ULONG ulStatusCode,
278         [in] LPCWSTR szStatusText);
279
280     HRESULT OnStopBinding(
281         [in] HRESULT hresult,
282         [in, unique] LPCWSTR szError);
283
284     [local]
285     HRESULT GetBindInfo(
286         [out] DWORD *grfBINDF,
287         [in, out, unique] BINDINFO * pbindinfo);
288
289     [call_as(GetBindInfo)]
290     HRESULT RemoteGetBindInfo(
291         [out] DWORD *grfBINDF,
292         [in, out, unique] RemBINDINFO * pbindinfo,
293         [in, out, unique] RemSTGMEDIUM* pstgmed);
294
295     [local]
296     HRESULT OnDataAvailable(
297         [in] DWORD grfBSCF,
298         [in] DWORD dwSize,
299         [in] FORMATETC* pformatetc,
300         [in] STGMEDIUM* pstgmed);
301
302     [call_as(OnDataAvailable)]
303     HRESULT RemoteOnDataAvailable(
304         [in] DWORD grfBSCF,
305         [in] DWORD dwSize,
306         [in] RemFORMATETC *pformatetc,
307         [in] RemSTGMEDIUM* pstgmed);
308
309     HRESULT OnObjectAvailable(
310         [in] REFIID riid,
311         [in, iid_is(riid)] IUnknown* punk);
312 }
313
314 /*****************************************************************************
315  * IBindStatusCallbackEx interface
316  */
317 [
318     object,
319     uuid(aaa74ef9-8ee7-4659-88d9-f8c504da73cc),
320     pointer_default(unique)
321 ]
322 interface IBindStatusCallbackEx : IBindStatusCallback
323 {
324     typedef [unique] IBindStatusCallbackEx *LPBINDSTATUSCALLBACKEX;
325
326     typedef enum {
327         BINDF2_DISABLEBASICOVERHTTP               = 0x00000001,
328         BINDF2_DISABLEAUTOCOOKIEHANDLING          = 0x00000002,
329         BINDF2_READ_DATA_GREATER_THAN_4GB         = 0x00000004,
330         BINDF2_DISABLE_HTTP_REDIRECT_XSECURITYID  = 0x00000008,
331         BINDF2_RESERVED_3                         = 0x20000000,
332         BINDF2_RESERVED_2                         = 0x40000000,
333         BINDF2_RESERVED_1                         = 0x80000000,
334     } BINDF2;
335
336     [local]
337     HRESULT GetBindInfoEx(
338             [out] DWORD *grfBINDF,
339             [in, out, unique] BINDINFO *pbindinfo,
340             [out] DWORD *grfBINDF2,
341             [out] DWORD *pdwReserved);
342
343     [call_as(GetBindInfoEx)]
344     HRESULT RemoteGetBindInfoEx(
345             [out] DWORD *grfBINDF,
346             [in, out, unique] RemBINDINFO *pbindinfo,
347             [in, out, unique] RemSTGMEDIUM *pstgmed,
348             [out] DWORD *grfBINDF2,
349             [out] DWORD *pdwReserved);
350 }
351
352
353 /*****************************************************************************
354  * IAuthenticate interface
355  */
356 [
357     local,
358     object,
359     uuid(79EAC9D0-BAf9-11CE-8C82-00AA004BA90B),
360     pointer_default(unique)
361 ]
362 interface IAuthenticate : IUnknown
363 {
364     typedef [unique] IAuthenticate *LPAUTHENTICATION;
365
366     HRESULT Authenticate(
367         [out] HWND* phwnd,
368         [out] LPWSTR *pszUsername,
369         [out] LPWSTR *pszPassword);
370 }
371
372 /*****************************************************************************
373  * IHttpNegotiate interface
374  */
375 [
376     object,
377     uuid(79EAC9D2-BAF9-11CE-8C82-00AA004BA90B),
378     pointer_default(unique)
379 ]
380 interface IHttpNegotiate : IUnknown
381 {
382     typedef [unique] IHttpNegotiate *LPHTTPNEGOTIATE;
383
384     HRESULT BeginningTransaction(
385         [in] LPCWSTR szURL,
386         [in, unique] LPCWSTR szHeaders,
387         [in] DWORD dwReserved,
388         [out] LPWSTR *pszAdditionalHeaders);
389
390     HRESULT OnResponse(
391         [in] DWORD dwResponseCode,
392         [in, unique] LPCWSTR szResponseHeaders,
393         [in, unique] LPCWSTR szRequestHeaders,
394         [out] LPWSTR *pszAdditionalRequestHeaders);
395 }
396
397 /*****************************************************************************
398  * IHttpNegotiate2 interface
399  */
400 [
401     object,
402     uuid(4F9F9FCB-E0F4-48eb-B7AB-FA2EA9365CB4),
403     pointer_default(unique)
404 ]
405 interface IHttpNegotiate2 : IHttpNegotiate
406 {
407     typedef [unique] IHttpNegotiate2 *LPHTTPNEGOTIATE2;
408
409     HRESULT GetRootSecurityId(
410          [out, size_is(*pcbSecurityId)] BYTE *pbSecurityId,
411          [in, out] DWORD *pcbSecurityId,
412          [in] DWORD_PTR dwReserved);
413 }
414
415 /*****************************************************************************
416  * IBindHost interface
417  */
418 cpp_quote("#define SID_IBindHost IID_IBindHost")
419 cpp_quote("#define SID_SBindHost IID_IBindHost")
420 [
421     object,
422     uuid(fc4801a1-2ba9-11cf-a229-00aa003d7352),
423     pointer_default(unique)
424 ]
425 interface IBindHost : IUnknown
426 {
427     typedef [unique] IBindHost *LPBINDHOST;
428
429     HRESULT CreateMoniker(
430         [in] LPOLESTR szName,
431         [in] IBindCtx *pBC,
432         [out] IMoniker** ppmk,
433         [in] DWORD dwReserved);
434
435     [local]
436     HRESULT MonikerBindToStorage(
437         [in] IMoniker *pMk,
438         [in] IBindCtx *pBC,
439         [in] IBindStatusCallback *pBSC,
440         [in] REFIID riid,
441         [out] void **ppvObj);
442
443     [call_as(MonikerBindToStorage)]
444     HRESULT RemoteMonikerBindToStorage(
445         [in, unique] IMoniker *pMk,
446         [in, unique] IBindCtx *pBC,
447         [in, unique] IBindStatusCallback *pBSC,
448         [in] REFIID riid,
449         [out, iid_is(riid)] IUnknown **ppvObj);
450
451     [local]
452     HRESULT MonikerBindToObject(
453         [in] IMoniker *pMk,
454         [in] IBindCtx *pBC,
455         [in] IBindStatusCallback *pBSC,
456         [in] REFIID riid,
457         [out] void **ppvObj);
458
459     [call_as(MonikerBindToObject)]
460     HRESULT RemoteMonikerBindToObject(
461         [in, unique] IMoniker *pMk,
462         [in, unique] IBindCtx *pBC,
463         [in, unique] IBindStatusCallback *pBSC,
464         [in] REFIID riid,
465         [out, iid_is(riid)] IUnknown **ppvObj);
466 }
467
468
469 /*****************************************************************************
470  * IWinInetInfo interface
471  */
472 [
473     object,
474     uuid(79eac9d6-bafa-11ce-8c82-00aa004ba90b),
475     pointer_default(unique)
476 ]
477 interface IWinInetInfo : IUnknown
478 {
479     typedef [unique] IWinInetInfo *LPWININETINFO;
480
481     [local]
482     HRESULT QueryOption(
483         [in] DWORD dwOption,
484         [in, out, size_is(*pcbBuf)] LPVOID pBuffer,
485         [in, out] DWORD *pcbBuf);
486
487     [call_as(QueryOption)]
488     HRESULT RemoteQueryOption(
489         [in] DWORD  dwOption,
490         [in, out, size_is(*pcbBuf)] BYTE *pBuffer,
491         [in, out] DWORD *pcbBuf);
492 }
493
494
495
496 /*****************************************************************************
497  * IWinInetHttpInfo interface
498  */
499 [
500     object,
501     uuid(79eac9d8-bafa-11ce-8c82-00aa004ba90b),
502     pointer_default(unique)
503 ]
504 interface IWinInetHttpInfo : IWinInetInfo
505 {
506     typedef [unique] IWinInetHttpInfo *LPWININETHTTPINFO;
507
508     [local]
509     HRESULT QueryInfo(
510         [in] DWORD dwOption,
511         [in, out,size_is(*pcbBuf)] LPVOID pBuffer,
512         [in, out] DWORD *pcbBuf,
513         [in, out] DWORD *pdwFlags,
514         [in, out] DWORD *pdwReserved);
515
516     [call_as(QueryInfo)]
517     HRESULT RemoteQueryInfo(
518         [in] DWORD dwOption,
519         [in,out,size_is(*pcbBuf)] BYTE *pBuffer,
520         [in, out] DWORD *pcbBuf,
521         [in, out] DWORD *pdwFlags,
522         [in, out] DWORD *pdwReserved);
523 }
524
525 /*****************************************************************************
526  * IWindowForBindingUI interface
527  */
528 [
529     local,
530     object,
531     uuid(79eac9d5-bafa-11ce-8c82-00aa004ba90b),
532     pointer_default(unique)
533 ]
534 interface IWindowForBindingUI : IUnknown
535 {
536     typedef [unique] IWindowForBindingUI *LPWINDOWFORBINDINGUI;
537
538     HRESULT GetWindow(
539         [in] REFGUID rguidReason,
540         [out] HWND *phwnd);
541 }
542
543 /*****************************************************************************
544  * IHttpSecurity interface
545  */
546 [
547     object,
548     uuid(79eac9d7-bafa-11ce-8c82-00aa004ba90b),
549     pointer_default(unique)
550 ]
551 interface IHttpSecurity : IWindowForBindingUI
552 {
553     typedef [unique] IHttpSecurity *LPHTTPSECURITY;
554
555     HRESULT OnSecurityProblem(
556         [in] DWORD dwProblem);
557 }
558
559
560 /*****************************************************************************
561  * IPersistMoniker interface
562  */
563 [
564     object,
565     uuid(79eac9c9-baf9-11ce-8c82-00aa004ba90b),
566     pointer_default(unique)
567 ]
568 interface IPersistMoniker : IUnknown
569 {
570     typedef [unique] IPersistMoniker *LPPERSISTMONIKER;
571
572     HRESULT GetClassID(
573         [out] CLSID *pClassID);
574
575     HRESULT IsDirty();
576
577     HRESULT Load(
578         [in] BOOL fFullyAvailable,
579         [in] IMoniker *pimkName,
580         [in] LPBC pibc,
581         [in] DWORD grfMode);
582
583     HRESULT Save(
584         [in] IMoniker *pimkName,
585         [in] LPBC pbc,
586         [in] BOOL fRemember);
587
588     HRESULT SaveCompleted(
589         [in] IMoniker *pimkName,
590         [in] LPBC pibc);
591
592     HRESULT GetCurMoniker(
593         [out] IMoniker **ppimkName);
594 }
595
596 /*****************************************************************************
597  * IMonikerProp interface
598  */
599 [
600     object,
601     uuid(A5CA5F7F-1847-4D87-9C5B-918509F7511D),
602     pointer_default(unique)
603 ]
604 interface IMonikerProp : IUnknown
605 {
606     typedef [unique] IMonikerProp *LPMONIKERPROP;
607
608     typedef enum {
609         MIMETYPEPROP        = 0,
610         USE_SRC_URL         = 1,
611         CLASSIDPROP         = 2,
612         TRUSTEDDOWNLOADPROP = 3,
613         POPUPLEVELPROP      = 4
614     } MONIKERPROPERTY;
615
616     HRESULT PutProperty(
617         [in] MONIKERPROPERTY mkp,
618         [in] LPCWSTR val);
619 }
620
621 cpp_quote("#ifndef _LPBINDPROTOCOL_DEFINED")
622 cpp_quote("#define _LPBINDPROTOCOL_DEFINED")
623
624 /*****************************************************************************
625  * IBindProtocol interface
626  */
627 [
628     local,
629     object,
630     uuid(79EAC9CD-BAF9-11CE-8C82-00AA004BA90B),
631     pointer_default(unique)
632 ]
633 interface IBindProtocol : IUnknown
634 {
635     typedef [unique] IBindProtocol *LPBINDPROTOCOL;
636
637     HRESULT CreateBinding(
638         [in] LPCWSTR szUrl,
639         [in] IBindCtx *pbc,
640         [out] IBinding **ppb);
641 }
642
643 cpp_quote("#endif /* !defined _LPBINDPROTOCOL_DEFINED */")
644
645 /*****************************************************************************
646  * IInternetBindInfo interface
647  */
648 [
649     local,
650     object,
651     uuid(79EAC9E1-BAF9-11CE-8C82-00AA004BA90B),
652     pointer_default(unique)
653 ]
654 interface IInternetBindInfo : IUnknown
655 {
656     typedef [unique] IInternetBindInfo *LPIINTERNETBINDINFO;
657
658     typedef enum tagBINDSTRING
659     {
660         BINDSTRING_HEADERS = 1,
661         BINDSTRING_ACCEPT_MIMES,
662         BINDSTRING_EXTRA_URL,
663         BINDSTRING_LANGUAGE,
664         BINDSTRING_USERNAME,
665         BINDSTRING_PASSWORD,
666         BINDSTRING_UA_PIXELS,
667         BINDSTRING_UA_COLOR,
668         BINDSTRING_OS,
669         BINDSTRING_USER_AGENT,
670         BINDSTRING_ACCEPT_ENCODINGS,
671         BINDSTRING_POST_COOKIE,
672         BINDSTRING_POST_DATA_MIME,
673         BINDSTRING_URL,
674         BINDSTRING_IID,
675         BINDSTRING_FLAG_BIND_TO_OBJECT,
676         BINDSTRING_PTR_BIND_CONTEXT
677     } BINDSTRING;
678
679     HRESULT GetBindInfo(
680         [out] DWORD *grfBINDF,
681         [in, out, unique] BINDINFO *pbindinfo);
682
683     HRESULT GetBindString(
684         [in]      ULONG ulStringType,
685         [in, out] LPOLESTR *ppwzStr,
686         [in]      ULONG cEl,
687         [in, out] ULONG *pcElFetched);
688 }
689
690 /*****************************************************************************
691  * IInternetPriority interface
692  */
693 [
694     local,
695     object,
696     uuid(79EAC9EB-BAF9-11CE-8C82-00AA004BA90B),
697     pointer_default(unique)
698 ]
699 interface IInternetPriority : IUnknown
700 {
701     typedef [unique] IInternetPriority *LPIINTERNETPRIORITY;
702
703     HRESULT SetPriority([in] LONG nPriority);
704     HRESULT GetPriority([out] LONG *pnPriority);
705 }
706
707 /*****************************************************************************
708  * IInternetProtocolRoot interface
709  */
710 [
711     local,
712     object,
713     uuid(79EAC9E3-BAF9-11CE-8C82-00AA004BA90B),
714     pointer_default(unique)
715 ]
716 interface IInternetProtocolRoot : IUnknown
717 {
718     typedef [unique] IInternetProtocolRoot *LPIINTERNETPROTOCOLROOT;
719
720     typedef enum _tagPI_FLAGS
721     {
722         PI_PARSE_URL         = 0x00000001,
723         PI_FILTER_MODE       = 0x00000002,
724         PI_FORCE_ASYNC       = 0x00000004,
725         PI_USE_WORKERTHREAD  = 0x00000008,
726         PI_MIMEVERIFICATION  = 0x00000010,
727         PI_CLSIDLOOKUP       = 0x00000020,
728         PI_DATAPROGRESS      = 0x00000040,
729         PI_SYNCHRONOUS       = 0x00000080,
730         PI_APARTMENTTHREADED = 0x00000100,
731         PI_CLASSINSTALL      = 0x00000200,
732         PD_FORCE_SWITCH      = 0x00010000
733     } PI_FLAGS;
734
735     typedef struct _tagPROTOCOLDATA
736     {
737         DWORD grfFlags;
738         DWORD dwState;
739         LPVOID pData;
740         ULONG cbData;
741     } PROTOCOLDATA;
742
743     HRESULT Start(
744         [in] LPCWSTR szUrl,
745         [in] IInternetProtocolSink *pOIProtSink,
746         [in] IInternetBindInfo *pOIBindInfo,
747         [in] DWORD grfPI,
748         [in] HANDLE_PTR dwReserved);
749
750     HRESULT Continue(
751         [in] PROTOCOLDATA *pProtocolData);
752
753     HRESULT Abort(
754         [in] HRESULT hrReason,
755         [in] DWORD dwOptions);
756
757     HRESULT Terminate(
758         [in] DWORD dwOptions);
759
760     HRESULT Suspend();
761
762     HRESULT Resume();
763 }
764
765 /*****************************************************************************
766  * IInternetProtocolSink interface
767  */
768 [
769     local,
770     object,
771     uuid(79EAC9E5-BAF9-11CE-8C82-00AA004BA90B),
772     pointer_default(unique)
773 ]
774 interface IInternetProtocolSink : IUnknown
775 {
776     typedef [unique] IInternetProtocolSink *LPIINTERNETPROTOCOLSINK;
777
778     HRESULT Switch(
779         [in] PROTOCOLDATA *pProtocolData);
780
781     HRESULT ReportProgress(
782         [in] ULONG ulStatusCode,
783         [in] LPCWSTR szStatusText);
784
785     HRESULT ReportData(
786         [in] DWORD grfBSCF,
787         [in] ULONG ulProgress,
788         [in] ULONG ulProgressMax);
789
790     HRESULT ReportResult(
791         [in] HRESULT hrResult,
792         [in] DWORD dwError,
793         [in] LPCWSTR szResult);
794 }
795
796 /*****************************************************************************
797  * IInternetProtocol interface
798  */
799 [
800     local,
801     object,
802     uuid(79EAC9E4-BAF9-11CE-8C82-00AA004BA90B),
803     pointer_default(unique)
804 ]
805 interface IInternetProtocol : IInternetProtocolRoot
806 {
807     typedef [unique] IInternetProtocol *LPIINTERNETPROTOCOL;
808
809     HRESULT Read(
810         [in,out, size_is(cb), length_is(*pcbRead)] void *pv,
811         [in]  ULONG cb,
812         [out] ULONG *pcbRead);
813
814     HRESULT Seek(
815         [in]  LARGE_INTEGER dlibMove,
816         [in]  DWORD dwOrigin,
817         [out] ULARGE_INTEGER *plibNewPosition);
818
819     HRESULT LockRequest(
820         [in] DWORD dwOptions);
821
822     HRESULT UnlockRequest();
823 }
824
825 /*****************************************************************************
826  * IInternetProtocolInfo interface
827  */
828 [
829     local,
830     object,
831     uuid(79eac9ec-baf9-11ce-8c82-00aa004ba90b),
832     pointer_default(unique)
833 ]
834 interface IInternetProtocolInfo : IUnknown
835 {
836     typedef [unique] IInternetProtocolInfo *LPIINTERNETPROTOCOLINFO;
837
838     typedef enum _tagPARSEACTION
839     {
840         PARSE_CANONICALIZE = 1,
841         PARSE_FRIENDLY,
842         PARSE_SECURITY_URL,
843         PARSE_ROOTDOCUMENT,
844         PARSE_DOCUMENT,
845         PARSE_ANCHOR,
846         PARSE_ENCODE,
847         PARSE_DECODE,
848         PARSE_PATH_FROM_URL,
849         PARSE_URL_FROM_PATH,
850         PARSE_MIME,
851         PARSE_SERVER,
852         PARSE_SCHEMA,
853         PARSE_SITE,
854         PARSE_DOMAIN,
855         PARSE_LOCATION,
856         PARSE_SECURITY_DOMAIN,
857         PARSE_ESCAPE,
858         PARSE_UNESCAPE
859     } PARSEACTION;
860
861     typedef enum _tagPSUACTION
862     {
863         PSU_DEFAULT = 1,
864         PSU_SECURITY_URL_ONLY
865     } PSUACTION;
866
867     typedef enum _tagQUERYOPTION
868     {
869         QUERY_EXPIRATION_DATE = 1,
870         QUERY_TIME_OF_LAST_CHANGE,
871         QUERY_CONTENT_ENCODING,
872         QUERY_CONTENT_TYPE,
873         QUERY_REFRESH,
874         QUERY_RECOMBINE,
875         QUERY_CAN_NAVIGATE,
876         QUERY_USES_NETWORK,
877         QUERY_IS_CACHED,
878         QUERY_IS_INSTALLEDENTRY,
879         QUERY_IS_CACHED_OR_MAPPED,
880         QUERY_USES_CACHE,
881         QUERY_IS_SECURE,
882         QUERY_IS_SAFE,
883         QUERY_USES_HISTORYFOLDER
884     } QUERYOPTION;
885
886     HRESULT ParseUrl(
887         [in] LPCWSTR pwzUrl,
888         [in] PARSEACTION ParseAction,
889         [in] DWORD dwParseFlags,
890         [out] LPWSTR pwzResult,
891         [in] DWORD cchResult,
892         [out] DWORD *pcchResult,
893         [in] DWORD dwReserved);
894
895     HRESULT CombineUrl(
896         [in] LPCWSTR pwzBaseUrl,
897         [in] LPCWSTR pwzRelativeUrl,
898         [in] DWORD dwCombineFlags,
899         [out] LPWSTR pwzResult,
900         [in] DWORD cchResult,
901         [out] DWORD *pcchResult,
902         [in] DWORD dwReserved);
903
904     HRESULT CompareUrl(
905         [in] LPCWSTR pwzUrl1,
906         [in] LPCWSTR pwzUrl2,
907         [in] DWORD dwCompareFlags);
908
909     HRESULT QueryInfo(
910         [in] LPCWSTR pwzUrl,
911         [in] QUERYOPTION OueryOption,
912         [in] DWORD dwQueryFlags,
913         [in, out,size_is(*pcbBuf)] LPVOID pBuffer,
914         [in] DWORD cbBuffer,
915         [in, out] DWORD *pcbBuf,
916         [in] DWORD dwReserved);
917 }
918
919 /*****************************************************************************
920  * IInternetSession interface
921  */
922 [
923     local,
924     object,
925     uuid(79eac9e7-baf9-11ce-8c82-00aa004ba90b),
926     pointer_default(unique)
927 ]
928 interface IInternetSession : IUnknown
929 {
930     typedef [unique] IInternetSession *LPIINTERNETSESSION;
931
932     typedef enum _tagOIBDG_FLAGS
933     {
934         OIBDG_APARTMENTTHREADED = 0x0100,
935         OIBDG_DATAONLY          = 0x1000
936     } OIBDG_FLAGS;
937
938     HRESULT RegisterNameSpace(
939         [in] IClassFactory *pCF,
940         [in] REFCLSID rclsid,
941         [in] LPCWSTR pwzProtocol,
942         [in] ULONG cPatterns,
943         [in] const LPCWSTR *ppwzPatterns,
944         [in] DWORD dwReserved);
945
946     HRESULT UnregisterNameSpace(
947         [in] IClassFactory *pCF,
948         [in] LPCWSTR pszProtocol);
949
950     HRESULT RegisterMimeFilter(
951         [in] IClassFactory *pCF,
952         [in] REFCLSID rclsid,
953         [in] LPCWSTR pwzType);
954
955     HRESULT UnregisterMimeFilter(
956         [in] IClassFactory *pCF,
957         [in] LPCWSTR pwzType);
958
959     HRESULT CreateBinding(
960         [in] LPBC pBC,
961         [in] LPCWSTR szUrl,
962         [in] IUnknown *pUnkOuter,
963         [out, unique] IUnknown **ppUnk,
964         [out, unique] IInternetProtocol **ppOInetProt,
965         [in] DWORD dwOption);
966
967     HRESULT SetSessionOption(
968         [in] DWORD dwOption,
969         [in] LPVOID pBuffer,
970         [in] DWORD dwBufferLength,
971         [in] DWORD dwReserved);
972 }
973
974 /*****************************************************************************
975  * IInternetSecurityMgrSite interface
976  */
977 [
978     local,
979     object,
980     uuid(79eac9ed-baf9-11ce-8c82-00aa004ba90b),
981     pointer_default(unique)
982 ]
983 interface IInternetSecurityMgrSite : IUnknown
984 {
985     HRESULT GetWindow(
986         [out] HWND *phwnd);
987
988     HRESULT EnableModeless(
989         [in] BOOL fEnable);
990 }
991
992
993 /*****************************************************************************
994  * IInternetSecurityManager interface
995  */
996 cpp_quote("#define SID_SInternetSecurityManager IID_IInternetSecurityManager")
997
998 [
999     object,
1000     uuid(79eac9ee-baf9-11ce-8c82-00aa004ba90b),
1001     pointer_default(unique)
1002 ]
1003 interface IInternetSecurityManager : IUnknown
1004 {
1005     HRESULT SetSecuritySite(
1006         [in, unique] IInternetSecurityMgrSite *pSite);
1007
1008     HRESULT GetSecuritySite(
1009         [out] IInternetSecurityMgrSite **ppSite);
1010
1011     HRESULT MapUrlToZone(
1012         [in] LPCWSTR pwszUrl,
1013         [out] DWORD *pdwZone,
1014         [in] DWORD dwFlags);
1015
1016 cpp_quote("#define MAX_SIZE_SECURITY_ID 512")
1017
1018     HRESULT GetSecurityId(
1019         [in] LPCWSTR pwszUrl,
1020         [out, size_is(*pcbSecurityId)] BYTE *pbSecurityId,
1021         [in, out] DWORD *pcbSecurityId,
1022         [in] DWORD_PTR dwReserved);
1023
1024
1025     typedef enum {
1026         PUAF_DEFAULT                = 0x00,
1027         PUAF_NOUI                   = 0x01,
1028         PUAF_ISFILE                 = 0x02,
1029         PUAF_WARN_IF_DENIED         = 0x04,
1030         PUAF_FORCEUI_FOREGROUND     = 0x08,
1031         PUAF_CHECK_TIPS             = 0x10
1032     } PUAF;
1033
1034     HRESULT ProcessUrlAction(
1035         [in] LPCWSTR pwszUrl,
1036         [in] DWORD dwAction,
1037         [out, size_is(cbPolicy)] BYTE *pPolicy,
1038         [in] DWORD cbPolicy,
1039         [in] BYTE *pContext,
1040         [in] DWORD cbContext,
1041         [in] DWORD dwFlags,
1042         [in] DWORD dwReserved);
1043
1044     HRESULT QueryCustomPolicy(
1045         [in] LPCWSTR pwszUrl,
1046         [in] REFGUID guidKey,
1047         [out, size_is(,*pcbPolicy)] BYTE **ppPolicy,
1048         [out] DWORD *pcbPolicy,
1049         [in] BYTE *pContext,
1050         [in] DWORD cbContext,
1051         [in] DWORD dwReserved);
1052
1053     typedef enum {
1054         SZM_CREATE = 0x0,
1055         SZM_DELETE = 0x1
1056     } SZM_FLAGS;
1057
1058     HRESULT SetZoneMapping(
1059         [in] DWORD dwZone,
1060         [in] LPCWSTR lpszPattern,
1061         [in] DWORD dwFlags);
1062
1063     HRESULT GetZoneMappings(
1064         [in] DWORD dwZone,
1065         [out] IEnumString **ppenumString,
1066         [in] DWORD dwFlags);
1067 }
1068
1069 /*****************************************************************************
1070  * IInternetHostSecurityManager interface
1071  */
1072 cpp_quote("#define SID_SInternetHostSecurityManager IID_IInternetHostSecurityManager")
1073
1074 [
1075     local,
1076     object,
1077     uuid(3af280b6-cb3f-11d0-891e-00c04fb6bfc4),
1078     pointer_default(unique)
1079 ]
1080 interface IInternetHostSecurityManager : IUnknown
1081 {
1082     HRESULT GetSecurityId(
1083             [out, size_is(*pcbSecurityId)] BYTE *pbSecurityId,
1084             [in, out] DWORD *pcbSecurityId,
1085             [in] DWORD_PTR dwReserved);
1086
1087     HRESULT ProcessUrlAction(
1088             [in] DWORD dwAction,
1089             [out, size_is(cbPolicy)] BYTE *pPolicy,
1090             [in] DWORD cbPolicy,
1091             [in] BYTE *pContext,
1092             [in] DWORD cbContext,
1093             [in] DWORD dwFlags,
1094             [in] DWORD dwReserved);
1095
1096     HRESULT QueryCustomPolicy(
1097             [in] REFGUID guidKey,
1098             [out, size_is(,*pcbPolicy)] BYTE **ppPolicy,
1099             [out] DWORD *pcbPolicy,
1100             [in] BYTE *pContext,
1101             [in] DWORD cbContext,
1102             [in] DWORD dwReserved);
1103 }
1104
1105 cpp_quote("#define URLACTION_MIN                        0x00001000")
1106 cpp_quote("#define URLACTION_DOWNLOAD_MIN               0x00001000")
1107 cpp_quote("#define URLACTION_DOWNLOAD_SIGNED_ACTIVEX    0x00001001")
1108 cpp_quote("#define URLACTION_DOWNLOAD_UNSIGNED_ACTIVEX  0x00001004")
1109 cpp_quote("#define URLACTION_DOWNLOAD_CURR_MAX          0x00001004")
1110 cpp_quote("#define URLACTION_DOWNLOAD_MAX               0x000011ff")
1111
1112 cpp_quote("#define URLACTION_ACTIVEX_MIN                     0x00001200")
1113 cpp_quote("#define URLACTION_ACTIVEX_RUN                     0x00001200")
1114 cpp_quote("#define URLPOLICY_ACTIVEX_CHECK_LIST              0x00010000")
1115 cpp_quote("#define URLACTION_ACTIVEX_OVERRIDE_OBJECT_SAFETY  0x00001201")
1116 cpp_quote("#define URLACTION_ACTIVEX_OVERRIDE_DATA_SAFETY    0x00001202")
1117 cpp_quote("#define URLACTION_ACTIVEX_OVERRIDE_SCRIPT_SAFETY  0x00001203")
1118 cpp_quote("#define URLACTION_SCRIPT_OVERRIDE_SAFETY          0x00001401")
1119 cpp_quote("#define URLACTION_ACTIVEX_CONFIRM_NOOBJECTSAFETY  0x00001204")
1120 cpp_quote("#define URLACTION_ACTIVEX_TREATASUNTRUSTED        0x00001205")
1121 cpp_quote("#define URLACTION_ACTIVEX_CURR_MAX                0x00001205")
1122 cpp_quote("#define URLACTION_ACTIVEX_MAX                     0x000013ff")
1123
1124 cpp_quote("#define URLACTION_SCRIPT_MIN           0x00001400")
1125 cpp_quote("#define URLACTION_SCRIPT_RUN           0x00001400")
1126 cpp_quote("#define URLACTION_SCRIPT_JAVA_USE      0x00001402")
1127 cpp_quote("#define URLACTION_SCRIPT_SAFE_ACTIVEX  0x00001405")
1128 cpp_quote("#define URLACTION_CROSS_DOMAIN_DATA    0x00001406")
1129 cpp_quote("#define URLACTION_SCRIPT_PASTE         0x00001407")
1130 cpp_quote("#define URLACTION_SCRIPT_CURR_MAX      0x00001407")
1131 cpp_quote("#define URLACTION_SCRIPT_MAX           0x000015ff")
1132
1133 cpp_quote("#define URLACTION_HTML_MIN                0x00001600")
1134 cpp_quote("#define URLACTION_HTML_SUBMIT_FORMS       0x00001601")
1135 cpp_quote("#define URLACTION_HTML_SUBMIT_FORMS_FROM  0x00001602")
1136 cpp_quote("#define URLACTION_HTML_SUBMIT_FORMS_TO    0x00001603")
1137 cpp_quote("#define URLACTION_HTML_FONT_DOWNLOAD      0x00001604")
1138 cpp_quote("#define URLACTION_HTML_JAVA_RUN           0x00001605")
1139 cpp_quote("#define URLACTION_HTML_USERDATA_SAVE      0x00001606")
1140 cpp_quote("#define URLACTION_HTML_SUBFRAME_NAVIGATE  0x00001607")
1141 cpp_quote("#define URLACTION_HTML_META_REFRESH       0x00001608")
1142 cpp_quote("#define URLACTION_HTML_MIXED_CONTENT      0x00001609")
1143 cpp_quote("#define URLACTION_HTML_MAX                0x000017ff")
1144
1145 cpp_quote("#define URLACTION_SHELL_MIN              0x00001800")
1146 cpp_quote("#define URLACTION_SHELL_INSTALL_DTITEMS  0x00001800")
1147 cpp_quote("#define URLACTION_SHELL_MOVE_OR_COPY     0x00001802")
1148 cpp_quote("#define URLACTION_SHELL_FILE_DOWNLOAD    0x00001803")
1149 cpp_quote("#define URLACTION_SHELL_VERB             0x00001804")
1150 cpp_quote("#define URLACTION_SHELL_WEBVIEW_VERB     0x00001805")
1151 cpp_quote("#define URLACTION_SHELL_CURR_MAX         0x00001805")
1152 cpp_quote("#define URLACTION_SHELL_MAX              0x000019ff")
1153
1154 cpp_quote("#define URLACTION_NETWORK_MIN                  0x00001a00")
1155 cpp_quote("#define URLACTION_CREDENTIALS_USE              0x00001a00")
1156 cpp_quote("#define URLACTION_AUTHENTICATE_CLIENT          0x00001a01")
1157 cpp_quote("#define URLACTION_COOKIES                      0x00001a02")
1158 cpp_quote("#define URLACTION_COOKIES_SESSION              0x00001a03")
1159 cpp_quote("#define URLACTION_CLIENT_CERT_PROMPT           0x00001a04")
1160 cpp_quote("#define URLACTION_COOKIES_THIRD_PARTY          0x00001a05")
1161 cpp_quote("#define URLACTION_COOKIES_SESSION_THIRD_PARTY  0x00001a06")
1162 cpp_quote("#define URLACTION_COOKIES_ENABLED              0x00001a10")
1163 cpp_quote("#define URLACTION_NETWORK_CURR_MAX             0x00001a10")
1164 cpp_quote("#define URLACTION_NETWORK_MAX                  0x00001bff")
1165
1166 cpp_quote("#define URLACTION_JAVA_MIN          0x00001c00")
1167 cpp_quote("#define URLACTION_JAVA_PERMISSIONS  0x00001c00")
1168 cpp_quote("#define URLPOLICY_JAVA_PROHIBIT     0x00000000")
1169 cpp_quote("#define URLPOLICY_JAVA_HIGH         0x00010000")
1170 cpp_quote("#define URLPOLICY_JAVA_MEDIUM       0x00020000")
1171 cpp_quote("#define URLPOLICY_JAVA_LOW          0x00030000")
1172 cpp_quote("#define URLPOLICY_JAVA_CUSTOM       0x00800000")
1173 cpp_quote("#define URLACTION_JAVA_CURR_MAX     0x00001c00")
1174 cpp_quote("#define URLACTION_JAVA_MAX          0x00001cff")
1175
1176 cpp_quote("#define URLACTION_INFODELIVERY_MIN                        0x00001d00")
1177 cpp_quote("#define URLACTION_INFODELIVERY_NO_ADDING_CHANNELS         0x00001d00")
1178 cpp_quote("#define URLACTION_INFODELIVERY_NO_EDITING_CHANNELS        0x00001d01")
1179 cpp_quote("#define URLACTION_INFODELIVERY_NO_REMOVING_CHANNELS       0x00001d02")
1180 cpp_quote("#define URLACTION_INFODELIVERY_NO_ADDING_SUBSCRIPTIONS    0x00001d03")
1181 cpp_quote("#define URLACTION_INFODELIVERY_NO_EDITING_SUBSCRIPTIONS   0x00001d04")
1182 cpp_quote("#define URLACTION_INFODELIVERY_NO_REMOVING_SUBSCRIPTIONS  0x00001d05")
1183 cpp_quote("#define URLACTION_INFODELIVERY_NO_CHANNEL_LOGGING         0x00001d06")
1184 cpp_quote("#define URLACTION_INFODELIVERY_CURR_MAX                   0x00001d06")
1185 cpp_quote("#define URLACTION_INFODELIVERY_MAX                        0x00001dff")
1186
1187 cpp_quote("#define URLACTION_CHANNEL_SOFTDIST_MIN          0x00001e00")
1188 cpp_quote("#define URLACTION_CHANNEL_SOFTDIST_PERMISSIONS  0x00001e05")
1189 cpp_quote("#define URLPOLICY_CHANNEL_SOFTDIST_PROHIBIT     0x00010000")
1190 cpp_quote("#define URLPOLICY_CHANNEL_SOFTDIST_PRECACHE     0x00020000")
1191 cpp_quote("#define URLPOLICY_CHANNEL_SOFTDIST_AUTOINSTALL  0x00030000")
1192 cpp_quote("#define URLACTION_CHANNEL_SOFTDIST_MAX          0x00001eff")
1193
1194 cpp_quote("#define URLPOLICY_ALLOW     0x00")
1195 cpp_quote("#define URLPOLICY_QUERY     0x01")
1196 cpp_quote("#define URLPOLICY_DISALLOW  0x03")
1197
1198 cpp_quote("#define URLPOLICY_NOTIFY_ON_ALLOW     0x10")
1199 cpp_quote("#define URLPOLICY_NOTIFY_ON_DISALLOW  0x20")
1200
1201 cpp_quote("#define URLPOLICY_LOG_ON_ALLOW     0x40")
1202 cpp_quote("#define URLPOLICY_LOG_ON_DISALLOW  0x80")
1203
1204 cpp_quote("#define URLPOLICY_DONTCHECKDLGBOX     0x100")
1205
1206 cpp_quote("#define URLPOLICY_CREDENTIALS_SILENT_LOGON_OK     0x00000000")
1207 cpp_quote("#define URLPOLICY_CREDENTIALS_MUST_PROMPT_USER    0x00010000")
1208 cpp_quote("#define URLPOLICY_CREDENTIALS_CONDITIONAL_PROMPT  0x00020000")
1209 cpp_quote("#define URLPOLICY_CREDENTIALS_ANONYMOUS_ONLY      0x00030000")
1210
1211 cpp_quote("#define URLPOLICY_AUTHENTICATE_CLEARTEXT_OK        0x00000000")
1212 cpp_quote("#define URLPOLICY_AUTHENTICATE_CHALLENGE_RESPONSE  0x00010000")
1213 cpp_quote("#define URLPOLICY_AUTHENTICATE_MUTUAL_ONLY         0x00030000")
1214
1215 cpp_quote("#define URLPOLICY_MASK_PERMISSIONS  0x0f")
1216 cpp_quote("#define GetUrlPolicyPermissions(dw)      (dw & URLPOLICY_MASK_PERMISSIONS)")
1217 cpp_quote("#define SetUrlPolicyPermissions(dw,dw2)  ((dw) = ((dw) & ~URLPOLICY_MASK_PERMISSIONS) | (dw2))")
1218
1219 /*****************************************************************************
1220  * IInternetZoneManager interface
1221  */
1222 [
1223     local,
1224     object,
1225     uuid(79EAC9EF-BAf9-11CE-8C82-00AA004BA90B),
1226     pointer_default(unique)
1227 ]
1228 interface IInternetZoneManager : IUnknown
1229 {
1230     typedef [unique] IInternetZoneManager* LPURLZONEMANAGER;
1231
1232     typedef enum tagURLZONE
1233     {
1234         URLZONE_INVALID         = -1,
1235         URLZONE_PREDEFINED_MIN  = 0,
1236         URLZONE_LOCAL_MACHINE   = 0,
1237         URLZONE_INTRANET        = 1,
1238         URLZONE_TRUSTED         = 2,
1239         URLZONE_INTERNET        = 3,
1240         URLZONE_UNTRUSTED       = 4,
1241         URLZONE_PREDEFINED_MAX  = 999,
1242         URLZONE_USER_MIN        = 1000,
1243         URLZONE_USER_MAX        = 10000,
1244     }  URLZONE;
1245
1246     typedef enum tagURLTEMPLATE
1247     {
1248         URLTEMPLATE_CUSTOM         = 0x00000,
1249         URLTEMPLATE_PREDEFINED_MIN = 0x10000,
1250         URLTEMPLATE_LOW            = 0x10000,
1251         URLTEMPLATE_MEDLOW         = 0x10500,
1252         URLTEMPLATE_MEDIUM         = 0x11000,
1253         URLTEMPLATE_MEDHIGH        = 0x11500,
1254         URLTEMPLATE_HIGH           = 0x12000,
1255         URLTEMPLATE_PREDEFINED_MAX = 0x20000,
1256     } URLTEMPLATE ;
1257
1258     typedef enum {
1259         ZAFLAGS_CUSTOM_EDIT              = 0x00000001,
1260         ZAFLAGS_ADD_SITES                = 0x00000002,
1261         ZAFLAGS_REQUIRE_VERIFICATION     = 0x00000004,
1262         ZAFLAGS_INCLUDE_PROXY_OVERRIDE   = 0x00000008,
1263         ZAFLAGS_INCLUDE_INTRANET_SITES   = 0x00000010,
1264         ZAFLAGS_NO_UI                    = 0x00000020,
1265         ZAFLAGS_SUPPORTS_VERIFICATION    = 0x00000040,
1266         ZAFLAGS_UNC_AS_INTRANET          = 0x00000080,
1267         ZAFLAGS_DETECT_INTRANET          = 0x00000100,
1268         ZAFLAGS_USE_LOCKED_ZONES         = 0x00010000,
1269         ZAFLAGS_VERIFY_TEMPLATE_SETTINGS = 0x00020000,
1270         ZAFLAGS_NO_CACHE                 = 0x00040000,
1271     } ZAFLAGS ;
1272
1273     enum {
1274         MAX_ZONE_PATH        = 260,
1275         MAX_ZONE_DESCRIPTION = 200
1276     };
1277
1278     typedef struct _ZONEATTRIBUTES {
1279         ULONG cbSize;
1280         WCHAR szDisplayName[MAX_ZONE_PATH];
1281         WCHAR szDescription[MAX_ZONE_DESCRIPTION];
1282         WCHAR szIconPath[MAX_ZONE_PATH];
1283         DWORD dwTemplateMinLevel;
1284         DWORD dwTemplateRecommended;
1285         DWORD dwTemplateCurrentLevel;
1286         DWORD dwFlags;
1287     } ZONEATTRIBUTES, *LPZONEATTRIBUTES;
1288
1289     typedef enum _URLZONEREG {
1290         URLZONEREG_DEFAULT,
1291         URLZONEREG_HKLM,
1292         URLZONEREG_HKCU
1293     } URLZONEREG;
1294
1295     HRESULT GetZoneAttributes(
1296         [in]              DWORD dwZone,
1297         [in, out, unique] ZONEATTRIBUTES* pZoneAttributes);
1298
1299     HRESULT SetZoneAttributes(
1300         [in] DWORD dwZone,
1301         [in] ZONEATTRIBUTES* pZoneAttributes);
1302
1303     HRESULT GetZoneCustomPolicy(
1304         [in]  DWORD dwZone,
1305         [in]  REFGUID guidKey,
1306         [out] BYTE **ppPolicy,
1307         [out] DWORD* pcbPolicy,
1308         [in]  URLZONEREG ulrZoneReg);
1309
1310     HRESULT SetZoneCustomPolicy(
1311         [in] DWORD dwZone,
1312         [in] REFGUID guidKey,
1313         [in] BYTE *ppPolicy,
1314         [in] DWORD pcbPolicy,
1315         [in] URLZONEREG ulrZoneReg);
1316
1317     HRESULT GetZoneActionPolicy(
1318         [in]  DWORD dwZone,
1319         [in]  DWORD dwAction,
1320         [out] BYTE* pPolicy,
1321         [in]  DWORD cbPolicy,
1322         [in]  URLZONEREG urlZoneReg);
1323
1324     HRESULT SetZoneActionPolicy(
1325         [in] DWORD dwZone,
1326         [in] DWORD dwAction,
1327         [in] BYTE* pPolicy,
1328         [in] DWORD cbPolicy,
1329         [in] URLZONEREG urlZoneReg);
1330
1331     HRESULT PromptAction(
1332         [in] DWORD dwAction,
1333         [in] HWND hwndParent,
1334         [in] LPCWSTR pwszUrl,
1335         [in] LPCWSTR pwszText,
1336         [in] DWORD dwPromptFlags );
1337
1338     HRESULT LogAction(
1339         [in] DWORD dwAction,
1340         [in] LPCWSTR pwszUrl,
1341         [in] LPCWSTR pwszText,
1342         [in] DWORD dwLogFlags);
1343
1344     HRESULT CreateZoneEnumerator(
1345         [out] DWORD* pdwEnum,
1346         [out] DWORD* pdwCount,
1347         [in]  DWORD dwFlags);
1348
1349     HRESULT GetZoneAt(
1350         [in]  DWORD dwEnum,
1351         [in]  DWORD dwIndex,
1352         [out] DWORD* pdwZone);
1353
1354     HRESULT DestroyZoneEnumerator(
1355         [in] DWORD dwEnum);
1356
1357     HRESULT CopyTemplatePoliciesToZone(
1358         [in] DWORD dwTemplate,
1359         [in] DWORD dwZone,
1360         [in] DWORD dwReserved);
1361 }
1362
1363 /*****************************************************************************
1364  * IInternetZoneManagerEx interface
1365  */
1366 [
1367     local,
1368     object,
1369     uuid(A4C23339-8E06-431E-9BF4-7E711C085648),
1370     pointer_default(unique)
1371 ]
1372 interface IInternetZoneManagerEx : IInternetZoneManager
1373 {
1374     HRESULT GetZoneActionPolicyEx(
1375         [in]  DWORD dwZone,
1376         [in]  DWORD dwAction,
1377         [out] BYTE* pPolicy,
1378         [in]  DWORD cbPolicy,
1379         [in]  URLZONEREG urlZoneReg,
1380         [in]  DWORD dwFlags);
1381
1382     HRESULT SetZoneActionPolicyEx(
1383         [in] DWORD dwZone,
1384         [in] DWORD dwAction,
1385         [in] BYTE* pPolicy,
1386         [in] DWORD cbPolicy,
1387         [in] URLZONEREG urlZoneReg,
1388         [in] DWORD dwFlags);
1389
1390 }
1391
1392 /*****************************************************************************
1393  * IInternetZoneManagerEx2 interface
1394  */
1395
1396 cpp_quote("#define SECURITY_IE_STATE_GREEN 0")
1397 cpp_quote("#define SECURITY_IE_STATE_RED   1")
1398
1399 [
1400     local,
1401     object,
1402     uuid(EDC17559-DD5D-4846-8EEF-8BECBA5A4ABF),
1403     pointer_default(unique)
1404 ]
1405 interface IInternetZoneManagerEx2 : IInternetZoneManagerEx
1406 {
1407     HRESULT GetZoneAttributesEx(
1408         [in]              DWORD dwZone,
1409         [in, out, unique] ZONEATTRIBUTES* pZoneAttributes,
1410         [in]              DWORD dwFlags);
1411
1412     HRESULT GetZoneSecurityState(
1413         [in]      DWORD dwZoneIndex,
1414         [in]      BOOL fRespectPolicy,
1415         [in, out] LPDWORD pdwState,
1416         [in, out] BOOL *pfPolicyEncountered);
1417
1418     HRESULT GetIESecurityState(
1419         [in]      BOOL fRespectPolicy,
1420         [in, out] LPDWORD pdwState,
1421         [in, out] BOOL *pfPolicyEncountered,
1422         [in]      BOOL fNoCache);
1423
1424     HRESULT FixInsecureSettings(void);
1425
1426 }
1427
1428
1429 typedef struct _tagSOFTDISTINFO
1430 {
1431     ULONG cbSize;
1432     DWORD dwFlags;
1433     DWORD dwAdState;
1434     LPWSTR szTitle;
1435     LPWSTR szAbstract;
1436     LPWSTR szHREF;
1437     DWORD dwInstalledVersionMS;
1438     DWORD dwInstalledVersionLS;
1439     DWORD dwUpdateVersionMS;
1440     DWORD dwUpdateVersionLS;
1441     DWORD dwAdvertisedVersionMS;
1442     DWORD dwAdvertisedVersionLS;
1443     DWORD dwReserved;
1444 } SOFTDISTINFO, *LPSOFTDISTINFO;
1445
1446 typedef struct _tagCODEBASEHOLD
1447 {
1448     DWORD cbSize;
1449     LPWSTR szDistUnit;
1450     LPWSTR szCodeBase;
1451     DWORD dwVersionMS;
1452     DWORD dwVersionLS;
1453     DWORD dwStyle;
1454 } CODEBASEHOLD, *LPCODEBASEHOLD;
1455
1456 [
1457     local,
1458     object,
1459     uuid(b15b8dc1-c7e1-11d0-8680-00aa00bdcb71),
1460     pointer_default(unique)
1461 ]
1462 interface ISoftDistExt : IUnknown
1463 {
1464     HRESULT ProcessSoftDist(
1465         [in] LPCWSTR szCDFURL,
1466         [in] IXMLElement *pSoftDistElement,
1467         [in, out] LPSOFTDISTINFO lpsdi );
1468
1469     HRESULT GetFirstCodeBase(
1470         [in] LPWSTR *szCodeBase,
1471         [in] LPDWORD dwMaxSize );
1472
1473     HRESULT GetNextCodeBase(
1474         [in] LPWSTR *szCodeBase,
1475         [in] LPDWORD dwMaxSize );
1476
1477     HRESULT AsyncInstallDistributionUnit(
1478         [in] IBindCtx *pbc,
1479         [in] LPVOID lpReserved,
1480         [in] DWORD flags,
1481         [in] LPCODEBASEHOLD lpcbh);
1482 }
1483
1484 typedef enum _tagINTERNETFEATURELIST
1485 {
1486     FEATURE_OBJECT_CACHING,
1487     FEATURE_ZONE_ELEVATION,
1488     FEATURE_MIME_HANDLING,
1489     FEATURE_MIME_SNIFFING,
1490     FEATURE_WINDOW_RESTRICTIONS,
1491     FEATURE_WEBOC_POPUPMANAGEMENT,
1492     FEATURE_BEHAVIORS,
1493     FEATURE_DISABLE_MK_PROTOCOL,
1494     FEATURE_LOCALMACHINE_LOCKDOWN,
1495     FEATURE_SECURITYBAND,
1496     FEATURE_RESTRICT_ACTIVEXINSTALL,
1497     FEATURE_VALIDATE_NAVIGATE_URL,
1498     FEATURE_RESTRICT_FILEDOWNLOAD,
1499     FEATURE_ADDON_MANAGEMENT,
1500     FEATURE_PROTOCOL_LOCKDOWN,
1501     FEATURE_HTTP_USERNAME_PASSWORD_DISABLE,
1502     FEATURE_SAFE_BINDTOOBJECT,
1503     FEATURE_UNC_SAVEDFILECHECK,
1504     FEATURE_GET_URL_DOM_FILEPATH_UNENCODED,
1505     FEATURE_TABBED_BROWSING,
1506     FEATURE_SSLUX,
1507     FEATURE_DISABLE_NAVIGATION_SOUNDS,
1508     FEATURE_DISABLE_LEGACY_COMPRESSION,
1509     FEATURE_FORCE_ADDR_AND_STATUS,
1510     FEATURE_XMLHTTP,
1511     FEATURE_DISABLE_TELNET_PROTOCOL,
1512     FEATURE_FEEDS,
1513     FEATURE_BLOCK_INPUT_PROMPTS,
1514     FEATURE_DOMSTORAGE,
1515     FEATURE_XDOMAINREQUEST,
1516     FEATURE_DATAURI,
1517     FEATURE_AJAX_CONNECTIONSERVICES,
1518     FEATURE_ENTRY_COUNT
1519 } INTERNETFEATURELIST;
1520
1521 typedef struct _tagPROTOCOLFILTERDATA {
1522     DWORD cbSize;
1523     IInternetProtocolSink *pProtocolSink;
1524     IInternetProtocol *pProtocol;
1525     IUnknown *pUnk;
1526     DWORD dwFilterFlags;
1527 } PROTOCOLFILTERDATA;
1528
1529 /*****************************************************************************
1530  * IUri interface
1531  */
1532 [
1533     local,
1534     object,
1535     uuid(a39ee748-6a27-4817-a6f2-13914bef5890),
1536     pointer_default(unique)
1537 ]
1538 interface IUri : IUnknown
1539 {
1540     typedef enum
1541     {
1542         Uri_PROPERTY_ABSOLUTE_URI = 0,
1543         Uri_PROPERTY_STRING_START = Uri_PROPERTY_ABSOLUTE_URI,
1544         Uri_PROPERTY_AUTHORITY = 1,
1545         Uri_PROPERTY_DISPLAY_URI = 2,
1546         Uri_PROPERTY_DOMAIN = 3,
1547         Uri_PROPERTY_EXTENSION = 4,
1548         Uri_PROPERTY_FRAGMENT = 5,
1549         Uri_PROPERTY_HOST = 6,
1550         Uri_PROPERTY_PASSWORD = 7,
1551         Uri_PROPERTY_PATH = 8,
1552         Uri_PROPERTY_PATH_AND_QUERY = 9,
1553         Uri_PROPERTY_QUERY = 10,
1554         Uri_PROPERTY_RAW_URI = 11,
1555         Uri_PROPERTY_SCHEME_NAME = 12,
1556         Uri_PROPERTY_USER_INFO = 13,
1557         Uri_PROPERTY_USER_NAME = 14,
1558         Uri_PROPERTY_STRING_LAST = Uri_PROPERTY_USER_NAME,
1559         Uri_PROPERTY_HOST_TYPE = 15,
1560         Uri_PROPERTY_DWORD_START = Uri_PROPERTY_HOST_TYPE,
1561         Uri_PROPERTY_PORT = 16,
1562         Uri_PROPERTY_SCHEME = 17,
1563         Uri_PROPERTY_ZONE = 18,
1564         Uri_PROPERTY_DWORD_LAST = Uri_PROPERTY_ZONE
1565     } Uri_PROPERTY;
1566
1567     typedef enum
1568     {
1569         Uri_HOST_UNKNOWN = 0,
1570         Uri_HOST_DNS = 1,
1571         Uri_HOST_IPV4 = 2,
1572         Uri_HOST_IPV6 = 3,
1573         Uri_HOST_IDN = 4
1574     } Uri_HOST_TYPE;
1575
1576     HRESULT GetPropertyBSTR(
1577         [in]  Uri_PROPERTY uriProp,
1578         [out] BSTR *pbstrProperty,
1579         [in]  DWORD dwFlags);
1580
1581     HRESULT GetPropertyLength(
1582         [in]  Uri_PROPERTY uriProp,
1583         [out] DWORD *pcchProperty,
1584         [in]  DWORD dwFlags);
1585
1586     HRESULT GetPropertyDWORD(
1587         [in]  Uri_PROPERTY uriProp,
1588         [out] DWORD *pdwProperty,
1589         [in]  DWORD dwFlags);
1590
1591     HRESULT HasProperty(
1592         [in] Uri_PROPERTY uriProp,
1593         [out] BOOL *pfHasProperty);
1594
1595     HRESULT GetAbsoluteUri(
1596         [out] BSTR *pbstrAbsoluteUri);
1597
1598     HRESULT GetAuthority(
1599         [out] BSTR *pbstrAuthority);
1600
1601     HRESULT GetDisplayUri(
1602         [out] BSTR *pbstrDisplayString);
1603
1604     HRESULT GetDomain(
1605         [out] BSTR *pbstrDomain);
1606
1607     HRESULT GetExtension(
1608         [out] BSTR *pbstrExtension);
1609
1610     HRESULT GetFragment(
1611         [out] BSTR *pbstrFragment);
1612
1613     HRESULT GetHost(
1614         [out] BSTR *pbstrHost);
1615
1616     HRESULT GetPassword(
1617         [out] BSTR *pbstrPassword);
1618
1619     HRESULT GetPath(
1620         [out] BSTR *pbstrPath);
1621
1622     HRESULT GetPathAndQuery(
1623         [out] BSTR *pbstrPathAndQuery);
1624
1625     HRESULT GetQuery(
1626         [out] BSTR *pbstrQuery);
1627
1628     HRESULT GetRawUri(
1629         [out] BSTR *pbstrRawUri);
1630
1631     HRESULT GetSchemeName(
1632         [out] BSTR *pbstrSchemeName);
1633
1634     HRESULT GetUserInfo(
1635         [out] BSTR *pbstrUserInfo);
1636
1637     HRESULT GetUserName(
1638         [out] BSTR *pbstrUserName);
1639
1640     HRESULT GetHostType(
1641         [out] DWORD *pdwHostType);
1642
1643     HRESULT GetPort(
1644         [out] DWORD *pdwPort);
1645
1646     HRESULT GetScheme(
1647         [out] DWORD *pdwScheme);
1648
1649     HRESULT GetZone(
1650         [out] DWORD *pdwZone);
1651
1652     HRESULT GetProperties(
1653         [out] LPDWORD pdwFlags);
1654
1655     HRESULT IsEqual(
1656         [in]  IUri *pUri,
1657         [out] BOOL *pfEqual);
1658 }
1659
1660 cpp_quote("HRESULT WINAPI CreateUri(LPCWSTR,DWORD,DWORD_PTR,IUri**);")
1661 cpp_quote("HRESULT WINAPI CreateUriWithFragment(LPCWSTR,LPCWSTR,DWORD,DWORD_PTR,IUri**);")
1662 cpp_quote("HRESULT WINAPI CreateUriFromMultiByteString(LPCSTR,DWORD,DWORD,DWORD,DWORD_PTR,IUri**);")
1663
1664 cpp_quote("#define Uri_HAS_ABSOLUTE_URI    (1 << Uri_PROPERTY_ABSOLUTE_URI)")
1665 cpp_quote("#define Uri_HAS_AUTHORITY       (1 << Uri_PROPERTY_AUTHORITY)")
1666 cpp_quote("#define Uri_HAS_DISPLAY_URI     (1 << Uri_PROPERTY_DISPLAY_URI)")
1667 cpp_quote("#define Uri_HAS_DOMAIN          (1 << Uri_PROPERTY_DOMAIN)")
1668 cpp_quote("#define Uri_HAS_EXTENSION       (1 << Uri_PROPERTY_EXTENSION)")
1669 cpp_quote("#define Uri_HAS_FRAGMENT        (1 << Uri_PROPERTY_FRAGMENT)")
1670 cpp_quote("#define Uri_HAS_HOST            (1 << Uri_PROPERTY_HOST)")
1671 cpp_quote("#define Uri_HAS_PASSWORD        (1 << Uri_PROPERTY_PASSWORD)")
1672 cpp_quote("#define Uri_HAS_PATH            (1 << Uri_PROPERTY_PATH)")
1673 cpp_quote("#define Uri_HAS_QUERY           (1 << Uri_PROPERTY_QUERY)")
1674 cpp_quote("#define Uri_HAS_RAW_URI         (1 << Uri_PROPERTY_RAW_URI)")
1675 cpp_quote("#define Uri_HAS_SCHEME_NAME     (1 << Uri_PROPERTY_SCHEME_NAME)")
1676 cpp_quote("#define Uri_HAS_USER_NAME       (1 << Uri_PROPERTY_USER_NAME)")
1677 cpp_quote("#define Uri_HAS_PATH_AND_QUERY  (1 << Uri_PROPERTY_PATH_AND_QUERY)")
1678 cpp_quote("#define Uri_HAS_USER_INFO       (1 << Uri_PROPERTY_USER_INFO)")
1679 cpp_quote("#define Uri_HAS_HOST_TYPE       (1 << Uri_PROPERTY_HOST_TYPE)")
1680 cpp_quote("#define Uri_HAS_PORT            (1 << Uri_PROPERTY_PORT)")
1681 cpp_quote("#define Uri_HAS_SCHEME          (1 << Uri_PROPERTY_SCHEME)")
1682 cpp_quote("#define Uri_HAS_ZONE            (1 << Uri_PROPERTY_ZONE)")
1683
1684 cpp_quote("#define Uri_CREATE_ALLOW_RELATIVE                  0x0001")
1685 cpp_quote("#define Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME  0x0002")
1686 cpp_quote("#define Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME      0x0004")
1687 cpp_quote("#define Uri_CREATE_NOFRAG                          0x0008")
1688 cpp_quote("#define Uri_CREATE_NO_CANONICALIZE                 0x0010")
1689 cpp_quote("#define Uri_CREATE_CANONICALIZE                    0x0100")
1690 cpp_quote("#define Uri_CREATE_FILE_USE_DOS_PATH               0x0020")
1691 cpp_quote("#define Uri_CREATE_DECODE_EXTRA_INFO               0x0040")
1692 cpp_quote("#define Uri_CREATE_NO_DECODE_EXTRA_INFO            0x0080")
1693 cpp_quote("#define Uri_CREATE_CRACK_UNKNOWN_SCHEMES           0x0200")
1694 cpp_quote("#define Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES        0x0400")
1695 cpp_quote("#define Uri_CREATE_PRE_PROCESS_HTML_URI            0x0800")
1696 cpp_quote("#define Uri_CREATE_NO_PRE_PROCESS_HTML_URI         0x1000")
1697 cpp_quote("#define Uri_CREATE_IE_SETTINGS                     0x2000")
1698 cpp_quote("#define Uri_CREATE_NO_IE_SETTINGS                  0x4000")
1699 cpp_quote("#define Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS  0x8000")
1700
1701 cpp_quote("#define Uri_DISPLAY_NO_FRAGMENT  0x00000001")
1702 cpp_quote("#define Uri_PUNYCODE_IDN_HOST    0x00000002")
1703 cpp_quote("#define Uri_DISPLAY_IDN_HOST     0x00000004")
1704
1705 cpp_quote("#define Uri_ENCODING_USER_INFO_AND_PATH_IS_PERCENT_ENCODED_UTF8   0x00000001")
1706 cpp_quote("#define Uri_ENCODING_USER_INFO_AND_PATH_IS_CP                     0x00000002")
1707 cpp_quote("#define Uri_ENCODING_HOST_IS_IDN                                  0x00000004")
1708 cpp_quote("#define Uri_ENCODING_HOST_IS_PERCENT_ENCODED_UTF8                 0x00000008")
1709 cpp_quote("#define Uri_ENCODING_HOST_IS_PERCENT_ENCODED_CP                   0x00000010")
1710 cpp_quote("#define Uri_ENCODING_QUERY_AND_FRAGMENT_IS_PERCENT_ENCODED_UTF8   0x00000020")
1711 cpp_quote("#define Uri_ENCODING_QUERY_AND_FRAGMENT_IS_CP                     0x00000040")
1712 cpp_quote("#define Uri_ENCODING_RFC (Uri_ENCODING_USER_INFO_AND_PATH_IS_PERCENT_ENCODED_UTF8|Uri_ENCODING_HOST_IS_PERCENT_ENCODED_UTF8|Uri_ENCODING_QUERY_AND_FRAGMENT_IS_PERCENT_ENCODED_UTF8)")
1713
1714 cpp_quote("#define UriBuilder_USE_ORIGINAL_FLAGS  0x00000001")
1715
1716 /*****************************************************************************
1717  * IUriContainer interface
1718  */
1719 [
1720     local,
1721     object,
1722     uuid(a158a630-ed6f-45fb-b987-f68676f57752),
1723     pointer_default(unique)
1724 ]
1725 interface IUriContainer : IUnknown
1726 {
1727     HRESULT GetIUri([out] IUri **ppIUri);
1728 }
1729
1730 /*****************************************************************************
1731  * IUriBuilder interface
1732  */
1733 [
1734     local,
1735     object,
1736     uuid(4221b2e1-8955-46c0-bd5b-de9897565de7),
1737     pointer_default(unique)
1738 ]
1739 interface IUriBuilder: IUnknown
1740 {
1741     HRESULT CreateUriSimple(
1742         [in]  DWORD       dwAllowEncodingPropertyMask,
1743         [in]  DWORD_PTR   dwReserved,
1744         [out] IUri      **ppIUri);
1745
1746     HRESULT CreateUri(
1747         [in]  DWORD       dwCreateFlags,
1748         [in]  DWORD       dwAllowEncodingPropertyMask,
1749         [in]  DWORD_PTR   dwReserved,
1750         [out] IUri      **ppIUri);
1751
1752     HRESULT CreateUriWithFlags(
1753         [in]  DWORD       dwCreateFlags,
1754         [in]  DWORD       dwUriBuilderFlags,
1755         [in]  DWORD       dwAllowEncodingPropertyMask,
1756         [in]  DWORD_PTR   dwReserved,
1757         [out] IUri      **ppIUri);
1758
1759     HRESULT GetIUri(
1760         [out] IUri **ppIUri);
1761
1762     HRESULT SetIUri(
1763         [in, unique] IUri *pIUri);
1764
1765     HRESULT GetFragment(
1766         [out] DWORD   *pcchFragment,
1767         [out] LPCWSTR *ppwzFragment);
1768
1769     HRESULT GetHost(
1770         [out] DWORD   *pcchHost,
1771         [out] LPCWSTR *ppwzHost);
1772
1773     HRESULT GetPassword(
1774         [out] DWORD   *pcchPassword,
1775         [out] LPCWSTR *ppwzPassword);
1776
1777     HRESULT GetPath(
1778         [out] DWORD   *pcchPath,
1779         [out] LPCWSTR *ppwzPath);
1780
1781     HRESULT GetPort(
1782         [out] BOOL  *pfHasPort,
1783         [out] DWORD *pdwPort);
1784
1785     HRESULT GetQuery(
1786         [out] DWORD   *pcchQuery,
1787         [out] LPCWSTR *ppwzQuery);
1788
1789     HRESULT GetSchemeName(
1790         [out] DWORD   *pcchSchemeName,
1791         [out] LPCWSTR *ppwzSchemeName);
1792
1793     HRESULT GetUserName(
1794         [out] DWORD   *pcchUserName,
1795         [out] LPCWSTR *ppwzUserName);
1796
1797     HRESULT SetFragment(
1798         [in] LPCWSTR pwzNewValue);
1799
1800     HRESULT SetHost(
1801         [in] LPCWSTR pwzNewValue);
1802
1803     HRESULT SetPassword(
1804         [in] LPCWSTR pwzNewValue);
1805
1806     HRESULT SetPath(
1807         [in] LPCWSTR pwzNewValue);
1808
1809     HRESULT SetPort(
1810         [in] BOOL  fHasPort,
1811         [in] DWORD dwNewValue);
1812
1813     HRESULT SetQuery(
1814         [in] LPCWSTR pwzNewValue);
1815
1816     HRESULT SetSchemeName(
1817         [in] LPCWSTR pwzNewValue);
1818
1819     HRESULT SetUserName(
1820         [in] LPCWSTR pwzNewValue);
1821
1822     HRESULT RemoveProperties(
1823         [in] DWORD dwPropertyMask);
1824
1825     HRESULT HasBeenModified(
1826         [out] BOOL *pfModified);
1827 };
1828
1829 /*****************************************************************************
1830  * IInternetProtocolEx interface
1831  */
1832 [
1833     local,
1834     object,
1835     uuid(c7a98e66-1010-492c-a1c8-c809e1f75905),
1836     pointer_default(unique)
1837 ]
1838 interface IInternetProtocolEx : IInternetProtocol
1839 {
1840     HRESULT StartEx(
1841         [in] IUri *pUri,
1842         [in] IInternetProtocolSink *pOIProtSink,
1843         [in] IInternetBindInfo *pOIBindInfo,
1844         [in] DWORD grfPI,
1845         [in] HANDLE *dwReserved);
1846 }
1847
1848 cpp_quote("#define CONFIRMSAFETYACTION_LOADOBJECT  0x00000001")
1849
1850 struct CONFIRMSAFETY
1851 {
1852     CLSID clsid;
1853     IUnknown *pUnk;
1854     DWORD dwFlags;
1855 };
1856
1857 cpp_quote("EXTERN_C const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY;")
1858
1859 cpp_quote("DEFINE_GUID(CLSID_InternetSecurityManager, 0x7b8a2d94, 0x0ac9, 0x11d1, 0x89, 0x6c, 0x00, 0xc0, 0x4f, 0xB6, 0xbf, 0xc4);")
1860 cpp_quote("DEFINE_GUID(CLSID_InternetZoneManager, 0x7B8A2D95, 0x0AC9, 0x11D1, 0x89, 0x6C, 0x00, 0xC0, 0x4F, 0xB6, 0xBF, 0xC4);")
1861 cpp_quote("DEFINE_GUID(IID_IAsyncMoniker, 0x79EAC9D3, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);")
1862 cpp_quote("DEFINE_GUID(IID_IAsyncBindCtx, 0x79EAC9D4, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);")
1863 cpp_quote("DEFINE_GUID(CLSID_StdURLMoniker, 0x79EAC9E0, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);")
1864 cpp_quote("DEFINE_GUID(CLSID_DeCompMimeFilter, 0x8f6b0360, 0xb80d, 0x11d0, 0xa9,0xb3, 0x00,0x60,0x97,0x94,0x23,0x11);")
1865
1866 cpp_quote("DEFINE_GUID(CLSID_CdlProtocol, 0x3dd53d40, 0x7b8b, 0x11D0, 0xb0,0x13, 0x00,0xaa,0x00,0x59,0xce,0x02);")
1867 cpp_quote("DEFINE_GUID(CLSID_FileProtocol, 0x79EAC9E7, 0xBAF9, 0x11CE, 0x8C,0x82, 0x00,0xAA,0x00,0x4B,0xA9,0x0B);")
1868 cpp_quote("DEFINE_GUID(CLSID_FtpProtocol, 0x79EAC9E3, 0xBAF9, 0x11CE, 0x8C,0x82, 0x00,0xAA,0x00,0x4B,0xA9,0x0B);")
1869 cpp_quote("DEFINE_GUID(CLSID_GopherProtocol, 0x79EAC9E4, 0xBAF9, 0x11CE, 0x8C,0x82, 0x00,0xAA,0x00,0x4B,0xA9,0x0B);")
1870 cpp_quote("DEFINE_GUID(CLSID_HttpProtocol, 0x79EAC9E2, 0xBAF9, 0x11CE, 0x8C,0x82, 0x00,0xAA,0x00,0x4B,0xA9,0x0B);")
1871 cpp_quote("DEFINE_GUID(CLSID_HttpSProtocol, 0x79EAC9E5, 0xBAF9, 0x11CE, 0x8C,0x82, 0x00,0xAA,0x00,0x4B,0xA9,0x0B);")
1872 cpp_quote("DEFINE_GUID(CLSID_MkProtocol, 0x79EAC9E6, 0xBAF9, 0x11CE, 0x8C,0x82, 0x00,0xAA,0x00,0x4B,0xA9,0x0B);")
1873
1874 cpp_quote("#define URLMON_OPTION_USERAGENT          0x10000001")
1875 cpp_quote("#define URLMON_OPTION_USERAGENT_REFRESH  0x10000002")
1876 cpp_quote("#define URLMON_OPTION_URL_ENCODING       0x10000004")
1877
1878 cpp_quote("#define MK_S_ASYNCHRONOUS                _HRESULT_TYPEDEF_(0x000401E8)")
1879 cpp_quote("#ifndef S_ASYNCHRONOUS")
1880 cpp_quote("#define S_ASYNCHRONOUS                   MK_S_ASYNCHRONOUS")
1881 cpp_quote("#endif")
1882
1883 cpp_quote("#define INET_E_ERROR_FIRST               _HRESULT_TYPEDEF_(0x800C0002)")
1884 cpp_quote("#define INET_E_INVALID_URL               _HRESULT_TYPEDEF_(0x800C0002)")
1885 cpp_quote("#define INET_E_NO_SESSION                _HRESULT_TYPEDEF_(0x800C0003)")
1886 cpp_quote("#define INET_E_CANNOT_CONNECT            _HRESULT_TYPEDEF_(0x800C0004)")
1887 cpp_quote("#define INET_E_RESOURCE_NOT_FOUND        _HRESULT_TYPEDEF_(0x800C0005)")
1888 cpp_quote("#define INET_E_OBJECT_NOT_FOUND          _HRESULT_TYPEDEF_(0x800C0006)")
1889 cpp_quote("#define INET_E_DATA_NOT_AVAILABLE        _HRESULT_TYPEDEF_(0x800C0007)")
1890 cpp_quote("#define INET_E_DOWNLOAD_FAILURE          _HRESULT_TYPEDEF_(0x800C0008)")
1891 cpp_quote("#define INET_E_AUTHENTICATION_REQUIRED   _HRESULT_TYPEDEF_(0x800C0009)")
1892 cpp_quote("#define INET_E_NO_VALID_MEDIA            _HRESULT_TYPEDEF_(0x800C000A)")
1893 cpp_quote("#define INET_E_CONNECTION_TIMEOUT        _HRESULT_TYPEDEF_(0x800C000B)")
1894 cpp_quote("#define INET_E_INVALID_REQUEST           _HRESULT_TYPEDEF_(0x800C000C)")
1895 cpp_quote("#define INET_E_UNKNOWN_PROTOCOL          _HRESULT_TYPEDEF_(0x800C000D)")
1896 cpp_quote("#define INET_E_SECURITY_PROBLEM          _HRESULT_TYPEDEF_(0x800C000E)")
1897 cpp_quote("#define INET_E_CANNOT_LOAD_DATA          _HRESULT_TYPEDEF_(0x800C000F)")
1898 cpp_quote("#define INET_E_CANNOT_INSTANTIATE_OBJECT _HRESULT_TYPEDEF_(0x800C0010)")
1899 cpp_quote("#define INET_E_USE_DEFAULT_PROTOCOLHANDLER _HRESULT_TYPEDEF_(0x800C0011)")
1900 cpp_quote("#define INET_E_QUERYOPTION_UNKNOWN       _HRESULT_TYPEDEF_(0x800C0013)")
1901 cpp_quote("#define INET_E_REDIRECT_FAILED           _HRESULT_TYPEDEF_(0x800C0014)")
1902 cpp_quote("#define INET_E_REDIRECT_TO_DIR           _HRESULT_TYPEDEF_(0x800C0015)")
1903 cpp_quote("#define INET_E_CANNOT_LOCK_REQUEST       _HRESULT_TYPEDEF_(0x800C0016)")
1904 cpp_quote("#define INET_E_ERROR_LAST                INET_E_REDIRECT_TO_DIR")
1905 cpp_quote("#define INET_E_DEFAULT_ACTION            INET_E_USE_DEFAULT_PROTOCOLHANDLER")
1906
1907 cpp_quote("HRESULT WINAPI CoGetClassObjectFromURL(REFCLSID, LPCWSTR, DWORD, DWORD, LPCWSTR, LPBINDCTX, DWORD, LPVOID, REFIID, LPVOID*);")
1908 cpp_quote("HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk);")
1909 cpp_quote("HRESULT WINAPI CreateURLMonikerEx(IMoniker*,LPCWSTR,IMoniker**,DWORD);")
1910 cpp_quote("HRESULT WINAPI CreateURLMonikerEx2(IMoniker*,IUri*,IMoniker**,DWORD);")
1911 cpp_quote("HRESULT WINAPI RegisterBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pbsc, IBindStatusCallback **ppbsc, DWORD dwReserved);")
1912 cpp_quote("HRESULT WINAPI CompareSecurityIds(BYTE*,DWORD,BYTE*,DWORD,DWORD);")
1913 cpp_quote("HRESULT WINAPI URLDownloadToFileA(LPUNKNOWN,LPCSTR,LPCSTR,DWORD,LPBINDSTATUSCALLBACK);")
1914 cpp_quote("HRESULT WINAPI URLDownloadToFileW(LPUNKNOWN,LPCWSTR,LPCWSTR,DWORD,LPBINDSTATUSCALLBACK);")
1915 cpp_quote("HRESULT WINAPI URLDownloadToCacheFileA(LPUNKNOWN,LPCSTR,LPSTR,DWORD,DWORD,LPBINDSTATUSCALLBACK);")
1916 cpp_quote("HRESULT WINAPI URLDownloadToCacheFileW(LPUNKNOWN,LPCWSTR,LPWSTR,DWORD,DWORD,LPBINDSTATUSCALLBACK);")
1917 cpp_quote("HRESULT WINAPI CoInternetGetSession(DWORD,IInternetSession**,DWORD);")
1918 cpp_quote("HRESULT WINAPI MkParseDisplayNameEx(IBindCtx*,LPCWSTR,ULONG*,IMoniker**);")
1919 cpp_quote("HRESULT WINAPI IsAsyncMoniker(IMoniker* pmk);")
1920 cpp_quote("HRESULT WINAPI CreateAsyncBindCtx(DWORD, IBindStatusCallback*, IEnumFORMATETC*, IBindCtx**);")
1921 cpp_quote("HRESULT WINAPI CreateAsyncBindCtxEx(IBindCtx*,DWORD,IBindStatusCallback*,IEnumFORMATETC*,IBindCtx**,DWORD);")
1922 cpp_quote("HRESULT WINAPI CoInternetCreateSecurityManager(IServiceProvider*,IInternetSecurityManager**,DWORD);")
1923 cpp_quote("HRESULT WINAPI CoInternetCombineUrl(LPCWSTR,LPCWSTR,DWORD,LPWSTR,DWORD,DWORD*,DWORD);")
1924 cpp_quote("HRESULT WINAPI CoInternetCompareUrl(LPCWSTR,LPCWSTR,DWORD);")
1925 cpp_quote("HRESULT WINAPI CoInternetCreateZoneManager(IServiceProvider*, IInternetZoneManager**, DWORD);")
1926 cpp_quote("HRESULT WINAPI CoInternetParseUrl(LPCWSTR,PARSEACTION,DWORD,LPWSTR,DWORD,DWORD*,DWORD);")
1927 cpp_quote("HRESULT WINAPI CoInternetQueryInfo(LPCWSTR,QUERYOPTION,DWORD,LPVOID,DWORD,DWORD*,DWORD);")
1928 cpp_quote("HRESULT WINAPI CoInternetSetFeatureEnabled(INTERNETFEATURELIST,DWORD,BOOL);")
1929 cpp_quote("HRESULT WINAPI CoInternetGetSecurityUrl(LPCWSTR,LPWSTR*,PSUACTION,DWORD);")
1930 cpp_quote("HRESULT WINAPI CreateFormatEnumerator(UINT,FORMATETC*,IEnumFORMATETC**);")
1931 cpp_quote("HRESULT WINAPI GetSoftwareUpdateInfo( LPCWSTR szDistUnit, LPSOFTDISTINFO psdi);")
1932 cpp_quote("HRESULT WINAPI FaultInIEFeature(HWND,uCLSSPEC*,QUERYCONTEXT*,DWORD);")
1933 cpp_quote("HRESULT WINAPI FindMimeFromData(LPBC,LPCWSTR,LPVOID,DWORD,LPCWSTR,DWORD,LPWSTR*,DWORD);")
1934 cpp_quote("HRESULT WINAPI GetClassFileOrMime(LPBC,LPCWSTR,LPVOID,DWORD,LPCWSTR,DWORD,CLSID*);")
1935 cpp_quote("HRESULT WINAPI HlinkGoBack(IUnknown*);")
1936 cpp_quote("HRESULT WINAPI HlinkGoForward(IUnknown*);")
1937 cpp_quote("HRESULT WINAPI HlinkNavigateMoniker(IUnknown*,IMoniker*);")
1938 cpp_quote("HRESULT WINAPI HlinkNavigateString(IUnknown*,LPCWSTR);")
1939 cpp_quote("HRESULT WINAPI HlinkSimpleNavigateToMoniker(IMoniker*,LPCWSTR,LPCWSTR,IUnknown*,IBindCtx*,IBindStatusCallback*,DWORD,DWORD);")
1940 cpp_quote("HRESULT WINAPI HlinkSimpleNavigateToString(LPCWSTR,LPCWSTR,LPCWSTR,IUnknown*,IBindCtx*,IBindStatusCallback*,DWORD,DWORD);")
1941 cpp_quote("HRESULT WINAPI IsValidURL(LPBC,LPCWSTR,DWORD);")
1942 cpp_quote("HRESULT WINAPI ObtainUserAgentString(DWORD,LPSTR,DWORD*);")
1943 cpp_quote("HRESULT WINAPI RegisterFormatEnumerator(LPBC,IEnumFORMATETC*,DWORD);")
1944 cpp_quote("HRESULT WINAPI RevokeFormatEnumerator(LPBC,IEnumFORMATETC*);")
1945 cpp_quote("HRESULT WINAPI RevokeBindStatusCallback(LPBC,IBindStatusCallback*);")
1946 cpp_quote("HRESULT WINAPI CopyStgMedium(const STGMEDIUM*,STGMEDIUM*);")
1947 cpp_quote("void WINAPI ReleaseBindInfo(BINDINFO*);")
1948 cpp_quote("HRESULT WINAPI UrlMkGetSessionOption(DWORD,LPVOID,DWORD,DWORD*,DWORD);")
1949 cpp_quote("HRESULT WINAPI UrlMkSetSessionOption(DWORD,LPVOID,DWORD,DWORD);")
1950 cpp_quote("HRESULT WINAPI URLOpenStreamA(LPUNKNOWN,LPCSTR,DWORD,LPBINDSTATUSCALLBACK);")
1951 cpp_quote("HRESULT WINAPI URLOpenStreamW(LPUNKNOWN,LPCWSTR,DWORD,LPBINDSTATUSCALLBACK);")
1952 cpp_quote("HRESULT WINAPI URLOpenPullStreamA(LPUNKNOWN,LPCSTR,DWORD,LPBINDSTATUSCALLBACK);")
1953 cpp_quote("HRESULT WINAPI URLOpenPullStreamW(LPUNKNOWN,LPCWSTR,DWORD,LPBINDSTATUSCALLBACK);")
1954 cpp_quote("HRESULT WINAPI URLOpenBlockingStreamA(LPUNKNOWN,LPCSTR,LPSTREAM*,DWORD,LPBINDSTATUSCALLBACK);")
1955 cpp_quote("HRESULT WINAPI URLOpenBlockingStreamW(LPUNKNOWN,LPCWSTR,LPSTREAM*,DWORD,LPBINDSTATUSCALLBACK);")
1956
1957 cpp_quote("#define OInetCombineUrl CoInternetCombineUrl")
1958 cpp_quote("#define OInetCompareUrl CoInternetCompareUrl")
1959 cpp_quote("#define OInetGetSession CoInternetGetSession")
1960
1961 cpp_quote("BOOL WINAPI IsLoggingEnabledA(LPCSTR);")
1962 cpp_quote("BOOL WINAPI IsLoggingEnabledW(LPCWSTR);")
1963 cpp_quote("#define IsLoggingEnabled WINELIB_NAME_AW(IsLoggingEnabled)")
1964
1965 cpp_quote("#define MKSYS_URLMONIKER 6")
1966 cpp_quote("#define URL_MK_LEGACY            0")
1967 cpp_quote("#define URL_MK_UNIFORM           1")