winmm: PlaySound concurrency cleanup.
[wine] / include / shobjidl.idl
1 /*
2  * COM interfaces for shell objects
3  *
4  * Copyright (C) 1999 Juergen Schmied
5  * Copyright (C) 2003 Alexandre Julliard
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21
22 import "objidl.idl";
23 import "oleidl.idl";
24 import "oaidl.idl";
25 import "docobj.idl";
26 import "shtypes.idl";
27 import "servprov.idl";
28 import "comcat.idl";
29 import "propidl.idl";
30 /* FIXME: import "prsht.idl";*/
31 import "msxml.idl";
32 import "wtypes.idl";
33 import "propsys.idl";
34 /* FIXME: import "structuredquery.idl"; */
35
36 cpp_quote("/* FIXME: #include <sherrors.h> */")
37
38
39 /*****************************************************************************
40  * IPersistFolder interface
41  */
42 [
43     object,
44     uuid(000214ea-0000-0000-c000-000000000046),
45     pointer_default(unique)
46 ]
47 interface IPersistFolder : IPersist
48 {
49     typedef IPersistFolder *LPPERSISTFOLDER;
50
51     HRESULT Initialize( [in] LPCITEMIDLIST pidl );
52 }
53
54
55 /*****************************************************************************
56  * IPersistFolder2 interface
57  */
58 [
59     object,
60     uuid(1ac3d9f0-175c-11d1-95be-00609797ea4f),
61     pointer_default(unique)
62 ]
63 interface IPersistFolder2 : IPersistFolder
64 {
65     typedef IPersistFolder2 *LPPERSISTFOLDER2;
66
67     HRESULT GetCurFolder( [out] LPITEMIDLIST *ppidl );
68 }
69
70
71 /*****************************************************************************
72  * IPersistIDList interface
73  */
74 [
75     object,
76     uuid(1079acfc-29bd-11d3-8e0d-00c04f6837d5),
77     pointer_default(unique)
78 ]
79 interface IPersistIDList : IPersist
80 {
81     HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
82     HRESULT GetIDList( [out] LPITEMIDLIST *ppidl );
83 }
84
85
86 /*****************************************************************************
87  * IEnumIDList interface
88  */
89 [
90     object,
91     uuid(000214f2-0000-0000-c000-000000000046),
92     pointer_default(unique)
93 ]
94 interface IEnumIDList : IUnknown
95 {
96     typedef IEnumIDList *LPENUMIDLIST;
97
98     HRESULT Next(
99         [in] ULONG celt,
100         [out, size_is(celt), length_is(*pceltFetched)] LPITEMIDLIST *rgelt,
101         [out] ULONG *pceltFetched);
102
103     HRESULT Skip( [in] ULONG celt );
104     HRESULT Reset();
105     HRESULT Clone( [out] IEnumIDList **ppenum );
106 }
107
108 /*****************************************************************************
109  * IShellPropSheetExt interface
110  */
111 cpp_quote("#if 0")
112     typedef LPARAM LPFNSVADDPROPSHEETPAGE;
113 cpp_quote("#else")
114 cpp_quote("#include <prsht.h>")
115 cpp_quote("typedef LPFNADDPROPSHEETPAGE LPFNSVADDPROPSHEETPAGE;")
116 cpp_quote("#endif")
117
118 [
119     object,
120     uuid(000214E9-0000-0000-C000-000000000046),
121     pointer_default(unique),
122     local
123 ]
124 interface IShellPropSheetExt : IUnknown
125 {
126     enum tagSHELLPROPSHEETEXTPAGEID {
127         EXPPS_FILETYPES = 0x1
128     };
129
130     typedef UINT EXPPS;
131
132     HRESULT AddPages(
133         [in] LPFNSVADDPROPSHEETPAGE pfnAddPage,
134         [in] LPARAM lParam);
135     HRESULT ReplacePage(
136         [in] EXPPS uPageID,
137         [in] LPFNSVADDPROPSHEETPAGE pfnReplaceWith,
138         [in] LPARAM lParam);
139 }
140 typedef IShellPropSheetExt *LPSHELLPROPSHEETEXT;
141
142 /*****************************************************************************
143  * IShellFolder interface
144  */
145 [
146     object,
147     uuid(000214e6-0000-0000-c000-000000000046),
148     pointer_default(unique)
149 ]
150 interface IShellFolder : IUnknown
151 {
152     typedef IShellFolder * LPSHELLFOLDER;
153
154     typedef enum tagSHGDN
155     {
156         SHGDN_NORMAL = 0,
157         SHGDN_INFOLDER = 1,
158         SHGDN_FOREDITING = 0x1000,
159         SHGDN_INCLUDE_NONFILESYS = 0x2000,
160         SHGDN_FORADDRESSBAR = 0x4000,
161         SHGDN_FORPARSING = 0x8000
162     } SHGNO;
163
164     typedef DWORD SHGDNF;
165
166     enum tagSHCONTF
167     {
168         SHCONTF_FOLDERS = 32,
169         SHCONTF_NONFOLDERS = 64,
170         SHCONTF_INCLUDEHIDDEN = 128,
171         SHCONTF_INIT_ON_FIRST_NEXT = 256,
172         SHCONTF_NETPRINTERSRCH = 512,
173         SHCONTF_SHAREABLE = 1024,
174         SHCONTF_STORAGE = 2048
175     };
176
177     typedef DWORD SHCONTF;
178
179     cpp_quote("#define SFGAO_CANCOPY           DROPEFFECT_COPY")
180     cpp_quote("#define SFGAO_CANMOVE           DROPEFFECT_MOVE")
181     cpp_quote("#define SFGAO_CANLINK           DROPEFFECT_LINK")
182     cpp_quote("#define SFGAO_STORAGE           0x00000008L")
183     cpp_quote("#define SFGAO_CANRENAME         0x00000010L")
184     cpp_quote("#define SFGAO_CANDELETE         0x00000020L")
185     cpp_quote("#define SFGAO_HASPROPSHEET      0x00000040L")
186     cpp_quote("#define SFGAO_DROPTARGET        0x00000100L")
187     cpp_quote("#define SFGAO_CAPABILITYMASK    0x00000177L")
188     cpp_quote("#define SFGAO_ENCRYPTED         0x00002000L")
189     cpp_quote("#define SFGAO_ISSLOW            0x00004000L")
190     cpp_quote("#define SFGAO_GHOSTED           0x00008000L")
191     cpp_quote("#define SFGAO_LINK              0x00010000L")
192     cpp_quote("#define SFGAO_SHARE             0x00020000L")
193     cpp_quote("#define SFGAO_READONLY          0x00040000L")
194     cpp_quote("#define SFGAO_HIDDEN            0x00080000L")
195     cpp_quote("#define SFGAO_DISPLAYATTRMASK   0x000FC000L")
196     cpp_quote("#define SFGAO_FILESYSANCESTOR   0x10000000L")
197     cpp_quote("#define SFGAO_FOLDER            0x20000000L")
198     cpp_quote("#define SFGAO_FILESYSTEM        0x40000000L")
199     cpp_quote("#define SFGAO_HASSUBFOLDER      0x80000000L")
200     cpp_quote("#define SFGAO_CONTENTSMASK      0x80000000L")
201     cpp_quote("#define SFGAO_VALIDATE          0x01000000L")
202     cpp_quote("#define SFGAO_REMOVABLE         0x02000000L")
203     cpp_quote("#define SFGAO_COMPRESSED        0x04000000L")
204     cpp_quote("#define SFGAO_BROWSABLE         0x08000000L")
205     cpp_quote("#define SFGAO_NONENUMERATED     0x00100000L")
206     cpp_quote("#define SFGAO_NEWCONTENT        0x00200000L")
207     cpp_quote("#define SFGAO_STREAM            0x00400000L")
208     cpp_quote("#define SFGAO_STORAGEANCESTOR   0x00800000L")
209
210     typedef ULONG SFGAOF;
211
212     HRESULT ParseDisplayName(
213         [in] HWND hwndOwner,
214         [in] LPBC pbcReserved,
215         [in, string] LPOLESTR lpszDisplayName,
216         [out] ULONG *pchEaten,
217         [out] LPITEMIDLIST *ppidl,
218         [in, out, unique] ULONG *pdwAttributes);
219
220     HRESULT EnumObjects(
221         [in] HWND hwndOwner,
222         [in] SHCONTF grfFlags,
223         [out] IEnumIDList **ppenumIDList);
224
225     HRESULT BindToObject(
226         [in] LPCITEMIDLIST pidl,
227         [in] LPBC pbcReserved,
228         [in] REFIID riid,
229         [out, iid_is(riid)] void **ppvOut);
230
231     HRESULT BindToStorage(
232         [in] LPCITEMIDLIST pidl,
233         [in] LPBC pbcReserved,
234         [in] REFIID riid,
235         [out, iid_is(riid)] void **ppvObj);
236
237     HRESULT CompareIDs(
238         [in] LPARAM lParam,
239         [in] LPCITEMIDLIST pidl1,
240         [in] LPCITEMIDLIST pidl2);
241
242     HRESULT CreateViewObject(
243         [in] HWND hwndOwner,
244         [in] REFIID riid,
245         [out, iid_is(riid)] void **ppvOut);
246
247     HRESULT GetAttributesOf(
248         [in] UINT cidl,
249         [in, size_is(cidl)] LPCITEMIDLIST *apidl,
250         [in, out] SFGAOF *rgfInOut);
251
252     HRESULT GetUIObjectOf(
253         [in] HWND hwndOwner,
254         [in] UINT cidl,
255         [in, size_is(cidl)] LPCITEMIDLIST *apidl,
256         [in] REFIID riid,
257         [in, out, unique] UINT *prgfInOut,
258         [out, iid_is(riid)] void **ppvOut);
259
260     HRESULT GetDisplayNameOf(
261         [in] LPCITEMIDLIST pidl,
262         [in] SHGDNF uFlags,
263         [out] STRRET *lpName);
264
265     HRESULT SetNameOf(
266         [in] HWND hwnd,
267         [in] LPCITEMIDLIST pidl,
268         [in, string] LPCOLESTR lpszName,
269         [in] SHGDNF uFlags,
270         [out] LPITEMIDLIST *ppidlOut);
271 }
272
273
274 /*****************************************************************************
275  * IEnumExtraSearch interface
276  */
277 [
278     object,
279     uuid(0e700be1-9db6-11d1-a1ce-00c04fd75d13),
280     pointer_default(unique)
281 ]
282 interface IEnumExtraSearch : IUnknown
283 {
284     typedef IEnumExtraSearch *LPENUMEXTRASEARCH;
285
286     typedef struct
287     {
288         GUID guidSearch;
289         WCHAR wszFriendlyName[80];
290         /*
291          *WCHAR wszMenuText[80];
292          *WCHAR wszHelpText[MAX_PATH];
293          */
294         WCHAR wszUrl[2084];
295         /*
296          *WCHAR wszIcon[MAX_PATH+10];
297          *WCHAR wszGreyIcon[MAX_PATH+10];
298          *WCHAR wszClrIcon[MAX_PATH+10];
299          */
300     } EXTRASEARCH, *LPEXTRASEARCH;
301
302     HRESULT Next(
303         [in] ULONG celt,
304         [out, size_is(celt), length_is(*pceltFetched)] EXTRASEARCH *rgelt,
305         [out] ULONG *pceltFetched);
306
307     HRESULT Skip( [in] ULONG celt );
308     HRESULT Reset();
309     HRESULT Clone( [out] IEnumExtraSearch **ppenum );
310 }
311
312
313 /*****************************************************************************
314  * IShellFolder2 interface
315  */
316 [
317     object,
318     uuid(93f2f68c-1d1b-11d3-a30e-00c04f79abd1),
319     pointer_default(unique)
320 ]
321 interface IShellFolder2 : IShellFolder
322 {
323     typedef struct
324     {
325         GUID    fmtid;
326         DWORD   pid;
327     } SHCOLUMNID, *LPSHCOLUMNID;
328     typedef const SHCOLUMNID *LPCSHCOLUMNID;
329
330     HRESULT GetDefaultSearchGUID( [out] GUID *lpguid );
331     HRESULT EnumSearches( [out] IEnumExtraSearch **ppenum );
332     HRESULT GetDefaultColumn( [in] DWORD dwReserved, [out] ULONG *pSort, [out] ULONG *pDisplay );
333     HRESULT GetDefaultColumnState( [in] UINT iColumn, [out] SHCOLSTATEF *pcsFlags );
334     HRESULT GetDetailsEx( [in] LPCITEMIDLIST pidl, [in] const SHCOLUMNID *pscid, [out] VARIANT *pv);
335     HRESULT GetDetailsOf( [in] LPCITEMIDLIST pidl, [in] UINT iColumn, [out] SHELLDETAILS *psd);
336     HRESULT MapColumnToSCID( [in] UINT iColumn, [in] SHCOLUMNID *pscid );
337 }
338
339 /*****************************************************************************
340  * IShellItem interface
341  */
342 [
343     object,
344     uuid(43826d1e-e718-42ee-bc55-a1e261c37bfe),
345     pointer_default(unique)
346 ]
347 interface IShellItem : IUnknown
348 {
349     typedef [v1_enum] enum {
350         SIGDN_NORMALDISPLAY                = 0,
351         SIGDN_PARENTRELATIVEPARSING        = 0x80018001,
352         SIGDN_DESKTOPABSOLUTEPARSING       = 0x80028000,
353         SIGDN_PARENTRELATIVEEDITING        = 0x80031001,
354         SIGDN_DESKTOPABSOLUTEEDITING       = 0x8004c000,
355         SIGDN_FILESYSPATH                  = 0x80058000,
356         SIGDN_URL                          = 0x80068000,
357         SIGDN_PARENTRELATIVEFORADDRESSBAR  = 0x8007c001,
358         SIGDN_PARENTRELATIVE               = 0x80080001
359     } SIGDN; /* & 0xFFFF => SHGDN */
360
361     [v1_enum] enum _SICHINTF
362     {
363         SICHINT_DISPLAY                       = 0x00000000,
364         SICHINT_CANONICAL                     = 0x10000000,
365         SICHINT_TEST_FILESYSPATH_IF_NOT_EQUAL = 0x20000000,
366         SICHINT_ALLFIELDS                     = 0x80000000
367     };
368     typedef DWORD SICHINTF;
369
370     HRESULT BindToHandler(
371         [in] IBindCtx *pbc,
372         [in] REFGUID rbhid,
373         [in] REFIID riid,
374         [out, iid_is(riid)] void **ppvOut);
375
376     HRESULT GetParent( [out] IShellItem **ppsi );
377
378     HRESULT GetDisplayName(
379         [in] SIGDN sigdnName,
380         [out] LPWSTR *ppszName);
381
382     HRESULT GetAttributes(
383         [in] SFGAOF sfgaoMask,
384         [out] SFGAOF *psfgaoAttribs);
385
386     HRESULT Compare(
387         [in] IShellItem *psi,
388         [in] SICHINTF hint,
389         [out] int *piOrder);
390 }
391
392 /*****************************************************************************
393  * IShellItem2 interface
394  */
395 [
396     object,
397     uuid(7E9FB0D3-919F-4307-AB2E-9B1860310C93),
398     pointer_default(unique)
399 ]
400 interface IShellItem2 : IShellItem
401 {
402     HRESULT GetPropertyStore(
403         [in] GETPROPERTYSTOREFLAGS flags,
404         [in] REFIID riid,
405         [out, iid_is(riid)] void **ppv);
406
407     HRESULT GetPropertyStoreWithCreateObject(
408         [in] GETPROPERTYSTOREFLAGS flags,
409         [in] IUnknown *punkCreateObject,
410         [in] REFIID riid,
411         [out, iid_is(riid)] void **ppv);
412
413     HRESULT GetPropertyStoreForKeys(
414         [in, size_is(cKeys)] const PROPERTYKEY *rgKeys,
415         [in] UINT cKeys,
416         [in] GETPROPERTYSTOREFLAGS flags,
417         [in] REFIID riid,
418         [out, iid_is(riid)] void **ppv);
419
420     HRESULT GetPropertyDescriptionList(
421         [in] REFPROPERTYKEY keyType,
422         [in] REFIID riid,
423         [out, iid_is(riid)] void **ppv);
424
425     HRESULT Update(
426         [in, unique] IBindCtx *pbc);
427
428     HRESULT GetProperty(
429         [in] REFPROPERTYKEY key,
430         [out] PROPVARIANT *ppropvar);
431
432     HRESULT GetCLSID(
433         [in] REFPROPERTYKEY key,
434         [out] CLSID *pclsid);
435
436     HRESULT GetFileTime (
437         [in] REFPROPERTYKEY key,
438         [out] FILETIME *pft);
439
440     HRESULT GetInt32(
441         [in] REFPROPERTYKEY key,
442         [out] int *pi);
443
444     HRESULT GetString(
445         [in] REFPROPERTYKEY key,
446         [out, string] LPWSTR *ppsz);
447
448     HRESULT GetUInt32(
449         [in] REFPROPERTYKEY key,
450         [out] ULONG *pui);
451
452     HRESULT GetUInt64(
453         [in] REFPROPERTYKEY key,
454         [out] ULONGLONG *pull);
455
456     HRESULT GetBool(
457         [in] REFPROPERTYKEY key,
458         [out] BOOL *pf);
459 }
460
461 typedef enum tagNWMF {
462     NWMF_UNLOADING        = 0x0001,
463     NWMF_USERINITED       = 0x0002,
464     NWMF_FIRST            = 0x0004,
465     NWMF_OVERRIDEKEY      = 0x0008,
466     NWMF_SHOWHELP         = 0x0010,
467     NWMF_HTMLDIALOG       = 0x0020,
468     NWMF_FROMDIALOGCHILD  = 0x0040,
469     NWMF_USERREQUESTED    = 0x0080,
470     NWMF_USERALLOWED      = 0x0100
471 } NWMF;
472
473 [
474     uuid(d2bc4c84-3f72-4a52-a604-7bcbf3982cbb),
475     object,
476     pointer_default(unique)
477 ]
478 interface INewWindowManager : IUnknown
479 {
480     HRESULT EvaluateNewWindow(
481         [in, string] LPCWSTR pszUrl,
482         [in, string] LPCWSTR pszName,
483         [in, string] LPCWSTR pszUrlContext,
484         [in, string] LPCWSTR pszFeatures,
485         [in]         BOOL fReplace,
486         [in]         DWORD dwFlags,
487         [in]         DWORD dwUserActionTime);
488 }
489
490 cpp_quote("#define SID_SNewWindowManager IID_INewWindowManager")
491
492 /*****************************************************************************
493  * IEnumShellItems interface
494  */
495 [
496  object,
497  uuid(70629033-E363-4A28-A567-0DB78006E6D7),
498  pointer_default(unique)
499 ]
500 interface IEnumShellItems : IUnknown
501 {
502     [local] HRESULT Next(
503         [in] ULONG celt,
504         [out, size_is(celt), length_is(*pceltFetched)] IShellItem **rgelt,
505         [out] ULONG *pceltFetched);
506
507     [call_as(Next)] HRESULT RemoteNext(
508         [in] ULONG celt,
509         [out, size_is(celt), length_is(*pceltFetched)] IShellItem **rgelt,
510         [out] ULONG *pceltFetched);
511
512     HRESULT Skip(
513         [in] ULONG celt);
514
515     HRESULT Reset();
516
517     HRESULT Clone(
518         [out] IEnumShellItems **ppenum);
519 }
520
521 /*****************************************************************************
522  * IShellItemArray interface
523  */
524 [
525  object,
526  uuid(B63EA76D-1F85-456F-A19C-48159EFA858B),
527  pointer_default(unique)
528 ]
529 interface IShellItemArray : IUnknown
530 {
531     typedef [v1_enum] enum SIATTRIBFLAGS {
532         SIATTRIBFLAGS_AND            = 0x0001,
533         SIATTRIBFLAGS_OR             = 0x0002,
534         SIATTRIBFLAGS_APPCOMPAT      = 0x0003,
535         SIATTRIBFLAGS_MASK           = 0x0003,
536         SIATTRIBFLAGS_ALLITEMS       = 0x4000
537     } SIATTRIBFLAGS;
538     cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(SIATTRIBFLAGS)")
539
540     HRESULT BindToHandler(
541         [in, unique] IBindCtx *pbc,
542         [in] REFGUID bhid,
543         [in] REFIID riid,
544         [out, iid_is(riid)] void **ppvOut);
545
546     HRESULT GetPropertyStore(
547         [in] GETPROPERTYSTOREFLAGS flags,
548         [in] REFIID riid,
549         [out, iid_is(riid)] void **ppv);
550
551     HRESULT GetPropertyDescriptionList(
552         [in] REFPROPERTYKEY keyType,
553         [in] REFIID riid,
554         [out, iid_is(riid)] void **ppv);
555
556     HRESULT GetAttributes(
557         [in] SIATTRIBFLAGS AttribFlags,
558         [in] SFGAOF sfgaoMask,
559         [out] SFGAOF *psfgaoAttribs);
560
561     HRESULT GetCount(
562         [out] DWORD *pdwNumItems);
563
564     HRESULT GetItemAt(
565         [in] DWORD dwIndex,
566         [out] IShellItem **ppsi);
567
568     HRESULT EnumItems(
569         [out] IEnumShellItems **ppenumShellItems);
570
571 }
572
573 typedef [v1_enum] enum DATAOBJ_GET_ITEM_FLAGS
574 {
575     DOGIF_DEFAULT       = 0x0,
576     DOGIF_TRAVERSE_LINK = 0x1,
577     DOGIF_NO_HDROP      = 0x2,
578     DOGIF_NO_URL        = 0x4,
579     DOGIF_ONLY_IF_ONE   = 0x8
580 } DATAOBJ_GET_ITEM_FLAGS;
581 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DATAOBJ_GET_ITEM_FLAGS)")
582
583 cpp_quote("HRESULT WINAPI SHGetNameFromIDList(PCIDLIST_ABSOLUTE pidl, SIGDN sigdnName, PWSTR *ppszName);")
584 cpp_quote("HRESULT WINAPI SHCreateItemFromParsingName(PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void **ppv);")
585 cpp_quote("HRESULT WINAPI SHCreateItemFromIDList(PCIDLIST_ABSOLUTE pidl, REFIID riid, void **ppv);")
586 cpp_quote("HRESULT WINAPI SHGetItemFromDataObject(IDataObject *pdtobj, DATAOBJ_GET_ITEM_FLAGS dwFlags, REFIID riid, void **ppv);")
587 cpp_quote("HRESULT WINAPI SHGetIDListFromObject(IUnknown *punk, PIDLIST_ABSOLUTE *ppidl);")
588 cpp_quote("HRESULT WINAPI SHGetItemFromObject(IUnknown *punk, REFIID riid, void **ppv);")
589 cpp_quote("HRESULT WINAPI SHCreateShellItemArray(PCIDLIST_ABSOLUTE pidlParent, IShellFolder* psf, UINT cidl, PCUITEMID_CHILD_ARRAY ppidl, IShellItemArray **ppsiItemArray);")
590 cpp_quote("HRESULT WINAPI SHCreateShellItemArrayFromShellItem(IShellItem *psi, REFIID riid, void **ppv);")
591 cpp_quote("HRESULT WINAPI SHCreateShellItemArrayFromDataObject(IDataObject *pdo, REFIID riid, void **ppv);")
592
593 /*****************************************************************************
594  * IShellItemFilter interface
595  */
596 [
597  object,
598  uuid(2659B475-EEB8-48B7-8F07-B378810F48CF),
599  pointer_default(unique)
600 ]
601 interface IShellItemFilter : IUnknown
602 {
603     HRESULT IncludeItem(
604         [in] IShellItem *psi);
605
606     HRESULT GetEnumFlagsForItem(
607         [in] IShellItem *psi,
608         [out] SHCONTF *pgrfFlags);
609 }
610
611 /*****************************************************************************
612  * FOLDERSETTINGS
613  */
614 typedef char *LPVIEWSETTINGS;
615
616 typedef enum
617 {
618     FWF_AUTOARRANGE         = 0x00000001,
619     FWF_ABBREVIATEDNAMES    = 0x00000002,
620     FWF_SNAPTOGRID          = 0x00000004,
621     FWF_OWNERDATA           = 0x00000008,
622     FWF_BESTFITWINDOW       = 0x00000010,
623     FWF_DESKTOP             = 0x00000020,
624     FWF_SINGLESEL           = 0x00000040,
625     FWF_NOSUBFOLDERS        = 0x00000080,
626     FWF_TRANSPARENT         = 0x00000100,
627     FWF_NOCLIENTEDGE        = 0x00000200,
628     FWF_NOSCROLL            = 0x00000400,
629     FWF_ALIGNLEFT           = 0x00000800,
630     FWF_NOICONS             = 0x00001000,
631     FWF_SHOWSELALWAYS       = 0x00002000,
632     FWF_NOVISIBLE           = 0x00004000,
633     FWF_SINGLECLICKACTIVATE = 0x00008000,
634     FWF_NOWEBVIEW           = 0x00010000,
635     FWF_HIDEFILENAMES       = 0x00020000,
636     FWF_CHECKSELECT         = 0x00040000,
637     FWF_NOENUMREFRESH       = 0x00080000,
638     FWF_NOGROUPING          = 0x00100000,
639     FWF_FULLROWSELECT       = 0x00200000,
640     FWF_NOFILTERS           = 0x00400000,
641     FWF_NOCOLUMNHEADER      = 0x00800000,
642     FWF_NOHEADERINALLVIEWS  = 0x01000000,
643     FWF_EXTENDEDTILES       = 0x02000000,
644     FWF_TRICHECKSELECT      = 0x04000000,
645     FWF_AUTOCHECKSELECT     = 0x08000000,
646     FWF_NOBROWSERVIEWSTATE  = 0x10000000,
647     FWF_SUBSETGROUPS        = 0x20000000,
648     FWF_USESEARCHFOLDER     = 0x40000000,
649     FWF_ALLOWRTLREADING     = 0x80000000
650 } FOLDERFLAGS;
651
652 typedef enum
653 {
654     FVM_AUTO       =-1,
655     FVM_ICON       = 1,
656     FVM_FIRST      = FVM_ICON,
657     FVM_SMALLICON  = 2,
658     FVM_LIST       = 3,
659     FVM_DETAILS    = 4,
660     FVM_THUMBNAIL  = 5,
661     FVM_TILE       = 6,
662     FVM_THUMBSTRIP = 7,
663     FVM_CONTENT    = 8,
664     FVM_LAST       = FVM_CONTENT
665 } FOLDERVIEWMODE;
666
667 typedef struct
668 {
669     UINT ViewMode;
670     UINT fFlags;
671 } FOLDERSETTINGS, *PFOLDERSETTINGS, *LPFOLDERSETTINGS;
672 typedef const FOLDERSETTINGS *LPCFOLDERSETTINGS;
673
674 /*****************************************************************************
675  * IShellIcon interface
676  */
677 [
678     uuid(000214e5-0000-0000-c000-000000000046),
679     object,
680     pointer_default(unique)
681 ]
682 interface IShellIcon : IUnknown
683 {
684     HRESULT GetIconOf(
685         [in] PCUITEMID_CHILD pidl,
686         [in] UINT flags,
687         [out] int *pIconIndex);
688 }
689
690 /*****************************************************************************
691  * IShellView interface
692  */
693 interface IShellBrowser;  /* forward declaration */
694 [
695     object,
696     uuid(000214e3-0000-0000-c000-000000000046),
697     pointer_default(unique)
698 ]
699 interface IShellView : IOleWindow
700 {
701     typedef IShellView *LPSHELLVIEW;
702
703     cpp_quote("#define SVSI_DESELECT       0x00000000")
704     cpp_quote("#define SVSI_SELECT         0x00000001")
705     cpp_quote("#define SVSI_EDIT           0x00000003")
706     cpp_quote("#define SVSI_DESELECTOTHERS 0x00000004")
707     cpp_quote("#define SVSI_ENSUREVISIBLE  0x00000008")
708     cpp_quote("#define SVSI_FOCUSED        0x00000010")
709     cpp_quote("#define SVSI_TRANSLATEPT    0x00000020")
710     cpp_quote("#define SVSI_SELECTIONMARK  0x00000040")
711     cpp_quote("#define SVSI_POSITIONITEM   0x00000080")
712     cpp_quote("#define SVSI_CHECK          0x00000100")
713     cpp_quote("#define SVSI_NOSTATECHANGE  0x80000000")
714
715     typedef UINT SVSIF;
716
717     typedef enum
718     {
719         SVGIO_BACKGROUND     = 0x00000000,
720         SVGIO_SELECTION      = 0x00000001,
721         SVGIO_ALLVIEW        = 0x00000002,
722         SVGIO_CHECKED        = 0x00000003,
723         SVGIO_TYPE_MASK      = 0x0000000f,
724         SVGIO_FLAG_VIEWORDER = 0x80000000,
725     } SVGIO;
726
727     typedef enum
728     {
729         SVUIA_DEACTIVATE       = 0,
730         SVUIA_ACTIVATE_NOFOCUS = 1,
731         SVUIA_ACTIVATE_FOCUS   = 2,
732         SVUIA_INPLACEACTIVATE  = 3
733     } SVUIA_STATUS;
734
735     HRESULT TranslateAccelerator( [in] MSG *pmsg );
736     HRESULT EnableModeless( [in] BOOL fEnable );
737     HRESULT UIActivate( [in] UINT uState );
738     HRESULT Refresh();
739     HRESULT CreateViewWindow(
740         [in] IShellView *psvPrevious,
741         [in] LPCFOLDERSETTINGS lpfs,
742         [in] IShellBrowser *psb,
743         [out] RECT *prcView,
744         [out] HWND *phWnd);
745
746     HRESULT DestroyViewWindow();
747     HRESULT GetCurrentInfo( [out] LPFOLDERSETTINGS lpfs );
748
749     [local] HRESULT AddPropertySheetPages(
750         [in] DWORD dwReserved,
751         [in] LPFNSVADDPROPSHEETPAGE pfn,
752         [in] LPARAM lparam);
753
754     HRESULT SaveViewState();
755     HRESULT SelectItem(
756         [in] LPCITEMIDLIST pidlItem,
757         [in] SVSIF uFlags);
758     HRESULT GetItemObject(
759         [in] UINT uItem,
760         [in] REFIID riid,
761         [out, iid_is(riid)] void **ppv);
762 }
763
764 [
765     object,
766     uuid(88e39e80-3578-11cf-ae69-08002b2e1262),
767     pointer_default(unique)
768 ]
769 interface IShellView2 : IShellView
770 {
771     typedef GUID SHELLVIEWID;
772 cpp_quote("#include <pshpack8.h>")
773     typedef struct _SV2CVW2_PARAMS
774     {
775         DWORD cbSize;
776         IShellView *psvPrev;
777         LPCFOLDERSETTINGS pfs;
778         IShellBrowser *psbOwner;
779         RECT *prcView;
780         SHELLVIEWID const *pvid;
781         HWND hwndView;
782     } SV2CVW2_PARAMS, *LPSV2CVW2_PARAMS;
783 cpp_quote("#include <poppack.h>")
784
785     HRESULT GetView(
786         [in, out] SHELLVIEWID *view_guid,
787         [in] ULONG view_type
788     );
789     HRESULT CreateViewWindow2(
790         [in] LPSV2CVW2_PARAMS view_params
791     );
792     HRESULT HandleRename(
793         [in] LPCITEMIDLIST new_pidl
794     );
795     HRESULT SelectAndPositionItem(
796         [in] LPCITEMIDLIST item,
797         [in] UINT flags,
798         [in] POINT *point
799     );
800 }
801
802 /*****************************************************************************
803  * IFolderView interface
804  */
805 [
806     uuid(cde725b0-ccc9-4519-917e-325d72fab4ce),
807     object,
808     pointer_default(unique)
809 ]
810 interface IFolderView : IUnknown
811 {
812     HRESULT GetCurrentViewMode( [out] UINT *mode );
813     HRESULT SetCurrentViewMode( [in] UINT mode );
814     HRESULT GetFolder( [in] REFIID riid, [out, iid_is(riid)] void **ppv );
815     HRESULT Item(
816         [in] int index,
817         [out] PITEMID_CHILD *ppidl
818     );
819     HRESULT ItemCount(
820         [in] UINT flags,
821         [out] int *items
822     );
823     HRESULT Items(
824         [in] UINT flags,
825         [in] REFIID riid,
826         [out, iid_is(riid)] void **ppv
827     );
828     HRESULT GetSelectionMarkedItem( [out] int *item );
829     HRESULT GetFocusedItem( [out] int *item );
830     HRESULT GetItemPosition(
831         [in] PCUITEMID_CHILD pidl,
832         [out] POINT* ppt
833     );
834     HRESULT GetSpacing( [in, out, unique] POINT* pt );
835     HRESULT GetDefaultSpacing( [out] POINT* pt );
836     HRESULT GetAutoArrange();
837     HRESULT SelectItem(
838         [in] int item,
839         [in] DWORD flags
840     );
841     HRESULT SelectAndPositionItems(
842         [in] UINT cidl,
843         [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl,
844         [in, unique, size_is(cidl)] POINT* apt,
845         [in] DWORD flags
846     );
847 }
848
849 /*****************************************************************************
850  * IShellBrowser interface
851  */
852 [
853     object,
854     uuid(000214e2-0000-0000-c000-000000000046),
855     pointer_default(unique)
856 ]
857 interface IShellBrowser : IOleWindow
858 {
859     typedef IShellBrowser *LPSHELLBROWSER;
860
861 cpp_quote("#define SBSP_DEFBROWSER            0x00000000")
862 cpp_quote("#define SBSP_SAMEBROWSER           0x00000001")
863 cpp_quote("#define SBSP_NEWBROWSER            0x00000002")
864 cpp_quote("#define SBSP_DEFMODE               0x00000000")
865 cpp_quote("#define SBSP_OPENMODE              0x00000010")
866 cpp_quote("#define SBSP_EXPLOREMODE           0x00000020")
867 cpp_quote("#define SBSP_HELPMODE              0x00000040")
868 cpp_quote("#define SBSP_NOTRANSFERHIST        0x00000080")
869 cpp_quote("#define SBSP_ABSOLUTE              0x00000000")
870 cpp_quote("#define SBSP_RELATIVE              0x00001000")
871 cpp_quote("#define SBSP_PARENT                0x00002000")
872 cpp_quote("#define SBSP_NAVIGATEBACK          0x00004000")
873 cpp_quote("#define SBSP_NAVIGATEFORWARD       0x00008000")
874 cpp_quote("#define SBSP_ALLOW_AUTONAVIGATE    0x00010000")
875 cpp_quote("#define SBSP_KEEPSAMETEMPLATE      0x00020000")
876 cpp_quote("#define SBSP_KEEPWORDWHEELTEXT     0x00040000")
877 cpp_quote("#define SBSP_ACTIVATE_NOFOCUS      0x00080000")
878 cpp_quote("#define SBSP_CREATENOHISTORY       0x00100000")
879 cpp_quote("#define SBSP_PLAYNOSOUND           0x00200000")
880 cpp_quote("#define SBSP_CALLERUNTURUSTED      0x00800000")
881 cpp_quote("#define SBSP_TRUSTFIRSTDOWNLOAD    0x01000000")
882 cpp_quote("#define SBSP_UNTRUSTEDFORDOWNLOAD  0x02000000")
883 cpp_quote("#define SBSP_NOAUTOSELECT          0x04000000")
884 cpp_quote("#define SBSP_WRITENOHISTORY        0x08000000")
885 cpp_quote("#define SBSP_TRUSTEDFORACTIVEX     0x10000000")
886 cpp_quote("#define SBSP_FEEDNAVIGATION        0x20000000")
887 cpp_quote("#define SBSP_REDIRECT              0x40000000")
888 cpp_quote("#define SBSP_INITIATEDBYHLINKFRAME 0x80000000")
889
890 cpp_quote("#define FCW_STATUS      0x0001")
891 cpp_quote("#define FCW_TOOLBAR     0x0002")
892 cpp_quote("#define FCW_TREE        0x0003")
893 cpp_quote("#define FCW_INTERNETBAR 0x0006")
894 cpp_quote("#define FCW_PROGRESS    0x0008")
895
896 cpp_quote("#define FCT_MERGE       0x0001")
897 cpp_quote("#define FCT_CONFIGABLE  0x0002")
898 cpp_quote("#define FCT_ADDTOEND    0x0004")
899
900 cpp_quote("#if 0")
901     typedef LPARAM LPTBBUTTONSB;
902 cpp_quote("#else")
903 cpp_quote("#include <commctrl.h>")
904 cpp_quote("typedef LPTBBUTTON LPTBBUTTONSB;")
905 cpp_quote("#endif")
906
907     HRESULT InsertMenusSB(
908         [in] HMENU hmenuShared,
909         [in, out] LPOLEMENUGROUPWIDTHS lpMenuWidths);
910
911     HRESULT SetMenuSB(
912         [in] HMENU hmenuShared,
913         [in] HOLEMENU holemenuReserved,
914         [in] HWND hwndActiveObject);
915
916     HRESULT RemoveMenusSB( [in] HMENU hmenuShared );
917     HRESULT SetStatusTextSB( [in, unique] LPCOLESTR pszStatusText );
918     HRESULT EnableModelessSB( [in] BOOL fEnable );
919     HRESULT TranslateAcceleratorSB( [in] MSG *pmsg, [in] WORD wID );
920
921     HRESULT BrowseObject(
922         [in] LPCITEMIDLIST pidl,
923         [in] UINT wFlags);
924
925     HRESULT GetViewStateStream(
926         [in] DWORD grfMode,
927         [out] IStream **ppStrm);
928
929     HRESULT GetControlWindow(
930         [in] UINT id,
931         [out] HWND *phwnd);
932
933     [local] HRESULT SendControlMsg(
934         [in] UINT id,
935         [in] UINT uMsg,
936         [in] WPARAM wParam,
937         [in] LPARAM lParam,
938         [in] LRESULT *pret);
939
940     HRESULT QueryActiveShellView( [out] IShellView **ppshv );
941     HRESULT OnViewWindowActive( [in] IShellView *pshv );
942
943     [local]
944     HRESULT SetToolbarItems(
945         [in] LPTBBUTTONSB lpButtons,
946         [in] UINT nButtons,
947         [in] UINT uFlags);
948 }
949
950
951 /*****************************************************************************
952  * IShellLinkA interface
953  */
954 [
955     object,
956     uuid(000214ee-0000-0000-c000-000000000046),
957     pointer_default(unique)
958 ]
959 interface IShellLinkA : IUnknown
960 {
961     typedef enum
962     {
963         SLR_NO_UI               = 0x0001,
964         SLR_ANY_MATCH           = 0x0002,
965         SLR_UPDATE              = 0x0004,
966         SLR_NOUPDATE            = 0x0008,
967         SLR_NOSEARCH            = 0x0010,
968         SLR_NOTRACK             = 0x0020,
969         SLR_NOLINKINFO          = 0x0040,
970         SLR_INVOKE_MSI          = 0x0080,
971         SLR_NO_UI_WITH_MSG_PUMP = 0x0101,
972     } SLR_FLAGS;
973
974     typedef enum
975     {
976         SLGP_SHORTPATH   = 0x0001,
977         SLGP_UNCPRIORITY = 0x0002,
978         SLGP_RAWPATH     = 0x0004,
979     } SLGP_FLAGS;
980
981     HRESULT GetPath(
982         [out, size_is(cch)] LPSTR pszFile,
983         [in] int cch,
984         [in, out, unique] WIN32_FIND_DATAA *pfd,
985         [in] DWORD fFlags);
986
987     HRESULT GetIDList( [out] LPITEMIDLIST * ppidl );
988
989     HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
990
991     HRESULT GetDescription(
992         [out, size_is(cch)] LPSTR pszName,
993         [in] int cch);
994
995     HRESULT SetDescription( [in] LPCSTR pszName );
996
997     HRESULT GetWorkingDirectory(
998         [out, size_is(cch)] LPSTR pszDir,
999         [in] int cch);
1000
1001     HRESULT SetWorkingDirectory( [in] LPCSTR pszDir );
1002
1003     HRESULT GetArguments(
1004         [out, size_is(cch)] LPSTR pszArgs,
1005         [in] int cch);
1006
1007     HRESULT SetArguments( [in] LPCSTR pszArgs );
1008
1009     HRESULT GetHotkey( [out] WORD *pwHotkey );
1010
1011     HRESULT SetHotkey( [in] WORD wHotkey );
1012
1013     HRESULT GetShowCmd( [out] int *piShowCmd );
1014
1015     HRESULT SetShowCmd( [in] int iShowCmd );
1016
1017     HRESULT GetIconLocation(
1018         [out, size_is(cch)] LPSTR pszIconPath,
1019         [in] int cch,
1020         [out] int *piIcon);
1021
1022     HRESULT SetIconLocation(
1023         [in] LPCSTR pszIconPath,
1024         [in] int iIcon);
1025
1026     HRESULT SetRelativePath(
1027         [in] LPCSTR pszPathRel,
1028         [in] DWORD dwReserved);
1029
1030     HRESULT Resolve(
1031         [in] HWND hwnd,
1032         [in] DWORD fFlags);
1033
1034     HRESULT SetPath( [in] LPCSTR pszFile );
1035 }
1036
1037
1038 /*****************************************************************************
1039  * IShellLinkW interface
1040  */
1041 [
1042     object,
1043     uuid(000214f9-0000-0000-c000-000000000046),
1044     pointer_default(unique)
1045 ]
1046 interface IShellLinkW : IUnknown
1047 {
1048     HRESULT GetPath(
1049         [out, size_is(cch)] LPWSTR pszFile,
1050         [in] int cch,
1051         [in, out] WIN32_FIND_DATAW *pfd,
1052         [in] DWORD fFlags);
1053
1054     HRESULT GetIDList( [out] LPITEMIDLIST * ppidl );
1055
1056     HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
1057
1058     HRESULT GetDescription(
1059         [out, size_is(cch)] LPWSTR pszName,
1060         [in] int cch);
1061
1062     HRESULT SetDescription( [in] LPCWSTR pszName );
1063
1064     HRESULT GetWorkingDirectory(
1065         [out, size_is(cch)] LPWSTR pszDir,
1066         [in] int cch);
1067
1068     HRESULT SetWorkingDirectory( [in] LPCWSTR pszDir );
1069
1070     HRESULT GetArguments(
1071         [out, size_is(cch)] LPWSTR pszArgs,
1072         [in] int cch);
1073
1074     HRESULT SetArguments( [in] LPCWSTR pszArgs );
1075
1076     HRESULT GetHotkey( [out] WORD *pwHotkey );
1077
1078     HRESULT SetHotkey( [in] WORD wHotkey );
1079
1080     HRESULT GetShowCmd( [out] int *piShowCmd );
1081
1082     HRESULT SetShowCmd( [in] int iShowCmd );
1083
1084     HRESULT GetIconLocation(
1085         [out, size_is(cch)] LPWSTR pszIconPath,
1086         [in] int cch,
1087         [out] int *piIcon);
1088
1089     HRESULT SetIconLocation(
1090         [in] LPCWSTR pszIconPath,
1091         [in] int iIcon);
1092
1093     HRESULT SetRelativePath(
1094         [in] LPCWSTR pszPathRel,
1095         [in] DWORD dwReserved);
1096
1097     HRESULT Resolve(
1098         [in] HWND hwnd,
1099         [in] DWORD fFlags);
1100
1101     HRESULT SetPath( [in] LPCWSTR pszFile );
1102 }
1103
1104 cpp_quote("#define IShellLink WINELIB_NAME_AW(IShellLink)")
1105
1106
1107 /*****************************************************************************
1108  * IShellExtInit interface
1109  */
1110 [
1111     object,
1112     uuid(000214e8-0000-0000-c000-000000000046),
1113     pointer_default(unique),
1114     local
1115 ]
1116 interface IShellExtInit : IUnknown
1117 {
1118     typedef IShellExtInit *LPSHELLEXTINIT;
1119
1120     HRESULT Initialize(
1121         [in] LPCITEMIDLIST pidlFolder,
1122         [in] IDataObject *pdtobj,
1123         [in] HKEY hkeyProgID);
1124 }
1125
1126
1127 /*******************************************************************************/
1128 /* Note: the following interfaces are not in shobjidl.idl under Windows, they  */
1129 /* are declared directly in shlobj.h. It hopefully won't break anything to put */
1130 /* them here anyway.                                                           */
1131 /*******************************************************************************/
1132
1133 #ifndef MAX_PATH
1134 #define MAX_PATH 260
1135 #endif
1136
1137
1138 /*****************************************************************************
1139  * IPersistFolder3 interface
1140  */
1141 [
1142     object,
1143     uuid(cef04fdf-fe72-11d2-87a5-00c04f6837cf),
1144     pointer_default(unique)
1145 ]
1146 interface IPersistFolder3 : IPersistFolder2
1147 {
1148     typedef struct
1149     {
1150         LPITEMIDLIST    pidlTargetFolder;
1151         WCHAR           szTargetParsingName[MAX_PATH];
1152         WCHAR           szNetworkProvider[MAX_PATH];
1153         DWORD           dwAttributes;
1154         int             csidl;
1155     } PERSIST_FOLDER_TARGET_INFO;
1156
1157     HRESULT InitializeEx(
1158         [in] IBindCtx *pbc,
1159         [in] LPCITEMIDLIST pidlRoot,
1160         [in] const PERSIST_FOLDER_TARGET_INFO *ppfti);
1161
1162     HRESULT GetFolderTargetInfo( [out] PERSIST_FOLDER_TARGET_INFO *ppfti );
1163 }
1164
1165
1166 /*****************************************************************************
1167  * IExtractIconA interface
1168  */
1169 [
1170     object,
1171     uuid(000214eb-0000-0000-c000-000000000046),
1172     pointer_default(unique),
1173     local
1174 ]
1175 interface IExtractIconA : IUnknown
1176 {
1177 cpp_quote("#define GIL_OPENICON     0x0001")
1178 cpp_quote("#define GIL_FORSHELL     0x0002")
1179 cpp_quote("#define GIL_ASYNC        0x0020")
1180 cpp_quote("#define GIL_DEFAULTICON  0x0040")
1181 cpp_quote("#define GIL_FORSHORTCUT  0x0080")
1182
1183 cpp_quote("#define GIL_SIMULATEDOC  0x0001")
1184 cpp_quote("#define GIL_PERINSTANCE  0x0002")
1185 cpp_quote("#define GIL_PERCLASS     0x0004")
1186 cpp_quote("#define GIL_NOTFILENAME  0x0008")
1187 cpp_quote("#define GIL_DONTCACHE    0x0010")
1188
1189     typedef IExtractIconA *LPEXTRACTICONA;
1190
1191     HRESULT GetIconLocation(
1192         [in] UINT uFlags,
1193         [out, size_is(cchMax)] LPSTR szIconFile,
1194         [in] UINT cchMax,
1195         [out] INT *piIndex,
1196         [out] UINT *pwFlags);
1197
1198     HRESULT Extract(
1199         [in] LPCSTR pszFile,
1200         [in] UINT nIconIndex,
1201         [out] HICON *phiconLarge,
1202         [out] HICON *phiconSmall,
1203         [in] UINT nIconSize );
1204 }
1205
1206
1207 /*****************************************************************************
1208  * IExtractIconW interface
1209  */
1210 [
1211     object,
1212     uuid(000214fa-0000-0000-c000-000000000046),
1213     pointer_default(unique),
1214     local
1215 ]
1216 interface IExtractIconW : IUnknown
1217 {
1218     typedef IExtractIconW *LPEXTRACTICONW;
1219
1220     HRESULT GetIconLocation(
1221         [in] UINT uFlags,
1222         [out, size_is(cchMax)] LPWSTR szIconFile,
1223         [in] UINT cchMax,
1224         [out] INT *piIndex,
1225         [out] UINT *pwFlags);
1226
1227     HRESULT Extract(
1228         [in] LPCWSTR pszFile,
1229         [in] UINT nIconIndex,
1230         [out] HICON *phiconLarge,
1231         [out] HICON *phiconSmall,
1232         [in] UINT nIconSize );
1233 }
1234
1235 cpp_quote("#define LPEXTRACTICON WINELIB_NAME_AW(LPEXTRACTICON)")
1236 cpp_quote("#define IExtractIcon WINELIB_NAME_AW(IExtractIcon)")
1237
1238
1239 /*****************************************************************************
1240  * ICommDlgBrowser interface
1241  */
1242 [
1243     object,
1244     uuid(000214f1-0000-0000-c000-000000000046),
1245     pointer_default(unique)
1246 ]
1247 interface ICommDlgBrowser : IUnknown
1248 {
1249 cpp_quote("#define CDBOSC_SETFOCUS     0x00000000")
1250 cpp_quote("#define CDBOSC_KILLFOCUS    0x00000001")
1251 cpp_quote("#define CDBOSC_SELCHANGE    0x00000002")
1252 cpp_quote("#define CDBOSC_RENAME       0x00000003")
1253 cpp_quote("#define CDBOSC_STATECHANGE  0x00000004")
1254
1255     typedef ICommDlgBrowser *LPCOMMDLGBROWSER;
1256
1257     HRESULT OnDefaultCommand( [in] IShellView *shv );
1258     HRESULT OnStateChange( [in] IShellView *shv, [in] ULONG uChange );
1259     HRESULT IncludeObject( [in] IShellView *shv, [in] LPCITEMIDLIST pidl );
1260 }
1261
1262
1263 /*****************************************************************************
1264  * ICommDlgBrowser2 interface
1265  */
1266 [
1267  object,
1268  uuid(10339516-2894-11D2-9039-00C04F8EEB3E),
1269  pointer_default(unique)
1270 ]
1271 interface ICommDlgBrowser2 : ICommDlgBrowser
1272 {
1273
1274     HRESULT Notify(
1275         [in] IShellView *ppshv,
1276         [in] DWORD dwNotifyType);
1277
1278     HRESULT GetDefaultMenuText(
1279         [in] IShellView *ppshv,
1280         [out, string, size_is(cchMax)] LPWSTR pszText,
1281         [in] int cchMax);
1282
1283     HRESULT GetViewFlags(
1284         [out] DWORD *pdwFlags);
1285 }
1286
1287
1288 /*****************************************************************************
1289  * ICommDlgBrowser3 interface
1290  */
1291 [
1292  object,
1293  uuid(C8AD25A1-3294-41EE-8165-71174BD01C57),
1294  pointer_default(unique)
1295 ]
1296 interface ICommDlgBrowser3 : ICommDlgBrowser2
1297 {
1298
1299     HRESULT OnColumnClicked(
1300         [in] IShellView *ppshv,
1301         [in] int iColumn);
1302
1303     HRESULT GetCurrentFilter(
1304         [out, string, size_is(cchFileSpec)] LPWSTR pszFileSpec,
1305         [in] int cchFileSpec);
1306
1307     HRESULT OnPreviewCreated(
1308         [in] IShellView *ppshv);
1309 }
1310
1311 /*****************************************************************************
1312  * IDockingWindow interface
1313  */
1314 [
1315     object,
1316     uuid(012dd920-7b26-11d0-8ca9-00a0c92dbfe8)
1317 ]
1318 interface IDockingWindow : IOleWindow
1319 {
1320     HRESULT ShowDW(
1321         [in] BOOL fShow);
1322
1323     HRESULT CloseDW(
1324         [in] DWORD dwReserved);
1325
1326     HRESULT ResizeBorderDW(
1327         [in] LPCRECT prcBorder,
1328         [in] IUnknown *punkToolbarSite,
1329         [in] BOOL fReserved);
1330 };
1331
1332
1333 /*****************************************************************************
1334  * IDockingWindowFrame interface
1335  */
1336 [
1337     object,
1338     uuid(47d2657a-7b27-11d0-8ca9-00a0c92dbfe8),
1339     pointer_default(unique),
1340     local
1341 ]
1342 interface IDockingWindowFrame : IOleWindow
1343 {
1344 cpp_quote("#define DWFRF_NORMAL           0x0000")
1345 cpp_quote("#define DWFRF_DELETECONFIGDATA 0x0001")
1346 cpp_quote("#define DWFAF_HIDDEN           0x0001")
1347
1348     HRESULT AddToolbar(
1349         [in] IUnknown *punkSrc,
1350         [in] LPCWSTR pwszItem,
1351         [in] DWORD dwAddFlags);
1352
1353     HRESULT RemoveToolbar(
1354         [in] IUnknown *punkSrc,
1355         [in] DWORD dwRemoveFlags);
1356
1357     HRESULT FindToolbar(
1358         [in] LPCWSTR pwszItem,
1359         [in] REFIID riid,
1360         [out] LPVOID *ppvObj);
1361 }
1362
1363
1364 /*****************************************************************************
1365  * IDragSourceHelper interface
1366  */
1367 [
1368     object,
1369     uuid(de5bf786-477a-11d2-839d-00c04fd918d0),
1370     pointer_default(unique),
1371     local
1372 ]
1373 interface IDragSourceHelper : IUnknown
1374 {
1375     typedef struct
1376     {
1377         SIZE     sizeDragImage;
1378         POINT    ptOffset;
1379         HBITMAP  hbmpDragImage;
1380         COLORREF crColorKey;
1381     } SHDRAGIMAGE, *LPSHDRAGIMAGE;
1382
1383   HRESULT InitializeFromBitmap(
1384       [in] LPSHDRAGIMAGE pshdi,
1385       [in] IDataObject *pDataObject);
1386
1387   HRESULT InitializeFromWindow(
1388       [in] HWND hwnd,
1389       [in] POINT *ppt,
1390       [in] IDataObject *pDataObject);
1391 }
1392
1393
1394 /*****************************************************************************
1395  * IDropTargetHelper interface
1396  */
1397 [
1398     object,
1399     uuid(4657278b-411b-11d2-839a-00c04fd918d0),
1400     pointer_default(unique),
1401     local
1402 ]
1403 interface IDropTargetHelper : IUnknown
1404 {
1405     HRESULT DragEnter(
1406         [in] HWND hwndTarget,
1407         [in] IDataObject *pDataObject,
1408         [in] POINT *ppt,
1409         [in] DWORD dwEffect);
1410
1411     HRESULT DragLeave();
1412
1413     HRESULT DragOver(
1414         [in] POINT *ppt,
1415         [in] DWORD dwEffect);
1416
1417     HRESULT Drop(
1418         [in] IDataObject *pDataObject,
1419         [in] POINT *ppt,
1420         [in] DWORD dwEffect);
1421
1422     HRESULT Show( [in] BOOL fShow );
1423 }
1424
1425
1426 /*****************************************************************************
1427  * IContextMenu interface
1428  */
1429 [
1430     object,
1431     uuid(000214e4-0000-0000-c000-000000000046),
1432     pointer_default(unique),
1433     local
1434 ]
1435 interface IContextMenu : IUnknown
1436 {
1437 cpp_quote("#define CMF_NORMAL        0x00000000")
1438 cpp_quote("#define CMF_DEFAULTONLY   0x00000001")
1439 cpp_quote("#define CMF_VERBSONLY     0x00000002")
1440 cpp_quote("#define CMF_EXPLORE       0x00000004")
1441 cpp_quote("#define CMF_NOVERBS       0x00000008")
1442 cpp_quote("#define CMF_CANRENAME     0x00000010")
1443 cpp_quote("#define CMF_NODEFAULT     0x00000020")
1444 cpp_quote("#define CMF_INCLUDESTATIC 0x00000040")
1445 cpp_quote("#define CMF_EXTENDEDVERBS 0x00000100")
1446 cpp_quote("#define CMF_RESERVED      0xffff0000")
1447
1448 cpp_quote("#define GCS_VERBA         0x00000000")
1449 cpp_quote("#define GCS_HELPTEXTA     0x00000001")
1450 cpp_quote("#define GCS_VALIDATEA     0x00000002")
1451 cpp_quote("#define GCS_VERBW         0x00000004")
1452 cpp_quote("#define GCS_HELPTEXTW     0x00000005")
1453 cpp_quote("#define GCS_VALIDATEW     0x00000006")
1454 cpp_quote("#define GCS_UNICODE       0x00000004")
1455 cpp_quote("#define GCS_VERB          WINELIB_NAME_AW(GCS_VERB)")
1456 cpp_quote("#define GCS_HELPTEXT      WINELIB_NAME_AW(GCS_HELPTEXT)")
1457 cpp_quote("#define GCS_VALIDATE      WINELIB_NAME_AW(GCS_VALIDATE)")
1458
1459 cpp_quote("#define CMDSTR_NEWFOLDERA   \"NewFolder\"")
1460 cpp_quote("#define CMDSTR_VIEWLISTA    \"ViewList\"")
1461 cpp_quote("#define CMDSTR_VIEWDETAILSA \"ViewDetails\"")
1462 cpp_quote("#if defined(__GNUC__)")
1463 cpp_quote("# define CMDSTR_NEWFOLDERW (const WCHAR []){ 'N','e','w','F','o','l','d','e','r',0 }")
1464 cpp_quote("# define CMDSTR_VIEWLISTW (const WCHAR []){ 'V','i','e','w','L','i','s','t',0 }")
1465 cpp_quote("# define CMDSTR_VIEWDETAILSW (const WCHAR []){ 'V','i','e','w','D','e','t','a','i','l','s',0 }")
1466 cpp_quote("#elif defined(_MSC_VER)")
1467 cpp_quote("# define CMDSTR_NEWFOLDERW   L\"NewFolder\"")
1468 cpp_quote("# define CMDSTR_VIEWLISTW    L\"ViewList\"")
1469 cpp_quote("# define CMDSTR_VIEWDETAILSW L\"ViewDetails\"")
1470 cpp_quote("#else")
1471 cpp_quote("static const WCHAR CMDSTR_NEWFOLDERW[] = {'N','e','w','F','o','l','d','e','r',0};")
1472 cpp_quote("static const WCHAR CMDSTR_VIEWLISTW [] = {'V','i','e','w','L','i','s','t',0};")
1473 cpp_quote("static const WCHAR CMDSTR_VIEWDETAILSW[] = {'V','i','e','w','D','e','t','a','i','l','s',0};")
1474 cpp_quote("#endif")
1475 cpp_quote("#define CMDSTR_NEWFOLDER    WINELIB_NAME_AW(CMDSTR_NEWFOLDER)")
1476 cpp_quote("#define CMDSTR_VIEWLIST     WINELIB_NAME_AW(CMDSTR_VIEWLIST)")
1477 cpp_quote("#define CMDSTR_VIEWDETAILS  WINELIB_NAME_AW(CMDSTR_VIEWDETAILS)")
1478
1479 cpp_quote("#define CMIC_MASK_HOTKEY         SEE_MASK_HOTKEY")
1480 cpp_quote("#define CMIC_MASK_ICON           SEE_MASK_ICON")
1481 cpp_quote("#define CMIC_MASK_FLAG_NO_UI     SEE_MASK_FLAG_NO_UI")
1482 cpp_quote("#define CMIC_MASK_UNICODE        SEE_MASK_UNICODE")
1483 cpp_quote("#define CMIC_MASK_NO_CONSOLE     SEE_MASK_NO_CONSOLE")
1484 cpp_quote("#define CMIC_MASK_HASLINKNAME    SEE_MASK_HASLINKNAME")
1485 cpp_quote("#define CMIC_MASK_FLAG_SEP_VDM   SEE_MASK_FLAG_SEPVDM")
1486 cpp_quote("#define CMIC_MASK_HASTITLE       SEE_MASK_HASTITLE")
1487 cpp_quote("#define CMIC_MASK_ASYNCOK        SEE_MASK_ASYNCOK")
1488 cpp_quote("#define CMIC_MASK_NOASYNC        SEE_MASK_NOASYNC")
1489 cpp_quote("#define CMIC_MASK_SHIFT_DOWN     0x10000000")
1490 cpp_quote("#define CMIC_MASK_PTINVOKE       0x20000000")
1491 cpp_quote("#define CMIC_MASK_CONTROL_DOWN   0x40000000")
1492 cpp_quote("#define CMIC_MASK_FLAG_LOG_USAGE SEE_MASK_FLAG_LOG_USAGE")
1493 cpp_quote("#define CMIC_MASK_NOZONECHECKS   SEE_MASK_NOZONECHECKS")
1494
1495     typedef IContextMenu *LPCONTEXTMENU;
1496
1497     typedef struct tagCMINVOKECOMMANDINFO
1498     {
1499         DWORD cbSize;
1500         DWORD fMask;
1501         HWND hwnd;
1502         LPCSTR lpVerb;
1503         LPCSTR lpParameters;
1504         LPCSTR lpDirectory;
1505         INT nShow;
1506         DWORD dwHotKey;
1507         HANDLE hIcon;
1508     } CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
1509
1510     typedef struct tagCMInvokeCommandInfoEx
1511     {
1512         DWORD cbSize;
1513         DWORD fMask;
1514         HWND hwnd;
1515         LPCSTR lpVerb;
1516         LPCSTR lpParameters;
1517         LPCSTR lpDirectory;
1518         INT nShow;
1519         DWORD dwHotKey;
1520         HANDLE hIcon;
1521         LPCSTR lpTitle;
1522         LPCWSTR lpVerbW;
1523         LPCWSTR lpParametersW;
1524         LPCWSTR lpDirectoryW;
1525         LPCWSTR lpTitleW;
1526         POINT ptInvoke;
1527     } CMINVOKECOMMANDINFOEX, *LPCMINVOKECOMMANDINFOEX;
1528
1529     HRESULT QueryContextMenu(
1530         [in] HMENU hmenu,
1531         [in] UINT indexMenu,
1532         [in] UINT idCmdFirst,
1533         [in] UINT idCmdLast,
1534         [in] UINT uFlags);
1535
1536     HRESULT InvokeCommand( [in] LPCMINVOKECOMMANDINFO lpici );
1537
1538     HRESULT GetCommandString(
1539         [in] UINT_PTR idCmd,
1540         [in] UINT uType,
1541         [out] UINT *pwReserved,
1542         [out, size_is(cchMax)] LPSTR pszName,
1543         [in] UINT cchMax);
1544 }
1545
1546
1547 /*****************************************************************************
1548  * IContextMenu2 interface
1549  */
1550 [
1551     object,
1552     uuid(000214f4-0000-0000-c000-000000000046),
1553     pointer_default(unique),
1554     local
1555 ]
1556 interface IContextMenu2 : IContextMenu
1557 {
1558     typedef IContextMenu2 *LPCONTEXTMENU2;
1559
1560     HRESULT HandleMenuMsg(
1561         [in] UINT uMsg,
1562         [in] WPARAM wParam,
1563         [in] LPARAM lParam);
1564 }
1565
1566
1567 /*****************************************************************************
1568  * IContextMenu3 interface
1569  */
1570 [
1571     object,
1572     uuid(bcfce0a0-ec17-11d0-8d10-00a0c90f2719),
1573     pointer_default(unique),
1574     local
1575 ]
1576 interface IContextMenu3 : IContextMenu2
1577 {
1578     typedef IContextMenu3 *LPCONTEXTMENU3;
1579
1580     HRESULT HandleMenuMsg2(
1581         [in] UINT uMsg,
1582         [in] WPARAM wParam,
1583         [in] LPARAM lParam,
1584         [out] LRESULT *plResult);
1585 }
1586
1587
1588 /*****************************************************************************
1589  * IShellExecuteHookA interface
1590  */
1591 [
1592     object,
1593     uuid(000214f5-0000-0000-c000-000000000046),
1594     pointer_default(unique),
1595     local
1596 ]
1597 interface IShellExecuteHookA : IUnknown
1598 {
1599     cpp_quote("struct _SHELLEXECUTEINFOA;")
1600     HRESULT Execute(
1601         [in, out] struct _SHELLEXECUTEINFOA* pei);
1602 }
1603
1604
1605 /*****************************************************************************
1606  * IShellExecuteHookW interface
1607  */
1608 [
1609     object,
1610     uuid(000214fb-0000-0000-c000-000000000046),
1611     pointer_default(unique),
1612     local
1613 ]
1614 interface IShellExecuteHookW : IUnknown
1615 {
1616     cpp_quote("struct _SHELLEXECUTEINFOW;")
1617     HRESULT Execute(
1618                 [in, out] struct _SHELLEXECUTEINFOW* pei);
1619 }
1620
1621 /*****************************************************************************
1622  * IShellLinkDataList interface
1623  */
1624 [
1625     object,
1626     uuid(45e2b4ae-b1c3-11d0-b92f-00a0c90312e1),
1627     pointer_default(unique)
1628 ]
1629 interface IShellLinkDataList : IUnknown
1630 {
1631     [local] HRESULT AddDataBlock(
1632                 [in] void *pDataBlock);
1633     [local] HRESULT CopyDataBlock(
1634                 [in] DWORD dwSig,
1635                 [out] void **ppDataBlock);
1636     HRESULT RemoveDataBlock(
1637                 [in] DWORD dwSig);
1638     HRESULT GetFlags(
1639                 [out] DWORD *pdwFlags);
1640     HRESULT SetFlags(
1641                 [in] DWORD dwFlags);
1642 }
1643
1644
1645 /*****************************************************************************
1646  * IResolveShellLink interface
1647  */
1648 [
1649     object,
1650     uuid(5cd52983-9449-11d2-963a-00c04f79adf0),
1651     pointer_default(unique)
1652 ]
1653 interface IResolveShellLink : IUnknown
1654 {
1655     HRESULT ResolveShellLink(
1656                 [in] IUnknown *punk,
1657                 [in] HWND hwnd,
1658                 [in] DWORD fFlags);
1659 }
1660
1661
1662 /*****************************************************************************
1663  * IURLSearchHook interface
1664  */
1665 [
1666     object,
1667     uuid(ac60f6a0-0fd9-11d0-99cb-00c04fd64497),
1668     pointer_default(unique),
1669     local
1670 ]
1671 interface IURLSearchHook : IUnknown
1672 {
1673     HRESULT Translate(
1674                 [in, out] LPWSTR lpwszSearchURL,
1675                 [in] DWORD cchBufferSize);
1676 }
1677
1678
1679 /*****************************************************************************
1680  * ISearchContext interface
1681  */
1682 [
1683     object,
1684     uuid(09f656a2-41af-480c-88f7-16cc0d164615),
1685     pointer_default(unique),
1686     local
1687 ]
1688 interface ISearchContext : IUnknown
1689 {
1690     HRESULT GetSearchUrl(
1691                 [in] BSTR *pbstrSearchUrl);
1692     HRESULT GetSearchText(
1693                 [in] BSTR *pbstrSearchText);
1694     HRESULT GetSearchStyle(
1695                 [in] BSTR *pdwSearchStyle);
1696 }
1697
1698
1699 /*****************************************************************************
1700  * IURLSearchHook2 interface
1701  */
1702 [
1703     object,
1704     uuid(5ee44da4-6d32-46e3-86bc-07540dedd0e0),
1705     pointer_default(unique),
1706     local
1707 ]
1708 interface IURLSearchHook2 : IURLSearchHook
1709 {
1710     HRESULT TranslateWithSearchContext(
1711                 [in, out] LPWSTR lpwszSearchURL,
1712                 [in] DWORD cchBufferSize,
1713                 [in] ISearchContext *pSearchContext);
1714 }
1715
1716
1717 cpp_quote("#define INewShortcutHook WINELIB_NAME_AW(INewShortcutHook)")
1718
1719 /*****************************************************************************
1720  * INewShortcutHookA interface
1721  */
1722 [
1723     object,
1724     uuid(000214e1-0000-0000-c000-000000000046),
1725     pointer_default(unique),
1726     local
1727 ]
1728 interface INewShortcutHookA : IUnknown
1729 {
1730     HRESULT SetReferent(
1731                 [in] LPCSTR pcszReferent,
1732                 [in] HWND hwnd);
1733     HRESULT GetReferent(
1734                 [out] LPSTR pcszReferent,
1735                 [in] int cchReferent);
1736     HRESULT SetFolder(
1737                 [in] LPCSTR pcszReferent);
1738     HRESULT GetFolder(
1739                 [out] LPSTR pcszReferent,
1740                 [in] int cchFolder);
1741     HRESULT GetName(
1742                 [out] LPSTR pszName,
1743                 [in] int cchName);
1744     HRESULT GetExtension(
1745                 [out] LPSTR pszExtension,
1746                 [in] int cchExtension);
1747
1748
1749
1750 /*****************************************************************************
1751  * INewShortcutHookW interface
1752  */
1753 [
1754     object,
1755     uuid(000214f7-0000-0000-c000-000000000046),
1756     pointer_default(unique),
1757     local
1758 ]
1759 interface INewShortcutHookW : IUnknown
1760 {
1761     HRESULT SetReferent(
1762                 [in] LPCWSTR pcszReferent,
1763                 [in] HWND hwnd);
1764     HRESULT GetReferent(
1765                 [out] LPWSTR pcszReferent,
1766                 [in] int cchReferent);
1767     HRESULT SetFolder(
1768                 [in] LPCWSTR pcszReferent);
1769     HRESULT GetFolder(
1770                 [out] LPWSTR pcszReferent,
1771                 [in] int cchFolder);
1772     HRESULT GetName(
1773                 [out] LPWSTR pszName,
1774                 [in] int cchName);
1775     HRESULT GetExtension(
1776                 [out] LPWSTR pszExtension,
1777                 [in] int cchExtension);
1778
1779
1780 /*****************************************************************************
1781  * IRunnableTask interface
1782  */
1783 [
1784     object,
1785     uuid(85788d00-6807-11d0-b810-00c04fd706ec),
1786     pointer_default(unique),
1787     local
1788 ]
1789 interface IRunnableTask : IUnknown
1790 {
1791     HRESULT Run();
1792     HRESULT Kill([in] BOOL fWait);
1793     HRESULT Suspend();
1794     HRESULT Resume();
1795     ULONG IsRunning();
1796 }
1797
1798 /*****************************************************************************
1799  * IShellChangeNotify interface
1800  */
1801 [
1802     object,
1803     uuid(d82be2b1-5764-11d0-a96e-00c04fd705a2),
1804     pointer_default(unique),
1805     local
1806 ]
1807 interface IShellChangeNotify : IUnknown
1808 {
1809     HRESULT OnChange(
1810                 [in] LONG lEvent,
1811                 [in] LPCITEMIDLIST pidl1,
1812                 [in] LPCITEMIDLIST pidl2);
1813 }
1814
1815 /*****************************************************************************
1816  * IFileSystemBindData interface
1817  */
1818 [
1819     object,
1820     uuid(01e18d10-4d8b-11d2-855d-006008059367),
1821     pointer_default(unique),
1822     local
1823 ]
1824 interface IFileSystemBindData : IUnknown
1825 {
1826     HRESULT SetFindData(
1827                 [in] const WIN32_FIND_DATAW *pfd);
1828     HRESULT GetFindData(
1829                 [out] WIN32_FIND_DATAW *pfd);
1830 }
1831
1832 /*****************************************************************************
1833  *    ITaskbarList interface
1834  */
1835 [
1836     object,
1837     uuid(56FDF342-FD6D-11d0-958A-006097C9A090),
1838     pointer_default(unique)
1839 ]
1840 interface ITaskbarList : IUnknown
1841 {
1842     HRESULT HrInit();
1843
1844     HRESULT AddTab(
1845         [in] HWND hwnd);
1846
1847     HRESULT DeleteTab(
1848         [in] HWND hwnd);
1849
1850     HRESULT ActivateTab(
1851         [in] HWND hwnd);
1852
1853     HRESULT SetActiveAlt(
1854         [in] HWND hwnd);
1855 }
1856
1857 cpp_quote("EXTERN_C const CLSID CLSID_TaskbarList;")
1858
1859 /*****************************************************************************
1860  *    IAutoCompleteDropDown interface
1861  */
1862 [
1863     object,
1864     uuid(3CD141F4-3C6A-11d2-BCAA-00C04FD929DB),
1865     pointer_default(unique)
1866 ]
1867 interface IAutoCompleteDropDown : IUnknown
1868 {
1869 cpp_quote("#define ACDD_VISIBLE   0x0001")
1870
1871     HRESULT GetDropDownStatus(
1872         [out] DWORD *pdwFlags,
1873         [out, string] LPWSTR *ppwszString);
1874
1875     HRESULT ResetEnumerator();
1876 }
1877
1878 [
1879     object,
1880     uuid(cb728b20-f786-11ce-92ad-00aa00a74cd0),
1881     pointer_default(unique)
1882 ]
1883 interface IProfferService : IUnknown
1884 {
1885     HRESULT ProfferService(
1886         [in] REFGUID service,
1887         [in] IServiceProvider *pService,
1888         [out] DWORD *pCookie);
1889
1890     HRESULT RevokeService([in] DWORD cookie);
1891 }
1892
1893 /*****************************************************************************
1894  * IExplorerBrowserEvents interface
1895  */
1896 [
1897  object,
1898  uuid(361BBDC7-E6EE-4E13-BE58-58E2240C810F)
1899 ]
1900 interface IExplorerBrowserEvents : IUnknown
1901 {
1902     HRESULT OnNavigationPending(
1903         [in] PCIDLIST_ABSOLUTE pidlFolder);
1904
1905     HRESULT OnViewCreated(
1906         [in] IShellView *psv);
1907
1908     HRESULT OnNavigationComplete(
1909         [in] PCIDLIST_ABSOLUTE pidlFolder);
1910
1911     HRESULT OnNavigationFailed(
1912         [in] PCIDLIST_ABSOLUTE pidlFolder);
1913 }
1914
1915 typedef GUID EXPLORERPANE;
1916 typedef EXPLORERPANE *REFEXPLORERPANE;
1917
1918 cpp_quote("#define SID_ExplorerPaneVisibility IID_IExplorerPaneVisibility")
1919
1920 /*****************************************************************************
1921  * IExplorerPaneVisibility interface
1922  */
1923 [
1924  object,
1925  uuid(E07010EC-BC17-44C0-97B0-46C7C95B9EDC)
1926 ]
1927 interface IExplorerPaneVisibility : IUnknown
1928 {
1929     typedef enum tagEXPLORERPANESTATE {
1930         EPS_DONTCARE     = 0x0,
1931         EPS_DEFAULT_ON   = 0x1,
1932         EPS_DEFAULT_OFF  = 0x2,
1933         EPS_STATE_MASK   = 0xffff,
1934         EPS_INITIALSTATE = 0x10000,
1935         EPS_FORCE        = 0x20000
1936     } EXPLORERPANESTATE;
1937
1938     HRESULT GetPaneState(
1939         [in] REFEXPLORERPANE ep,
1940         [out] EXPLORERPANESTATE *peps);
1941 }
1942
1943 typedef [v1_enum] enum tagEXPLORER_BROWSER_FILL_FLAGS {
1944     EBF_NONE                     = 0,
1945     EBF_SELECTFROMDATAOBJECT     = 0x100,
1946     EBF_NODROPTARGET             = 0x200
1947 } EXPLORER_BROWSER_FILL_FLAGS;
1948
1949 typedef [v1_enum] enum tagEXPLORER_BROWSER_OPTIONS {
1950     EBO_NONE               = 0x00,
1951     EBO_NAVIGATEONCE       = 0x01,
1952     EBO_SHOWFRAMES         = 0x02,
1953     EBO_ALWAYSNAVIGATE     = 0x04,
1954     EBO_NOTRAVELLOG        = 0x08,
1955     EBO_NOWRAPPERWINDOW    = 0x10,
1956     EBO_HTMLSHAREPOINTVIEW = 0x20
1957 } EXPLORER_BROWSER_OPTIONS;
1958
1959 cpp_quote("#define SID_SExplorerBrowserFrame IID_ICommDlgBrowser")
1960
1961 /*****************************************************************************
1962  * IExplorerBrowser interface
1963  */
1964 [
1965  object,
1966  uuid(DFD3B6B5-C10C-4BE9-85F6-A66969F402F6),
1967  pointer_default(unique)
1968 ]
1969 interface IExplorerBrowser : IUnknown
1970 {
1971
1972     [local] HRESULT Initialize(
1973         [in] HWND hwndParent,
1974         [in] const RECT *prc,
1975         [in, unique] const FOLDERSETTINGS *pfs);
1976
1977     HRESULT Destroy();
1978
1979     [local] HRESULT SetRect(
1980         [in,out,unique] HDWP *phdwp,
1981         [in] RECT rcBrowser);
1982
1983     HRESULT SetPropertyBag(
1984         [in, string] LPCWSTR pszPropertyBag);
1985
1986     HRESULT SetEmptyText(
1987         [in, string] LPCWSTR pszEmptyText);
1988
1989     HRESULT SetFolderSettings(
1990         [in] const FOLDERSETTINGS *pfs);
1991
1992     HRESULT Advise(
1993         [in] IExplorerBrowserEvents *psbe,
1994         [out] DWORD *pdwCookie);
1995
1996     HRESULT Unadvise(
1997         [in] DWORD dwCookie);
1998
1999     HRESULT SetOptions(
2000         [in] EXPLORER_BROWSER_OPTIONS dwFlag);
2001
2002     HRESULT GetOptions(
2003         [out] EXPLORER_BROWSER_OPTIONS *pdwFlag);
2004
2005     HRESULT BrowseToIDList(
2006         [in] PCUIDLIST_RELATIVE pidl,
2007         [in] UINT uFlags);
2008
2009     HRESULT BrowseToObject(
2010         [in] IUnknown *punk,
2011         [in] UINT uFlags);
2012
2013     HRESULT FillFromObject(
2014         [in] IUnknown *punk,
2015         [in] EXPLORER_BROWSER_FILL_FLAGS dwFlags);
2016
2017     HRESULT RemoveAll();
2018
2019     HRESULT GetCurrentView(
2020         [in] REFIID riid,
2021         [out, iid_is(riid)] void **ppv);
2022 }
2023
2024 /*****************************************************************************
2025  * INameSpaceTreeControl interface
2026  */
2027 [
2028  object,
2029  uuid(028212A3-B627-47E9-8856-C14265554E4F)
2030 ]
2031 interface INameSpaceTreeControl : IUnknown
2032 {
2033     [v1_enum] enum _NSTCSTYLE {
2034         NSTCS_HASEXPANDOS                 = 0x00000001,
2035         NSTCS_HASLINES                    = 0x00000002,
2036         NSTCS_SINGLECLICKEXPAND           = 0x00000004,
2037         NSTCS_FULLROWSELECT               = 0x00000008,
2038         NSTCS_SPRINGEXPAND                = 0x00000010,
2039         NSTCS_HORIZONTALSCROLL            = 0x00000020,
2040         NSTCS_ROOTHASEXPANDO              = 0x00000040,
2041         NSTCS_SHOWSELECTIONALWAYS         = 0x00000080,
2042         NSTCS_NOINFOTIP                   = 0x00000200,
2043         NSTCS_EVENHEIGHT                  = 0x00000400,
2044         NSTCS_NOREPLACEOPEN               = 0x00000800,
2045         NSTCS_DISABLEDRAGDROP             = 0x00001000,
2046         NSTCS_NOORDERSTREAM               = 0x00002000,
2047         NSTCS_RICHTOOLTIP                 = 0x00004000,
2048         NSTCS_BORDER                      = 0x00008000,
2049         NSTCS_NOEDITLABELS                = 0x00010000,
2050         NSTCS_TABSTOP                     = 0x00020000,
2051         NSTCS_FAVORITESMODE               = 0x00080000,
2052         NSTCS_AUTOHSCROLL                 = 0x00100000,
2053         NSTCS_FADEINOUTEXPANDOS           = 0x00200000,
2054         NSTCS_EMPTYTEXT                   = 0x00400000,
2055         NSTCS_CHECKBOXES                  = 0x00800000,
2056         NSTCS_PARTIALCHECKBOXES           = 0x01000000,
2057         NSTCS_EXCLUSIONCHECKBOXES         = 0x02000000,
2058         NSTCS_DIMMEDCHECKBOXES            = 0x04000000,
2059         NSTCS_NOINDENTCHECKS              = 0x08000000,
2060         NSTCS_ALLOWJUNCTIONS              = 0x10000000,
2061         NSTCS_SHOWTABSBUTTON              = 0x20000000,
2062         NSTCS_SHOWDELETEBUTTON            = 0x40000000,
2063         NSTCS_SHOWREFRESHBUTTON      = (int)0x80000000
2064     };
2065     typedef DWORD NSTCSTYLE;
2066
2067     [v1_enum] enum _NSTCROOTSTYLE {
2068         NSTCRS_VISIBLE                    = 0x0000,
2069         NSTCRS_HIDDEN                     = 0x0001,
2070         NSTCRS_EXPANDED                   = 0x0002
2071     };
2072     typedef DWORD NSTCROOTSTYLE;
2073
2074     [v1_enum] enum _NSTCITEMSTATE {
2075         NSTCIS_NONE                       = 0x0000,
2076         NSTCIS_SELECTED                   = 0x0001,
2077         NSTCIS_EXPANDED                   = 0x0002,
2078         NSTCIS_BOLD                       = 0x0004,
2079         NSTCIS_DISABLED                   = 0x0008,
2080         NSTCIS_SELECTEDNOEXPAND           = 0x0010
2081     };
2082     typedef DWORD NSTCITEMSTATE;
2083
2084     typedef [v1_enum] enum NSTCGNI {
2085         NSTCGNI_NEXT                      = 0,
2086         NSTCGNI_NEXTVISIBLE               = 1,
2087         NSTCGNI_PREV                      = 2,
2088         NSTCGNI_PREVVISIBLE               = 3,
2089         NSTCGNI_PARENT                    = 4,
2090         NSTCGNI_CHILD                     = 5,
2091         NSTCGNI_FIRSTVISIBLE              = 6,
2092         NSTCGNI_LASTVISIBLE               = 7
2093     } NSTCGNI;
2094
2095     HRESULT Initialize(
2096         [in] HWND hwndParent,
2097         [in, unique] RECT *prc,
2098         [in] NSTCSTYLE nstcsFlags);
2099
2100     HRESULT TreeAdvise(
2101         [in] IUnknown *punk,
2102         [out] DWORD *pdwCookie);
2103
2104     HRESULT TreeUnadvise(
2105         [in] DWORD dwCookie);
2106
2107     HRESULT AppendRoot(
2108         [in] IShellItem *psiRoot,
2109         [in] SHCONTF grfEnumFlags,
2110         [in] NSTCROOTSTYLE grfRootStyle,
2111         [in, unique] IShellItemFilter *pif);
2112
2113     HRESULT InsertRoot(
2114         [in] int iIndex,
2115         [in] IShellItem *psiRoot,
2116         [in] SHCONTF grfEnumFlags,
2117         [in] NSTCROOTSTYLE grfRootStyle,
2118         [in, unique] IShellItemFilter *pif);
2119
2120     HRESULT RemoveRoot(
2121         [in] IShellItem *psiRoot);
2122
2123     HRESULT RemoveAllRoots();
2124
2125     HRESULT GetRootItems(
2126         [out] IShellItemArray **ppsiaRootItems);
2127
2128     HRESULT SetItemState(
2129         [in] IShellItem *psi,
2130         [in] NSTCITEMSTATE nstcisMask,
2131         [in] NSTCITEMSTATE nstcisFlags);
2132
2133     HRESULT GetItemState(
2134         [in] IShellItem *psi,
2135         [in] NSTCITEMSTATE nstcismask,
2136         [out] NSTCITEMSTATE *pnstcisFlags);
2137
2138     HRESULT GetSelectedItems(
2139         [out] IShellItemArray **psiaItems);
2140
2141     HRESULT GetItemCustomState(
2142         [in] IShellItem *psi,
2143         [out] int *piStateNumber);
2144
2145     HRESULT SetItemCustomState(
2146         [in] IShellItem *psi,
2147         [in] int iStateNumber);
2148
2149     HRESULT EnsureItemVisible(
2150         [in] IShellItem *psi);
2151
2152     HRESULT SetTheme(
2153         [in, string] LPCWSTR pszTheme);
2154
2155     HRESULT GetNextItem(
2156         [in, unique] IShellItem *psi,
2157         [in] NSTCGNI nstcgi,
2158         [out] IShellItem **ppsiNext);
2159
2160     HRESULT HitTest(
2161         [in] POINT *ppt,
2162         [out] IShellItem **ppsiOut);
2163
2164     HRESULT GetItemRect(
2165         [in] IShellItem *psi,
2166         [out] RECT *prect);
2167
2168     HRESULT CollapseAll();
2169 }
2170
2171 /*****************************************************************************
2172  * INameSpaceTreeControl2 interface
2173  */
2174 [
2175  object,
2176  uuid(7CC7AED8-290E-49BC-8945-C1401CC9306C)
2177 ]
2178 interface INameSpaceTreeControl2 : INameSpaceTreeControl
2179 {
2180     typedef [v1_enum] enum NSTCSTYLE2 {
2181         NSTCS2_DEFAULT                     = 0x00,
2182         NSTCS2_INTERRUPTNOTIFICATIONS      = 0x01,
2183         NSTCS2_SHOWNULLSPACEMENU           = 0x02,
2184         NSTCS2_DISPLAYPADDING              = 0x04,
2185         NSTCS2_DISPLAYPINNEDONLY           = 0x08,
2186         NTSCS2_NOSINGLETONAUTOEXPAND       = 0x10,  /* The apparent typo here is   */
2187         NTSCS2_NEVERINSERTNONENUMERATED    = 0x20   /* present also in the Win SDK */
2188     } NSTCSTYLE2;
2189     cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(NSTCSTYLE2)")
2190
2191     HRESULT SetControlStyle(
2192         [in] NSTCSTYLE nstcsMask,
2193         [in] NSTCSTYLE nstcsStyle);
2194
2195     HRESULT GetControlStyle(
2196         [in] NSTCSTYLE nstcsMask,
2197         [out] NSTCSTYLE *pnstcsStyle);
2198
2199     HRESULT SetControlStyle2(
2200         [in] NSTCSTYLE2 nstcsMask,
2201         [in] NSTCSTYLE2 nstcsStyle);
2202
2203     HRESULT GetControlStyle2(
2204         [in] NSTCSTYLE2 nstcsMask,
2205         [out] NSTCSTYLE2 *pnstcsStyle);
2206 }
2207
2208 /*****************************************************************************
2209  * INameSpaceTreeControlEvents interface
2210  */
2211
2212 [
2213  object,
2214  uuid(93D77985-B3D8-4484-8318-672CDDA002CE),
2215  local
2216 ]
2217 interface INameSpaceTreeControlEvents : IUnknown
2218 {
2219     [v1_enum] enum _NSTCEHITTEST {
2220         NSTCEHT_NOWHERE                    = 0x0001,
2221         NSTCEHT_ONITEMICON                 = 0x0002,
2222         NSTCEHT_ONITEMLABEL                = 0x0004,
2223         NSTCEHT_ONITEMIDENT                = 0x0008,
2224         NSTCEHT_ONITEMBUTTON               = 0x0010,
2225         NSTCEHT_ONITEMRIGHT                = 0x0020,
2226         NSTCEHT_ONITEMSTATEICON            = 0x0040,
2227         NSTCEHT_ONITEM                     = 0x0046,
2228         NSTCEHT_ONITEMTABBUTTON            = 0x1000
2229     };
2230     typedef DWORD NSTCEHITTEST;
2231
2232     [v1_enum] enum _NSTCECLICKTYPE {
2233         NSTCECT_LBUTTON                    = 0x1,
2234         NSTCECT_MBUTTON                    = 0x2,
2235         NSTCECT_RBUTTON                    = 0x3,
2236         NSTCECT_BUTTON                     = 0x3,
2237         NSTCECT_DBLCLICK                   = 0x4
2238     };
2239     typedef DWORD NSTCECLICKTYPE;
2240
2241     HRESULT OnItemClick(
2242         [in] IShellItem *psi,
2243         [in] NSTCEHITTEST nstceHitTest,
2244         [in] NSTCECLICKTYPE nstceClickType);
2245
2246     HRESULT OnPropertyItemCommit(
2247         [in] IShellItem *psi);
2248
2249     HRESULT OnItemStateChanging(
2250         [in] IShellItem *psi,
2251         [in] NSTCITEMSTATE nstcisMask,
2252         [in] NSTCITEMSTATE nstcisState);
2253
2254     HRESULT OnItemStateChanged(
2255         [in] IShellItem *psi,
2256         [in] NSTCITEMSTATE nstcisMask,
2257         [in] NSTCITEMSTATE nstcisState);
2258
2259     HRESULT OnSelectionChanged(
2260         [in] IShellItemArray *psiaSelection);
2261
2262     HRESULT OnKeyboardInput(
2263         [in] UINT uMsg,
2264         [in] WPARAM wParam,
2265         [in] LPARAM lParam);
2266
2267     HRESULT OnBeforeExpand(
2268         [in] IShellItem *psi);
2269
2270     HRESULT OnAfterExpand(
2271         [in] IShellItem *psi);
2272
2273     HRESULT OnBeginLabelEdit(
2274         [in] IShellItem *psi);
2275
2276     HRESULT OnEndLabelEdit(
2277         [in] IShellItem *psi);
2278
2279     HRESULT OnGetToolTip(
2280         [in] IShellItem *psi,
2281         [out, string, size_is(cchTip)] LPWSTR pszTip,
2282         [in] int cchTip);
2283
2284     HRESULT OnBeforeItemDelete(
2285         [in] IShellItem *psi);
2286
2287     HRESULT OnItemAdded(
2288         [in] IShellItem *psi,
2289         [in] BOOL fIsRoot);
2290
2291     HRESULT OnItemDeleted(
2292         [in] IShellItem *psi,
2293         [in] BOOL fIsRoot);
2294
2295     HRESULT OnBeforeContextMenu(
2296         [in, unique] IShellItem *psi,
2297         [in] REFIID riid,
2298         [out, iid_is(riid)] void **ppv);
2299
2300     HRESULT OnAfterContextMenu(
2301         [in] IShellItem *psi,
2302         [in] IContextMenu *pcmIn,
2303         [in] REFIID riid,
2304         [out, iid_is(riid)] void **ppv);
2305
2306     HRESULT OnBeforeStateImageChange(
2307         [in] IShellItem *psi);
2308
2309     HRESULT OnGetDefaultIconIndex(
2310         [in] IShellItem *psi,
2311         [out] int *piDefaultIcon,
2312         [out] int *piOpenIcon);
2313 }
2314
2315 cpp_quote("#ifdef MIDL_PASS")
2316 typedef IUnknown *HIMAGELIST;
2317 cpp_quote("#endif")
2318
2319 /*****************************************************************************
2320  * INameSpaceTreeControlCustomDraw interface
2321  */
2322 [
2323  object,
2324  uuid(2D3BA758-33EE-42D5-BB7B-5F3431D86C78),
2325  local
2326 ]
2327
2328 interface INameSpaceTreeControlCustomDraw : IUnknown
2329 {
2330     typedef struct NSTCCUSTOMDRAW
2331     {
2332         IShellItem *psi;
2333         UINT uItemState;
2334         NSTCITEMSTATE nstcis;
2335         LPCWSTR pszText;
2336         int iImage;
2337         HIMAGELIST himl;
2338         int iLevel;
2339         int iIndent;
2340     } NSTCCUSTOMDRAW;
2341
2342     HRESULT PrePaint(
2343         [in] HDC hdc,
2344         [in] RECT *prc,
2345         [out] LRESULT *plres);
2346
2347     HRESULT PostPaint(
2348         [in] HDC hdc,
2349         [in] RECT *prc);
2350
2351     HRESULT ItemPrePaint(
2352         [in] HDC hdc,
2353         [in] RECT *prc,
2354         [in, out] COLORREF *pclrText,
2355         [in, out] COLORREF *pclrTextBk,
2356         [out] LRESULT *plres);
2357
2358     HRESULT ItemPostPaint(
2359         [in] HDC hdc,
2360         [in] RECT *prc,
2361         [in] NSTCCUSTOMDRAW *pnstccdItem);
2362 }
2363
2364 /*****************************************************************************
2365  * INameSpaceTreeControlDropHandler interface
2366  */
2367 [
2368  object,
2369  uuid(F9C665D6-C2F2-4C19-BF33-8322D7352F51),
2370  local
2371 ]
2372 interface INameSpaceTreeControlDropHandler : IUnknown
2373 {
2374     HRESULT OnDragEnter(
2375         [in, unique] IShellItem *psiOver,
2376         [in] IShellItemArray *psiaData,
2377         [in] BOOL fOutsideSource,
2378         [in] DWORD grfKeyState,
2379         [in, out] DWORD *pdwEffect);
2380
2381     HRESULT OnDragOver(
2382         [in, unique] IShellItem *psiOver,
2383         [in] IShellItemArray *psiaData,
2384         [in] DWORD grfKeyState,
2385         [in, out] DWORD *pdwEffect);
2386
2387     HRESULT OnDragPosition(
2388         [in, unique] IShellItem *psiOver,
2389         [in] IShellItemArray *psiaData,
2390         [in] int iNewPosition,
2391         [in] int iOldPosition);
2392
2393     HRESULT OnDrop(
2394         [in, unique] IShellItem *psiOver,
2395         [in] IShellItemArray *psiaData,
2396         [in] int iPosition,
2397         [in] DWORD grfKeyState,
2398         [in, out] DWORD *pdwEffect);
2399
2400     HRESULT OnDropPosition(
2401         [in, unique] IShellItem *psiOver,
2402         [in] IShellItemArray *psiaData,
2403         [in] int iNewPosition,
2404         [in] int iOldPosition);
2405
2406     HRESULT OnDragLeave(
2407         [in, unique] IShellItem *psiOver);
2408 }
2409 cpp_quote("#define NSTCDHPOS_ONTOP -1")
2410
2411 interface IFileDialog;
2412
2413 typedef [v1_enum] enum FDE_OVERWRITE_RESPONSE
2414 {
2415     FDEOR_DEFAULT  = 0,
2416     FDEOR_ACCCEP   = 1,
2417     FDEOR_REFUSE   = 2
2418 } FDE_OVERWRITE_RESPONSE;
2419
2420 typedef [v1_enum] enum FDE_SHAREVIOLATION_RESPONSE
2421 {
2422     FDESVR_DEFAULT = 0,
2423     FDESVR_ACCEPT  = 1,
2424     FDESVR_REFUSE  = 2
2425 } FDE_SHAREVIOLATION_RESPONSE;
2426
2427 /*****************************************************************************
2428  * IFileDialogEvents interface
2429  */
2430 [
2431  object,
2432  uuid(973510DB-7D7F-452B-8975-74A85828D354),
2433  pointer_default(unique)
2434 ]
2435 interface IFileDialogEvents : IUnknown
2436 {
2437     HRESULT OnFileOk(
2438         [in] IFileDialog *pfd);
2439
2440     HRESULT OnFolderChanging(
2441         [in] IFileDialog *pfd,
2442         [in] IShellItem *psiFolder);
2443
2444     HRESULT OnFolderChange(
2445         [in] IFileDialog *pfd);
2446
2447     HRESULT OnSelectionChange(
2448         [in] IFileDialog *pfd);
2449
2450     HRESULT OnShareViolation(
2451         [in] IFileDialog *pfd,
2452         [in] IShellItem *psi,
2453         [out] FDE_SHAREVIOLATION_RESPONSE *pResponse);
2454
2455     HRESULT OnTypeChange(
2456         [in] IFileDialog *pfd);
2457
2458     HRESULT OnOverwrite(
2459         [in] IFileDialog *pfd,
2460         [in] IShellItem *psi,
2461         [out] FDE_OVERWRITE_RESPONSE *pResponse);
2462 }
2463
2464 /*****************************************************************************
2465  * IModalWindow interface
2466  */
2467 [
2468  object,
2469  uuid(B4DB1657-70D7-485E-8E3E-6FCB5A5C1802),
2470  pointer_default(unique)
2471 ]
2472 interface IModalWindow : IUnknown
2473 {
2474     [local]
2475     HRESULT Show(
2476         [in, unique, annotation("__in_opt")] HWND hwndOwner);
2477
2478     [call_as(Show)]
2479     HRESULT RemoteShow(
2480         [in, unique] HWND hwndOwner);
2481 }
2482
2483 typedef [v1_enum] enum FDAP
2484 {
2485     FDAP_BOTTOM    = 0,
2486     FDAP_TOP       = 1
2487 } FDAP;
2488
2489 /*****************************************************************************
2490  * IFileDialog interface
2491  */
2492 [
2493  object,
2494  uuid(42F85136-DB7E-439C-85F1-E4075D135FC8),
2495  pointer_default(unique)
2496 ]
2497 interface IFileDialog : IModalWindow
2498 {
2499     [v1_enum] enum _FILEOPENDIALOGOPTIONS
2500     {
2501         FOS_OVERWRITEPROMPT     = 0x00000002,
2502         FOS_STRICTFILETYPES     = 0x00000004,
2503         FOS_NOCHANGEDIR         = 0x00000008,
2504         FOS_PICKFOLDERS         = 0x00000020,
2505         FOS_FORCEFILESYSTEM     = 0x00000040,
2506         FOS_ALLNONSTORAGEITEMS  = 0x00000080,
2507         FOS_NOVALIDATE          = 0x00000100,
2508         FOS_ALLOWMULTISELECT    = 0x00000200,
2509         FOS_PATHMUSTEXIST       = 0x00000800,
2510         FOS_FILEMUSTEXIST       = 0x00001000,
2511         FOS_CREATEPROMPT        = 0x00002000,
2512         FOS_SHAREAWARE          = 0x00004000,
2513         FOS_NOREADONLYRETURN    = 0x00008000,
2514         FOS_NOTESTFILECREATE    = 0x00010000,
2515         FOS_HIDEMRUPLACES       = 0x00020000,
2516         FOS_HIDEPINNEDPLACES    = 0x00040000,
2517         FOS_NODEREFERENCELINKS  = 0x00100000,
2518         FOS_DONTADDTORECENT     = 0x02000000,
2519         FOS_FORCESHOWHIDDEN     = 0x10000000,
2520         FOS_DEFAULTNOMINIMODE   = 0x20000000,
2521         FOS_FORCEPREVIEWPANEON  = 0x40000000
2522     };
2523     typedef DWORD FILEOPENDIALOGOPTIONS;
2524
2525     HRESULT SetFileTypes(
2526         [in] UINT cFileTypes,
2527         [in, size_is(cFileTypes)] const COMDLG_FILTERSPEC *rgFilterSpec);
2528
2529     HRESULT SetFileTypeIndex(
2530         [in] UINT iFileType);
2531
2532     HRESULT GetFileTypeIndex(
2533         [out] UINT *piFileType);
2534
2535     HRESULT Advise(
2536         [in] IFileDialogEvents *pfde,
2537         [out] DWORD *pdwCookie);
2538
2539     HRESULT Unadvise(
2540         [in] DWORD dwCookie);
2541
2542     HRESULT SetOptions(
2543         [in] FILEOPENDIALOGOPTIONS fos);
2544
2545     HRESULT GetOptions(
2546         [in] FILEOPENDIALOGOPTIONS *pfos);
2547
2548     HRESULT SetDefaultFolder(
2549         [in] IShellItem *psi);
2550
2551     HRESULT SetFolder(
2552         [in] IShellItem *psi);
2553
2554     HRESULT GetFolder(
2555         [out] IShellItem **ppsi);
2556
2557     HRESULT GetCurrentSelection(
2558         [out] IShellItem **ppsi);
2559
2560     HRESULT SetFileName(
2561         [in, string] LPCWSTR pszName);
2562
2563     HRESULT GetFileName(
2564         [out, string] LPWSTR *pszName);
2565
2566     HRESULT SetTitle(
2567         [in, string] LPCWSTR pszTitle);
2568
2569     HRESULT SetOkButtonLabel(
2570         [in, string] LPCWSTR pszText);
2571
2572     HRESULT SetFileNameLabel(
2573         [in, string] LPCWSTR pszLabel);
2574
2575     HRESULT GetResult(
2576         [out] IShellItem **ppsi);
2577
2578     HRESULT AddPlace(
2579         [in] IShellItem *psi,
2580         [in] FDAP fdap);
2581
2582     HRESULT SetDefaultExtension(
2583         [in, string] LPCWSTR pszDefaultExtension);
2584
2585     HRESULT Close(
2586         [in] HRESULT hr);
2587
2588     HRESULT SetClientGuid(
2589         [in] REFGUID guid);
2590
2591     HRESULT ClearClientData();
2592
2593     HRESULT SetFilter(
2594         [in] IShellItemFilter *pFilter);
2595 }
2596
2597 /*****************************************************************************
2598  * IFileDialog2 interface
2599  */
2600 [
2601  object,
2602  uuid(61744FC7-85B5-4791-A9B0-272276309B13),
2603  pointer_default(unique)
2604 ]
2605 interface IFileDialog2 : IFileDialog
2606 {
2607     HRESULT SetCancelButtonLabel(
2608         [in] LPCWSTR pszLabel);
2609
2610     HRESULT SetNavigationRoot(
2611         [in] IShellItem *psi);
2612 }
2613
2614 /*****************************************************************************
2615  * IFileOperationProgressSink interface
2616  */
2617 [
2618  object,
2619  uuid(04B0F1A7-9490-44BC-96E1-4296A31252E2),
2620  pointer_default(unique)
2621 ]
2622 interface IFileOperationProgressSink : IUnknown
2623 {
2624     HRESULT StartOperations();
2625
2626     HRESULT FinishOperations(
2627         [in] HRESULT hrResult);
2628
2629     HRESULT PreRenameItem(
2630         [in] DWORD dwFlags,
2631         [in] IShellItem *psiItem,
2632         [in, unique, string] LPCWSTR pszNewName);
2633
2634     HRESULT PostRenameItem(
2635         [in] DWORD dwFlags,
2636         [in] IShellItem *psiItem,
2637         [in, string] LPCWSTR pszNewName,
2638         [in] HRESULT hrRename,
2639         [in] IShellItem *psiNewlyCreated);
2640
2641     HRESULT PreMoveItem(
2642         [in] DWORD dwFlags,
2643         [in] IShellItem *psiItem,
2644         [in] IShellItem *psiDestinationFolder,
2645         [in, unique, string] LPCWSTR pszNewName);
2646
2647     HRESULT PostMoveItem(
2648         [in] DWORD dwFlags,
2649         [in] IShellItem *psiItem,
2650         [in] IShellItem *psiDestinationFolder,
2651         [in, unique, string] LPCWSTR pszNewName,
2652         [in] HRESULT hrMove,
2653         [in] IShellItem *psiNewlyCreated);
2654
2655     HRESULT PreCopyItem(
2656         [in] DWORD dwFlags,
2657         [in] IShellItem *psiItem,
2658         [in] IShellItem *psiDestinationFolder,
2659         [in, unique, string] LPCWSTR pszNewName);
2660
2661     HRESULT PostCopyItem(
2662         [in] DWORD dwFlags,
2663         [in] IShellItem *psiItem,
2664         [in] IShellItem *psiDestinationFolder,
2665         [in, unique, string] LPCWSTR pszNewName,
2666         [in] HRESULT hrCopy,
2667         [in] IShellItem *psiNewlyCreated);
2668
2669     HRESULT PreDeleteItem(
2670         [in] DWORD dwFlags,
2671         [in] IShellItem *psiItem);
2672
2673     HRESULT PostDeleteItem(
2674         [in] DWORD dwFlags,
2675         [in] IShellItem *psiItem,
2676         [in] HRESULT hrDelete,
2677         [in] IShellItem *psiNewlyCreated);
2678
2679     HRESULT PreNewItem(
2680         [in] DWORD dwFlags,
2681         [in] IShellItem *psiDestinationFolder,
2682         [in, unique, string] LPCWSTR pszNewName);
2683
2684     HRESULT PostNewItem(
2685         [in] DWORD dwFlags,
2686         [in] IShellItem *psiDestinationFolder,
2687         [in, unique, string] LPCWSTR pszNewName,
2688         [in, unique, string] LPCWSTR pszTemplateName,
2689         [in] DWORD dwFileAttributes,
2690         [in] HRESULT hrNew,
2691         [in] IShellItem *psiNewItem);
2692
2693     HRESULT UpdateProgress(
2694         [in] UINT iWorkTotal,
2695         [in] UINT iWorkSoFar);
2696
2697     HRESULT ResetTimer();
2698
2699     HRESULT PauseTimer();
2700
2701     HRESULT ResumeTimer();
2702 }
2703
2704 /*****************************************************************************
2705  * IFileSaveDialog interface
2706  */
2707 [
2708  object,
2709  uuid(84BCCD23-5FDE-4CDB-AEA4-AF64B83D78AB),
2710  pointer_default(unique)
2711 ]
2712 interface IFileSaveDialog : IFileDialog
2713 {
2714     HRESULT SetSaveAsItem(
2715         [in] IShellItem *psi);
2716
2717     HRESULT SetProperties(
2718         [in] IPropertyStore *pStore);
2719
2720     HRESULT SetCollectedProperties(
2721         [in] IPropertyDescriptionList *pList,
2722         [in] BOOL fAppendDefault);
2723
2724     HRESULT GetProperties(
2725         [in] IPropertyStore **ppStore);
2726
2727     HRESULT ApplyProperties(
2728         [in] IShellItem *psi,
2729         [in] IPropertyStore *pStore,
2730         [in, unique] HWND hwnd,
2731         [in, unique] IFileOperationProgressSink *pSink);
2732 }
2733
2734
2735 /*****************************************************************************
2736  * IFileOpenDialog interface
2737  */
2738 [
2739  object,
2740  uuid(D57C7288-D4AD-4768-BE02-9D969532D960),
2741  pointer_default(unique)
2742 ]
2743 interface IFileOpenDialog : IFileDialog
2744 {
2745     HRESULT GetResults(
2746         [out] IShellItemArray **ppenum);
2747
2748     HRESULT GetSelectedItems(
2749         [out] IShellItemArray **ppsai);
2750 }
2751
2752 typedef [v1_enum] enum CDCONTROLSTATEF
2753 {
2754     CDCS_INACTIVE       = 0x0,
2755     CDCS_ENABLED        = 0x1,
2756     CDCS_VISIBLE        = 0x2,
2757     CDCS_ENABLEDVISIBLE = 0x3
2758 } CDCONTROLSTATEF;
2759 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(CDCONTROLSTATEF)")
2760 /*****************************************************************************
2761  * IFileDialogCustomize interface
2762  */
2763 [
2764  object,
2765  uuid(E6FDD21A-163F-4975-9C8C-A69F1BA37034),
2766  pointer_default(unique)
2767 ]
2768 interface IFileDialogCustomize : IUnknown
2769 {
2770     HRESULT EnableOpenDropDown(
2771         [in] DWORD dwIDCtl);
2772
2773     HRESULT AddMenu(
2774         [in] DWORD dwIDCtl,
2775         [in, string] LPCWSTR pszLabel);
2776
2777     HRESULT AddPushButton(
2778         [in] DWORD dwIDCtl,
2779         [in, string] LPCWSTR pszLabel);
2780
2781     HRESULT AddComboBox(
2782         [in] DWORD dwIDCtl);
2783
2784     HRESULT AddRadioButtonList(
2785         [in] DWORD dwIDCtl);
2786
2787     HRESULT AddCheckButton(
2788         [in] DWORD dwIDCtl,
2789         [in, string] LPCWSTR pszLabel,
2790         [in] BOOL bChecked);
2791
2792     HRESULT AddEditBox(
2793         [in] DWORD dwIDCtl,
2794         [in, string] LPCWSTR pszText);
2795
2796     HRESULT AddSeparator(
2797         [in] DWORD dwIDCtl);
2798
2799     HRESULT AddText(
2800         [in] DWORD dwIDCtl,
2801         [in, string] LPCWSTR pszText);
2802
2803     HRESULT SetControlLabel(
2804         [in] DWORD dwIDCtl,
2805         [in, string] LPCWSTR pszLabel);
2806
2807     HRESULT GetControlState(
2808         [in] DWORD dwIDCtl,
2809         [out] CDCONTROLSTATEF *pdwState);
2810
2811     HRESULT SetControlState(
2812         [in] DWORD dwIDCtl,
2813         [in] CDCONTROLSTATEF dwState);
2814
2815     HRESULT GetEditBoxText(
2816         [in] DWORD dwIDCtl,
2817         [out, string] WCHAR **ppszText);
2818
2819     HRESULT SetEditBoxText(
2820         [in] DWORD dwIDCtl,
2821         [in, string] LPCWSTR pszText);
2822
2823     HRESULT GetCheckButtonState(
2824         [in] DWORD dwIDCtl,
2825         [out] BOOL *pbChecked);
2826
2827     HRESULT SetCheckButtonState(
2828         [in] DWORD dwIDCtl,
2829         [in] BOOL bChecked);
2830
2831     HRESULT AddControlItem(
2832         [in] DWORD dwIDCtl,
2833         [in] DWORD dwIDItem,
2834         [in] LPCWSTR pszLabel);
2835
2836     HRESULT RemoveControlItem(
2837         [in] DWORD dwIDCtl,
2838         [in] DWORD dwIDItem);
2839
2840     HRESULT RemoveAllControlItems(
2841         [in] DWORD dwIDCtl);
2842
2843     HRESULT GetControlItemState(
2844         [in] DWORD dwIDCtl,
2845         [in] DWORD dwIDItem,
2846         [out] CDCONTROLSTATEF *pdwState);
2847
2848     HRESULT SetControlItemState(
2849         [in] DWORD dwIDCtl,
2850         [in] DWORD dwIDItem,
2851         [in] CDCONTROLSTATEF dwState);
2852
2853     HRESULT GetSelectedControlItem(
2854         [in] DWORD dwIDCtl,
2855         [out] DWORD *pdwIDItem);
2856
2857     HRESULT SetSelectedControlItem(
2858         [in] DWORD dwIDCtl,
2859         [in] DWORD dwIDItem);
2860
2861     HRESULT StartVisualGroup(
2862         [in] DWORD dwIDCtl,
2863         [in, string] LPCWSTR pszLabel);
2864
2865     HRESULT EndVisualGroup();
2866
2867     HRESULT MakeProminent(
2868         [in] DWORD dwIDCtl);
2869
2870     HRESULT SetControlItemText(
2871         [in] DWORD dwIDCtl,
2872         [in] DWORD dwIDItem,
2873         [in, string] LPCWSTR pszLabel);
2874 }
2875
2876 /*****************************************************************************
2877  * IFileDialogControlEvents interface
2878  */
2879 [
2880  object,
2881  uuid(36116642-D713-4B97-9B83-7484A9D00433),
2882  pointer_default(unique)
2883 ]
2884 interface IFileDialogControlEvents : IUnknown
2885 {
2886     HRESULT OnItemSelected(
2887         [in] IFileDialogCustomize *pfdc,
2888         [in] DWORD dwIDCtl,
2889         [in] DWORD dwIDItem);
2890
2891     HRESULT OnButtonClicked(
2892         [in] IFileDialogCustomize *pfdc,
2893         [in] DWORD dwIDCtl);
2894
2895     HRESULT OnCheckButtonToggled(
2896         [in] IFileDialogCustomize *pfdc,
2897         [in] BOOL dwIDCtl,
2898         [in] BOOL bChecked);
2899
2900     HRESULT OnControlActivating(
2901         [in] IFileDialogCustomize *pfdc,
2902         [in] DWORD dwIDCtl);
2903 }
2904
2905 typedef [v1_enum] enum tagKF_CATEGORY
2906 {
2907     KF_CATEGORY_VIRTUAL = 0x00000001,
2908     KF_CATEGORY_FIXED   = 0x00000002,
2909     KF_CATEGORY_COMMON  = 0x00000003,
2910     KF_CATEGORY_PERUSER = 0x00000004
2911 } KF_CATEGORY;
2912
2913 typedef [v1_enum] enum tagKF_REDIRECTION_CAPABILITIES
2914 {
2915     KF_REDIRECTION_CAPABILITIES_ALLOW_ALL               = 0x000000ff,
2916     KF_REDIRECTION_CAPABILITIES_REDIRECTABLE            = 0x00000001,
2917     KF_REDIRECTION_CAPABILITIES_DENY_ALL                = 0x000fff00,
2918     KF_REDIRECTION_CAPABILITIES_DENY_POLICY_REDIRECTED  = 0x00000100,
2919     KF_REDIRECTION_CAPABILITIES_DENY_POLICY             = 0x00000200,
2920     KF_REDIRECTION_CAPABILITIES_DENY_PERMISSIONS        = 0x00000400
2921 } KF_REDIRECTION_CAPABILITIES;
2922
2923 typedef [v1_enum] enum tagKF_DEFINITION_FLAGS
2924 {
2925     KFDF_LOCAL_REDIRECT_ONLY    = 0x00000002,
2926     KFDF_ROAMABLE               = 0x00000004,
2927     KFDF_PRECREATE              = 0x00000008
2928 } KF_DEFINITION_FLAGS;
2929
2930 typedef struct tagKNOWNFOLDER_DEFINITION
2931 {
2932     KF_CATEGORY         category;
2933     LPWSTR              pszName;
2934     LPWSTR              pszDescription;
2935     KNOWNFOLDERID       fidParent;
2936     LPWSTR              pszRelativePath;
2937     LPWSTR              pszParsingName;
2938     LPWSTR              pszTooltip;
2939     LPWSTR              pszLocalizedName;
2940     LPWSTR              pszIcon;
2941     LPWSTR              pszSecurity;
2942     DWORD               dwAttributes;
2943     KF_DEFINITION_FLAGS kfdFlags;
2944     FOLDERTYPEID        ftidType;
2945 } KNOWNFOLDER_DEFINITION;
2946
2947 [
2948  object,
2949  uuid(3aa7af7e-9b36-420C-a8e3-f77d4674a488),
2950  pointer_default(ref)
2951 ]
2952 interface IKnownFolder : IUnknown
2953 {
2954     HRESULT GetId(
2955         [out] KNOWNFOLDERID *pkfid);
2956
2957     HRESULT GetCategory(
2958         [out] KF_CATEGORY *pCategory);
2959
2960     HRESULT GetShellItem(
2961         [in] DWORD dwFlags,
2962         [in] REFIID riid,
2963         [out, iid_is(riid)] void **ppv);
2964
2965     HRESULT GetPath(
2966         [in] DWORD dwFlags,
2967         [out, string] LPWSTR *ppszPath);
2968
2969     HRESULT SetPath(
2970         [in] DWORD dwFlags,
2971         [in, string] LPCWSTR pszPath);
2972
2973     HRESULT GetIDList(
2974         [in] DWORD dwFlags,
2975         [out] PIDLIST_ABSOLUTE *ppidl);
2976
2977     HRESULT GetFolderType(
2978         [out] FOLDERTYPEID *pftid);
2979
2980     HRESULT GetRedirectionCapabilities(
2981         [out] KF_REDIRECTION_CAPABILITIES *pCapabilities);
2982
2983     HRESULT GetFolderDefinition(
2984         [out] KNOWNFOLDER_DEFINITION *pKFD);
2985 }
2986
2987 typedef [v1_enum] enum tagKF_REDIRECT_FLAGS
2988 {
2989     KF_REDIRECT_USER_EXCLUSIVE      = 0x00000001,
2990     KF_REDIRECT_COPY_SOURCE_DACL    = 0x00000002,
2991     KF_REDIRECT_OWNER_USER          = 0x00000004,
2992     KF_REDIRECT_SET_OWNER_EXPLICIT  = 0x00000008,
2993     KF_REDIRECT_CHECK_ONLY          = 0x00000010,
2994     KF_REDIRECT_WITH_UI             = 0x00000020,
2995     KF_REDIRECT_UNPIN               = 0x00000040,
2996     KF_REDIRECT_PIN                 = 0x00000080,
2997     KF_REDIRECT_COPY_CONTENTS       = 0x00000200,
2998     KF_REDIRECT_DEL_SOURCE_CONTENTS = 0x00000400,
2999     KF_REDIRECT_EXCLUDE_ALL_KNOWN_SUBFOLDERS = 0x00000800
3000 } KF_REDIRECT_FLAGS;
3001
3002 [
3003     object,
3004     uuid(8BE2D872-86AA-4d47-B776-32CCA40C7018),
3005     pointer_default(ref)
3006 ]
3007 interface IKnownFolderManager : IUnknown
3008 {
3009     typedef [v1_enum] enum tagFFFP_MODE
3010     {
3011         FFFP_EXACTMATCH,
3012         FFFP_NEARESTPARENTMATCH
3013     } FFFP_MODE;
3014
3015     HRESULT FolderIdFromCsidl(
3016         [in] int nCsidl,
3017         [out] KNOWNFOLDERID *pfid);
3018
3019     HRESULT FolderIdToCsidl(
3020         [in] REFKNOWNFOLDERID rfid,
3021         [out] int *pnCsidl);
3022
3023     HRESULT GetFolderIds(
3024         [out, size_is(, *pCount)] KNOWNFOLDERID **ppKFId,
3025         [in, out] UINT *pCount);
3026
3027     HRESULT GetFolder(
3028         [in] REFKNOWNFOLDERID rfid,
3029         [out] IKnownFolder **ppkf);
3030
3031     HRESULT GetFolderByName(
3032         [in, string] LPCWSTR pszCanonicalName,
3033         [out] IKnownFolder **ppkf);
3034
3035     HRESULT RegisterFolder(
3036         [in] REFKNOWNFOLDERID rfid,
3037         [in] KNOWNFOLDER_DEFINITION const *pKFD);
3038
3039     HRESULT UnregisterFolder(
3040         [in] REFKNOWNFOLDERID rfid);
3041
3042     HRESULT FindFolderFromPath(
3043         [in, string] LPCWSTR pszPath,
3044         [in] FFFP_MODE mode,
3045         [out] IKnownFolder **ppkf);
3046
3047     HRESULT FindFolderFromIDList(
3048         [in] PCIDLIST_ABSOLUTE pidl,
3049         [out] IKnownFolder **ppkf);
3050
3051     HRESULT Redirect(
3052         [in] REFKNOWNFOLDERID rfid,
3053         [in, unique] HWND hwnd,
3054         [in] KF_REDIRECT_FLAGS flags,
3055         [in, unique, string] LPCWSTR pszTargetPath,
3056         [in] UINT cFolders,
3057         [in, size_is(cFolders), unique] KNOWNFOLDERID const *pExclusion,
3058         [out, string] LPWSTR *ppszError);
3059 }
3060
3061 /*****************************************************************************
3062  * ShellObjects typelibrary
3063  */
3064 [
3065  uuid(50A7E9B1-70EF-11D1-B75A-00A0C90564FE),
3066  lcid(0x0000),
3067  version(1.0)
3068 ]
3069 library ShellObjects
3070 {
3071     [
3072         uuid(71F96385-DDD6-48D3-A0C1-AE06E8B055FB)
3073     ]
3074     coclass ExplorerBrowser
3075     {
3076         interface IExplorerBrowser;
3077     }
3078
3079     [
3080         uuid(DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7)
3081     ]
3082     coclass FileOpenDialog
3083     {
3084         interface IFileOpenDialog;
3085     }
3086
3087     [
3088         uuid(C0B4E2F3-BA21-4773-8DBA-335EC946EB8B)
3089     ]
3090     coclass FileSaveDialog
3091     {
3092         interface IFileSaveDialog;
3093     }
3094
3095     [
3096         uuid(AE054212-3535-4430-83ED-D501AA6680E6)
3097     ]
3098     coclass NamespaceTreeControl
3099     {
3100         interface INameSpaceTreeControl2;
3101     }
3102
3103     [
3104         uuid(4df0c730-df9d-4ae3-9153-aa6b82e9795a)
3105     ]
3106     coclass KnownFolderManager
3107     {
3108         interface IKnownFolderManager;
3109     }
3110 }