xref: /reactos/sdk/include/psdk/shobjidl.idl (revision 8ea93d2a)
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
22import "objidl.idl";
23import "oleidl.idl";
24import "oaidl.idl";
25import "docobj.idl";
26import "shtypes.idl";
27import "servprov.idl";
28import "comcat.idl";
29import "propidl.idl";
30/* FIXME: import "prsht.idl";*/
31import "msxml.idl";
32import "wtypes.idl";
33import "propsys.idl";
34import "objectarray.idl";
35/* FIXME: import "structuredquery.idl"; */
36
37cpp_quote("/* FIXME: #include <sherrors.h> */")
38
39cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
40cpp_quote("#undef PlaySound")
41cpp_quote("#endif")
42
43
44/*****************************************************************************
45 * IPersistFolder interface
46 */
47[
48    object,
49    uuid(000214ea-0000-0000-c000-000000000046),
50    pointer_default(unique)
51]
52interface IPersistFolder : IPersist
53{
54    typedef IPersistFolder *LPPERSISTFOLDER;
55
56    HRESULT Initialize( [in] PCIDLIST_ABSOLUTE pidl );
57}
58
59
60/*****************************************************************************
61 * IPersistFolder2 interface
62 */
63[
64    object,
65    uuid(1ac3d9f0-175c-11d1-95be-00609797ea4f),
66    pointer_default(unique)
67]
68interface IPersistFolder2 : IPersistFolder
69{
70    typedef IPersistFolder2 *LPPERSISTFOLDER2;
71
72    HRESULT GetCurFolder( [out] PIDLIST_ABSOLUTE *ppidl );
73}
74
75
76/*****************************************************************************
77 * IPersistIDList interface
78 */
79[
80    object,
81    uuid(1079acfc-29bd-11d3-8e0d-00c04f6837d5),
82    pointer_default(unique)
83]
84interface IPersistIDList : IPersist
85{
86    HRESULT SetIDList( [in] PCIDLIST_ABSOLUTE pidl );
87    HRESULT GetIDList( [out] PIDLIST_ABSOLUTE *ppidl );
88}
89
90
91/*****************************************************************************
92 * IEnumIDList interface
93 */
94[
95    object,
96    uuid(000214f2-0000-0000-c000-000000000046),
97    pointer_default(unique)
98]
99interface IEnumIDList : IUnknown
100{
101    typedef IEnumIDList *LPENUMIDLIST;
102
103    HRESULT Next(
104        [in] ULONG celt,
105        [out, size_is(celt), length_is(*pceltFetched)] PITEMID_CHILD *rgelt,
106        [out] ULONG *pceltFetched);
107
108    HRESULT Skip( [in] ULONG celt );
109    HRESULT Reset();
110    HRESULT Clone( [out] IEnumIDList **ppenum );
111}
112
113/*****************************************************************************
114 * IShellPropSheetExt interface
115 */
116cpp_quote("#if 0")
117    typedef LPARAM LPFNSVADDPROPSHEETPAGE;
118cpp_quote("#else")
119cpp_quote("#include <prsht.h>")
120cpp_quote("typedef LPFNADDPROPSHEETPAGE LPFNSVADDPROPSHEETPAGE;")
121cpp_quote("#endif")
122
123[
124    object,
125    uuid(000214E9-0000-0000-C000-000000000046),
126    pointer_default(unique),
127    local
128]
129interface IShellPropSheetExt : IUnknown
130{
131    enum tagSHELLPROPSHEETEXTPAGEID {
132        EXPPS_FILETYPES = 0x1
133    };
134
135    typedef UINT EXPPS;
136
137    HRESULT AddPages(
138        [in] LPFNSVADDPROPSHEETPAGE pfnAddPage,
139        [in] LPARAM lParam);
140    HRESULT ReplacePage(
141        [in] EXPPS uPageID,
142        [in] LPFNSVADDPROPSHEETPAGE pfnReplaceWith,
143        [in] LPARAM lParam);
144}
145typedef IShellPropSheetExt *LPSHELLPROPSHEETEXT;
146
147/*****************************************************************************
148 * IShellFolder interface
149 */
150[
151    object,
152    uuid(000214e6-0000-0000-c000-000000000046),
153    pointer_default(unique)
154]
155interface IShellFolder : IUnknown
156{
157    typedef IShellFolder * LPSHELLFOLDER;
158
159    typedef enum tagSHGDN
160    {
161        SHGDN_NORMAL = 0,
162        SHGDN_INFOLDER = 1,
163        SHGDN_FOREDITING = 0x1000,
164        SHGDN_INCLUDE_NONFILESYS = 0x2000,
165        SHGDN_FORADDRESSBAR = 0x4000,
166        SHGDN_FORPARSING = 0x8000
167    } SHGNO;
168
169    typedef DWORD SHGDNF;
170
171    enum tagSHCONTF
172    {
173        SHCONTF_FOLDERS = 32,
174        SHCONTF_NONFOLDERS = 64,
175        SHCONTF_INCLUDEHIDDEN = 128,
176        SHCONTF_INIT_ON_FIRST_NEXT = 256,
177        SHCONTF_NETPRINTERSRCH = 512,
178        SHCONTF_SHAREABLE = 1024,
179        SHCONTF_STORAGE = 2048,
180        SHCONTF_NAVIGATION_ENUM = 0x01000,
181        SHCONTF_FASTITEMS = 0x02000,
182        SHCONTF_FLATLIST = 0x04000,
183        SHCONTF_ENABLE_ASYNC = 0x08000,
184        SHCONTF_INCLUDESUPERHIDDEN = 0x10000
185    };
186
187    typedef DWORD SHCONTF;
188
189    cpp_quote("#define SFGAO_CANCOPY           DROPEFFECT_COPY")
190    cpp_quote("#define SFGAO_CANMOVE           DROPEFFECT_MOVE")
191    cpp_quote("#define SFGAO_CANLINK           DROPEFFECT_LINK")
192    cpp_quote("#define SFGAO_STORAGE           0x00000008L")
193    cpp_quote("#define SFGAO_CANRENAME         0x00000010L")
194    cpp_quote("#define SFGAO_CANDELETE         0x00000020L")
195    cpp_quote("#define SFGAO_HASPROPSHEET      0x00000040L")
196    cpp_quote("#define SFGAO_DROPTARGET        0x00000100L")
197    cpp_quote("#define SFGAO_CAPABILITYMASK    0x00000177L")
198    cpp_quote("#define SFGAO_ENCRYPTED         0x00002000L")
199    cpp_quote("#define SFGAO_ISSLOW            0x00004000L")
200    cpp_quote("#define SFGAO_GHOSTED           0x00008000L")
201    cpp_quote("#define SFGAO_LINK              0x00010000L")
202    cpp_quote("#define SFGAO_SHARE             0x00020000L")
203    cpp_quote("#define SFGAO_READONLY          0x00040000L")
204    cpp_quote("#define SFGAO_HIDDEN            0x00080000L")
205    cpp_quote("#define SFGAO_DISPLAYATTRMASK   0x000FC000L")
206    cpp_quote("#define SFGAO_FILESYSANCESTOR   0x10000000L")
207    cpp_quote("#define SFGAO_FOLDER            0x20000000L")
208    cpp_quote("#define SFGAO_FILESYSTEM        0x40000000L")
209    cpp_quote("#define SFGAO_HASSUBFOLDER      0x80000000L")
210    cpp_quote("#define SFGAO_CONTENTSMASK      0x80000000L")
211    cpp_quote("#define SFGAO_VALIDATE          0x01000000L")
212    cpp_quote("#define SFGAO_REMOVABLE         0x02000000L")
213    cpp_quote("#define SFGAO_COMPRESSED        0x04000000L")
214    cpp_quote("#define SFGAO_BROWSABLE         0x08000000L")
215    cpp_quote("#define SFGAO_NONENUMERATED     0x00100000L")
216    cpp_quote("#define SFGAO_NEWCONTENT        0x00200000L")
217    cpp_quote("#define SFGAO_STREAM            0x00400000L")
218    cpp_quote("#define SFGAO_STORAGEANCESTOR   0x00800000L")
219    cpp_quote("#define SFGAO_STORAGECAPMASK    0x70C50008L")
220    cpp_quote("#define SFGAO_PKEYSFGAOMASK     0x81044000L")
221
222    typedef ULONG SFGAOF;
223
224    HRESULT ParseDisplayName(
225        [in] HWND hwndOwner,
226        [in] LPBC pbcReserved,
227        [in, string] LPOLESTR lpszDisplayName,
228        [out] ULONG *pchEaten,
229        [out] PIDLIST_RELATIVE *ppidl,
230        [in, out, unique] ULONG *pdwAttributes);
231
232    HRESULT EnumObjects(
233        [in] HWND hwndOwner,
234        [in] SHCONTF grfFlags,
235        [out] IEnumIDList **ppenumIDList);
236
237    HRESULT BindToObject(
238        [in] PCUIDLIST_RELATIVE pidl,
239        [in] LPBC pbcReserved,
240        [in] REFIID riid,
241        [out, iid_is(riid)] void **ppvOut);
242
243    HRESULT BindToStorage(
244        [in] PCUIDLIST_RELATIVE pidl,
245        [in] LPBC pbcReserved,
246        [in] REFIID riid,
247        [out, iid_is(riid)] void **ppvObj);
248
249    HRESULT CompareIDs(
250        [in] LPARAM lParam,
251        [in] PCUIDLIST_RELATIVE pidl1,
252        [in] PCUIDLIST_RELATIVE pidl2);
253
254    HRESULT CreateViewObject(
255        [in] HWND hwndOwner,
256        [in] REFIID riid,
257        [out, iid_is(riid)] void **ppvOut);
258
259    HRESULT GetAttributesOf(
260        [in] UINT cidl,
261        [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl,
262        [in, out] SFGAOF *rgfInOut);
263
264    HRESULT GetUIObjectOf(
265        [in] HWND hwndOwner,
266        [in] UINT cidl,
267        [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl,
268        [in] REFIID riid,
269        [in, out, unique] UINT *prgfInOut,
270        [out, iid_is(riid)] void **ppvOut);
271
272    HRESULT GetDisplayNameOf(
273        [in] PCUITEMID_CHILD pidl,
274        [in] SHGDNF uFlags,
275        [out] STRRET *lpName);
276
277    HRESULT SetNameOf(
278        [in] HWND hwnd,
279        [in] PCUITEMID_CHILD pidl,
280        [in, string] LPCOLESTR lpszName,
281        [in] SHGDNF uFlags,
282        [out] PITEMID_CHILD *ppidlOut);
283}
284
285
286/*****************************************************************************
287 * IEnumExtraSearch interface
288 */
289[
290    object,
291    uuid(0e700be1-9db6-11d1-a1ce-00c04fd75d13),
292    pointer_default(unique)
293]
294interface IEnumExtraSearch : IUnknown
295{
296    typedef IEnumExtraSearch *LPENUMEXTRASEARCH;
297
298    typedef struct
299    {
300        GUID guidSearch;
301        WCHAR wszFriendlyName[80];
302        /*
303         *WCHAR wszMenuText[80];
304         *WCHAR wszHelpText[MAX_PATH];
305         */
306        WCHAR wszUrl[2084];
307        /*
308         *WCHAR wszIcon[MAX_PATH+10];
309         *WCHAR wszGreyIcon[MAX_PATH+10];
310         *WCHAR wszClrIcon[MAX_PATH+10];
311         */
312    } EXTRASEARCH, *LPEXTRASEARCH;
313
314    HRESULT Next(
315        [in] ULONG celt,
316        [out, size_is(celt), length_is(*pceltFetched)] EXTRASEARCH *rgelt,
317        [out] ULONG *pceltFetched);
318
319    HRESULT Skip( [in] ULONG celt );
320    HRESULT Reset();
321    HRESULT Clone( [out] IEnumExtraSearch **ppenum );
322}
323
324
325/*****************************************************************************
326 * IShellFolder2 interface
327 */
328[
329    object,
330    uuid(93f2f68c-1d1b-11d3-a30e-00c04f79abd1),
331    pointer_default(unique)
332]
333interface IShellFolder2 : IShellFolder
334{
335    typedef struct
336    {
337        GUID    fmtid;
338        DWORD   pid;
339    } SHCOLUMNID, *LPSHCOLUMNID;
340    typedef const SHCOLUMNID *LPCSHCOLUMNID;
341
342    HRESULT GetDefaultSearchGUID( [out] GUID *lpguid );
343    HRESULT EnumSearches( [out] IEnumExtraSearch **ppenum );
344    HRESULT GetDefaultColumn( [in] DWORD dwReserved, [out] ULONG *pSort, [out] ULONG *pDisplay );
345    HRESULT GetDefaultColumnState( [in] UINT iColumn, [out] SHCOLSTATEF *pcsFlags );
346    HRESULT GetDetailsEx( [in] PCUITEMID_CHILD pidl, [in] const SHCOLUMNID *pscid, [out] VARIANT *pv);
347    HRESULT GetDetailsOf( [in] PCUITEMID_CHILD pidl, [in] UINT iColumn, [out] SHELLDETAILS *psd);
348    HRESULT MapColumnToSCID( [in] UINT iColumn, [in] SHCOLUMNID *pscid );
349}
350
351/*****************************************************************************
352 * IShellItem interface
353 */
354[
355    object,
356    uuid(43826d1e-e718-42ee-bc55-a1e261c37bfe),
357    pointer_default(unique)
358]
359interface IShellItem : IUnknown
360{
361    typedef [v1_enum] enum {
362        SIGDN_NORMALDISPLAY                = 0,
363        SIGDN_PARENTRELATIVEPARSING        = 0x80018001,
364        SIGDN_DESKTOPABSOLUTEPARSING       = 0x80028000,
365        SIGDN_PARENTRELATIVEEDITING        = 0x80031001,
366        SIGDN_DESKTOPABSOLUTEEDITING       = 0x8004c000,
367        SIGDN_FILESYSPATH                  = 0x80058000,
368        SIGDN_URL                          = 0x80068000,
369        SIGDN_PARENTRELATIVEFORADDRESSBAR  = 0x8007c001,
370        SIGDN_PARENTRELATIVE               = 0x80080001
371    } SIGDN; /* & 0xFFFF => SHGDN */
372
373    [v1_enum] enum _SICHINTF
374    {
375        SICHINT_DISPLAY                       = 0x00000000,
376        SICHINT_CANONICAL                     = 0x10000000,
377        SICHINT_TEST_FILESYSPATH_IF_NOT_EQUAL = 0x20000000,
378        SICHINT_ALLFIELDS                     = 0x80000000
379    };
380    typedef DWORD SICHINTF;
381
382    HRESULT BindToHandler(
383        [in] IBindCtx *pbc,
384        [in] REFGUID rbhid,
385        [in] REFIID riid,
386        [out, iid_is(riid)] void **ppvOut);
387
388    HRESULT GetParent( [out] IShellItem **ppsi );
389
390    HRESULT GetDisplayName(
391        [in] SIGDN sigdnName,
392        [out] LPWSTR *ppszName);
393
394    HRESULT GetAttributes(
395        [in] SFGAOF sfgaoMask,
396        [out] SFGAOF *psfgaoAttribs);
397
398    HRESULT Compare(
399        [in] IShellItem *psi,
400        [in] SICHINTF hint,
401        [out] int *piOrder);
402}
403
404/*****************************************************************************
405 * IShellItem2 interface
406 */
407[
408    object,
409    uuid(7E9FB0D3-919F-4307-AB2E-9B1860310C93),
410    pointer_default(unique)
411]
412interface IShellItem2 : IShellItem
413{
414    HRESULT GetPropertyStore(
415        [in] GETPROPERTYSTOREFLAGS flags,
416        [in] REFIID riid,
417        [out, iid_is(riid)] void **ppv);
418
419    HRESULT GetPropertyStoreWithCreateObject(
420        [in] GETPROPERTYSTOREFLAGS flags,
421        [in] IUnknown *punkCreateObject,
422        [in] REFIID riid,
423        [out, iid_is(riid)] void **ppv);
424
425    HRESULT GetPropertyStoreForKeys(
426        [in, size_is(cKeys)] const PROPERTYKEY *rgKeys,
427        [in] UINT cKeys,
428        [in] GETPROPERTYSTOREFLAGS flags,
429        [in] REFIID riid,
430        [out, iid_is(riid)] void **ppv);
431
432    HRESULT GetPropertyDescriptionList(
433        [in] REFPROPERTYKEY keyType,
434        [in] REFIID riid,
435        [out, iid_is(riid)] void **ppv);
436
437    HRESULT Update(
438        [in, unique] IBindCtx *pbc);
439
440    HRESULT GetProperty(
441        [in] REFPROPERTYKEY key,
442        [out] PROPVARIANT *ppropvar);
443
444    HRESULT GetCLSID(
445        [in] REFPROPERTYKEY key,
446        [out] CLSID *pclsid);
447
448    HRESULT GetFileTime (
449        [in] REFPROPERTYKEY key,
450        [out] FILETIME *pft);
451
452    HRESULT GetInt32(
453        [in] REFPROPERTYKEY key,
454        [out] int *pi);
455
456    HRESULT GetString(
457        [in] REFPROPERTYKEY key,
458        [out, string] LPWSTR *ppsz);
459
460    HRESULT GetUInt32(
461        [in] REFPROPERTYKEY key,
462        [out] ULONG *pui);
463
464    HRESULT GetUInt64(
465        [in] REFPROPERTYKEY key,
466        [out] ULONGLONG *pull);
467
468    HRESULT GetBool(
469        [in] REFPROPERTYKEY key,
470        [out] BOOL *pf);
471}
472
473typedef enum tagNWMF {
474    NWMF_UNLOADING        = 0x0001,
475    NWMF_USERINITED       = 0x0002,
476    NWMF_FIRST            = 0x0004,
477    NWMF_OVERRIDEKEY      = 0x0008,
478    NWMF_SHOWHELP         = 0x0010,
479    NWMF_HTMLDIALOG       = 0x0020,
480    NWMF_FROMDIALOGCHILD  = 0x0040,
481    NWMF_USERREQUESTED    = 0x0080,
482    NWMF_USERALLOWED      = 0x0100
483} NWMF;
484
485[
486    uuid(d2bc4c84-3f72-4a52-a604-7bcbf3982cbb),
487    object,
488    pointer_default(unique)
489]
490interface INewWindowManager : IUnknown
491{
492    HRESULT EvaluateNewWindow(
493        [in, string] LPCWSTR pszUrl,
494        [in, string] LPCWSTR pszName,
495        [in, string] LPCWSTR pszUrlContext,
496        [in, string] LPCWSTR pszFeatures,
497        [in]         BOOL fReplace,
498        [in]         DWORD dwFlags,
499        [in]         DWORD dwUserActionTime);
500}
501
502cpp_quote("#define SID_SNewWindowManager IID_INewWindowManager")
503
504/*****************************************************************************
505 * IEnumShellItems interface
506 */
507[
508 object,
509 uuid(70629033-E363-4A28-A567-0DB78006E6D7),
510 pointer_default(unique)
511]
512interface IEnumShellItems : IUnknown
513{
514    [local] HRESULT Next(
515        [in] ULONG celt,
516        [out, size_is(celt), length_is(*pceltFetched)] IShellItem **rgelt,
517        [out] ULONG *pceltFetched);
518
519    [call_as(Next)] HRESULT RemoteNext(
520        [in] ULONG celt,
521        [out, size_is(celt), length_is(*pceltFetched)] IShellItem **rgelt,
522        [out] ULONG *pceltFetched);
523
524    HRESULT Skip(
525        [in] ULONG celt);
526
527    HRESULT Reset();
528
529    HRESULT Clone(
530        [out] IEnumShellItems **ppenum);
531}
532
533/*****************************************************************************
534 * IShellItemArray interface
535 */
536[
537 object,
538 uuid(B63EA76D-1F85-456F-A19C-48159EFA858B),
539 pointer_default(unique)
540]
541interface IShellItemArray : IUnknown
542{
543    typedef [v1_enum] enum SIATTRIBFLAGS {
544        SIATTRIBFLAGS_AND            = 0x0001,
545        SIATTRIBFLAGS_OR             = 0x0002,
546        SIATTRIBFLAGS_APPCOMPAT      = 0x0003,
547        SIATTRIBFLAGS_MASK           = 0x0003,
548        SIATTRIBFLAGS_ALLITEMS       = 0x4000
549    } SIATTRIBFLAGS;
550    cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(SIATTRIBFLAGS)")
551
552    HRESULT BindToHandler(
553        [in, unique] IBindCtx *pbc,
554        [in] REFGUID bhid,
555        [in] REFIID riid,
556        [out, iid_is(riid)] void **ppvOut);
557
558    HRESULT GetPropertyStore(
559        [in] GETPROPERTYSTOREFLAGS flags,
560        [in] REFIID riid,
561        [out, iid_is(riid)] void **ppv);
562
563    HRESULT GetPropertyDescriptionList(
564        [in] REFPROPERTYKEY keyType,
565        [in] REFIID riid,
566        [out, iid_is(riid)] void **ppv);
567
568    HRESULT GetAttributes(
569        [in] SIATTRIBFLAGS AttribFlags,
570        [in] SFGAOF sfgaoMask,
571        [out] SFGAOF *psfgaoAttribs);
572
573    HRESULT GetCount(
574        [out] DWORD *pdwNumItems);
575
576    HRESULT GetItemAt(
577        [in] DWORD dwIndex,
578        [out] IShellItem **ppsi);
579
580    HRESULT EnumItems(
581        [out] IEnumShellItems **ppenumShellItems);
582
583}
584
585typedef [v1_enum] enum DATAOBJ_GET_ITEM_FLAGS
586{
587    DOGIF_DEFAULT       = 0x0,
588    DOGIF_TRAVERSE_LINK = 0x1,
589    DOGIF_NO_HDROP      = 0x2,
590    DOGIF_NO_URL        = 0x4,
591    DOGIF_ONLY_IF_ONE   = 0x8
592} DATAOBJ_GET_ITEM_FLAGS;
593cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DATAOBJ_GET_ITEM_FLAGS)")
594
595cpp_quote("HRESULT WINAPI SHGetNameFromIDList(PCIDLIST_ABSOLUTE pidl, SIGDN sigdnName, PWSTR *ppszName);")
596cpp_quote("HRESULT WINAPI SHCreateItemFromParsingName(PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void **ppv);")
597cpp_quote("HRESULT WINAPI SHCreateItemFromIDList(PCIDLIST_ABSOLUTE pidl, REFIID riid, void **ppv);")
598cpp_quote("HRESULT WINAPI SHGetItemFromDataObject(IDataObject *pdtobj, DATAOBJ_GET_ITEM_FLAGS dwFlags, REFIID riid, void **ppv);")
599cpp_quote("HRESULT WINAPI SHGetIDListFromObject(IUnknown *punk, PIDLIST_ABSOLUTE *ppidl);")
600cpp_quote("HRESULT WINAPI SHGetItemFromObject(IUnknown *punk, REFIID riid, void **ppv);")
601cpp_quote("HRESULT WINAPI SHCreateShellItemArray(PCIDLIST_ABSOLUTE pidlParent, IShellFolder* psf, UINT cidl, PCUITEMID_CHILD_ARRAY ppidl, IShellItemArray **ppsiItemArray);")
602cpp_quote("HRESULT WINAPI SHCreateShellItemArrayFromShellItem(IShellItem *psi, REFIID riid, void **ppv);")
603cpp_quote("HRESULT WINAPI SHCreateShellItemArrayFromIDLists(UINT cidl, PCIDLIST_ABSOLUTE_ARRAY pidl_array, IShellItemArray **psia);")
604cpp_quote("HRESULT WINAPI SHCreateShellItemArrayFromDataObject(IDataObject *pdo, REFIID riid, void **ppv);")
605
606/*****************************************************************************
607 * IShellItemFilter interface
608 */
609[
610 object,
611 uuid(2659B475-EEB8-48B7-8F07-B378810F48CF),
612 pointer_default(unique)
613]
614interface IShellItemFilter : IUnknown
615{
616    HRESULT IncludeItem(
617        [in] IShellItem *psi);
618
619    HRESULT GetEnumFlagsForItem(
620        [in] IShellItem *psi,
621        [out] SHCONTF *pgrfFlags);
622}
623
624/*****************************************************************************
625 * FOLDERSETTINGS
626 */
627typedef char *LPVIEWSETTINGS;
628
629typedef enum
630{
631    FWF_AUTOARRANGE         = 0x00000001,
632    FWF_ABBREVIATEDNAMES    = 0x00000002,
633    FWF_SNAPTOGRID          = 0x00000004,
634    FWF_OWNERDATA           = 0x00000008,
635    FWF_BESTFITWINDOW       = 0x00000010,
636    FWF_DESKTOP             = 0x00000020,
637    FWF_SINGLESEL           = 0x00000040,
638    FWF_NOSUBFOLDERS        = 0x00000080,
639    FWF_TRANSPARENT         = 0x00000100,
640    FWF_NOCLIENTEDGE        = 0x00000200,
641    FWF_NOSCROLL            = 0x00000400,
642    FWF_ALIGNLEFT           = 0x00000800,
643    FWF_NOICONS             = 0x00001000,
644    FWF_SHOWSELALWAYS       = 0x00002000,
645    FWF_NOVISIBLE           = 0x00004000,
646    FWF_SINGLECLICKACTIVATE = 0x00008000,
647    FWF_NOWEBVIEW           = 0x00010000,
648    FWF_HIDEFILENAMES       = 0x00020000,
649    FWF_CHECKSELECT         = 0x00040000,
650    FWF_NOENUMREFRESH       = 0x00080000,
651    FWF_NOGROUPING          = 0x00100000,
652    FWF_FULLROWSELECT       = 0x00200000,
653    FWF_NOFILTERS           = 0x00400000,
654    FWF_NOCOLUMNHEADER      = 0x00800000,
655    FWF_NOHEADERINALLVIEWS  = 0x01000000,
656    FWF_EXTENDEDTILES       = 0x02000000,
657    FWF_TRICHECKSELECT      = 0x04000000,
658    FWF_AUTOCHECKSELECT     = 0x08000000,
659    FWF_NOBROWSERVIEWSTATE  = 0x10000000,
660    FWF_SUBSETGROUPS        = 0x20000000,
661    FWF_USESEARCHFOLDER     = 0x40000000,
662    FWF_ALLOWRTLREADING     = 0x80000000
663} FOLDERFLAGS;
664
665typedef enum
666{
667    FVM_AUTO       =-1,
668    FVM_ICON       = 1,
669    FVM_FIRST      = FVM_ICON,
670    FVM_SMALLICON  = 2,
671    FVM_LIST       = 3,
672    FVM_DETAILS    = 4,
673    FVM_THUMBNAIL  = 5,
674    FVM_TILE       = 6,
675    FVM_THUMBSTRIP = 7,
676    FVM_CONTENT    = 8,
677    FVM_LAST       = FVM_CONTENT
678} FOLDERVIEWMODE;
679
680typedef struct
681{
682    UINT ViewMode;
683    UINT fFlags;
684} FOLDERSETTINGS, *PFOLDERSETTINGS, *LPFOLDERSETTINGS;
685typedef const FOLDERSETTINGS *LPCFOLDERSETTINGS;
686
687/*****************************************************************************
688 * IShellIcon interface
689 */
690[
691    uuid(000214e5-0000-0000-c000-000000000046),
692    object,
693    pointer_default(unique)
694]
695interface IShellIcon : IUnknown
696{
697    HRESULT GetIconOf(
698        [in] PCUITEMID_CHILD pidl,
699        [in] UINT flags,
700        [out] int *pIconIndex);
701}
702
703/*****************************************************************************
704 * IShellView interface
705 */
706interface IShellBrowser;  /* forward declaration */
707[
708    object,
709    uuid(000214e3-0000-0000-c000-000000000046),
710    pointer_default(unique)
711]
712interface IShellView : IOleWindow
713{
714    typedef IShellView *LPSHELLVIEW;
715
716    cpp_quote("#define SVSI_DESELECT       0x00000000")
717    cpp_quote("#define SVSI_SELECT         0x00000001")
718    cpp_quote("#define SVSI_EDIT           0x00000003")
719    cpp_quote("#define SVSI_DESELECTOTHERS 0x00000004")
720    cpp_quote("#define SVSI_ENSUREVISIBLE  0x00000008")
721    cpp_quote("#define SVSI_FOCUSED        0x00000010")
722    cpp_quote("#define SVSI_TRANSLATEPT    0x00000020")
723    cpp_quote("#define SVSI_SELECTIONMARK  0x00000040")
724    cpp_quote("#define SVSI_POSITIONITEM   0x00000080")
725    cpp_quote("#define SVSI_CHECK          0x00000100")
726    cpp_quote("#define SVSI_NOSTATECHANGE  0x80000000")
727
728    typedef UINT SVSIF;
729
730    typedef enum
731    {
732        SVGIO_BACKGROUND     = 0x00000000,
733        SVGIO_SELECTION      = 0x00000001,
734        SVGIO_ALLVIEW        = 0x00000002,
735        SVGIO_CHECKED        = 0x00000003,
736        SVGIO_TYPE_MASK      = 0x0000000f,
737        SVGIO_FLAG_VIEWORDER = 0x80000000,
738    } SVGIO;
739
740    typedef enum
741    {
742        SVUIA_DEACTIVATE       = 0,
743        SVUIA_ACTIVATE_NOFOCUS = 1,
744        SVUIA_ACTIVATE_FOCUS   = 2,
745        SVUIA_INPLACEACTIVATE  = 3
746    } SVUIA_STATUS;
747
748    HRESULT TranslateAccelerator( [in] MSG *pmsg );
749    HRESULT EnableModeless( [in] BOOL fEnable );
750    HRESULT UIActivate( [in] UINT uState );
751    HRESULT Refresh();
752    HRESULT CreateViewWindow(
753        [in] IShellView *psvPrevious,
754        [in] LPCFOLDERSETTINGS lpfs,
755        [in] IShellBrowser *psb,
756        [out] RECT *prcView,
757        [out] HWND *phWnd);
758
759    HRESULT DestroyViewWindow();
760    HRESULT GetCurrentInfo( [out] LPFOLDERSETTINGS lpfs );
761
762    [local] HRESULT AddPropertySheetPages(
763        [in] DWORD dwReserved,
764        [in] LPFNSVADDPROPSHEETPAGE pfn,
765        [in] LPARAM lparam);
766
767    HRESULT SaveViewState();
768    HRESULT SelectItem(
769        [in] PCUITEMID_CHILD pidlItem,
770        [in] SVSIF uFlags);
771    HRESULT GetItemObject(
772        [in] UINT uItem,
773        [in] REFIID riid,
774        [out, iid_is(riid)] void **ppv);
775}
776
777[
778    object,
779    uuid(88e39e80-3578-11cf-ae69-08002b2e1262),
780    pointer_default(unique)
781]
782interface IShellView2 : IShellView
783{
784    typedef GUID SHELLVIEWID;
785cpp_quote("#include <pshpack8.h>")
786    typedef struct _SV2CVW2_PARAMS
787    {
788        DWORD cbSize;
789        IShellView *psvPrev;
790        LPCFOLDERSETTINGS pfs;
791        IShellBrowser *psbOwner;
792        RECT *prcView;
793        SHELLVIEWID const *pvid;
794        HWND hwndView;
795    } SV2CVW2_PARAMS, *LPSV2CVW2_PARAMS;
796cpp_quote("#include <poppack.h>")
797
798    HRESULT GetView(
799        [in, out] SHELLVIEWID *view_guid,
800        [in] ULONG view_type
801    );
802    HRESULT CreateViewWindow2(
803        [in] LPSV2CVW2_PARAMS view_params
804    );
805    HRESULT HandleRename(
806        [in] PCUITEMID_CHILD new_pidl
807    );
808    HRESULT SelectAndPositionItem(
809        [in] PCUITEMID_CHILD item,
810        [in] UINT flags,
811        [in] POINT *point
812    );
813}
814
815[
816    object,
817    uuid(ec39fa88-f8af-41c5-8421-38bed28f4673),
818    pointer_default(unique)
819]
820interface IShellView3 : IShellView2
821{
822    [v1_enum] enum _SV3CVW3_FLAGS
823    {
824        SV3CVW3_DEFAULT          = 0x00000000,
825        SV3CVW3_NONINTERACTIVE   = 0x00000001,
826        SV3CVW3_FORCEVIEWMODE    = 0x00000002,
827        SV3CVW3_FORCEFOLDERFLAGS = 0x00000004
828    };
829
830    typedef DWORD SV3CVW3_FLAGS;
831
832    HRESULT CreateViewWindow3(
833        [in] IShellBrowser *owner,
834        [in, unique] IShellView *prev_view,
835        [in] SV3CVW3_FLAGS view_flags,
836        [in] FOLDERFLAGS mask,
837        [in] FOLDERFLAGS flags,
838        [in] FOLDERVIEWMODE mode,
839        [in, unique] const SHELLVIEWID *view_id,
840        [in] const RECT *rect,
841        [out] HWND *hwnd);
842}
843
844/*****************************************************************************
845 * IFolderView interface
846 */
847[
848    uuid(cde725b0-ccc9-4519-917e-325d72fab4ce),
849    object,
850    pointer_default(unique)
851]
852interface IFolderView : IUnknown
853{
854    HRESULT GetCurrentViewMode( [out] UINT *mode );
855    HRESULT SetCurrentViewMode( [in] UINT mode );
856    HRESULT GetFolder( [in] REFIID riid, [out, iid_is(riid)] void **ppv );
857    HRESULT Item(
858        [in] int index,
859        [out] PITEMID_CHILD *ppidl
860    );
861    HRESULT ItemCount(
862        [in] UINT flags,
863        [out] int *items
864    );
865    HRESULT Items(
866        [in] UINT flags,
867        [in] REFIID riid,
868        [out, iid_is(riid)] void **ppv
869    );
870    HRESULT GetSelectionMarkedItem( [out] int *item );
871    HRESULT GetFocusedItem( [out] int *item );
872    HRESULT GetItemPosition(
873        [in] PCUITEMID_CHILD pidl,
874        [out] POINT* ppt
875    );
876    HRESULT GetSpacing( [in, out, unique] POINT* pt );
877    HRESULT GetDefaultSpacing( [out] POINT* pt );
878    HRESULT GetAutoArrange();
879    HRESULT SelectItem(
880        [in] int item,
881        [in] DWORD flags
882    );
883    HRESULT SelectAndPositionItems(
884        [in] UINT cidl,
885        [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl,
886        [in, unique, size_is(cidl)] POINT* apt,
887        [in] DWORD flags
888    );
889}
890
891[v1_enum] enum tagSORTDIRECTION
892{
893    SORT_DESCENDING = -1,
894    SORT_ASCENDING = 1
895};
896typedef int SORTDIRECTION;
897
898typedef struct SORTCOLUMN
899{
900    PROPERTYKEY propkey;
901    SORTDIRECTION direction;
902} SORTCOLUMN;
903
904typedef [v1_enum] enum FVTEXTTYPE
905{
906    FVST_EMPTYTEXT = 0
907} FVTEXTTYPE;
908
909[
910    uuid(1af3a467-214f-4298-908e-06b03e0b39f9),
911    object,
912    pointer_default(unique)
913]
914interface IFolderView2 : IFolderView
915{
916    HRESULT SetGroupBy(
917        [in] REFPROPERTYKEY key,
918        [in] BOOL ascending);
919
920    [local]
921    HRESULT GetGroupBy(
922        [out] PROPERTYKEY *pkey,
923        [out] BOOL *ascending);
924
925    [call_as(GetGroupBy)]
926    HRESULT RemoteGetGroupBy(
927        [out] PROPERTYKEY *pkey,
928        [out] BOOL *ascending);
929
930    HRESULT SetViewProperty(
931        [in] PCUITEMID_CHILD pidl,
932        [in] REFPROPERTYKEY propkey,
933        [in] REFPROPVARIANT propvar);
934
935    HRESULT GetViewProperty(
936        [in] PCUITEMID_CHILD pidl,
937        [in] REFPROPERTYKEY propkey,
938        [out] PROPVARIANT *propvar);
939
940    HRESULT SetTileViewProperties(
941        [in] PCUITEMID_CHILD pidl,
942        [in, string] LPCWSTR prop_list);
943
944    HRESULT SetExtendedTileViewProperties(
945        [in] PCUITEMID_CHILD pidl,
946        [in, string] LPCWSTR prop_list);
947
948    HRESULT SetText(
949        [in] FVTEXTTYPE type,
950        [in] LPCWSTR text);
951
952    HRESULT SetCurrentFolderFlags(
953        [in] DWORD mask,
954        [in] DWORD flags);
955
956    HRESULT GetCurrentFolderFlags([out] DWORD *flags);
957
958    HRESULT GetSortColumnCount([out] int *columns);
959
960    HRESULT SetSortColumns(
961        [in, size_is(count)] const SORTCOLUMN *columns,
962        [in] int count);
963
964    HRESULT GetSortColumns(
965        [out, size_is(count)] SORTCOLUMN *columns,
966        [in] int count);
967
968    HRESULT GetItem(
969        [in] int ittem,
970        [in] REFIID riid,
971        [out, iid_is(riid)] void **ppv);
972
973    HRESULT GetVisibleItem(
974        [in] int start,
975        [in] BOOL previous,
976        [out] int *item);
977
978    HRESULT GetSelectedItem(
979        [in] int start,
980        [out] int *item);
981
982    HRESULT GetSelection(
983        [in] BOOL none_implies_folder,
984        [out] IShellItemArray **array);
985
986    HRESULT GetSelectionState(
987        [in] PCUITEMID_CHILD pidl,
988        [out] DWORD *flags);
989
990    HRESULT InvokeVerbOnSelection([in, unique, string] LPCSTR verb);
991
992    HRESULT SetViewModeAndIconSize(
993        [in] FOLDERVIEWMODE mode,
994        [in] int size);
995
996    HRESULT GetViewModeAndIconSize(
997        [out] FOLDERVIEWMODE *mode,
998        [out] int *size);
999
1000    HRESULT SetGroupSubsetCount([in] UINT visible_rows);
1001
1002    HRESULT GetGroupSubsetCount([out] UINT *visible_rows);
1003
1004    HRESULT SetRedraw([in] BOOL redraw);
1005
1006    HRESULT IsMoveInSameFolder();
1007
1008    HRESULT DoRename();
1009}
1010
1011/*****************************************************************************
1012 * IShellBrowser interface
1013 */
1014[
1015    object,
1016    uuid(000214e2-0000-0000-c000-000000000046),
1017    pointer_default(unique)
1018]
1019interface IShellBrowser : IOleWindow
1020{
1021    typedef IShellBrowser *LPSHELLBROWSER;
1022
1023cpp_quote("#define SBSP_DEFBROWSER            0x00000000")
1024cpp_quote("#define SBSP_SAMEBROWSER           0x00000001")
1025cpp_quote("#define SBSP_NEWBROWSER            0x00000002")
1026cpp_quote("#define SBSP_DEFMODE               0x00000000")
1027cpp_quote("#define SBSP_OPENMODE              0x00000010")
1028cpp_quote("#define SBSP_EXPLOREMODE           0x00000020")
1029cpp_quote("#define SBSP_HELPMODE              0x00000040")
1030cpp_quote("#define SBSP_NOTRANSFERHIST        0x00000080")
1031cpp_quote("#define SBSP_ABSOLUTE              0x00000000")
1032cpp_quote("#define SBSP_RELATIVE              0x00001000")
1033cpp_quote("#define SBSP_PARENT                0x00002000")
1034cpp_quote("#define SBSP_NAVIGATEBACK          0x00004000")
1035cpp_quote("#define SBSP_NAVIGATEFORWARD       0x00008000")
1036cpp_quote("#define SBSP_ALLOW_AUTONAVIGATE    0x00010000")
1037cpp_quote("#define SBSP_KEEPSAMETEMPLATE      0x00020000")
1038cpp_quote("#define SBSP_KEEPWORDWHEELTEXT     0x00040000")
1039cpp_quote("#define SBSP_ACTIVATE_NOFOCUS      0x00080000")
1040cpp_quote("#define SBSP_CREATENOHISTORY       0x00100000")
1041cpp_quote("#define SBSP_PLAYNOSOUND           0x00200000")
1042cpp_quote("#define SBSP_CALLERUNTURUSTED      0x00800000")
1043cpp_quote("#define SBSP_TRUSTFIRSTDOWNLOAD    0x01000000")
1044cpp_quote("#define SBSP_UNTRUSTEDFORDOWNLOAD  0x02000000")
1045cpp_quote("#define SBSP_NOAUTOSELECT          0x04000000")
1046cpp_quote("#define SBSP_WRITENOHISTORY        0x08000000")
1047cpp_quote("#define SBSP_TRUSTEDFORACTIVEX     0x10000000")
1048cpp_quote("#define SBSP_FEEDNAVIGATION        0x20000000")
1049cpp_quote("#define SBSP_REDIRECT              0x40000000")
1050cpp_quote("#define SBSP_INITIATEDBYHLINKFRAME 0x80000000")
1051
1052cpp_quote("#define FCW_STATUS      0x0001")
1053cpp_quote("#define FCW_TOOLBAR     0x0002")
1054cpp_quote("#define FCW_TREE        0x0003")
1055cpp_quote("#define FCW_INTERNETBAR 0x0006")
1056cpp_quote("#define FCW_PROGRESS    0x0008")
1057
1058cpp_quote("#define FCT_MERGE       0x0001")
1059cpp_quote("#define FCT_CONFIGABLE  0x0002")
1060cpp_quote("#define FCT_ADDTOEND    0x0004")
1061
1062cpp_quote("#if 0")
1063    typedef LPARAM LPTBBUTTONSB;
1064cpp_quote("#else")
1065cpp_quote("#include <commctrl.h>")
1066cpp_quote("typedef LPTBBUTTON LPTBBUTTONSB;")
1067cpp_quote("#endif")
1068
1069    HRESULT InsertMenusSB(
1070        [in] HMENU hmenuShared,
1071        [in, out] LPOLEMENUGROUPWIDTHS lpMenuWidths);
1072
1073    HRESULT SetMenuSB(
1074        [in] HMENU hmenuShared,
1075        [in] HOLEMENU holemenuReserved,
1076        [in] HWND hwndActiveObject);
1077
1078    HRESULT RemoveMenusSB( [in] HMENU hmenuShared );
1079    HRESULT SetStatusTextSB( [in, unique] LPCOLESTR pszStatusText );
1080    HRESULT EnableModelessSB( [in] BOOL fEnable );
1081    HRESULT TranslateAcceleratorSB( [in] MSG *pmsg, [in] WORD wID );
1082
1083    HRESULT BrowseObject(
1084        [in] PCUIDLIST_RELATIVE pidl,
1085        [in] UINT wFlags);
1086
1087    HRESULT GetViewStateStream(
1088        [in] DWORD grfMode,
1089        [out] IStream **ppStrm);
1090
1091    HRESULT GetControlWindow(
1092        [in] UINT id,
1093        [out] HWND *phwnd);
1094
1095    [local] HRESULT SendControlMsg(
1096        [in] UINT id,
1097        [in] UINT uMsg,
1098        [in] WPARAM wParam,
1099        [in] LPARAM lParam,
1100        [in] LRESULT *pret);
1101
1102    HRESULT QueryActiveShellView( [out] IShellView **ppshv );
1103    HRESULT OnViewWindowActive( [in] IShellView *pshv );
1104
1105    [local]
1106    HRESULT SetToolbarItems(
1107        [in] LPTBBUTTONSB lpButtons,
1108        [in] UINT nButtons,
1109        [in] UINT uFlags);
1110}
1111
1112
1113/*****************************************************************************
1114 * IShellLinkA interface
1115 */
1116[
1117    object,
1118    uuid(000214ee-0000-0000-c000-000000000046),
1119    pointer_default(unique)
1120]
1121interface IShellLinkA : IUnknown
1122{
1123    typedef enum
1124    {
1125        SLR_NO_UI               = 0x0001,
1126        SLR_ANY_MATCH           = 0x0002,
1127        SLR_UPDATE              = 0x0004,
1128        SLR_NOUPDATE            = 0x0008,
1129        SLR_NOSEARCH            = 0x0010,
1130        SLR_NOTRACK             = 0x0020,
1131        SLR_NOLINKINFO          = 0x0040,
1132        SLR_INVOKE_MSI          = 0x0080,
1133        SLR_NO_UI_WITH_MSG_PUMP = 0x0101,
1134    } SLR_FLAGS;
1135
1136    typedef enum
1137    {
1138        SLGP_SHORTPATH   = 0x0001,
1139        SLGP_UNCPRIORITY = 0x0002,
1140        SLGP_RAWPATH     = 0x0004,
1141    } SLGP_FLAGS;
1142
1143    HRESULT GetPath(
1144        [out, size_is(cch)] LPSTR pszFile,
1145        [in] int cch,
1146        [in, out, unique] WIN32_FIND_DATAA *pfd,
1147        [in] DWORD fFlags);
1148
1149    HRESULT GetIDList( [out] PIDLIST_ABSOLUTE * ppidl );
1150
1151    HRESULT SetIDList( [in] PCIDLIST_ABSOLUTE pidl );
1152
1153    HRESULT GetDescription(
1154        [out, size_is(cch)] LPSTR pszName,
1155        [in] int cch);
1156
1157    HRESULT SetDescription( [in] LPCSTR pszName );
1158
1159    HRESULT GetWorkingDirectory(
1160        [out, size_is(cch)] LPSTR pszDir,
1161        [in] int cch);
1162
1163    HRESULT SetWorkingDirectory( [in] LPCSTR pszDir );
1164
1165    HRESULT GetArguments(
1166        [out, size_is(cch)] LPSTR pszArgs,
1167        [in] int cch);
1168
1169    HRESULT SetArguments( [in] LPCSTR pszArgs );
1170
1171    HRESULT GetHotkey( [out] WORD *pwHotkey );
1172
1173    HRESULT SetHotkey( [in] WORD wHotkey );
1174
1175    HRESULT GetShowCmd( [out] int *piShowCmd );
1176
1177    HRESULT SetShowCmd( [in] int iShowCmd );
1178
1179    HRESULT GetIconLocation(
1180        [out, size_is(cch)] LPSTR pszIconPath,
1181        [in] int cch,
1182        [out] int *piIcon);
1183
1184    HRESULT SetIconLocation(
1185        [in] LPCSTR pszIconPath,
1186        [in] int iIcon);
1187
1188    HRESULT SetRelativePath(
1189        [in] LPCSTR pszPathRel,
1190        [in] DWORD dwReserved);
1191
1192    HRESULT Resolve(
1193        [in] HWND hwnd,
1194        [in] DWORD fFlags);
1195
1196    HRESULT SetPath( [in] LPCSTR pszFile );
1197}
1198
1199
1200/*****************************************************************************
1201 * IShellLinkW interface
1202 */
1203[
1204    object,
1205    uuid(000214f9-0000-0000-c000-000000000046),
1206    pointer_default(unique)
1207]
1208interface IShellLinkW : IUnknown
1209{
1210    HRESULT GetPath(
1211        [out, size_is(cch)] LPWSTR pszFile,
1212        [in] int cch,
1213        [in, out] WIN32_FIND_DATAW *pfd,
1214        [in] DWORD fFlags);
1215
1216    HRESULT GetIDList( [out] PIDLIST_ABSOLUTE * ppidl );
1217
1218    HRESULT SetIDList( [in] PCIDLIST_ABSOLUTE pidl );
1219
1220    HRESULT GetDescription(
1221        [out, size_is(cch)] LPWSTR pszName,
1222        [in] int cch);
1223
1224    HRESULT SetDescription( [in] LPCWSTR pszName );
1225
1226    HRESULT GetWorkingDirectory(
1227        [out, size_is(cch)] LPWSTR pszDir,
1228        [in] int cch);
1229
1230    HRESULT SetWorkingDirectory( [in] LPCWSTR pszDir );
1231
1232    HRESULT GetArguments(
1233        [out, size_is(cch)] LPWSTR pszArgs,
1234        [in] int cch);
1235
1236    HRESULT SetArguments( [in] LPCWSTR pszArgs );
1237
1238    HRESULT GetHotkey( [out] WORD *pwHotkey );
1239
1240    HRESULT SetHotkey( [in] WORD wHotkey );
1241
1242    HRESULT GetShowCmd( [out] int *piShowCmd );
1243
1244    HRESULT SetShowCmd( [in] int iShowCmd );
1245
1246    HRESULT GetIconLocation(
1247        [out, size_is(cch)] LPWSTR pszIconPath,
1248        [in] int cch,
1249        [out] int *piIcon);
1250
1251    HRESULT SetIconLocation(
1252        [in] LPCWSTR pszIconPath,
1253        [in] int iIcon);
1254
1255    HRESULT SetRelativePath(
1256        [in] LPCWSTR pszPathRel,
1257        [in] DWORD dwReserved);
1258
1259    HRESULT Resolve(
1260        [in] HWND hwnd,
1261        [in] DWORD fFlags);
1262
1263    HRESULT SetPath( [in] LPCWSTR pszFile );
1264}
1265
1266cpp_quote("#define IShellLink WINELIB_NAME_AW(IShellLink)")
1267
1268
1269/*****************************************************************************
1270 * IShellExtInit interface
1271 */
1272[
1273    object,
1274    uuid(000214e8-0000-0000-c000-000000000046),
1275    pointer_default(unique),
1276    local
1277]
1278interface IShellExtInit : IUnknown
1279{
1280    typedef IShellExtInit *LPSHELLEXTINIT;
1281
1282    HRESULT Initialize(
1283        [in] PCIDLIST_ABSOLUTE pidlFolder,
1284        [in] IDataObject *pdtobj,
1285        [in] HKEY hkeyProgID);
1286}
1287
1288
1289/*******************************************************************************/
1290/* Note: the following interfaces are not in shobjidl.idl under Windows, they  */
1291/* are declared directly in shlobj.h. It hopefully won't break anything to put */
1292/* them here anyway.                                                           */
1293/*******************************************************************************/
1294
1295#ifndef MAX_PATH
1296#define MAX_PATH 260
1297#endif
1298
1299
1300/*****************************************************************************
1301 * IPersistFolder3 interface
1302 */
1303[
1304    object,
1305    uuid(cef04fdf-fe72-11d2-87a5-00c04f6837cf),
1306    pointer_default(unique)
1307]
1308interface IPersistFolder3 : IPersistFolder2
1309{
1310    typedef struct
1311    {
1312    PIDLIST_ABSOLUTE	pidlTargetFolder;
1313	WCHAR		szTargetParsingName[MAX_PATH];
1314	WCHAR		szNetworkProvider[MAX_PATH];
1315	DWORD		dwAttributes;
1316	int		csidl;
1317    } PERSIST_FOLDER_TARGET_INFO;
1318
1319    HRESULT InitializeEx(
1320        [in] IBindCtx *pbc,
1321        [in] PCIDLIST_ABSOLUTE pidlRoot,
1322        [in] const PERSIST_FOLDER_TARGET_INFO *ppfti);
1323
1324    HRESULT GetFolderTargetInfo( [out] PERSIST_FOLDER_TARGET_INFO *ppfti );
1325}
1326
1327
1328/*****************************************************************************
1329 * IExtractIconA interface
1330 */
1331[
1332    object,
1333    uuid(000214eb-0000-0000-c000-000000000046),
1334    pointer_default(unique),
1335    local
1336]
1337interface IExtractIconA : IUnknown
1338{
1339cpp_quote("#define GIL_OPENICON     0x0001")
1340cpp_quote("#define GIL_FORSHELL     0x0002")
1341cpp_quote("#define GIL_ASYNC        0x0020")
1342cpp_quote("#define GIL_DEFAULTICON  0x0040")
1343cpp_quote("#define GIL_FORSHORTCUT  0x0080")
1344
1345cpp_quote("#define GIL_SIMULATEDOC  0x0001")
1346cpp_quote("#define GIL_PERINSTANCE  0x0002")
1347cpp_quote("#define GIL_PERCLASS     0x0004")
1348cpp_quote("#define GIL_NOTFILENAME  0x0008")
1349cpp_quote("#define GIL_DONTCACHE    0x0010")
1350
1351    typedef IExtractIconA *LPEXTRACTICONA;
1352
1353    HRESULT GetIconLocation(
1354        [in] UINT uFlags,
1355        [out, size_is(cchMax)] LPSTR szIconFile,
1356        [in] UINT cchMax,
1357        [out] INT *piIndex,
1358        [out] UINT *pwFlags);
1359
1360    HRESULT Extract(
1361        [in] LPCSTR pszFile,
1362        [in] UINT nIconIndex,
1363        [out] HICON *phiconLarge,
1364        [out] HICON *phiconSmall,
1365        [in] UINT nIconSize );
1366}
1367
1368
1369/*****************************************************************************
1370 * IExtractIconW interface
1371 */
1372[
1373    object,
1374    uuid(000214fa-0000-0000-c000-000000000046),
1375    pointer_default(unique),
1376    local
1377]
1378interface IExtractIconW : IUnknown
1379{
1380    typedef IExtractIconW *LPEXTRACTICONW;
1381
1382    HRESULT GetIconLocation(
1383        [in] UINT uFlags,
1384        [out, size_is(cchMax)] LPWSTR szIconFile,
1385        [in] UINT cchMax,
1386        [out] INT *piIndex,
1387        [out] UINT *pwFlags);
1388
1389    HRESULT Extract(
1390        [in] LPCWSTR pszFile,
1391        [in] UINT nIconIndex,
1392        [out] HICON *phiconLarge,
1393        [out] HICON *phiconSmall,
1394        [in] UINT nIconSize );
1395}
1396
1397cpp_quote("#define LPEXTRACTICON WINELIB_NAME_AW(LPEXTRACTICON)")
1398cpp_quote("#define IExtractIcon WINELIB_NAME_AW(IExtractIcon)")
1399
1400
1401/*****************************************************************************
1402 * ICommDlgBrowser interface
1403 */
1404[
1405    object,
1406    uuid(000214f1-0000-0000-c000-000000000046),
1407    pointer_default(unique)
1408]
1409interface ICommDlgBrowser : IUnknown
1410{
1411cpp_quote("#define CDBOSC_SETFOCUS     0x00000000")
1412cpp_quote("#define CDBOSC_KILLFOCUS    0x00000001")
1413cpp_quote("#define CDBOSC_SELCHANGE    0x00000002")
1414cpp_quote("#define CDBOSC_RENAME       0x00000003")
1415cpp_quote("#define CDBOSC_STATECHANGE  0x00000004")
1416
1417    typedef ICommDlgBrowser *LPCOMMDLGBROWSER;
1418
1419    HRESULT OnDefaultCommand( [in] IShellView *shv );
1420    HRESULT OnStateChange( [in] IShellView *shv, [in] ULONG uChange );
1421    HRESULT IncludeObject( [in] IShellView *shv, [in] PCUITEMID_CHILD pidl );
1422}
1423
1424
1425/*****************************************************************************
1426 * ICommDlgBrowser2 interface
1427 */
1428[
1429 object,
1430 uuid(10339516-2894-11D2-9039-00C04F8EEB3E),
1431 pointer_default(unique)
1432]
1433interface ICommDlgBrowser2 : ICommDlgBrowser
1434{
1435
1436    HRESULT Notify(
1437        [in] IShellView *ppshv,
1438        [in] DWORD dwNotifyType);
1439
1440    HRESULT GetDefaultMenuText(
1441        [in] IShellView *ppshv,
1442        [out, string, size_is(cchMax)] LPWSTR pszText,
1443        [in] int cchMax);
1444
1445    HRESULT GetViewFlags(
1446        [out] DWORD *pdwFlags);
1447}
1448
1449
1450/*****************************************************************************
1451 * ICommDlgBrowser3 interface
1452 */
1453[
1454 object,
1455 uuid(C8AD25A1-3294-41EE-8165-71174BD01C57),
1456 pointer_default(unique)
1457]
1458interface ICommDlgBrowser3 : ICommDlgBrowser2
1459{
1460
1461    HRESULT OnColumnClicked(
1462        [in] IShellView *ppshv,
1463        [in] int iColumn);
1464
1465    HRESULT GetCurrentFilter(
1466        [out, string, size_is(cchFileSpec)] LPWSTR pszFileSpec,
1467        [in] int cchFileSpec);
1468
1469    HRESULT OnPreviewCreated(
1470        [in] IShellView *ppshv);
1471}
1472
1473/*****************************************************************************
1474 * IDockingWindow interface
1475 */
1476[
1477    object,
1478    uuid(012dd920-7b26-11d0-8ca9-00a0c92dbfe8)
1479]
1480interface IDockingWindow : IOleWindow
1481{
1482    HRESULT ShowDW(
1483        [in] BOOL fShow);
1484
1485    HRESULT CloseDW(
1486        [in] DWORD dwReserved);
1487
1488    HRESULT ResizeBorderDW(
1489        [in] LPCRECT prcBorder,
1490        [in] IUnknown *punkToolbarSite,
1491        [in] BOOL fReserved);
1492};
1493
1494
1495/*****************************************************************************
1496 * IDockingWindowFrame interface
1497 */
1498[
1499    object,
1500    uuid(47d2657a-7b27-11d0-8ca9-00a0c92dbfe8),
1501    pointer_default(unique),
1502    local
1503]
1504interface IDockingWindowFrame : IOleWindow
1505{
1506cpp_quote("#define DWFRF_NORMAL           0x0000")
1507cpp_quote("#define DWFRF_DELETECONFIGDATA 0x0001")
1508cpp_quote("#define DWFAF_HIDDEN           0x0001")
1509
1510    HRESULT AddToolbar(
1511        [in] IUnknown *punkSrc,
1512        [in] LPCWSTR pwszItem,
1513        [in] DWORD dwAddFlags);
1514
1515    HRESULT RemoveToolbar(
1516        [in] IUnknown *punkSrc,
1517        [in] DWORD dwRemoveFlags);
1518
1519    HRESULT FindToolbar(
1520        [in] LPCWSTR pwszItem,
1521        [in] REFIID riid,
1522        [out] LPVOID *ppvObj);
1523}
1524
1525
1526/*****************************************************************************
1527 * IDragSourceHelper interface
1528 */
1529[
1530    object,
1531    uuid(de5bf786-477a-11d2-839d-00c04fd918d0),
1532    pointer_default(unique),
1533    local
1534]
1535interface IDragSourceHelper : IUnknown
1536{
1537    typedef struct
1538    {
1539        SIZE     sizeDragImage;
1540        POINT    ptOffset;
1541        HBITMAP  hbmpDragImage;
1542        COLORREF crColorKey;
1543    } SHDRAGIMAGE, *LPSHDRAGIMAGE;
1544
1545  HRESULT InitializeFromBitmap(
1546      [in] LPSHDRAGIMAGE pshdi,
1547      [in] IDataObject *pDataObject);
1548
1549  HRESULT InitializeFromWindow(
1550      [in] HWND hwnd,
1551      [in] POINT *ppt,
1552      [in] IDataObject *pDataObject);
1553}
1554
1555
1556/*****************************************************************************
1557 * IDropTargetHelper interface
1558 */
1559[
1560    object,
1561    uuid(4657278b-411b-11d2-839a-00c04fd918d0),
1562    pointer_default(unique),
1563    local
1564]
1565interface IDropTargetHelper : IUnknown
1566{
1567    HRESULT DragEnter(
1568        [in] HWND hwndTarget,
1569        [in] IDataObject *pDataObject,
1570        [in] POINT *ppt,
1571        [in] DWORD dwEffect);
1572
1573    HRESULT DragLeave();
1574
1575    HRESULT DragOver(
1576        [in] POINT *ppt,
1577        [in] DWORD dwEffect);
1578
1579    HRESULT Drop(
1580        [in] IDataObject *pDataObject,
1581        [in] POINT *ppt,
1582        [in] DWORD dwEffect);
1583
1584    HRESULT Show( [in] BOOL fShow );
1585}
1586
1587
1588/*****************************************************************************
1589 * IContextMenu interface
1590 */
1591[
1592    object,
1593    uuid(000214e4-0000-0000-c000-000000000046),
1594    pointer_default(unique),
1595    local
1596]
1597interface IContextMenu : IUnknown
1598{
1599cpp_quote("#define CMF_NORMAL            0x00000000")
1600cpp_quote("#define CMF_DEFAULTONLY       0x00000001")
1601cpp_quote("#define CMF_VERBSONLY         0x00000002")
1602cpp_quote("#define CMF_EXPLORE           0x00000004")
1603cpp_quote("#define CMF_NOVERBS           0x00000008")
1604cpp_quote("#define CMF_CANRENAME         0x00000010")
1605cpp_quote("#define CMF_NODEFAULT         0x00000020")
1606cpp_quote("#define CMF_INCLUDESTATIC     0x00000040")
1607cpp_quote("#define CMF_EXTENDEDVERBS     0x00000100")
1608cpp_quote("#define CMF_DISABLEDVERBS     0x00000200")
1609cpp_quote("#define CMF_ASYNCVERBSTATE    0x00000400")
1610cpp_quote("#define CMF_OPTIMIZEFORINVOKE 0x00000800")
1611cpp_quote("#define CMF_SYNCCASCADEMENU   0x00001000")
1612cpp_quote("#define CMF_DONOTPICKDEFAULT  0x00002000")
1613cpp_quote("#define CMF_RESERVED          0xffff0000")
1614
1615cpp_quote("#define GCS_VERBA         0x00000000")
1616cpp_quote("#define GCS_HELPTEXTA     0x00000001")
1617cpp_quote("#define GCS_VALIDATEA     0x00000002")
1618cpp_quote("#define GCS_VERBW         0x00000004")
1619cpp_quote("#define GCS_HELPTEXTW     0x00000005")
1620cpp_quote("#define GCS_VALIDATEW     0x00000006")
1621cpp_quote("#define GCS_UNICODE       0x00000004")
1622cpp_quote("#define GCS_VERB          WINELIB_NAME_AW(GCS_VERB)")
1623cpp_quote("#define GCS_HELPTEXT      WINELIB_NAME_AW(GCS_HELPTEXT)")
1624cpp_quote("#define GCS_VALIDATE      WINELIB_NAME_AW(GCS_VALIDATE)")
1625
1626cpp_quote("#define CMDSTR_NEWFOLDERA   \"NewFolder\"")
1627cpp_quote("#define CMDSTR_VIEWLISTA    \"ViewList\"")
1628cpp_quote("#define CMDSTR_VIEWDETAILSA \"ViewDetails\"")
1629cpp_quote("#if defined(__GNUC__)")
1630cpp_quote("# define CMDSTR_NEWFOLDERW (const WCHAR []){ 'N','e','w','F','o','l','d','e','r',0 }")
1631cpp_quote("# define CMDSTR_VIEWLISTW (const WCHAR []){ 'V','i','e','w','L','i','s','t',0 }")
1632cpp_quote("# define CMDSTR_VIEWDETAILSW (const WCHAR []){ 'V','i','e','w','D','e','t','a','i','l','s',0 }")
1633cpp_quote("#elif defined(_MSC_VER)")
1634cpp_quote("# define CMDSTR_NEWFOLDERW   L\"NewFolder\"")
1635cpp_quote("# define CMDSTR_VIEWLISTW    L\"ViewList\"")
1636cpp_quote("# define CMDSTR_VIEWDETAILSW L\"ViewDetails\"")
1637cpp_quote("#else")
1638cpp_quote("static const WCHAR CMDSTR_NEWFOLDERW[] = {'N','e','w','F','o','l','d','e','r',0};")
1639cpp_quote("static const WCHAR CMDSTR_VIEWLISTW [] = {'V','i','e','w','L','i','s','t',0};")
1640cpp_quote("static const WCHAR CMDSTR_VIEWDETAILSW[] = {'V','i','e','w','D','e','t','a','i','l','s',0};")
1641cpp_quote("#endif")
1642cpp_quote("#define CMDSTR_NEWFOLDER    WINELIB_NAME_AW(CMDSTR_NEWFOLDER)")
1643cpp_quote("#define CMDSTR_VIEWLIST     WINELIB_NAME_AW(CMDSTR_VIEWLIST)")
1644cpp_quote("#define CMDSTR_VIEWDETAILS  WINELIB_NAME_AW(CMDSTR_VIEWDETAILS)")
1645
1646cpp_quote("#define CMIC_MASK_HOTKEY         SEE_MASK_HOTKEY")
1647cpp_quote("#define CMIC_MASK_ICON           SEE_MASK_ICON")
1648cpp_quote("#define CMIC_MASK_FLAG_NO_UI     SEE_MASK_FLAG_NO_UI")
1649cpp_quote("#define CMIC_MASK_UNICODE        SEE_MASK_UNICODE")
1650cpp_quote("#define CMIC_MASK_NO_CONSOLE     SEE_MASK_NO_CONSOLE")
1651cpp_quote("#define CMIC_MASK_HASLINKNAME    SEE_MASK_HASLINKNAME")
1652cpp_quote("#define CMIC_MASK_FLAG_SEP_VDM   SEE_MASK_FLAG_SEPVDM")
1653cpp_quote("#define CMIC_MASK_HASTITLE       SEE_MASK_HASTITLE")
1654cpp_quote("#define CMIC_MASK_ASYNCOK        SEE_MASK_ASYNCOK")
1655cpp_quote("#define CMIC_MASK_NOASYNC        SEE_MASK_NOASYNC")
1656cpp_quote("#define CMIC_MASK_SHIFT_DOWN     0x10000000")
1657cpp_quote("#define CMIC_MASK_PTINVOKE       0x20000000")
1658cpp_quote("#define CMIC_MASK_CONTROL_DOWN   0x40000000")
1659cpp_quote("#define CMIC_MASK_FLAG_LOG_USAGE SEE_MASK_FLAG_LOG_USAGE")
1660cpp_quote("#define CMIC_MASK_NOZONECHECKS   SEE_MASK_NOZONECHECKS")
1661
1662    typedef IContextMenu *LPCONTEXTMENU;
1663
1664    typedef struct tagCMINVOKECOMMANDINFO
1665    {
1666        DWORD cbSize;
1667        DWORD fMask;
1668        HWND hwnd;
1669        LPCSTR lpVerb;
1670        LPCSTR lpParameters;
1671        LPCSTR lpDirectory;
1672        INT nShow;
1673        DWORD dwHotKey;
1674        HANDLE hIcon;
1675    } CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
1676
1677    typedef struct tagCMInvokeCommandInfoEx
1678    {
1679        DWORD cbSize;
1680        DWORD fMask;
1681        HWND hwnd;
1682        LPCSTR lpVerb;
1683        LPCSTR lpParameters;
1684        LPCSTR lpDirectory;
1685        INT nShow;
1686        DWORD dwHotKey;
1687        HANDLE hIcon;
1688        LPCSTR lpTitle;
1689        LPCWSTR lpVerbW;
1690        LPCWSTR lpParametersW;
1691        LPCWSTR lpDirectoryW;
1692        LPCWSTR lpTitleW;
1693        POINT ptInvoke;
1694    } CMINVOKECOMMANDINFOEX, *LPCMINVOKECOMMANDINFOEX;
1695
1696    HRESULT QueryContextMenu(
1697        [in] HMENU hmenu,
1698        [in] UINT indexMenu,
1699        [in] UINT idCmdFirst,
1700        [in] UINT idCmdLast,
1701        [in] UINT uFlags);
1702
1703    HRESULT InvokeCommand( [in] LPCMINVOKECOMMANDINFO lpici );
1704
1705    HRESULT GetCommandString(
1706        [in] UINT_PTR idCmd,
1707        [in] UINT uType,
1708        [out] UINT *pwReserved,
1709        [out, size_is(cchMax)] LPSTR pszName,
1710        [in] UINT cchMax);
1711}
1712
1713
1714/*****************************************************************************
1715 * IContextMenu2 interface
1716 */
1717[
1718    object,
1719    uuid(000214f4-0000-0000-c000-000000000046),
1720    pointer_default(unique),
1721    local
1722]
1723interface IContextMenu2 : IContextMenu
1724{
1725    typedef IContextMenu2 *LPCONTEXTMENU2;
1726
1727    HRESULT HandleMenuMsg(
1728        [in] UINT uMsg,
1729        [in] WPARAM wParam,
1730        [in] LPARAM lParam);
1731}
1732
1733
1734/*****************************************************************************
1735 * IContextMenu3 interface
1736 */
1737[
1738    object,
1739    uuid(bcfce0a0-ec17-11d0-8d10-00a0c90f2719),
1740    pointer_default(unique),
1741    local
1742]
1743interface IContextMenu3 : IContextMenu2
1744{
1745    typedef IContextMenu3 *LPCONTEXTMENU3;
1746
1747    HRESULT HandleMenuMsg2(
1748        [in] UINT uMsg,
1749        [in] WPARAM wParam,
1750        [in] LPARAM lParam,
1751        [out] LRESULT *plResult);
1752}
1753
1754/*****************************************************************************
1755 * IContextMenuCB interface
1756 */
1757
1758[
1759    object,
1760    uuid(3409e930-5a39-11d1-83fa-00a0c90dc849),
1761    pointer_default(unique),
1762    local
1763]
1764interface IContextMenuCB : IUnknown
1765{
1766    HRESULT CallBack(
1767        [in] IShellFolder *psf,
1768        [in] HWND hwndOwner,
1769        [in] IDataObject *pdtobj,
1770        [in] UINT uMsg,
1771        [in] WPARAM wParam,
1772        [in] LPARAM lParam);
1773}
1774
1775/*****************************************************************************
1776 * IShellExecuteHookA interface
1777 */
1778[
1779    object,
1780    uuid(000214f5-0000-0000-c000-000000000046),
1781    pointer_default(unique),
1782    local
1783]
1784interface IShellExecuteHookA : IUnknown
1785{
1786    cpp_quote("struct _SHELLEXECUTEINFOA;")
1787    HRESULT Execute(
1788        [in, out] struct _SHELLEXECUTEINFOA* pei);
1789}
1790
1791
1792/*****************************************************************************
1793 * IShellExecuteHookW interface
1794 */
1795[
1796    object,
1797    uuid(000214fb-0000-0000-c000-000000000046),
1798    pointer_default(unique),
1799    local
1800]
1801interface IShellExecuteHookW : IUnknown
1802{
1803    cpp_quote("struct _SHELLEXECUTEINFOW;")
1804    HRESULT Execute(
1805		[in, out] struct _SHELLEXECUTEINFOW* pei);
1806}
1807
1808/*****************************************************************************
1809 * IShellLinkDataList interface
1810 */
1811[
1812    object,
1813    uuid(45e2b4ae-b1c3-11d0-b92f-00a0c90312e1),
1814    pointer_default(unique)
1815]
1816interface IShellLinkDataList : IUnknown
1817{
1818    [local] HRESULT AddDataBlock(
1819                [in] void *pDataBlock);
1820    [local] HRESULT CopyDataBlock(
1821                [in] DWORD dwSig,
1822                [out] void **ppDataBlock);
1823    HRESULT RemoveDataBlock(
1824                [in] DWORD dwSig);
1825    HRESULT GetFlags(
1826                [out] DWORD *pdwFlags);
1827    HRESULT SetFlags(
1828                [in] DWORD dwFlags);
1829}
1830
1831
1832/*****************************************************************************
1833 * IResolveShellLink interface
1834 */
1835[
1836    object,
1837    uuid(5cd52983-9449-11d2-963a-00c04f79adf0),
1838    pointer_default(unique)
1839]
1840interface IResolveShellLink : IUnknown
1841{
1842    HRESULT ResolveShellLink(
1843                [in] IUnknown *punk,
1844                [in] HWND hwnd,
1845                [in] DWORD fFlags);
1846}
1847
1848
1849/*****************************************************************************
1850 * IURLSearchHook interface
1851 */
1852[
1853    object,
1854    uuid(ac60f6a0-0fd9-11d0-99cb-00c04fd64497),
1855    pointer_default(unique),
1856    local
1857]
1858interface IURLSearchHook : IUnknown
1859{
1860    HRESULT Translate(
1861                [in, out] LPWSTR lpwszSearchURL,
1862                [in] DWORD cchBufferSize);
1863}
1864
1865
1866/*****************************************************************************
1867 * ISearchContext interface
1868 */
1869[
1870    object,
1871    uuid(09f656a2-41af-480c-88f7-16cc0d164615),
1872    pointer_default(unique),
1873    local
1874]
1875interface ISearchContext : IUnknown
1876{
1877    HRESULT GetSearchUrl(
1878                [in] BSTR *pbstrSearchUrl);
1879    HRESULT GetSearchText(
1880                [in] BSTR *pbstrSearchText);
1881    HRESULT GetSearchStyle(
1882                [in] BSTR *pdwSearchStyle);
1883}
1884
1885
1886/*****************************************************************************
1887 * IURLSearchHook2 interface
1888 */
1889[
1890    object,
1891    uuid(5ee44da4-6d32-46e3-86bc-07540dedd0e0),
1892    pointer_default(unique),
1893    local
1894]
1895interface IURLSearchHook2 : IURLSearchHook
1896{
1897    HRESULT TranslateWithSearchContext(
1898                [in, out] LPWSTR lpwszSearchURL,
1899                [in] DWORD cchBufferSize,
1900                [in] ISearchContext *pSearchContext);
1901}
1902
1903
1904cpp_quote("#define INewShortcutHook WINELIB_NAME_AW(INewShortcutHook)")
1905
1906/*****************************************************************************
1907 * INewShortcutHookA interface
1908 */
1909[
1910    object,
1911    uuid(000214e1-0000-0000-c000-000000000046),
1912    pointer_default(unique),
1913    local
1914]
1915interface INewShortcutHookA : IUnknown
1916{
1917    HRESULT SetReferent(
1918                [in] LPCSTR pcszReferent,
1919                [in] HWND hwnd);
1920    HRESULT GetReferent(
1921                [out] LPSTR pcszReferent,
1922                [in] int cchReferent);
1923    HRESULT SetFolder(
1924                [in] LPCSTR pcszReferent);
1925    HRESULT GetFolder(
1926                [out] LPSTR pcszReferent,
1927                [in] int cchFolder);
1928    HRESULT GetName(
1929                [out] LPSTR pszName,
1930                [in] int cchName);
1931    HRESULT GetExtension(
1932                [out] LPSTR pszExtension,
1933                [in] int cchExtension);
1934}
1935
1936
1937/*****************************************************************************
1938 * INewShortcutHookW interface
1939 */
1940[
1941    object,
1942    uuid(000214f7-0000-0000-c000-000000000046),
1943    pointer_default(unique),
1944    local
1945]
1946interface INewShortcutHookW : IUnknown
1947{
1948    HRESULT SetReferent(
1949                [in] LPCWSTR pcszReferent,
1950                [in] HWND hwnd);
1951    HRESULT GetReferent(
1952                [out] LPWSTR pcszReferent,
1953                [in] int cchReferent);
1954    HRESULT SetFolder(
1955                [in] LPCWSTR pcszReferent);
1956    HRESULT GetFolder(
1957                [out] LPWSTR pcszReferent,
1958                [in] int cchFolder);
1959    HRESULT GetName(
1960                [out] LPWSTR pszName,
1961                [in] int cchName);
1962    HRESULT GetExtension(
1963                [out] LPWSTR pszExtension,
1964                [in] int cchExtension);
1965}
1966
1967/*****************************************************************************
1968 * IRunnableTask interface
1969 */
1970[
1971    object,
1972    uuid(85788d00-6807-11d0-b810-00c04fd706ec),
1973    pointer_default(unique),
1974    local
1975]
1976interface IRunnableTask : IUnknown
1977{
1978    HRESULT Run();
1979    HRESULT Kill([in] BOOL fWait);
1980    HRESULT Suspend();
1981    HRESULT Resume();
1982    ULONG IsRunning();
1983}
1984
1985/*****************************************************************************
1986 * IShellChangeNotify interface
1987 */
1988[
1989    object,
1990    uuid(d82be2b1-5764-11d0-a96e-00c04fd705a2),
1991    pointer_default(unique),
1992    local
1993]
1994interface IShellChangeNotify : IUnknown
1995{
1996    HRESULT OnChange(
1997                [in] LONG lEvent,
1998                [in] PCIDLIST_ABSOLUTE pidl1,
1999                [in] PCIDLIST_ABSOLUTE pidl2);
2000}
2001
2002cpp_quote("#define STR_FILE_SYS_BIND_DATA  L\"File System Bind Data\"")
2003
2004/*****************************************************************************
2005 * IFileSystemBindData interface
2006 */
2007[
2008    object,
2009    uuid(01e18d10-4d8b-11d2-855d-006008059367),
2010    pointer_default(unique),
2011    local
2012]
2013interface IFileSystemBindData : IUnknown
2014{
2015    HRESULT SetFindData(
2016                [in] const WIN32_FIND_DATAW *pfd);
2017    HRESULT GetFindData(
2018                [out] WIN32_FIND_DATAW *pfd);
2019}
2020
2021/*****************************************************************************
2022 *    ITaskbarList interface
2023 */
2024[
2025    object,
2026    uuid(56FDF342-FD6D-11d0-958A-006097C9A090),
2027    pointer_default(unique)
2028]
2029interface ITaskbarList : IUnknown
2030{
2031    HRESULT HrInit();
2032
2033    HRESULT AddTab(
2034        [in] HWND hwnd);
2035
2036    HRESULT DeleteTab(
2037        [in] HWND hwnd);
2038
2039    HRESULT ActivateTab(
2040        [in] HWND hwnd);
2041
2042    HRESULT SetActiveAlt(
2043        [in] HWND hwnd);
2044}
2045
2046/*****************************************************************************
2047 *    ITaskbarList2 interface
2048 */
2049[
2050    object,
2051    uuid(602D4995-B13A-429B-A66E-1935E44F4317),
2052    pointer_default(unique)
2053]
2054interface ITaskbarList2 : ITaskbarList
2055{
2056    HRESULT MarkFullscreenWindow(
2057        [in] HWND hwnd,
2058        [in] BOOL fullscreen);
2059}
2060
2061cpp_quote("#ifdef MIDL_PASS")
2062typedef IUnknown* HIMAGELIST;
2063cpp_quote("#endif")
2064
2065typedef [v1_enum] enum THUMBBUTTONFLAGS {
2066    THBF_ENABLED         = 0x0000,
2067    THBF_DISABLED        = 0x0001,
2068    THBF_DISMISSONCLICK  = 0x0002,
2069    THBF_NOBACKGROUND    = 0x0004,
2070    THBF_HIDDEN          = 0x0008,
2071    THBF_NONINTERACTIVE  = 0x0010
2072} THUMBBUTTONFLAGS;
2073
2074cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(THUMBBUTTONFLAGS)")
2075
2076typedef [v1_enum] enum THUMBBUTTONMASK {
2077    THB_BITMAP   = 0x0001,
2078    THB_ICON     = 0x0002,
2079    THB_TOOLTIP  = 0x0004,
2080    THB_FLAGS    = 0x0008
2081} THUMBBUTTONMASK;
2082
2083cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(THUMBBUTTONMASK)")
2084
2085cpp_quote("#include <pshpack8.h>")
2086typedef struct THUMBBUTTON {
2087    THUMBBUTTONMASK dwMask;
2088    UINT iId;
2089    UINT iBitmap;
2090    HICON hIcon;
2091    WCHAR szTip[260];
2092    THUMBBUTTONFLAGS dwFlags;
2093} THUMBBUTTON, *LPTHUMBBUTTON;
2094cpp_quote("#include <poppack.h>")
2095
2096[
2097    uuid(ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf),
2098    object
2099]
2100interface ITaskbarList3 : ITaskbarList2
2101{
2102    typedef [v1_enum] enum TBPFLAG {
2103        TBPF_NOPROGRESS     = 0x0000,
2104        TBPF_INDETERMINATE  = 0x0001,
2105        TBPF_NORMAL         = 0x0002,
2106        TBPF_ERROR          = 0x0004,
2107        TBPF_PAUSED         = 0x0008
2108    } TBPFLAG;
2109
2110    cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(TBPFLAG)")
2111
2112    HRESULT SetProgressValue(
2113            [in] HWND hwnd,
2114            [in] ULONGLONG ullCompleted,
2115            [in] ULONGLONG ullTotal);
2116
2117    HRESULT SetProgressState(
2118            [in] HWND hwnd,
2119            [in] TBPFLAG tbpFlags);
2120
2121    HRESULT RegisterTab(
2122            [in] HWND hwndTab,
2123            [in] HWND hwndMDI);
2124
2125    HRESULT UnregisterTab([in] HWND hwndTab);
2126
2127    HRESULT SetTabOrder(
2128            [in] HWND hwndTab,
2129            [in] HWND hwndInsertBefore);
2130
2131    HRESULT SetTabActive(
2132            [in] HWND hwndTab,
2133            [in] HWND hwndMDI,
2134            [in] DWORD dwReserved);
2135
2136    HRESULT ThumbBarAddButtons(
2137            [in] HWND hwnd,
2138            [in] UINT cButtons,
2139            [in, size_is(cButtons)] LPTHUMBBUTTON pButton);
2140
2141    HRESULT ThumbBarUpdateButtons(
2142            [in] HWND hwnd,
2143            [in] UINT cButtons,
2144            [in, size_is(cButtons)] LPTHUMBBUTTON pButton);
2145
2146    HRESULT ThumbBarSetImageList(
2147            [in] HWND hwnd,
2148            [in] HIMAGELIST himl);
2149
2150    HRESULT SetOverlayIcon(
2151            [in] HWND hwnd,
2152            [in] HICON hIcon,
2153            [in, unique, string] LPCWSTR pszDescription);
2154
2155    HRESULT SetThumbnailTooltip(
2156            [in] HWND hwnd,
2157            [in, unique, string] LPCWSTR pszTip);
2158
2159    HRESULT SetThumbnailClip(
2160            [in] HWND hwnd,
2161            [in] RECT *prcClip);
2162}
2163
2164[
2165    uuid(c43dc798-95d1-4bea-9030-bb99e2983a1a),
2166    object
2167]
2168interface ITaskbarList4 : ITaskbarList3
2169{
2170    typedef [v1_enum] enum STPFLAG {
2171        STPF_NONE                       = 0x0000,
2172        STPF_USEAPPTHUMBNAILALWAYS      = 0x0001,
2173        STPF_USEAPPTHUMBNAILWHENACTIVE  = 0x0002,
2174        STPF_USEAPPPEEKALWAYS           = 0x0004,
2175        STPF_USEAPPPEEKWHENACTIVE       = 0x0008
2176    } STPFLAG;
2177
2178    cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(STPFLAG)")
2179
2180    HRESULT SetTabProperties(
2181            [in] HWND hwndTab,
2182            [in] STPFLAG stpFlags);
2183}
2184
2185/*****************************************************************************
2186 * IDefaultExtractIconInit interface
2187 */
2188
2189[
2190    object,
2191    uuid(800AB0B8-F5FA-4e72-8FF3-B1A243B87BD9), /* FIXME: wrong value! */
2192    pointer_default(unique),
2193	local
2194]
2195interface IDefaultExtractIconInit : IUnknown
2196{
2197    HRESULT SetDefaultIcon(
2198                       [in] LPCWSTR pszFile,
2199                       [in] int iIcon);
2200    HRESULT SetFlags(
2201                       [in] UINT uFlags);
2202    HRESULT SetKey(
2203                       [in] HKEY hkey);
2204    HRESULT SetNormalIcon(
2205                       [in] LPCWSTR pszFile,
2206                       [in] int iIcon);
2207    HRESULT SetOpenIcon(
2208                       [in] LPCWSTR pszFile,
2209                       [in] int iIcon);
2210    HRESULT SetShortcutIcon(
2211                       [in] LPCWSTR pszFile,
2212                       [in] int iIcon);
2213}
2214
2215
2216#ifdef __REACTOS__
2217/*****************************************************************************
2218 * IExplorerCommand interface (Vista+)
2219 */
2220
2221interface IEnumExplorerCommand;
2222
2223[
2224    uuid(A08CE4D0-FA25-44AB-B57C-C7B1C323E0B9),
2225    pointer_default(unique)
2226]
2227interface IExplorerCommand : IUnknown
2228{
2229    cpp_quote("// GetIcon(ppszIcon) Receives resource string that identifies icon source")
2230    typedef [v1_enum] enum _EXPCMDSTATE
2231    {
2232        ECS_ENABLED         = 0x000,
2233        ECS_DISABLED        = 0x001,
2234        ECS_HIDDEN          = 0x002,
2235        ECS_CHECKBOX        = 0x004,
2236        ECS_CHECKED         = 0x008,
2237        ECS_RADIOCHECK      = 0x010,    // Windows 7
2238    } EXPCMDSTATE;
2239
2240    typedef [v1_enum] enum _EXPCMDFLAGS
2241    {
2242        ECF_DEFAULT         = 0x000,
2243        ECF_HASSUBCOMMANDS  = 0x001,
2244        ECF_HASSPLITBUTTON  = 0x002,
2245        ECF_HIDELABEL       = 0x004,
2246        ECF_ISSEPARATOR     = 0x008,
2247        ECF_HASLUASHIELD    = 0x010,
2248        ECF_SEPARATORBEFORE = 0x020,    // Windows 7
2249        ECF_SEPARATORAFTER  = 0x040,    // Windows 7
2250        ECF_ISDROPDOWN      = 0x080,    // Windows 7
2251        ECF_TOGGLEABLE      = 0x100,    // Windows 8
2252        ECF_AUTOMENUICONS   = 0x200,    // Windows 8
2253    } EXPCMDFLAGS;
2254
2255    HRESULT GetTitle(
2256                    [in, unique] IShellItemArray *psiItemArray,
2257                    [out, string] LPWSTR *ppszName);
2258    HRESULT GetIcon(
2259                    [in, unique] IShellItemArray *psiItemArray,
2260                    [out, string] LPWSTR *ppszIcon);
2261    HRESULT GetToolTip(
2262                    [in, unique] IShellItemArray *psiItemArray,
2263                    [out, string] LPWSTR *ppszInfotip);
2264    HRESULT GetCanonicalName(
2265                    [out] GUID* pguidCommandName);
2266    HRESULT GetState(
2267                    [in] IShellItemArray *psiItemArray,
2268                    [in] BOOL fOkToBeSlow,
2269                    [out] EXPCMDSTATE *pCmdState);
2270    HRESULT Invoke(
2271                    [in] IShellItemArray *psiItemArray,
2272                    [in, unique] IBindCtx *pbc);
2273    HRESULT GetFlags(
2274                    [out] EXPCMDFLAGS *pFlags);
2275    HRESULT EnumSubCommands(
2276                    [out] IEnumExplorerCommand **ppEnum);
2277};
2278
2279
2280/*****************************************************************************
2281 * IExplorerCommandState interface (Vista+)
2282 */
2283[
2284    object,
2285    uuid(BDDACB60-7657-47AE-8445-D23E1ACF82AE),
2286    pointer_default(unique)
2287]
2288interface IExplorerCommandState : IUnknown
2289{
2290    HRESULT GetState(
2291                    [in] IShellItemArray *psiItemArray,
2292                    [in] BOOL fOkToBeSlow,
2293                    [out] EXPCMDSTATE *pCmdState);
2294}
2295
2296
2297/*****************************************************************************
2298 * IInitializeCommand interface (Vista+)
2299 */
2300[
2301    object,
2302    uuid(85075ACF-231F-40EA-9610-D26B7B58F638),
2303    pointer_default(unique)
2304]
2305interface IInitializeCommand : IUnknown
2306{
2307    HRESULT Initialize(
2308                    [in, string] LPCWSTR pszCommandName,
2309                    [in] IPropertyBag *ppb);
2310}
2311
2312
2313/*****************************************************************************
2314 * IEnumExplorerCommand interface (Vista+)
2315 */
2316[
2317    object,
2318    uuid(A88826F8-186F-4987-AADE-EA0CEF8FBFE8),
2319    pointer_default(unique)
2320]
2321interface IEnumExplorerCommand : IUnknown
2322{
2323    [local]
2324    HRESULT Next(
2325                    [in] ULONG celt,
2326                    [out] IExplorerCommand** pUICommand,
2327                    [out, optional] ULONG *pceltFetched);
2328    [call_as(Next)]
2329    HRESULT RemoteNext(
2330                    [in] ULONG celt,
2331                    [out] IExplorerCommand** pUICommand,
2332                    [out, optional] ULONG *pceltFetched);
2333    HRESULT Skip(
2334                    [in] ULONG celt);
2335    HRESULT Reset();
2336    HRESULT Clone(
2337                    [out] IEnumExplorerCommand **ppenum);
2338};
2339
2340
2341/*****************************************************************************
2342 * IExplorerCommandProvider interface (Vista+)
2343 */
2344[
2345    uuid(64961751-0835-43C0-8FFE-D57686530E64),
2346    pointer_default(unique)
2347]
2348interface IExplorerCommandProvider : IUnknown
2349{
2350    cpp_quote("// GetCommands usually creates an IEnumExplorerCommand")
2351    cpp_quote("// GetCommand usually creates an IExplorerCommand")
2352
2353    HRESULT GetCommands(
2354                    [in] IUnknown *punkSite,
2355                    [in] REFIID riid,
2356                    [out, iid_is(riid)] void **ppv);
2357    HRESULT GetCommand(
2358                    [in] REFGUID rguidCommandId,
2359                    [in] REFIID riid,
2360                    [out, iid_is(riid)] void **ppv);
2361};
2362
2363
2364/*****************************************************************************
2365 * IOpenControlPanel interface (Vista+)
2366 */
2367[
2368    object,
2369    uuid(D11AD862-66DE-4DF4-BF6C-1F5621996AF1),
2370    pointer_default(unique)
2371]
2372interface IOpenControlPanel : IUnknown
2373{
2374    typedef [v1_enum] enum CPVIEW
2375    {
2376        CPVIEW_CLASSIC = 0,
2377        CPVIEW_CATEGORY = 1,
2378        CPVIEW_ALLITEMS = CPVIEW_CLASSIC,
2379        CPVIEW_HOME = CPVIEW_CATEGORY
2380    } CPVIEW;
2381
2382    HRESULT Open(
2383                    [in, optional] LPCWSTR pszName,
2384                    [in, optional] LPCWSTR pszPage,
2385                    [in, optional] IUnknown *punkSite);
2386    HRESULT GetPath(
2387                    [in, optional] LPCWSTR pszName,
2388                    [out, string, size_is(cchPath)] LPWSTR pszPath,
2389                    [in] UINT cchPath);
2390    HRESULT GetCurrentView(
2391                    [out] CPVIEW *pView);
2392}
2393
2394#endif // __REACTOS__
2395
2396/*****************************************************************************
2397 * IDeskBand interface
2398 */
2399cpp_quote("#define DBIM_MINSIZE    0x0001")
2400cpp_quote("#define DBIM_MAXSIZE    0x0002")
2401cpp_quote("#define DBIM_INTEGRAL   0x0004")
2402cpp_quote("#define DBIM_ACTUAL     0x0008")
2403cpp_quote("#define DBIM_TITLE      0x0010")
2404cpp_quote("#define DBIM_MODEFLAGS  0x0020")
2405cpp_quote("#define DBIM_BKCOLOR    0x0040")
2406
2407cpp_quote("#include <pshpack8.h>")
2408
2409typedef struct tagDESKBANDINFO
2410{
2411    DWORD       dwMask;
2412    POINTL      ptMinSize;
2413    POINTL      ptMaxSize;
2414    POINTL      ptIntegral;
2415    POINTL      ptActual;
2416    WCHAR       wszTitle[256];
2417    DWORD       dwModeFlags;
2418    COLORREF    crBkgnd;
2419} DESKBANDINFO;
2420
2421cpp_quote("#include <poppack.h>")
2422
2423cpp_quote("#define DBIMF_NORMAL            0x0000")
2424cpp_quote("#define DBIMF_FIXED             0x0001")
2425cpp_quote("#define DBIMF_FIXEDBMP          0x0004   // a fixed background bitmap (if supported)")
2426cpp_quote("#define DBIMF_VARIABLEHEIGHT    0x0008")
2427cpp_quote("#define DBIMF_UNDELETEABLE      0x0010")
2428cpp_quote("#define DBIMF_DEBOSSED          0x0020")
2429cpp_quote("#define DBIMF_BKCOLOR           0x0040")
2430cpp_quote("#define DBIMF_USECHEVRON        0x0080")
2431cpp_quote("#define DBIMF_BREAK             0x0100")
2432cpp_quote("#define DBIMF_ADDTOFRONT        0x0200")
2433cpp_quote("#define DBIMF_TOPALIGN          0x0400")
2434cpp_quote("#if (NTDDI_VERSION >= NTDDI_LONGHORN)")
2435cpp_quote("#define DBIMF_NOGRIPPER         0x0800")
2436cpp_quote("#define DBIMF_ALWAYSGRIPPER     0x1000")
2437cpp_quote("#define DBIMF_NOMARGINS         0x2000")
2438cpp_quote("#endif  // NTDDI_LONGHORN")
2439
2440cpp_quote("#define DBIF_VIEWMODE_NORMAL         0x0000")
2441cpp_quote("#define DBIF_VIEWMODE_VERTICAL       0x0001")
2442cpp_quote("#define DBIF_VIEWMODE_FLOATING       0x0002")
2443cpp_quote("#define DBIF_VIEWMODE_TRANSPARENT    0x0004")
2444
2445enum tagDESKBANDCID {
2446    DBID_BANDINFOCHANGED    = 0,
2447    DBID_SHOWONLY           = 1,
2448    DBID_MAXIMIZEBAND       = 2,
2449    DBID_PUSHCHEVRON        = 3,
2450    DBID_DELAYINIT          = 4,
2451    DBID_FINISHINIT         = 5,
2452    DBID_SETWINDOWTHEME     = 6,
2453    DBID_PERMITAUTOHIDE     = 7,
2454};
2455
2456cpp_quote("#define DBPC_SELECTFIRST    (DWORD)-1")
2457cpp_quote("#define DBPC_SELECTLAST     (DWORD)-2")
2458
2459cpp_quote("#define CGID_DeskBand IID_IDeskBand")
2460
2461[
2462    uuid(EB0FE172-1A3A-11D0-89B3-00A0C90A90AC),
2463    object,
2464]
2465interface IDeskBand : IDockingWindow
2466{
2467    HRESULT GetBandInfo(
2468        [in] DWORD dwBandID,
2469        [in] DWORD dwViewMode,
2470        [in, out] DESKBANDINFO* pdbi);
2471}
2472
2473cpp_quote("#if (_WIN32_IE >= _WIN32_IE_IE60)")
2474
2475[
2476    uuid(EB0FE173-1A3A-11D0-89B3-00A0C90A90AC),
2477    object,
2478    pointer_default(unique),
2479    local
2480]
2481interface IDeskBar : IOleWindow
2482{
2483    HRESULT SetClient([in] IUnknown* punkClient);
2484
2485    HRESULT GetClient([out] IUnknown** ppunkClient);
2486
2487    HRESULT OnPosRectChangeDB([in] RECT *prc);
2488}
2489
2490
2491/*****************************************************************************
2492 * IMenuPopup interface
2493 */
2494[
2495    uuid(D1E7AFEB-6A2E-11d0-8C78-00C04FD918B4),
2496    object,
2497    pointer_default(unique),
2498    local
2499]
2500interface IMenuPopup : IDeskBar
2501{
2502    enum tagMENUPOPUPSELECT
2503    {
2504        MPOS_EXECUTE = 0,
2505        MPOS_FULLCANCEL,
2506        MPOS_CANCELLEVEL,
2507        MPOS_SELECTLEFT,
2508        MPOS_SELECTRIGHT,
2509        MPOS_CHILDTRACKING
2510    };
2511
2512    enum tagMENUPOPUPPOPUPFLAGS
2513    {
2514        MPPF_SETFOCUS      = 0x00000001,
2515        MPPF_INITIALSELECT = 0x00000002,
2516        MPPF_NOANIMATE     = 0x00000004,
2517        MPPF_KEYBOARD      = 0x00000010,
2518        MPPF_REPOSITION    = 0x00000020,
2519        MPPF_FORCEZORDER   = 0x00000040,
2520        MPPF_FINALSELECT   = 0x00000080,
2521        MPPF_TOP           = 0x20000000,
2522        MPPF_LEFT          = 0x40000000,
2523        MPPF_RIGHT         = 0x60000000,
2524        MPPF_BOTTOM        = 0x80000000,
2525        MPPF_POS_MASK      = 0xE0000000,
2526        MPPF_ALIGN_LEFT    = 0x02000000,
2527        MPPF_ALIGN_RIGHT   = 0x04000000
2528    };
2529    typedef int MP_POPUPFLAGS;
2530
2531    HRESULT Popup(
2532        [in] POINTL *ppt,
2533        [in] RECTL *prcExclude,
2534        [in] MP_POPUPFLAGS dwFlags);
2535
2536    HRESULT OnSelect([in] DWORD dwSelectType);
2537
2538    HRESULT SetSubMenu(
2539        [in] IMenuPopup* pmp,
2540        [in] BOOL fSet);
2541}
2542
2543cpp_quote("#endif /* _WIN32_IE_IE60 */")
2544
2545cpp_quote("#if (_WIN32_IE >= _WIN32_IE_IE40)")
2546
2547/*****************************************************************************
2548 * IBandSite interface
2549 */
2550cpp_quote("#include <pshpack8.h>")
2551
2552typedef struct tagBANDSITEINFO
2553{
2554    DWORD dwMask;
2555    DWORD dwState;
2556    DWORD dwStyle;
2557} BANDSITEINFO;
2558
2559cpp_quote("#include <poppack.h>")
2560
2561
2562enum tagBANDSITECID {
2563    BSID_BANDADDED,
2564    BSID_BANDREMOVED,
2565};
2566
2567cpp_quote("#define BSIM_STATE        0x00000001")
2568cpp_quote("#define BSIM_STYLE        0x00000002")
2569
2570cpp_quote("#define BSSF_VISIBLE      0x00000001")
2571cpp_quote("#define BSSF_NOTITLE      0x00000002")
2572cpp_quote("#define BSSF_UNDELETEABLE 0x00001000")
2573
2574cpp_quote("#define BSIS_AUTOGRIPPER       0x00000000")
2575cpp_quote("#define BSIS_NOGRIPPER         0x00000001")
2576cpp_quote("#define BSIS_ALWAYSGRIPPER     0x00000002")
2577cpp_quote("#define BSIS_LEFTALIGN         0x00000004")
2578cpp_quote("#define BSIS_SINGLECLICK       0x00000008")
2579cpp_quote("#define BSIS_NOCONTEXTMENU     0x00000010")
2580cpp_quote("#define BSIS_NODROPTARGET      0x00000020")
2581cpp_quote("#define BSIS_NOCAPTION         0x00000040")
2582cpp_quote("#define BSIS_PREFERNOLINEBREAK 0x00000080")
2583cpp_quote("#define BSIS_LOCKED            0x00000100")
2584cpp_quote("#if (_WIN32_IE >= _WIN32_IE_IE70)")
2585cpp_quote("#define BSIS_PRESERVEORDERDURINGLAYOUT 0x00000200")
2586cpp_quote("#endif  /* _WIN32_IE_IE70 */")
2587
2588cpp_quote("#define SID_SBandSite IID_IBandSite")
2589cpp_quote("#define CGID_BandSite IID_IBandSite")
2590
2591[
2592    object,
2593    uuid(4CF504B0-DE96-11D0-8B3F-00A0C911E8E5)
2594]
2595interface IBandSite : IUnknown
2596{
2597    HRESULT AddBand([in] IUnknown* punk);
2598
2599    HRESULT EnumBands(
2600        [in] UINT uBand,
2601        [out] DWORD* pdwBandID);
2602
2603    HRESULT QueryBand(
2604        [in] DWORD dwBandID,
2605        [out] IDeskBand** ppstb,
2606        [out] DWORD* pdwState,
2607        [out, string, size_is(cchName)] LPWSTR pszName,
2608        [in] int cchName);
2609
2610    HRESULT SetBandState(
2611        [in] DWORD dwBandID,
2612        [in] DWORD dwMask,
2613        [in] DWORD dwState);
2614
2615    HRESULT RemoveBand([in] DWORD dwBandID);
2616
2617    HRESULT GetBandObject(
2618        [in] DWORD dwBandID,
2619        [in] REFIID riid,
2620        [out, iid_is(riid)] void **ppv);
2621
2622    HRESULT SetBandSiteInfo([in] const BANDSITEINFO *pbsinfo);
2623
2624    HRESULT GetBandSiteInfo([in, out] BANDSITEINFO *pbsinfo);
2625}
2626
2627cpp_quote("#endif /* _WIN32_IE_IE40 */")
2628
2629/*****************************************************************************
2630 * IMenuBand interface
2631 */
2632[
2633    uuid(568804CD-CBD7-11d0-9816-00C04FD91972),
2634    object,
2635    pointer_default(unique),
2636    local
2637]
2638interface IMenuBand : IUnknown
2639{
2640    enum tagMENUBANDHANDLERCID {
2641        MBHANDCID_PIDLSELECT = 0,
2642    };
2643
2644    HRESULT IsMenuMessage([in] MSG* pmsg);
2645
2646    HRESULT TranslateMenuMessage(
2647        [in, out] MSG* pmsg,
2648        [out] LRESULT* plRet);
2649}
2650
2651/*****************************************************************************
2652 * IShellMenuCallback interface
2653 */
2654cpp_quote("#include <pshpack8.h>")
2655
2656typedef struct tagSMDATA
2657{
2658	DWORD			dwMask;
2659	DWORD			dwFlags;
2660	HMENU			hmenu;
2661	HWND			hwnd;
2662	UINT			uId;
2663	UINT			uIdParent;
2664	UINT			uIdAncestor;
2665	IUnknown		*punk;
2666	PIDLIST_ABSOLUTE	pidlFolder;
2667	PUITEMID_CHILD	pidlItem;
2668	IShellFolder	*psf;
2669	void			*pvUserData;
2670} SMDATA, *LPSMDATA;
2671
2672cpp_quote("#define SMDM_SHELLFOLDER		0x00000001")
2673cpp_quote("#define SMDM_HMENU			0x00000002")
2674cpp_quote("#define SMDM_TOOLBAR			0x00000004")
2675
2676typedef struct tagSMINFO
2677{
2678	DWORD			dwMask;
2679	DWORD			dwType;
2680	DWORD			dwFlags;
2681	int				iIcon;
2682} SMINFO, *PSMINFO;
2683
2684typedef struct tagSHCSCHANGENOTIFYSTRUCT
2685{
2686	LONG			lEvent;
2687	PCIDLIST_ABSOLUTE	pidl1;
2688	PCIDLIST_ABSOLUTE	pidl2;
2689} SMCSHCHANGENOTIFYSTRUCT, *PSMCSHCHANGENOTIFYSTRUCT;
2690
2691cpp_quote("#include <poppack.h>")
2692
2693enum
2694{
2695	SMIM_TYPE			= 0x00000001,
2696	SMIM_FLAGS			= 0x00000002,
2697	SMIM_ICON			= 0x00000004
2698};
2699
2700enum
2701{
2702	SMIT_SEPARATOR      = 0x00000001,
2703	SMIT_STRING         = 0x00000002
2704};
2705
2706enum
2707{
2708	SMIF_ICON			= 0x00000001,
2709	SMIF_ACCELERATOR	= 0x00000002,
2710	SMIF_DROPTARGET		= 0x00000004,
2711	SMIF_SUBMENU		= 0x00000008,
2712	SMIF_CHECKED		= 0x00000020,
2713	SMIF_DROPCASCADE	= 0x00000040,
2714	SMIF_HIDDEN			= 0x00000080,
2715	SMIF_DISABLED		= 0x00000100,
2716	SMIF_TRACKPOPUP		= 0x00000200,
2717	SMIF_DEMOTED		= 0x00000400,
2718	SMIF_ALTSTATE		= 0x00000800,
2719	SMIF_DRAGNDROP		= 0x00001000,
2720	SMIF_NEW			= 0x00002000,
2721};
2722
2723
2724cpp_quote("#define SMC_INITMENU				0x00000001")
2725cpp_quote("#define SMC_CREATE				0x00000002")
2726cpp_quote("#define SMC_EXITMENU				0x00000003")
2727cpp_quote("#define SMC_GETINFO				0x00000005")
2728cpp_quote("#define SMC_GETSFINFO			0x00000006")
2729cpp_quote("#define SMC_GETOBJECT			0x00000007")
2730cpp_quote("#define SMC_GETSFOBJECT			0x00000008")
2731cpp_quote("#define SMC_SFEXEC				0x00000009")
2732cpp_quote("#define SMC_SFSELECTITEM			0x0000000A")
2733cpp_quote("#define SMC_REFRESH				0x00000010")
2734cpp_quote("#define SMC_DEMOTE				0x00000011")
2735cpp_quote("#define SMC_PROMOTE				0x00000012")
2736cpp_quote("#define SMC_DEFAULTICON			0x00000016")
2737cpp_quote("#define SMC_NEWITEM				0x00000017")
2738cpp_quote("#define SMC_CHEVRONEXPAND		0x00000019")
2739cpp_quote("#define SMC_DISPLAYCHEVRONTIP	0x0000002A")
2740cpp_quote("#define SMC_SETSFOBJECT			0x0000002D")
2741cpp_quote("#define SMC_SHCHANGENOTIFY		0x0000002E")
2742cpp_quote("#define SMC_CHEVRONGETTIP		0x0000002F")
2743cpp_quote("#define SMC_SFDDRESTRICTED		0x00000030")
2744
2745[
2746    uuid(4CA300A1-9B8D-11d1-8B22-00C04FD918D0),
2747    object,
2748    pointer_default(unique),
2749    local
2750]
2751interface IShellMenuCallback : IUnknown
2752{
2753	HRESULT CallbackSM(
2754		[in, out] LPSMDATA psmd,
2755        [in] UINT uMsg,
2756        [in] WPARAM wParam,
2757        [in] LPARAM lParam);
2758}
2759
2760
2761/*****************************************************************************
2762 * IShellMenu interface
2763 */
2764
2765cpp_quote("#define SMINIT_DEFAULT               0x00000000")
2766cpp_quote("#define SMINIT_RESTRICT_DRAGDROP     0x00000002")
2767cpp_quote("#define SMINIT_TOPLEVEL              0x00000004")
2768cpp_quote("#define SMINIT_CACHED                0x00000010")
2769cpp_quote("#define SMINIT_VERTICAL              0x10000000")
2770cpp_quote("#define SMINIT_HORIZONTAL            0x20000000")
2771cpp_quote("")
2772cpp_quote("#define ANCESTORDEFAULT              (UINT)-1")
2773cpp_quote("")
2774cpp_quote("#define SMSET_TOP                    0x10000000")
2775cpp_quote("#define SMSET_BOTTOM                 0x20000000")
2776cpp_quote("#define SMSET_DONTOWN                0x00000001")
2777cpp_quote("")
2778cpp_quote("#define SMINV_REFRESH                0x00000001")
2779cpp_quote("#define SMINV_ID                     0x00000008")
2780
2781[
2782    uuid(EE1F7637-E138-11d1-8379-00C04FD918D0),
2783    object,
2784    pointer_default(unique),
2785    local
2786]
2787interface IShellMenu : IUnknown
2788{
2789	HRESULT Initialize(
2790		[in] IShellMenuCallback *psmc,
2791        [in] UINT uId,
2792        [in] UINT uIdAncestor,
2793        [in] DWORD dwFlags);
2794
2795	HRESULT GetMenuInfo(
2796		[out] IShellMenuCallback **ppsmc,
2797		[out] UINT *puId,
2798		[out] UINT *puIdAncestor,
2799		[out] DWORD *pdwFlags);
2800
2801	HRESULT SetShellFolder(
2802        [in] IShellFolder *psf,
2803		[in] PCIDLIST_ABSOLUTE pidlFolder,
2804        [in] HKEY hKey,
2805        [in] DWORD dwFlags);
2806
2807	HRESULT GetShellFolder(
2808		[out] DWORD *pdwFlags,
2809		[out] PIDLIST_ABSOLUTE *ppidl,
2810		[in] REFIID riid,
2811		[out] void **ppv);
2812
2813	HRESULT SetMenu(
2814		[in] HMENU hmenu,
2815		[in] HWND hwnd,
2816        [in] DWORD dwFlags);
2817
2818	HRESULT GetMenu(
2819		[out] HMENU *phmenu,
2820		[out] HWND *phwnd,
2821		[out] DWORD *pdwFlags);
2822
2823	HRESULT InvalidateItem(
2824		[in] LPSMDATA psmd,
2825        [in] DWORD dwFlags);
2826
2827	HRESULT GetState(
2828		[out] LPSMDATA psmd);
2829
2830	HRESULT SetMenuToolbar(
2831		[in] IUnknown *punk,
2832        [in] DWORD dwFlags);
2833}
2834
2835cpp_quote("#if (_WIN32_IE >= _WIN32_IE_IE60)")
2836
2837/*****************************************************************************
2838 * ITrackShellMenu interface
2839 */
2840[
2841    uuid(8278F932-2A3E-11d2-838F-00C04FD918D0),
2842    object,
2843    pointer_default(unique),
2844    local
2845]
2846interface ITrackShellMenu : IShellMenu
2847{
2848	HRESULT SetObscured(
2849		[in] HWND hwndTB,
2850		[in] IUnknown *punkBand,
2851		DWORD dwSMSetFlags);
2852
2853	HRESULT Popup(
2854		[in] HWND hwnd,
2855		[in] POINTL *ppt,
2856		[in] RECTL *prcExclude,
2857		MP_POPUPFLAGS dwFlags);
2858};
2859
2860cpp_quote("#endif /* _WIN32_IE_IE60 */")
2861
2862/*****************************************************************************
2863 *    IAutoCompleteDropDown interface
2864 */
2865[
2866    object,
2867    uuid(3CD141F4-3C6A-11d2-BCAA-00C04FD929DB),
2868    pointer_default(unique)
2869]
2870interface IAutoCompleteDropDown : IUnknown
2871{
2872cpp_quote("#define ACDD_VISIBLE   0x0001")
2873
2874    HRESULT GetDropDownStatus(
2875        [out] DWORD *pdwFlags,
2876        [out, string] LPWSTR *ppwszString);
2877
2878    HRESULT ResetEnumerator();
2879}
2880
2881/*****************************************************************************
2882 * IProfferService interface
2883 */
2884[
2885    object,
2886    uuid(cb728b20-f786-11ce-92ad-00aa00a74cd0),
2887    pointer_default(unique)
2888]
2889interface IProfferService : IUnknown
2890{
2891    HRESULT ProfferService(
2892        [in] REFGUID service,
2893        [in] IServiceProvider *pService,
2894        [out] DWORD *pCookie);
2895
2896    HRESULT RevokeService([in] DWORD cookie);
2897}
2898
2899/*****************************************************************************
2900 * IExplorerBrowserEvents interface
2901 */
2902[
2903 object,
2904 uuid(361BBDC7-E6EE-4E13-BE58-58E2240C810F)
2905]
2906interface IExplorerBrowserEvents : IUnknown
2907{
2908    HRESULT OnNavigationPending(
2909        [in] PCIDLIST_ABSOLUTE pidlFolder);
2910
2911    HRESULT OnViewCreated(
2912        [in] IShellView *psv);
2913
2914    HRESULT OnNavigationComplete(
2915        [in] PCIDLIST_ABSOLUTE pidlFolder);
2916
2917    HRESULT OnNavigationFailed(
2918        [in] PCIDLIST_ABSOLUTE pidlFolder);
2919}
2920
2921typedef GUID EXPLORERPANE;
2922typedef EXPLORERPANE *REFEXPLORERPANE;
2923
2924cpp_quote("#define SID_ExplorerPaneVisibility IID_IExplorerPaneVisibility")
2925
2926/*****************************************************************************
2927 * IExplorerPaneVisibility interface
2928 */
2929[
2930 object,
2931 uuid(E07010EC-BC17-44C0-97B0-46C7C95B9EDC)
2932]
2933interface IExplorerPaneVisibility : IUnknown
2934{
2935    typedef enum tagEXPLORERPANESTATE {
2936        EPS_DONTCARE     = 0x0,
2937        EPS_DEFAULT_ON   = 0x1,
2938        EPS_DEFAULT_OFF  = 0x2,
2939        EPS_STATE_MASK   = 0xffff,
2940        EPS_INITIALSTATE = 0x10000,
2941        EPS_FORCE        = 0x20000
2942    } EXPLORERPANESTATE;
2943
2944    HRESULT GetPaneState(
2945        [in] REFEXPLORERPANE ep,
2946        [out] EXPLORERPANESTATE *peps);
2947}
2948
2949typedef [v1_enum] enum tagEXPLORER_BROWSER_FILL_FLAGS {
2950    EBF_NONE                     = 0,
2951    EBF_SELECTFROMDATAOBJECT     = 0x100,
2952    EBF_NODROPTARGET             = 0x200
2953} EXPLORER_BROWSER_FILL_FLAGS;
2954
2955typedef [v1_enum] enum tagEXPLORER_BROWSER_OPTIONS {
2956    EBO_NONE               = 0x00,
2957    EBO_NAVIGATEONCE       = 0x01,
2958    EBO_SHOWFRAMES         = 0x02,
2959    EBO_ALWAYSNAVIGATE     = 0x04,
2960    EBO_NOTRAVELLOG        = 0x08,
2961    EBO_NOWRAPPERWINDOW    = 0x10,
2962    EBO_HTMLSHAREPOINTVIEW = 0x20,
2963    EBO_NOBORDER           = 0x40,
2964    EBO_NOPERSISTVIEWSTATE = 0x80,
2965} EXPLORER_BROWSER_OPTIONS;
2966
2967cpp_quote("#define SID_SExplorerBrowserFrame IID_ICommDlgBrowser")
2968
2969/*****************************************************************************
2970 * IExplorerBrowser interface
2971 */
2972[
2973 object,
2974 uuid(DFD3B6B5-C10C-4BE9-85F6-A66969F402F6),
2975 pointer_default(unique)
2976]
2977interface IExplorerBrowser : IUnknown
2978{
2979
2980    [local] HRESULT Initialize(
2981        [in] HWND hwndParent,
2982        [in] const RECT *prc,
2983        [in, unique] const FOLDERSETTINGS *pfs);
2984
2985    HRESULT Destroy();
2986
2987    [local] HRESULT SetRect(
2988        [in,out,unique] HDWP *phdwp,
2989        [in] RECT rcBrowser);
2990
2991    HRESULT SetPropertyBag(
2992        [in, string] LPCWSTR pszPropertyBag);
2993
2994    HRESULT SetEmptyText(
2995        [in, string] LPCWSTR pszEmptyText);
2996
2997    HRESULT SetFolderSettings(
2998        [in] const FOLDERSETTINGS *pfs);
2999
3000    HRESULT Advise(
3001        [in] IExplorerBrowserEvents *psbe,
3002        [out] DWORD *pdwCookie);
3003
3004    HRESULT Unadvise(
3005        [in] DWORD dwCookie);
3006
3007    HRESULT SetOptions(
3008        [in] EXPLORER_BROWSER_OPTIONS dwFlag);
3009
3010    HRESULT GetOptions(
3011        [out] EXPLORER_BROWSER_OPTIONS *pdwFlag);
3012
3013    HRESULT BrowseToIDList(
3014        [in] PCUIDLIST_RELATIVE pidl,
3015        [in] UINT uFlags);
3016
3017    HRESULT BrowseToObject(
3018        [in] IUnknown *punk,
3019        [in] UINT uFlags);
3020
3021    HRESULT FillFromObject(
3022        [in] IUnknown *punk,
3023        [in] EXPLORER_BROWSER_FILL_FLAGS dwFlags);
3024
3025    HRESULT RemoveAll();
3026
3027    HRESULT GetCurrentView(
3028        [in] REFIID riid,
3029        [out, iid_is(riid)] void **ppv);
3030}
3031
3032/*****************************************************************************
3033 * INameSpaceTreeControl interface
3034 */
3035[
3036 object,
3037 uuid(028212A3-B627-47E9-8856-C14265554E4F)
3038]
3039interface INameSpaceTreeControl : IUnknown
3040{
3041    [v1_enum] enum _NSTCSTYLE {
3042        NSTCS_HASEXPANDOS                 = 0x00000001,
3043        NSTCS_HASLINES                    = 0x00000002,
3044        NSTCS_SINGLECLICKEXPAND           = 0x00000004,
3045        NSTCS_FULLROWSELECT               = 0x00000008,
3046        NSTCS_SPRINGEXPAND                = 0x00000010,
3047        NSTCS_HORIZONTALSCROLL            = 0x00000020,
3048        NSTCS_ROOTHASEXPANDO              = 0x00000040,
3049        NSTCS_SHOWSELECTIONALWAYS         = 0x00000080,
3050        NSTCS_NOINFOTIP                   = 0x00000200,
3051        NSTCS_EVENHEIGHT                  = 0x00000400,
3052        NSTCS_NOREPLACEOPEN               = 0x00000800,
3053        NSTCS_DISABLEDRAGDROP             = 0x00001000,
3054        NSTCS_NOORDERSTREAM               = 0x00002000,
3055        NSTCS_RICHTOOLTIP                 = 0x00004000,
3056        NSTCS_BORDER                      = 0x00008000,
3057        NSTCS_NOEDITLABELS                = 0x00010000,
3058        NSTCS_TABSTOP                     = 0x00020000,
3059        NSTCS_FAVORITESMODE               = 0x00080000,
3060        NSTCS_AUTOHSCROLL                 = 0x00100000,
3061        NSTCS_FADEINOUTEXPANDOS           = 0x00200000,
3062        NSTCS_EMPTYTEXT                   = 0x00400000,
3063        NSTCS_CHECKBOXES                  = 0x00800000,
3064        NSTCS_PARTIALCHECKBOXES           = 0x01000000,
3065        NSTCS_EXCLUSIONCHECKBOXES         = 0x02000000,
3066        NSTCS_DIMMEDCHECKBOXES            = 0x04000000,
3067        NSTCS_NOINDENTCHECKS              = 0x08000000,
3068        NSTCS_ALLOWJUNCTIONS              = 0x10000000,
3069        NSTCS_SHOWTABSBUTTON              = 0x20000000,
3070        NSTCS_SHOWDELETEBUTTON            = 0x40000000,
3071        NSTCS_SHOWREFRESHBUTTON      = (int)0x80000000
3072    };
3073    typedef DWORD NSTCSTYLE;
3074
3075    [v1_enum] enum _NSTCROOTSTYLE {
3076        NSTCRS_VISIBLE                    = 0x0000,
3077        NSTCRS_HIDDEN                     = 0x0001,
3078        NSTCRS_EXPANDED                   = 0x0002
3079    };
3080    typedef DWORD NSTCROOTSTYLE;
3081
3082    [v1_enum] enum _NSTCITEMSTATE {
3083        NSTCIS_NONE                       = 0x0000,
3084        NSTCIS_SELECTED                   = 0x0001,
3085        NSTCIS_EXPANDED                   = 0x0002,
3086        NSTCIS_BOLD                       = 0x0004,
3087        NSTCIS_DISABLED                   = 0x0008,
3088        NSTCIS_SELECTEDNOEXPAND           = 0x0010
3089    };
3090    typedef DWORD NSTCITEMSTATE;
3091
3092    typedef [v1_enum] enum NSTCGNI {
3093        NSTCGNI_NEXT                      = 0,
3094        NSTCGNI_NEXTVISIBLE               = 1,
3095        NSTCGNI_PREV                      = 2,
3096        NSTCGNI_PREVVISIBLE               = 3,
3097        NSTCGNI_PARENT                    = 4,
3098        NSTCGNI_CHILD                     = 5,
3099        NSTCGNI_FIRSTVISIBLE              = 6,
3100        NSTCGNI_LASTVISIBLE               = 7
3101    } NSTCGNI;
3102
3103    HRESULT Initialize(
3104        [in] HWND hwndParent,
3105        [in, unique] RECT *prc,
3106        [in] NSTCSTYLE nstcsFlags);
3107
3108    HRESULT TreeAdvise(
3109        [in] IUnknown *punk,
3110        [out] DWORD *pdwCookie);
3111
3112    HRESULT TreeUnadvise(
3113        [in] DWORD dwCookie);
3114
3115    HRESULT AppendRoot(
3116        [in] IShellItem *psiRoot,
3117        [in] SHCONTF grfEnumFlags,
3118        [in] NSTCROOTSTYLE grfRootStyle,
3119        [in, unique] IShellItemFilter *pif);
3120
3121    HRESULT InsertRoot(
3122        [in] int iIndex,
3123        [in] IShellItem *psiRoot,
3124        [in] SHCONTF grfEnumFlags,
3125        [in] NSTCROOTSTYLE grfRootStyle,
3126        [in, unique] IShellItemFilter *pif);
3127
3128    HRESULT RemoveRoot(
3129        [in] IShellItem *psiRoot);
3130
3131    HRESULT RemoveAllRoots();
3132
3133    HRESULT GetRootItems(
3134        [out] IShellItemArray **ppsiaRootItems);
3135
3136    HRESULT SetItemState(
3137        [in] IShellItem *psi,
3138        [in] NSTCITEMSTATE nstcisMask,
3139        [in] NSTCITEMSTATE nstcisFlags);
3140
3141    HRESULT GetItemState(
3142        [in] IShellItem *psi,
3143        [in] NSTCITEMSTATE nstcismask,
3144        [out] NSTCITEMSTATE *pnstcisFlags);
3145
3146    HRESULT GetSelectedItems(
3147        [out] IShellItemArray **psiaItems);
3148
3149    HRESULT GetItemCustomState(
3150        [in] IShellItem *psi,
3151        [out] int *piStateNumber);
3152
3153    HRESULT SetItemCustomState(
3154        [in] IShellItem *psi,
3155        [in] int iStateNumber);
3156
3157    HRESULT EnsureItemVisible(
3158        [in] IShellItem *psi);
3159
3160    HRESULT SetTheme(
3161        [in, string] LPCWSTR pszTheme);
3162
3163    HRESULT GetNextItem(
3164        [in, unique] IShellItem *psi,
3165        [in] NSTCGNI nstcgi,
3166        [out] IShellItem **ppsiNext);
3167
3168    HRESULT HitTest(
3169        [in] POINT *ppt,
3170        [out] IShellItem **ppsiOut);
3171
3172    HRESULT GetItemRect(
3173        [in] IShellItem *psi,
3174        [out] RECT *prect);
3175
3176    HRESULT CollapseAll();
3177}
3178
3179/*****************************************************************************
3180 * INameSpaceTreeControl2 interface
3181 */
3182[
3183 object,
3184 uuid(7CC7AED8-290E-49BC-8945-C1401CC9306C)
3185]
3186interface INameSpaceTreeControl2 : INameSpaceTreeControl
3187{
3188    typedef [v1_enum] enum NSTCSTYLE2 {
3189        NSTCS2_DEFAULT                     = 0x00,
3190        NSTCS2_INTERRUPTNOTIFICATIONS      = 0x01,
3191        NSTCS2_SHOWNULLSPACEMENU           = 0x02,
3192        NSTCS2_DISPLAYPADDING              = 0x04,
3193        NSTCS2_DISPLAYPINNEDONLY           = 0x08,
3194        NTSCS2_NOSINGLETONAUTOEXPAND       = 0x10,  /* The apparent typo here is   */
3195        NTSCS2_NEVERINSERTNONENUMERATED    = 0x20   /* present also in the Win SDK */
3196    } NSTCSTYLE2;
3197    cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(NSTCSTYLE2)")
3198
3199    HRESULT SetControlStyle(
3200        [in] NSTCSTYLE nstcsMask,
3201        [in] NSTCSTYLE nstcsStyle);
3202
3203    HRESULT GetControlStyle(
3204        [in] NSTCSTYLE nstcsMask,
3205        [out] NSTCSTYLE *pnstcsStyle);
3206
3207    HRESULT SetControlStyle2(
3208        [in] NSTCSTYLE2 nstcsMask,
3209        [in] NSTCSTYLE2 nstcsStyle);
3210
3211    HRESULT GetControlStyle2(
3212        [in] NSTCSTYLE2 nstcsMask,
3213        [out] NSTCSTYLE2 *pnstcsStyle);
3214}
3215
3216/*****************************************************************************
3217 * INameSpaceTreeControlEvents interface
3218 */
3219
3220[
3221 object,
3222 uuid(93D77985-B3D8-4484-8318-672CDDA002CE),
3223 local
3224]
3225interface INameSpaceTreeControlEvents : IUnknown
3226{
3227    [v1_enum] enum _NSTCEHITTEST {
3228        NSTCEHT_NOWHERE                    = 0x0001,
3229        NSTCEHT_ONITEMICON                 = 0x0002,
3230        NSTCEHT_ONITEMLABEL                = 0x0004,
3231        NSTCEHT_ONITEMIDENT                = 0x0008,
3232        NSTCEHT_ONITEMBUTTON               = 0x0010,
3233        NSTCEHT_ONITEMRIGHT                = 0x0020,
3234        NSTCEHT_ONITEMSTATEICON            = 0x0040,
3235        NSTCEHT_ONITEM                     = 0x0046,
3236        NSTCEHT_ONITEMTABBUTTON            = 0x1000
3237    };
3238    typedef DWORD NSTCEHITTEST;
3239
3240    [v1_enum] enum _NSTCECLICKTYPE {
3241        NSTCECT_LBUTTON                    = 0x1,
3242        NSTCECT_MBUTTON                    = 0x2,
3243        NSTCECT_RBUTTON                    = 0x3,
3244        NSTCECT_BUTTON                     = 0x3,
3245        NSTCECT_DBLCLICK                   = 0x4
3246    };
3247    typedef DWORD NSTCECLICKTYPE;
3248
3249    HRESULT OnItemClick(
3250        [in] IShellItem *psi,
3251        [in] NSTCEHITTEST nstceHitTest,
3252        [in] NSTCECLICKTYPE nstceClickType);
3253
3254    HRESULT OnPropertyItemCommit(
3255        [in] IShellItem *psi);
3256
3257    HRESULT OnItemStateChanging(
3258        [in] IShellItem *psi,
3259        [in] NSTCITEMSTATE nstcisMask,
3260        [in] NSTCITEMSTATE nstcisState);
3261
3262    HRESULT OnItemStateChanged(
3263        [in] IShellItem *psi,
3264        [in] NSTCITEMSTATE nstcisMask,
3265        [in] NSTCITEMSTATE nstcisState);
3266
3267    HRESULT OnSelectionChanged(
3268        [in] IShellItemArray *psiaSelection);
3269
3270    HRESULT OnKeyboardInput(
3271        [in] UINT uMsg,
3272        [in] WPARAM wParam,
3273        [in] LPARAM lParam);
3274
3275    HRESULT OnBeforeExpand(
3276        [in] IShellItem *psi);
3277
3278    HRESULT OnAfterExpand(
3279        [in] IShellItem *psi);
3280
3281    HRESULT OnBeginLabelEdit(
3282        [in] IShellItem *psi);
3283
3284    HRESULT OnEndLabelEdit(
3285        [in] IShellItem *psi);
3286
3287    HRESULT OnGetToolTip(
3288        [in] IShellItem *psi,
3289        [out, string, size_is(cchTip)] LPWSTR pszTip,
3290        [in] int cchTip);
3291
3292    HRESULT OnBeforeItemDelete(
3293        [in] IShellItem *psi);
3294
3295    HRESULT OnItemAdded(
3296        [in] IShellItem *psi,
3297        [in] BOOL fIsRoot);
3298
3299    HRESULT OnItemDeleted(
3300        [in] IShellItem *psi,
3301        [in] BOOL fIsRoot);
3302
3303    HRESULT OnBeforeContextMenu(
3304        [in, unique] IShellItem *psi,
3305        [in] REFIID riid,
3306        [out, iid_is(riid)] void **ppv);
3307
3308    HRESULT OnAfterContextMenu(
3309        [in] IShellItem *psi,
3310        [in] IContextMenu *pcmIn,
3311        [in] REFIID riid,
3312        [out, iid_is(riid)] void **ppv);
3313
3314    HRESULT OnBeforeStateImageChange(
3315        [in] IShellItem *psi);
3316
3317    HRESULT OnGetDefaultIconIndex(
3318        [in] IShellItem *psi,
3319        [out] int *piDefaultIcon,
3320        [out] int *piOpenIcon);
3321}
3322
3323/*****************************************************************************
3324 * INameSpaceTreeControlCustomDraw interface
3325 */
3326[
3327 object,
3328 uuid(2D3BA758-33EE-42D5-BB7B-5F3431D86C78),
3329 local
3330]
3331
3332interface INameSpaceTreeControlCustomDraw : IUnknown
3333{
3334    typedef struct NSTCCUSTOMDRAW
3335    {
3336        IShellItem *psi;
3337        UINT uItemState;
3338        NSTCITEMSTATE nstcis;
3339        LPCWSTR pszText;
3340        int iImage;
3341        HIMAGELIST himl;
3342        int iLevel;
3343        int iIndent;
3344    } NSTCCUSTOMDRAW;
3345
3346    HRESULT PrePaint(
3347        [in] HDC hdc,
3348        [in] RECT *prc,
3349        [out] LRESULT *plres);
3350
3351    HRESULT PostPaint(
3352        [in] HDC hdc,
3353        [in] RECT *prc);
3354
3355    HRESULT ItemPrePaint(
3356        [in] HDC hdc,
3357        [in] RECT *prc,
3358        [in, out] COLORREF *pclrText,
3359        [in, out] COLORREF *pclrTextBk,
3360        [out] LRESULT *plres);
3361
3362    HRESULT ItemPostPaint(
3363        [in] HDC hdc,
3364        [in] RECT *prc,
3365        [in] NSTCCUSTOMDRAW *pnstccdItem);
3366}
3367
3368/*****************************************************************************
3369 * INameSpaceTreeControlDropHandler interface
3370 */
3371[
3372 object,
3373 uuid(F9C665D6-C2F2-4C19-BF33-8322D7352F51),
3374 local
3375]
3376interface INameSpaceTreeControlDropHandler : IUnknown
3377{
3378    HRESULT OnDragEnter(
3379        [in, unique] IShellItem *psiOver,
3380        [in] IShellItemArray *psiaData,
3381        [in] BOOL fOutsideSource,
3382        [in] DWORD grfKeyState,
3383        [in, out] DWORD *pdwEffect);
3384
3385    HRESULT OnDragOver(
3386        [in, unique] IShellItem *psiOver,
3387        [in] IShellItemArray *psiaData,
3388        [in] DWORD grfKeyState,
3389        [in, out] DWORD *pdwEffect);
3390
3391    HRESULT OnDragPosition(
3392        [in, unique] IShellItem *psiOver,
3393        [in] IShellItemArray *psiaData,
3394        [in] int iNewPosition,
3395        [in] int iOldPosition);
3396
3397    HRESULT OnDrop(
3398        [in, unique] IShellItem *psiOver,
3399        [in] IShellItemArray *psiaData,
3400        [in] int iPosition,
3401        [in] DWORD grfKeyState,
3402        [in, out] DWORD *pdwEffect);
3403
3404    HRESULT OnDropPosition(
3405        [in, unique] IShellItem *psiOver,
3406        [in] IShellItemArray *psiaData,
3407        [in] int iNewPosition,
3408        [in] int iOldPosition);
3409
3410    HRESULT OnDragLeave(
3411        [in, unique] IShellItem *psiOver);
3412}
3413cpp_quote("#define NSTCDHPOS_ONTOP -1")
3414
3415interface IFileDialog;
3416
3417typedef [v1_enum] enum FDE_OVERWRITE_RESPONSE
3418{
3419    FDEOR_DEFAULT  = 0,
3420    FDEOR_ACCEPT   = 1,
3421    FDEOR_REFUSE   = 2
3422} FDE_OVERWRITE_RESPONSE;
3423
3424typedef [v1_enum] enum FDE_SHAREVIOLATION_RESPONSE
3425{
3426    FDESVR_DEFAULT = 0,
3427    FDESVR_ACCEPT  = 1,
3428    FDESVR_REFUSE  = 2
3429} FDE_SHAREVIOLATION_RESPONSE;
3430
3431/*****************************************************************************
3432 * IFileDialogEvents interface
3433 */
3434[
3435 object,
3436 uuid(973510DB-7D7F-452B-8975-74A85828D354),
3437 pointer_default(unique)
3438]
3439interface IFileDialogEvents : IUnknown
3440{
3441    HRESULT OnFileOk(
3442        [in] IFileDialog *pfd);
3443
3444    HRESULT OnFolderChanging(
3445        [in] IFileDialog *pfd,
3446        [in] IShellItem *psiFolder);
3447
3448    HRESULT OnFolderChange(
3449        [in] IFileDialog *pfd);
3450
3451    HRESULT OnSelectionChange(
3452        [in] IFileDialog *pfd);
3453
3454    HRESULT OnShareViolation(
3455        [in] IFileDialog *pfd,
3456        [in] IShellItem *psi,
3457        [out] FDE_SHAREVIOLATION_RESPONSE *pResponse);
3458
3459    HRESULT OnTypeChange(
3460        [in] IFileDialog *pfd);
3461
3462    HRESULT OnOverwrite(
3463        [in] IFileDialog *pfd,
3464        [in] IShellItem *psi,
3465        [out] FDE_OVERWRITE_RESPONSE *pResponse);
3466}
3467
3468/*****************************************************************************
3469 * IModalWindow interface
3470 */
3471[
3472 object,
3473 uuid(B4DB1657-70D7-485E-8E3E-6FCB5A5C1802),
3474 pointer_default(unique)
3475]
3476interface IModalWindow : IUnknown
3477{
3478    [local]
3479    HRESULT Show(
3480        [in, unique, annotation("__in_opt")] HWND hwndOwner);
3481
3482    [call_as(Show)]
3483    HRESULT RemoteShow(
3484        [in, unique] HWND hwndOwner);
3485}
3486
3487typedef [v1_enum] enum FDAP
3488{
3489    FDAP_BOTTOM    = 0,
3490    FDAP_TOP       = 1
3491} FDAP;
3492
3493/*****************************************************************************
3494 * IFileDialog interface
3495 */
3496[
3497 object,
3498 uuid(42F85136-DB7E-439C-85F1-E4075D135FC8),
3499 pointer_default(unique)
3500]
3501interface IFileDialog : IModalWindow
3502{
3503    [v1_enum] enum _FILEOPENDIALOGOPTIONS
3504    {
3505        FOS_OVERWRITEPROMPT     = 0x00000002,
3506        FOS_STRICTFILETYPES     = 0x00000004,
3507        FOS_NOCHANGEDIR         = 0x00000008,
3508        FOS_PICKFOLDERS         = 0x00000020,
3509        FOS_FORCEFILESYSTEM     = 0x00000040,
3510        FOS_ALLNONSTORAGEITEMS  = 0x00000080,
3511        FOS_NOVALIDATE          = 0x00000100,
3512        FOS_ALLOWMULTISELECT    = 0x00000200,
3513        FOS_PATHMUSTEXIST       = 0x00000800,
3514        FOS_FILEMUSTEXIST       = 0x00001000,
3515        FOS_CREATEPROMPT        = 0x00002000,
3516        FOS_SHAREAWARE          = 0x00004000,
3517        FOS_NOREADONLYRETURN    = 0x00008000,
3518        FOS_NOTESTFILECREATE    = 0x00010000,
3519        FOS_HIDEMRUPLACES       = 0x00020000,
3520        FOS_HIDEPINNEDPLACES    = 0x00040000,
3521        FOS_NODEREFERENCELINKS  = 0x00100000,
3522        FOS_DONTADDTORECENT     = 0x02000000,
3523        FOS_FORCESHOWHIDDEN     = 0x10000000,
3524        FOS_DEFAULTNOMINIMODE   = 0x20000000,
3525        FOS_FORCEPREVIEWPANEON  = 0x40000000
3526    };
3527    typedef DWORD FILEOPENDIALOGOPTIONS;
3528
3529    HRESULT SetFileTypes(
3530        [in] UINT cFileTypes,
3531        [in, size_is(cFileTypes)] const COMDLG_FILTERSPEC *rgFilterSpec);
3532
3533    HRESULT SetFileTypeIndex(
3534        [in] UINT iFileType);
3535
3536    HRESULT GetFileTypeIndex(
3537        [out] UINT *piFileType);
3538
3539    HRESULT Advise(
3540        [in] IFileDialogEvents *pfde,
3541        [out] DWORD *pdwCookie);
3542
3543    HRESULT Unadvise(
3544        [in] DWORD dwCookie);
3545
3546    HRESULT SetOptions(
3547        [in] FILEOPENDIALOGOPTIONS fos);
3548
3549    HRESULT GetOptions(
3550        [in] FILEOPENDIALOGOPTIONS *pfos);
3551
3552    HRESULT SetDefaultFolder(
3553        [in] IShellItem *psi);
3554
3555    HRESULT SetFolder(
3556        [in] IShellItem *psi);
3557
3558    HRESULT GetFolder(
3559        [out] IShellItem **ppsi);
3560
3561    HRESULT GetCurrentSelection(
3562        [out] IShellItem **ppsi);
3563
3564    HRESULT SetFileName(
3565        [in, string] LPCWSTR pszName);
3566
3567    HRESULT GetFileName(
3568        [out, string] LPWSTR *pszName);
3569
3570    HRESULT SetTitle(
3571        [in, string] LPCWSTR pszTitle);
3572
3573    HRESULT SetOkButtonLabel(
3574        [in, string] LPCWSTR pszText);
3575
3576    HRESULT SetFileNameLabel(
3577        [in, string] LPCWSTR pszLabel);
3578
3579    HRESULT GetResult(
3580        [out] IShellItem **ppsi);
3581
3582    HRESULT AddPlace(
3583        [in] IShellItem *psi,
3584        [in] FDAP fdap);
3585
3586    HRESULT SetDefaultExtension(
3587        [in, string] LPCWSTR pszDefaultExtension);
3588
3589    HRESULT Close(
3590        [in] HRESULT hr);
3591
3592    HRESULT SetClientGuid(
3593        [in] REFGUID guid);
3594
3595    HRESULT ClearClientData();
3596
3597    HRESULT SetFilter(
3598        [in] IShellItemFilter *pFilter);
3599}
3600
3601/*****************************************************************************
3602 * IFileDialog2 interface
3603 */
3604[
3605 object,
3606 uuid(61744FC7-85B5-4791-A9B0-272276309B13),
3607 pointer_default(unique)
3608]
3609interface IFileDialog2 : IFileDialog
3610{
3611    HRESULT SetCancelButtonLabel(
3612        [in] LPCWSTR pszLabel);
3613
3614    HRESULT SetNavigationRoot(
3615        [in] IShellItem *psi);
3616}
3617
3618/*****************************************************************************
3619 * IFileOperationProgressSink interface
3620 */
3621[
3622 object,
3623 uuid(04B0F1A7-9490-44BC-96E1-4296A31252E2),
3624 pointer_default(unique)
3625]
3626interface IFileOperationProgressSink : IUnknown
3627{
3628    HRESULT StartOperations();
3629
3630    HRESULT FinishOperations(
3631        [in] HRESULT hrResult);
3632
3633    HRESULT PreRenameItem(
3634        [in] DWORD dwFlags,
3635        [in] IShellItem *psiItem,
3636        [in, unique, string] LPCWSTR pszNewName);
3637
3638    HRESULT PostRenameItem(
3639        [in] DWORD dwFlags,
3640        [in] IShellItem *psiItem,
3641        [in, string] LPCWSTR pszNewName,
3642        [in] HRESULT hrRename,
3643        [in] IShellItem *psiNewlyCreated);
3644
3645    HRESULT PreMoveItem(
3646        [in] DWORD dwFlags,
3647        [in] IShellItem *psiItem,
3648        [in] IShellItem *psiDestinationFolder,
3649        [in, unique, string] LPCWSTR pszNewName);
3650
3651    HRESULT PostMoveItem(
3652        [in] DWORD dwFlags,
3653        [in] IShellItem *psiItem,
3654        [in] IShellItem *psiDestinationFolder,
3655        [in, unique, string] LPCWSTR pszNewName,
3656        [in] HRESULT hrMove,
3657        [in] IShellItem *psiNewlyCreated);
3658
3659    HRESULT PreCopyItem(
3660        [in] DWORD dwFlags,
3661        [in] IShellItem *psiItem,
3662        [in] IShellItem *psiDestinationFolder,
3663        [in, unique, string] LPCWSTR pszNewName);
3664
3665    HRESULT PostCopyItem(
3666        [in] DWORD dwFlags,
3667        [in] IShellItem *psiItem,
3668        [in] IShellItem *psiDestinationFolder,
3669        [in, unique, string] LPCWSTR pszNewName,
3670        [in] HRESULT hrCopy,
3671        [in] IShellItem *psiNewlyCreated);
3672
3673    HRESULT PreDeleteItem(
3674        [in] DWORD dwFlags,
3675        [in] IShellItem *psiItem);
3676
3677    HRESULT PostDeleteItem(
3678        [in] DWORD dwFlags,
3679        [in] IShellItem *psiItem,
3680        [in] HRESULT hrDelete,
3681        [in] IShellItem *psiNewlyCreated);
3682
3683    HRESULT PreNewItem(
3684        [in] DWORD dwFlags,
3685        [in] IShellItem *psiDestinationFolder,
3686        [in, unique, string] LPCWSTR pszNewName);
3687
3688    HRESULT PostNewItem(
3689        [in] DWORD dwFlags,
3690        [in] IShellItem *psiDestinationFolder,
3691        [in, unique, string] LPCWSTR pszNewName,
3692        [in, unique, string] LPCWSTR pszTemplateName,
3693        [in] DWORD dwFileAttributes,
3694        [in] HRESULT hrNew,
3695        [in] IShellItem *psiNewItem);
3696
3697    HRESULT UpdateProgress(
3698        [in] UINT iWorkTotal,
3699        [in] UINT iWorkSoFar);
3700
3701    HRESULT ResetTimer();
3702
3703    HRESULT PauseTimer();
3704
3705    HRESULT ResumeTimer();
3706}
3707
3708/*****************************************************************************
3709 * IFileSaveDialog interface
3710 */
3711[
3712 object,
3713 uuid(84BCCD23-5FDE-4CDB-AEA4-AF64B83D78AB),
3714 pointer_default(unique)
3715]
3716interface IFileSaveDialog : IFileDialog
3717{
3718    HRESULT SetSaveAsItem(
3719        [in] IShellItem *psi);
3720
3721    HRESULT SetProperties(
3722        [in] IPropertyStore *pStore);
3723
3724    HRESULT SetCollectedProperties(
3725        [in] IPropertyDescriptionList *pList,
3726        [in] BOOL fAppendDefault);
3727
3728    HRESULT GetProperties(
3729        [in] IPropertyStore **ppStore);
3730
3731    HRESULT ApplyProperties(
3732        [in] IShellItem *psi,
3733        [in] IPropertyStore *pStore,
3734        [in, unique] HWND hwnd,
3735        [in, unique] IFileOperationProgressSink *pSink);
3736}
3737
3738
3739/*****************************************************************************
3740 * IFileOpenDialog interface
3741 */
3742[
3743 object,
3744 uuid(D57C7288-D4AD-4768-BE02-9D969532D960),
3745 pointer_default(unique)
3746]
3747interface IFileOpenDialog : IFileDialog
3748{
3749    HRESULT GetResults(
3750        [out] IShellItemArray **ppenum);
3751
3752    HRESULT GetSelectedItems(
3753        [out] IShellItemArray **ppsai);
3754}
3755
3756typedef [v1_enum] enum CDCONTROLSTATEF
3757{
3758    CDCS_INACTIVE       = 0x0,
3759    CDCS_ENABLED        = 0x1,
3760    CDCS_VISIBLE        = 0x2,
3761    CDCS_ENABLEDVISIBLE = 0x3
3762} CDCONTROLSTATEF;
3763cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(CDCONTROLSTATEF)")
3764/*****************************************************************************
3765 * IFileDialogCustomize interface
3766 */
3767[
3768 object,
3769 uuid(E6FDD21A-163F-4975-9C8C-A69F1BA37034),
3770 pointer_default(unique)
3771]
3772interface IFileDialogCustomize : IUnknown
3773{
3774    HRESULT EnableOpenDropDown(
3775        [in] DWORD dwIDCtl);
3776
3777    HRESULT AddMenu(
3778        [in] DWORD dwIDCtl,
3779        [in, string] LPCWSTR pszLabel);
3780
3781    HRESULT AddPushButton(
3782        [in] DWORD dwIDCtl,
3783        [in, string] LPCWSTR pszLabel);
3784
3785    HRESULT AddComboBox(
3786        [in] DWORD dwIDCtl);
3787
3788    HRESULT AddRadioButtonList(
3789        [in] DWORD dwIDCtl);
3790
3791    HRESULT AddCheckButton(
3792        [in] DWORD dwIDCtl,
3793        [in, string] LPCWSTR pszLabel,
3794        [in] BOOL bChecked);
3795
3796    HRESULT AddEditBox(
3797        [in] DWORD dwIDCtl,
3798        [in, string] LPCWSTR pszText);
3799
3800    HRESULT AddSeparator(
3801        [in] DWORD dwIDCtl);
3802
3803    HRESULT AddText(
3804        [in] DWORD dwIDCtl,
3805        [in, string] LPCWSTR pszText);
3806
3807    HRESULT SetControlLabel(
3808        [in] DWORD dwIDCtl,
3809        [in, string] LPCWSTR pszLabel);
3810
3811    HRESULT GetControlState(
3812        [in] DWORD dwIDCtl,
3813        [out] CDCONTROLSTATEF *pdwState);
3814
3815    HRESULT SetControlState(
3816        [in] DWORD dwIDCtl,
3817        [in] CDCONTROLSTATEF dwState);
3818
3819    HRESULT GetEditBoxText(
3820        [in] DWORD dwIDCtl,
3821        [out, string] WCHAR **ppszText);
3822
3823    HRESULT SetEditBoxText(
3824        [in] DWORD dwIDCtl,
3825        [in, string] LPCWSTR pszText);
3826
3827    HRESULT GetCheckButtonState(
3828        [in] DWORD dwIDCtl,
3829        [out] BOOL *pbChecked);
3830
3831    HRESULT SetCheckButtonState(
3832        [in] DWORD dwIDCtl,
3833        [in] BOOL bChecked);
3834
3835    HRESULT AddControlItem(
3836        [in] DWORD dwIDCtl,
3837        [in] DWORD dwIDItem,
3838        [in] LPCWSTR pszLabel);
3839
3840    HRESULT RemoveControlItem(
3841        [in] DWORD dwIDCtl,
3842        [in] DWORD dwIDItem);
3843
3844    HRESULT RemoveAllControlItems(
3845        [in] DWORD dwIDCtl);
3846
3847    HRESULT GetControlItemState(
3848        [in] DWORD dwIDCtl,
3849        [in] DWORD dwIDItem,
3850        [out] CDCONTROLSTATEF *pdwState);
3851
3852    HRESULT SetControlItemState(
3853        [in] DWORD dwIDCtl,
3854        [in] DWORD dwIDItem,
3855        [in] CDCONTROLSTATEF dwState);
3856
3857    HRESULT GetSelectedControlItem(
3858        [in] DWORD dwIDCtl,
3859        [out] DWORD *pdwIDItem);
3860
3861    HRESULT SetSelectedControlItem(
3862        [in] DWORD dwIDCtl,
3863        [in] DWORD dwIDItem);
3864
3865    HRESULT StartVisualGroup(
3866        [in] DWORD dwIDCtl,
3867        [in, string] LPCWSTR pszLabel);
3868
3869    HRESULT EndVisualGroup();
3870
3871    HRESULT MakeProminent(
3872        [in] DWORD dwIDCtl);
3873
3874    HRESULT SetControlItemText(
3875        [in] DWORD dwIDCtl,
3876        [in] DWORD dwIDItem,
3877        [in, string] LPCWSTR pszLabel);
3878}
3879
3880/*****************************************************************************
3881 * IFileDialogControlEvents interface
3882 */
3883[
3884 object,
3885 uuid(36116642-D713-4B97-9B83-7484A9D00433),
3886 pointer_default(unique)
3887]
3888interface IFileDialogControlEvents : IUnknown
3889{
3890    HRESULT OnItemSelected(
3891        [in] IFileDialogCustomize *pfdc,
3892        [in] DWORD dwIDCtl,
3893        [in] DWORD dwIDItem);
3894
3895    HRESULT OnButtonClicked(
3896        [in] IFileDialogCustomize *pfdc,
3897        [in] DWORD dwIDCtl);
3898
3899    HRESULT OnCheckButtonToggled(
3900        [in] IFileDialogCustomize *pfdc,
3901        [in] BOOL dwIDCtl,
3902        [in] BOOL bChecked);
3903
3904    HRESULT OnControlActivating(
3905        [in] IFileDialogCustomize *pfdc,
3906        [in] DWORD dwIDCtl);
3907}
3908
3909typedef [v1_enum] enum tagKF_CATEGORY
3910{
3911    KF_CATEGORY_VIRTUAL = 0x00000001,
3912    KF_CATEGORY_FIXED   = 0x00000002,
3913    KF_CATEGORY_COMMON  = 0x00000003,
3914    KF_CATEGORY_PERUSER = 0x00000004
3915} KF_CATEGORY;
3916
3917typedef [v1_enum] enum tagKF_REDIRECTION_CAPABILITIES
3918{
3919    KF_REDIRECTION_CAPABILITIES_ALLOW_ALL               = 0x000000ff,
3920    KF_REDIRECTION_CAPABILITIES_REDIRECTABLE            = 0x00000001,
3921    KF_REDIRECTION_CAPABILITIES_DENY_ALL                = 0x000fff00,
3922    KF_REDIRECTION_CAPABILITIES_DENY_POLICY_REDIRECTED  = 0x00000100,
3923    KF_REDIRECTION_CAPABILITIES_DENY_POLICY             = 0x00000200,
3924    KF_REDIRECTION_CAPABILITIES_DENY_PERMISSIONS        = 0x00000400
3925} KF_REDIRECTION_CAPABILITIES;
3926
3927typedef [v1_enum] enum tagKF_DEFINITION_FLAGS
3928{
3929    KFDF_LOCAL_REDIRECT_ONLY    = 0x00000002,
3930    KFDF_ROAMABLE               = 0x00000004,
3931    KFDF_PRECREATE              = 0x00000008,
3932    KFDF_STREAM                 = 0x00000010,
3933    KFDF_PUBLISHEXPANDEDPATH    = 0x00000020
3934} KF_DEFINITION_FLAGS;
3935
3936typedef struct tagKNOWNFOLDER_DEFINITION
3937{
3938    KF_CATEGORY         category;
3939    LPWSTR              pszName;
3940    LPWSTR              pszDescription;
3941    KNOWNFOLDERID       fidParent;
3942    LPWSTR              pszRelativePath;
3943    LPWSTR              pszParsingName;
3944    LPWSTR              pszTooltip;
3945    LPWSTR              pszLocalizedName;
3946    LPWSTR              pszIcon;
3947    LPWSTR              pszSecurity;
3948    DWORD               dwAttributes;
3949    KF_DEFINITION_FLAGS kfdFlags;
3950    FOLDERTYPEID        ftidType;
3951} KNOWNFOLDER_DEFINITION;
3952
3953[
3954 object,
3955 uuid(3aa7af7e-9b36-420C-a8e3-f77d4674a488),
3956 pointer_default(ref)
3957]
3958interface IKnownFolder : IUnknown
3959{
3960    HRESULT GetId(
3961        [out] KNOWNFOLDERID *pkfid);
3962
3963    HRESULT GetCategory(
3964        [out] KF_CATEGORY *pCategory);
3965
3966    HRESULT GetShellItem(
3967        [in] DWORD dwFlags,
3968        [in] REFIID riid,
3969        [out, iid_is(riid)] void **ppv);
3970
3971    HRESULT GetPath(
3972        [in] DWORD dwFlags,
3973        [out, string] LPWSTR *ppszPath);
3974
3975    HRESULT SetPath(
3976        [in] DWORD dwFlags,
3977        [in, string] LPCWSTR pszPath);
3978
3979    HRESULT GetIDList(
3980        [in] DWORD dwFlags,
3981        [out] PIDLIST_ABSOLUTE *ppidl);
3982
3983    HRESULT GetFolderType(
3984        [out] FOLDERTYPEID *pftid);
3985
3986    HRESULT GetRedirectionCapabilities(
3987        [out] KF_REDIRECTION_CAPABILITIES *pCapabilities);
3988
3989    HRESULT GetFolderDefinition(
3990        [out] KNOWNFOLDER_DEFINITION *pKFD);
3991}
3992
3993typedef [v1_enum] enum tagKF_REDIRECT_FLAGS
3994{
3995    KF_REDIRECT_USER_EXCLUSIVE      = 0x00000001,
3996    KF_REDIRECT_COPY_SOURCE_DACL    = 0x00000002,
3997    KF_REDIRECT_OWNER_USER          = 0x00000004,
3998    KF_REDIRECT_SET_OWNER_EXPLICIT  = 0x00000008,
3999    KF_REDIRECT_CHECK_ONLY          = 0x00000010,
4000    KF_REDIRECT_WITH_UI             = 0x00000020,
4001    KF_REDIRECT_UNPIN               = 0x00000040,
4002    KF_REDIRECT_PIN                 = 0x00000080,
4003    KF_REDIRECT_COPY_CONTENTS       = 0x00000200,
4004    KF_REDIRECT_DEL_SOURCE_CONTENTS = 0x00000400,
4005    KF_REDIRECT_EXCLUDE_ALL_KNOWN_SUBFOLDERS = 0x00000800
4006} KF_REDIRECT_FLAGS;
4007
4008[
4009    object,
4010    uuid(8BE2D872-86AA-4d47-B776-32CCA40C7018),
4011    pointer_default(ref)
4012]
4013interface IKnownFolderManager : IUnknown
4014{
4015    typedef [v1_enum] enum tagFFFP_MODE
4016    {
4017        FFFP_EXACTMATCH,
4018        FFFP_NEARESTPARENTMATCH
4019    } FFFP_MODE;
4020
4021    HRESULT FolderIdFromCsidl(
4022        [in] int nCsidl,
4023        [out] KNOWNFOLDERID *pfid);
4024
4025    HRESULT FolderIdToCsidl(
4026        [in] REFKNOWNFOLDERID rfid,
4027        [out] int *pnCsidl);
4028
4029    HRESULT GetFolderIds(
4030        [out, size_is(, *pCount)] KNOWNFOLDERID **ppKFId,
4031        [in, out] UINT *pCount);
4032
4033    HRESULT GetFolder(
4034        [in] REFKNOWNFOLDERID rfid,
4035        [out] IKnownFolder **ppkf);
4036
4037    HRESULT GetFolderByName(
4038        [in, string] LPCWSTR pszCanonicalName,
4039        [out] IKnownFolder **ppkf);
4040
4041    HRESULT RegisterFolder(
4042        [in] REFKNOWNFOLDERID rfid,
4043        [in] KNOWNFOLDER_DEFINITION const *pKFD);
4044
4045    HRESULT UnregisterFolder(
4046        [in] REFKNOWNFOLDERID rfid);
4047
4048    HRESULT FindFolderFromPath(
4049        [in, string] LPCWSTR pszPath,
4050        [in] FFFP_MODE mode,
4051        [out] IKnownFolder **ppkf);
4052
4053    HRESULT FindFolderFromIDList(
4054        [in] PCIDLIST_ABSOLUTE pidl,
4055        [out] IKnownFolder **ppkf);
4056
4057    HRESULT Redirect(
4058        [in] REFKNOWNFOLDERID rfid,
4059        [in, unique] HWND hwnd,
4060        [in] KF_REDIRECT_FLAGS flags,
4061        [in, unique, string] LPCWSTR pszTargetPath,
4062        [in] UINT cFolders,
4063        [in, size_is(cFolders), unique] KNOWNFOLDERID const *pExclusion,
4064        [out, string] LPWSTR *ppszError);
4065}
4066
4067/* function for releasing structure returned from IKnownFolder::GetFolderDefinition */
4068cpp_quote("static inline void FreeKnownFolderDefinitionFields(KNOWNFOLDER_DEFINITION *pKFD)")
4069cpp_quote("{")
4070cpp_quote("    CoTaskMemFree(pKFD->pszName);")
4071cpp_quote("    CoTaskMemFree(pKFD->pszDescription);")
4072cpp_quote("    CoTaskMemFree(pKFD->pszRelativePath);")
4073cpp_quote("    CoTaskMemFree(pKFD->pszParsingName);")
4074cpp_quote("    CoTaskMemFree(pKFD->pszTooltip);")
4075cpp_quote("    CoTaskMemFree(pKFD->pszLocalizedName);")
4076cpp_quote("    CoTaskMemFree(pKFD->pszIcon);")
4077cpp_quote("    CoTaskMemFree(pKFD->pszSecurity);")
4078cpp_quote("}")
4079
4080typedef [v1_enum] enum ASSOCIATIONLEVEL {
4081    AL_MACHINE,
4082    AL_EFFECTIVE,
4083    AL_USER
4084} ASSOCIATIONLEVEL;
4085
4086typedef [v1_enum] enum ASSOCIATIONTYPE {
4087    AT_FILEEXTENSION,
4088    AT_URLPROTOCOL,
4089    AT_STARTMENUCLIENT,
4090    AT_MIMETYPE
4091} ASSOCIATIONTYPE;
4092
4093[
4094    object,
4095    uuid(4e530b0a-e611-4c77-a3ac-9031d022281b),
4096    pointer_default(unique)
4097]
4098interface IApplicationAssociationRegistration : IUnknown
4099{
4100    HRESULT QueryCurrentDefault(
4101        [in, string] LPCWSTR pszQuery,
4102        [in] ASSOCIATIONTYPE atQueryType,
4103        [in] ASSOCIATIONLEVEL alQueryLevel,
4104        [out, string] LPWSTR *ppszAssociation);
4105
4106    HRESULT QueryAppIsDefault(
4107        [in, string] LPCWSTR pszQuery,
4108        [in] ASSOCIATIONTYPE atQueryType,
4109        [in] ASSOCIATIONLEVEL alQueryLevel,
4110        [in, string] LPCWSTR pszAppRegistryName,
4111        [out] BOOL *pfDefault);
4112
4113    HRESULT QueryAppIsDefaultAll(
4114        [in] ASSOCIATIONLEVEL alQueryLevel,
4115        [in, string] LPCWSTR pszAppRegistryName,
4116        [out] BOOL* pfDefault);
4117
4118    HRESULT SetAppAsDefault(
4119        [in, string] LPCWSTR pszAppRegistryName,
4120        [in, string] LPCWSTR pszSet,
4121        [in] ASSOCIATIONTYPE atSetType);
4122
4123    HRESULT SetAppAsDefaultAll(
4124        [in, string] LPCWSTR pszAppRegistryName);
4125
4126    HRESULT ClearUserAssociations();
4127}
4128
4129[
4130    uuid(6332debf-87b5-4670-90c0-5e57b408a49e),
4131    object,
4132    pointer_default(unique)
4133]
4134interface ICustomDestinationList : IUnknown
4135{
4136    typedef [v1_enum] enum KNOWNDESTCATEGORY {
4137        KDC_FREQUENT = 1,
4138        KDC_RECENT
4139    } KNOWNDESTCATEGORY;
4140
4141    HRESULT SetAppID([in, string] LPCWSTR pszAppID);
4142
4143    HRESULT BeginList(
4144            [out] UINT *pcMinSlots,
4145            [in] REFIID riid,
4146            [out, iid_is(riid)] void **ppv);
4147
4148    HRESULT AppendCategory(
4149            [in, string] LPCWSTR pszCategory,
4150            [in] IObjectArray *poa);
4151
4152    HRESULT AppendKnownCategory([in] KNOWNDESTCATEGORY category);
4153    HRESULT AddUserTasks([in] IObjectArray *poa);
4154    HRESULT CommitList();
4155
4156    HRESULT GetRemovedDestinations(
4157            [in] REFIID riid,
4158            [out, iid_is(riid)] void **ppv);
4159
4160    HRESULT DeleteList([in, unique, string] LPCWSTR pszAppID);
4161    HRESULT AbortList();
4162}
4163
4164[
4165    uuid(ddefe873-6997-4e68-be26-39b633adbe12),
4166    object,
4167    pointer_default(unique)
4168]
4169interface IQueryCancelAutoPlay : IUnknown
4170{
4171    HRESULT AllowAutoPlay([in, string] LPCWSTR path,
4172                          [in] DWORD content_type,
4173                          [in, string] LPCWSTR label,
4174                          [in] DWORD serial_number);
4175}
4176
4177[
4178    uuid(d594d0d8-8da7-457b-b3b4-ce5dbaac0b88),
4179    pointer_default(unique)
4180]
4181interface ITransferAdviseSink : IUnknown
4182{
4183    [v1_enum] enum _TRANSFER_ADVISE_STATE
4184    {
4185        TS_NONE          = 0,
4186        TS_PERFORMING    = 1,
4187        TS_PREPARING     = 2,
4188        TS_INDETERMINATE = 4
4189    };
4190    typedef DWORD TRANSFER_ADVISE_STATE;
4191
4192    HRESULT UpdateProgress([in] ULONGLONG size_current,
4193                           [in] ULONGLONG size_total,
4194                           [in] INT files_current,
4195                           [in] INT files_total,
4196                           [in] INT folders_current,
4197                           [in] INT folders_total);
4198    HRESULT UpdateTransferState([in] TRANSFER_ADVISE_STATE state);
4199    HRESULT ConfirmOverwrite([in] IShellItem *source,
4200                             [in] IShellItem *dest_parent,
4201                             [in, string] LPCWSTR name);
4202    HRESULT ConfirmEncryptLoss([in] IShellItem *source);
4203    HRESULT FileFailure([in] IShellItem *item,
4204                        [in, unique, string] LPCWSTR itemname,
4205                        [in] HRESULT hr,
4206                        [in, out, unique, size_is(crename)] LPWSTR rename,
4207                        [in] ULONG crename);
4208    HRESULT SubStreamFailure([in] IShellItem *item,
4209                             [in, string] LPCWSTR stream,
4210                             [in] HRESULT hr);
4211    HRESULT PropertyFailure([in] IShellItem *item,
4212                            [in, unique] const PROPERTYKEY *key,
4213                            [in] HRESULT hr);
4214}
4215
4216[v1_enum] enum _TRANSFER_SOURCE_FLAGS
4217{
4218    TSF_NORMAL                     = 0,
4219    TSF_FAIL_EXIST                 = 0,
4220    TSF_RENAME_EXIST               = 0x1,
4221    TSF_OVERWRITE_EXIST            = 0x2,
4222    TSF_ALLOW_DECRYPTION           = 0x4,
4223    TSF_NO_SECURITY                = 0x8,
4224    TSF_COPY_CREATION_TIME         = 0x10,
4225    TSF_COPY_WRITE_TIME            = 0x20,
4226    TSF_USE_FULL_ACCESS            = 0x40,
4227    TSF_DELETE_RECYCLE_IF_POSSIBLE = 0x80,
4228    TSF_COPY_HARD_LINK             = 0x100,
4229    TSF_COPY_LOCALIZED_NAME        = 0x200,
4230    TSF_MOVE_AS_COPY_DELETE        = 0x400,
4231    TSF_SUSPEND_SHELLEVENTS        = 0x800
4232};
4233typedef DWORD TRANSFER_SOURCE_FLAGS;
4234
4235[
4236    uuid(00adb003-bde9-45c6-8e29-d09f9353e108),
4237    object,
4238    pointer_default(unique)
4239]
4240interface ITransferSource : IUnknown
4241{
4242    HRESULT Advise([in] ITransferAdviseSink *sink, [out] DWORD *cookie);
4243    HRESULT Unadvise([in] DWORD cookie);
4244    HRESULT SetProperties([in] IPropertyChangeArray *array);
4245    HRESULT OpenItem([in] IShellItem *item,
4246                     [in] TRANSFER_SOURCE_FLAGS flags,
4247                     [in] REFIID riid,
4248                     [out, iid_is(riid)] void **ppv);
4249    HRESULT MoveItem([in] IShellItem *item,
4250                     [in] IShellItem *parent_dest,
4251                     [in, string] LPCWSTR name_dest,
4252                     [in] TRANSFER_SOURCE_FLAGS flags,
4253                     [out] IShellItem **newitem);
4254    HRESULT RecycleItem([in] IShellItem *source,
4255                        [in] IShellItem *parent_dest,
4256                        [in] TRANSFER_SOURCE_FLAGS flags,
4257                        [out] IShellItem **new_dest);
4258    HRESULT RemoveItem([in] IShellItem *source, [in] TRANSFER_SOURCE_FLAGS flags);
4259    HRESULT RenameItem([in] IShellItem *source,
4260                       [in, string] LPCWSTR newname,
4261                       [in] TRANSFER_SOURCE_FLAGS flags,
4262                       [out] IShellItem **new_dest);
4263    HRESULT LinkItem([in] IShellItem *source,
4264                     [in] IShellItem *parent_dest,
4265                     [in, unique, string] LPCWSTR new_name,
4266                     [in] TRANSFER_SOURCE_FLAGS flags,
4267                     [out] IShellItem **new_dest);
4268    HRESULT ApplyPropertiesToItem([in] IShellItem *source, [out] IShellItem **newitem);
4269    HRESULT GetDefaultDestinationName([in] IShellItem *source,
4270                                      [in] IShellItem *parent_dest,
4271                                      [out, string] LPWSTR *dest_name);
4272    HRESULT EnterFolder([in] IShellItem *child_folder);
4273    HRESULT LeaveFolder([in] IShellItem *child_folder);
4274}
4275
4276[
4277    uuid(48addd32-3ca5-4124-abe3-b5a72531b207),
4278    object,
4279    pointer_default(unique)
4280]
4281interface ITransferDestination : IUnknown
4282{
4283    HRESULT Advise([in] ITransferAdviseSink *sink, [out] DWORD *cookie);
4284    HRESULT Unadvise([in] DWORD cookie);
4285    HRESULT CreateItem([in, string] LPCWSTR name,
4286                       [in] DWORD attr,
4287                       [in] ULONGLONG size,
4288                       [in] TRANSFER_SOURCE_FLAGS flags,
4289                       [in] REFIID riid,
4290                       [out, iid_is(riid)] void **ppv,
4291                       [in] REFIID resources,
4292                       [out, iid_is(riid)] void **presources);
4293}
4294
4295[
4296    uuid(92218cab-ecaa-4335-8133-807fd234c2ee),
4297    object,
4298    pointer_default(unique)
4299]
4300interface IAssocHandlerInvoker : IUnknown
4301{
4302    HRESULT SupportsSelection();
4303    HRESULT Invoke();
4304}
4305
4306[
4307    uuid(f04061ac-1659-4a3f-a954-775aa57fc083),
4308    object,
4309    pointer_default(unique)
4310]
4311interface IAssocHandler : IUnknown
4312{
4313    HRESULT GetName([out, string] LPWSTR *name);
4314    HRESULT GetUIName([out, string] LPWSTR *uiname);
4315    HRESULT GetIconLocation([out, string] LPWSTR *path,
4316                            [out] int *index);
4317    HRESULT IsRecommended();
4318    HRESULT MakeDefault([in, string] LPCWSTR description);
4319    HRESULT Invoke([in] IDataObject *object);
4320    HRESULT CreateInvoker([in] IDataObject *object,
4321                          [out] IAssocHandlerInvoker **invoker);
4322}
4323
4324[
4325    uuid(973810ae-9599-4b88-9e4d-6ee98c9552da),
4326    object,
4327    pointer_default(unique)
4328]
4329interface IEnumAssocHandlers : IUnknown
4330{
4331    HRESULT Next([in]  ULONG count,
4332                 [out, size_is(count), length_is(*fetched)] IAssocHandler **handlers,
4333                 [out] ULONG *fetched);
4334}
4335
4336typedef enum ASSOC_FILTER
4337{
4338    ASSOC_FILTER_NONE = 0,
4339    ASSOC_FILTER_RECOMMENDED
4340} ASSOC_FILTER;
4341cpp_quote("HRESULT WINAPI SHAssocEnumHandlers(PCWSTR extra, ASSOC_FILTER filter, IEnumAssocHandlers **handlersenum);")
4342
4343typedef [v1_enum] enum ACTIVATEOPTIONS
4344{
4345    AO_NONE             = 0x00000000,
4346    AO_DESIGNMODE       = 0x00000001,
4347    AO_NOERRORUI        = 0x00000002,
4348    AO_NOSPLASHSCREEN   = 0x00000004
4349} ACTIVATEOPTIONS;
4350
4351[
4352    uuid(2e941141-7f97-4756-ba1d-9decde894a3d),
4353    object,
4354    pointer_default(unique)
4355]
4356interface IApplicationActivationManager : IUnknown
4357{
4358    HRESULT ActivateApplication([in] LPCWSTR appusermodelid,
4359                                [in, unique] LPCWSTR arguments,
4360                                [in] ACTIVATEOPTIONS options,
4361                                [out] DWORD *processid);
4362    HRESULT ActivateForFile([in] LPCWSTR appusermodelid,
4363                            [in] IShellItemArray *itemarray,
4364                            [in, unique] LPCWSTR verb,
4365                            [out] DWORD *processid);
4366    HRESULT ActivateForProtocol([in] LPCWSTR appusermodelid,
4367                                [in] IShellItemArray *itemarray,
4368                                [out] DWORD *processid);
4369}
4370
4371/*****************************************************************************
4372 * ShellObjects typelibrary
4373 */
4374[
4375 uuid(50A7E9B1-70EF-11D1-B75A-00A0C90564FE),
4376 lcid(0x0000),
4377 version(1.0)
4378]
4379library ShellObjects
4380{
4381    [
4382        uuid(71F96385-DDD6-48D3-A0C1-AE06E8B055FB)
4383    ]
4384    coclass ExplorerBrowser
4385    {
4386        interface IExplorerBrowser;
4387    }
4388
4389    [
4390        uuid(DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7)
4391    ]
4392    coclass FileOpenDialog
4393    {
4394        interface IFileOpenDialog;
4395    }
4396
4397    [
4398        uuid(C0B4E2F3-BA21-4773-8DBA-335EC946EB8B)
4399    ]
4400    coclass FileSaveDialog
4401    {
4402        interface IFileSaveDialog;
4403    }
4404
4405    [
4406        uuid(AE054212-3535-4430-83ED-D501AA6680E6)
4407    ]
4408    coclass NamespaceTreeControl
4409    {
4410        interface INameSpaceTreeControl2;
4411    }
4412
4413    [
4414        uuid(4df0c730-df9d-4ae3-9153-aa6b82e9795a)
4415    ]
4416    coclass KnownFolderManager
4417    {
4418        interface IKnownFolderManager;
4419    }
4420
4421    [
4422        uuid(591209c7-767b-42b2-9fba-44ee4615f2c7)
4423    ]
4424    coclass ApplicationAssociationRegistration
4425    {
4426        interface IApplicationAssociationRegistration;
4427    }
4428
4429    [
4430         uuid(00021401-0000-0000-c000-000000000046)
4431    ]
4432    coclass ShellLink
4433    {
4434        interface IShellLinkW;
4435    }
4436
4437    [
4438        uuid(56fdf344-fd6d-11d0-958a-006097c9a090)
4439    ]
4440    coclass TaskbarList
4441    {
4442        interface ITaskbarList4;
4443    }
4444
4445    [
4446        uuid(77f10cf0-3db5-4966-b520-b7c54fd35ed6)
4447    ]
4448    coclass DestinationList {
4449        interface ICustomDestinationList;
4450    }
4451
4452    [
4453        uuid(2d3468c1-36a7-43b6-ac24-d3f02fd9607a)
4454    ]
4455    coclass EnumerableObjectCollection
4456    {
4457        interface IEnumObjects;
4458    }
4459
4460    [
4461        uuid(331f1768-05a9-4ddd-b86e-dae34ddc998a)
4462    ]
4463    coclass QueryCancelAutoPlay
4464    {
4465        interface IQueryCancelAutoPlay;
4466    }
4467
4468    [
4469        uuid(9ac9fbe1-e0a2-4ad6-b4ee-e212013ea917)
4470    ]
4471    coclass ShellItem {
4472        interface IShellItem2;
4473    }
4474
4475    [
4476        uuid(45ba127d-10a8-46ea-8ab7-56ea9078943c)
4477    ]
4478    coclass ApplicationActivationManager
4479    {
4480        interface IApplicationActivationManager;
4481    }
4482
4483#ifdef __REACTOS__
4484    [
4485        uuid(0010890e-8789-413c-adbc-48f5b511b3af)
4486    ]
4487    coclass UserNotification
4488    {
4489        interface IUserNotification;
4490    }
4491#endif // __REACTOS__
4492
4493}
4494
4495enum _OPPROGDLGF
4496{
4497    OPPROGDLG_DEFAULT = 0,
4498    OPPROGDLG_ENABLEPAUSE = 0x80,
4499    OPPROGDLG_ALLOWUNDO = 0x100,
4500    OPPROGDLG_DONTDISPLAYSOURCEPATH = 0x200,
4501    OPPROGDLG_DONTDISPLAYDESTPATH = 0x400,
4502    OPPROGDLG_NOMULTIDAYESTIMATES = 0x800,
4503    OPPROGDLG_DONTDISPLAYLOCATIONS = 0x1000
4504};
4505typedef DWORD OPPROGDLGF;
4506
4507enum _PDMODE
4508{
4509    PDM_DEFAULT = 0,
4510    PDM_RUN = 0x1,
4511    PDM_PREFLIGHT = 0x2,
4512    PDM_UNDOING = 0x4,
4513    PDM_ERRORSBLOCKING = 0x8,
4514    PDM_INDETERMINATE = 0x10
4515};
4516typedef DWORD PDMODE;
4517
4518typedef enum PDOPSTATUS
4519{
4520    PDOPS_RUNNING = 1,
4521    PDOPS_PAUSED = 2,
4522    PDOPS_CANCELLED = 3,
4523    PDOPS_STOPPED = 4,
4524    PDOPS_ERRORS = 5
4525} 	PDOPSTATUS;
4526
4527typedef enum _SPACTION
4528{
4529    SPACTION_NONE = 0,
4530    SPACTION_MOVING = 1,
4531    SPACTION_COPYING = 2,
4532    SPACTION_RECYCLING = 3,
4533    SPACTION_APPLYINGATTRIBS = 4,
4534    SPACTION_DOWNLOADING = 5,
4535    SPACTION_SEARCHING_INTERNET = 6,
4536    SPACTION_CALCULATING = 7,
4537    SPACTION_UPLOADING = 8,
4538    SPACTION_SEARCHING_FILES = 9,
4539    SPACTION_DELETING = 10,
4540    SPACTION_RENAMING = 11,
4541    SPACTION_FORMATTING = 12,
4542    SPACTION_COPY_MOVING = 13
4543} 	SPACTION;
4544
4545[
4546    uuid(0C9FB851-E5C9-43EB-A370-F0677B13874C),
4547    object,
4548    pointer_default(unique)
4549]
4550interface IOperationsProgressDialog : IUnknown
4551{
4552     HRESULT StartProgressDialog(
4553         [in] HWND hwndOwner,
4554         [in] OPPROGDLGF flags);
4555     HRESULT StopProgressDialog();
4556     HRESULT SetOperation(
4557         [in] SPACTION action);
4558     HRESULT SetMode(
4559         [in] PDMODE mode);
4560     HRESULT UpdateProgress(
4561        [in] ULONGLONG ullPointsCurrent,
4562        [in] ULONGLONG ullPointsTotal,
4563        [in] ULONGLONG ullSizeCurrent,
4564        [in] ULONGLONG ullSizeTotal,
4565        [in] ULONGLONG ullItemsCurrent,
4566        [in] ULONGLONG ullItemsTotal);
4567     HRESULT UpdateLocations(
4568         [in, optional] IShellItem *psiSource,
4569         [in, optional] IShellItem *psiTarget,
4570         [in, optional] IShellItem *psiItem);
4571     HRESULT ResetTimer();
4572     HRESULT PauseTimer();
4573     HRESULT ResumeTimer();
4574     HRESULT GetMilliseconds(
4575         [out] ULONGLONG *pullElapsed,
4576         [out] ULONGLONG *pullRemaining);
4577     HRESULT GetOperationStatus(
4578         [out] PDOPSTATUS *popstatus);
4579};
4580
4581[
4582    uuid(947aab5f-0a5c-4c13-b4d6-4bf7836fc9f8),
4583    object,
4584    pointer_default(unique)
4585]
4586interface IFileOperation : IUnknown
4587{
4588     HRESULT Advise(
4589         [in] IFileOperationProgressSink *pfops,
4590         [out] DWORD *pdwCookie);
4591     HRESULT Unadvise(
4592         [in] DWORD dwCookie);
4593     HRESULT SetOperationFlags(
4594         [in] DWORD dwOperationFlags);
4595     HRESULT SetProgressMessage(
4596         [in] LPCWSTR pszMessage);
4597     HRESULT SetProgressDialog(
4598         [in] IOperationsProgressDialog *popd);
4599     HRESULT SetProperties(
4600         [in] IPropertyChangeArray *pproparray);
4601     HRESULT SetOwnerWindow(
4602         [in] HWND hwndOwner);
4603     HRESULT ApplyPropertiesToItem(
4604         [in] IShellItem *psiItem);
4605     HRESULT ApplyPropertiesToItems(
4606         [in] IUnknown *punkItems);
4607     HRESULT RenameItem(
4608         [in] IShellItem *psiItem,
4609         [in] LPCWSTR pszNewName,
4610         [in] IFileOperationProgressSink *pfopsItem);
4611     HRESULT RenameItems(
4612         [in] IUnknown *pUnkItems,
4613         [in] LPCWSTR pszNewName);
4614     HRESULT MoveItem(
4615         [in] IShellItem *psiItem,
4616         [in] IShellItem *psiDestinationFolder,
4617         [in] LPCWSTR pszNewName,
4618         [in] IFileOperationProgressSink *pfopsItem);
4619     HRESULT MoveItems(
4620         [in] IUnknown *punkItems,
4621         [in] IShellItem *psiDestinationFolder);
4622     HRESULT CopyItem(
4623         [in] IShellItem *psiItem,
4624         [in] IShellItem *psiDestinationFolder,
4625         [in] LPCWSTR pszCopyName,
4626         [in] IFileOperationProgressSink *pfopsItem);
4627     HRESULT CopyItems(
4628         [in] IUnknown *punkItems,
4629         [in] IShellItem *psiDestinationFolder);
4630     HRESULT DeleteItem(
4631         [in] IShellItem *psiItem,
4632         [in] IFileOperationProgressSink *pfopsItem);
4633     HRESULT DeleteItems(
4634         [in] IUnknown *punkItems);
4635     HRESULT NewItem(
4636         [in] IShellItem *psiDestinationFolder,
4637         [in] DWORD dwFileAttributes,
4638         [in] LPCWSTR pszName,
4639         [in] LPCWSTR pszTemplateName,
4640         [in] IFileOperationProgressSink *pfopsItem);
4641     HRESULT PerformOperations();
4642     HRESULT GetAnyOperationsAborted(
4643         [out] BOOL *pfAnyOperationsAborted);
4644};
4645
4646[
4647    uuid(6CCB7BE0-6807-11d0-B810-00C04FD706EC),
4648    object,
4649    local,
4650    pointer_default(unique)
4651]
4652interface IShellTaskScheduler : IUnknown
4653{
4654    HRESULT AddTask(
4655        [in] IRunnableTask *pTask,
4656        [in] REFGUID rtoid,
4657        [in] DWORD_PTR lParam,
4658        [in] DWORD dwPriority);
4659    HRESULT RemoveTasks(
4660        [in] REFGUID rtoid,
4661        [in] DWORD_PTR lParam,
4662        [in] BOOL fWaitIfRunning);
4663    UINT CountTasks(
4664        [in] REFGUID rtoid);
4665    HRESULT Status(
4666        [in] DWORD dwReleaseStatus,
4667        [in] DWORD dwThreadTimeout);
4668}
4669
4670
4671[
4672    uuid(47c01f95-e185-412c-b5c5-4f27df965aea),
4673    object,
4674    pointer_default(unique)
4675]
4676interface IFolderBandPriv : IUnknown
4677{
4678    HRESULT SetCascade([in] BOOL fCascade);
4679
4680    HRESULT SetAccelerators([in] BOOL fAccelerators);
4681
4682    HRESULT SetNoIcons([in] BOOL fNoIcons);
4683
4684    HRESULT SetNoText([in] BOOL fNoText);
4685}
4686
4687
4688#ifdef __REACTOS__
4689/*****************************************************************************
4690 * IQueryContinue interface
4691 */
4692
4693[
4694    uuid(7307055c-b24a-486b-9f25-163e597a28a9),
4695    object,
4696    pointer_default(unique)
4697]
4698interface IQueryContinue : IUnknown
4699{
4700    // Returns S_OK if the operation should continue, and S_FALSE if not.
4701    HRESULT QueryContinue();
4702}
4703
4704
4705/*****************************************************************************
4706 * IUserNotification interface
4707 */
4708
4709[
4710    uuid(ba9711ba-5893-4787-a7e1-41277151550b),
4711    object,
4712    pointer_default(unique)
4713]
4714interface IUserNotification : IUnknown
4715{
4716    HRESULT SetBalloonInfo(
4717        [in, unique, string] LPCWSTR pszTitle,
4718        [in, unique, string] LPCWSTR pszText,
4719        [in] DWORD dwInfoFlags);
4720
4721    HRESULT SetBalloonRetry(
4722        [in] DWORD dwShowTime,  // Time intervals in milliseconds
4723        [in] DWORD dwInterval,
4724        [in] UINT cRetryCount);
4725
4726    HRESULT SetIconInfo(
4727        [in, unique] HICON hIcon,
4728        [in, unique, string] LPCWSTR pszToolTip);
4729
4730    // Blocks until the notification times out.
4731    HRESULT Show(
4732        [in, unique] IQueryContinue *pqc,
4733        [in] DWORD dwContinuePollInterval);
4734
4735    HRESULT PlaySound(
4736        [in, string] LPCWSTR pszSoundName);
4737};
4738
4739
4740/*****************************************************************************
4741 * IUserNotificationCallback interface (Vista+)
4742 */
4743
4744[
4745    uuid(19108294-0441-4aff-8013-fa0a730b0bea),
4746    object
4747]
4748interface IUserNotificationCallback : IUnknown
4749{
4750    HRESULT OnBalloonUserClick([in] POINT * pt);
4751    HRESULT OnLeftClick([in] POINT * pt);
4752    HRESULT OnContextMenu([in] POINT * pt);
4753};
4754
4755
4756/*****************************************************************************
4757 * IUserNotification2 interface (Vista+)
4758 */
4759
4760[
4761    uuid(215913cc-57eb-4fab-ab5a-e5fa7bea2a6c),
4762    object,
4763    pointer_default(unique)
4764]
4765interface IUserNotification2 : IUnknown
4766{
4767    HRESULT SetBalloonInfo(
4768        [in, unique, string] LPCWSTR pszTitle,
4769        [in, unique, string] LPCWSTR pszText,
4770        [in] DWORD dwInfoFlags);
4771
4772    HRESULT SetBalloonRetry(
4773        [in] DWORD dwShowTime,  // Time intervals in milliseconds
4774        [in] DWORD dwInterval,
4775        [in] UINT cRetryCount);
4776
4777    HRESULT SetIconInfo(
4778        [in, unique] HICON hIcon,
4779        [in, unique, string] LPCWSTR pszToolTip);
4780
4781    // Blocks until the notification times out.
4782    HRESULT Show(
4783        [in, unique] IQueryContinue *pqc,
4784        [in] DWORD dwContinuePollInterval,
4785        [in, unique] IUserNotificationCallback *pSink);
4786
4787    HRESULT PlaySound(
4788        [in, string] LPCWSTR pszSoundName);
4789};
4790
4791/*****************************************************************************
4792 * IItemNameLimits interface
4793 */
4794
4795[
4796    uuid(1df0d7f1-b267-4d28-8b10-12e23202a5c4)
4797]
4798interface IItemNameLimits : IUnknown
4799{
4800    HRESULT GetValidCharacters(
4801        [out, string] LPWSTR *ppwszValidChars,
4802        [out, string] LPWSTR *ppwszInvalidChars);
4803
4804    HRESULT GetMaxLength(
4805        [in, string] LPCWSTR pszName,
4806        [out] int *piMaxNameLen);
4807};
4808
4809/*****************************************************************************
4810 * IUserAssist interface
4811 */
4812[
4813    uuid(dd313e05-feff-11d1-8ecd-0000f87a470c),
4814    object,
4815    local,
4816    pointer_default(unique)
4817]
4818interface IUserAssist : IUnknown
4819{
4820    HRESULT FireEvent(
4821        GUID const *guid,
4822        INT param1,
4823        ULONG param2,
4824        WPARAM wparam,
4825        LPARAM lparam);
4826
4827    HRESULT QueryEvent(
4828        GUID const *guid,
4829        INT param,
4830        WPARAM wparam,
4831        LPARAM lparam,
4832        PVOID ptr);
4833
4834    HRESULT SetEvent(
4835        GUID const *guid,
4836        INT param,
4837        WPARAM wparam,
4838        LPARAM lparam,
4839        PVOID ptr);
4840
4841    HRESULT Enable(
4842        BOOL bEnable);
4843};
4844
4845#endif // __REACTOS__
4846