include: Add ICommDlgBrowser2 and ICommDlgBrowser3 interfaces.
[wine] / include / shobjidl.idl
1 /*
2  * COM interfaces for shell objects
3  *
4  * Copyright (C) 1999 Juergen Schmied
5  * Copyright (C) 2003 Alexandre Julliard
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21
22 import "objidl.idl";
23 import "oleidl.idl";
24 import "oaidl.idl";
25 import "docobj.idl";
26 import "shtypes.idl";
27 import "servprov.idl";
28 import "comcat.idl";
29 import "propidl.idl";
30 /* FIXME: import "prsht.idl";*/
31 import "msxml.idl";
32 import "wtypes.idl";
33 /* FIXME: import "propsys.idl"; */
34 /* FIXME: import "structuredquery.idl"; */
35
36 cpp_quote("/* FIXME: #include <sherrors.h> */")
37
38
39 /*****************************************************************************
40  * IPersistFolder interface
41  */
42 [
43     object,
44     uuid(000214ea-0000-0000-c000-000000000046),
45     pointer_default(unique)
46 ]
47 interface IPersistFolder : IPersist
48 {
49     typedef IPersistFolder *LPPERSISTFOLDER;
50
51     HRESULT Initialize( [in] LPCITEMIDLIST pidl );
52 }
53
54
55 /*****************************************************************************
56  * IPersistFolder2 interface
57  */
58 [
59     object,
60     uuid(1ac3d9f0-175c-11d1-95be-00609797ea4f),
61     pointer_default(unique)
62 ]
63 interface IPersistFolder2 : IPersistFolder
64 {
65     typedef IPersistFolder2 *LPPERSISTFOLDER2;
66
67     HRESULT GetCurFolder( [out] LPITEMIDLIST *ppidl );
68 }
69
70
71 /*****************************************************************************
72  * IPersistIDList interface
73  */
74 [
75     object,
76     uuid(1079acfc-29bd-11d3-8e0d-00c04f6837d5),
77     pointer_default(unique)
78 ]
79 interface IPersistIDList : IPersist
80 {
81     HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
82     HRESULT GetIDList( [out] LPITEMIDLIST *ppidl );
83 }
84
85
86 /*****************************************************************************
87  * IEnumIDList interface
88  */
89 [
90     object,
91     uuid(000214f2-0000-0000-c000-000000000046),
92     pointer_default(unique)
93 ]
94 interface IEnumIDList : IUnknown
95 {
96     typedef IEnumIDList *LPENUMIDLIST;
97
98     HRESULT Next(
99         [in] ULONG celt,
100         [out, size_is(celt), length_is(*pceltFetched)] LPITEMIDLIST *rgelt,
101         [out] ULONG *pceltFetched);
102
103     HRESULT Skip( [in] ULONG celt );
104     HRESULT Reset();
105     HRESULT Clone( [out] IEnumIDList **ppenum );
106 }
107
108 /*****************************************************************************
109  * IShellPropSheetExt interface
110  */
111 cpp_quote("#if 0")
112     typedef LPARAM LPFNSVADDPROPSHEETPAGE;
113 cpp_quote("#else")
114 cpp_quote("#include <prsht.h>")
115 cpp_quote("typedef LPFNADDPROPSHEETPAGE LPFNSVADDPROPSHEETPAGE;")
116 cpp_quote("#endif")
117
118 [
119     object,
120     uuid(000214E9-0000-0000-C000-000000000046),
121     pointer_default(unique),
122     local
123 ]
124 interface IShellPropSheetExt : IUnknown
125 {
126     enum tagSHELLPROPSHEETEXTPAGEID {
127         EXPPS_FILETYPES = 0x1
128     };
129
130     typedef UINT EXPPS;
131
132     HRESULT AddPages(
133         [in] LPFNSVADDPROPSHEETPAGE pfnAddPage,
134         [in] LPARAM lParam);
135     HRESULT ReplacePage(
136         [in] EXPPS uPageID,
137         [in] LPFNSVADDPROPSHEETPAGE pfnReplaceWith,
138         [in] LPARAM lParam);
139 }
140 typedef IShellPropSheetExt *LPSHELLPROPSHEETEXT;
141
142 /*****************************************************************************
143  * IShellFolder interface
144  */
145 [
146     object,
147     uuid(000214e6-0000-0000-c000-000000000046),
148     pointer_default(unique)
149 ]
150 interface IShellFolder : IUnknown
151 {
152     typedef IShellFolder * LPSHELLFOLDER;
153
154     typedef enum tagSHGDN
155     {
156         SHGDN_NORMAL = 0,
157         SHGDN_INFOLDER = 1,
158         SHGDN_FOREDITING = 0x1000,
159         SHGDN_INCLUDE_NONFILESYS = 0x2000,
160         SHGDN_FORADDRESSBAR = 0x4000,
161         SHGDN_FORPARSING = 0x8000
162     } SHGNO;
163
164     typedef DWORD SHGDNF;
165
166     enum tagSHCONTF
167     {
168         SHCONTF_FOLDERS = 32,
169         SHCONTF_NONFOLDERS = 64,
170         SHCONTF_INCLUDEHIDDEN = 128,
171         SHCONTF_INIT_ON_FIRST_NEXT = 256,
172         SHCONTF_NETPRINTERSRCH = 512,
173         SHCONTF_SHAREABLE = 1024,
174         SHCONTF_STORAGE = 2048
175     };
176
177     typedef DWORD SHCONTF;
178
179     cpp_quote("#define SFGAO_CANCOPY           DROPEFFECT_COPY")
180     cpp_quote("#define SFGAO_CANMOVE           DROPEFFECT_MOVE")
181     cpp_quote("#define SFGAO_CANLINK           DROPEFFECT_LINK")
182     cpp_quote("#define SFGAO_STORAGE           0x00000008L")
183     cpp_quote("#define SFGAO_CANRENAME         0x00000010L")
184     cpp_quote("#define SFGAO_CANDELETE         0x00000020L")
185     cpp_quote("#define SFGAO_HASPROPSHEET      0x00000040L")
186     cpp_quote("#define SFGAO_DROPTARGET        0x00000100L")
187     cpp_quote("#define SFGAO_CAPABILITYMASK    0x00000177L")
188     cpp_quote("#define SFGAO_ENCRYPTED         0x00002000L")
189     cpp_quote("#define SFGAO_ISSLOW            0x00004000L")
190     cpp_quote("#define SFGAO_GHOSTED           0x00008000L")
191     cpp_quote("#define SFGAO_LINK              0x00010000L")
192     cpp_quote("#define SFGAO_SHARE             0x00020000L")
193     cpp_quote("#define SFGAO_READONLY          0x00040000L")
194     cpp_quote("#define SFGAO_HIDDEN            0x00080000L")
195     cpp_quote("#define SFGAO_DISPLAYATTRMASK   0x000FC000L")
196     cpp_quote("#define SFGAO_FILESYSANCESTOR   0x10000000L")
197     cpp_quote("#define SFGAO_FOLDER            0x20000000L")
198     cpp_quote("#define SFGAO_FILESYSTEM        0x40000000L")
199     cpp_quote("#define SFGAO_HASSUBFOLDER      0x80000000L")
200     cpp_quote("#define SFGAO_CONTENTSMASK      0x80000000L")
201     cpp_quote("#define SFGAO_VALIDATE          0x01000000L")
202     cpp_quote("#define SFGAO_REMOVABLE         0x02000000L")
203     cpp_quote("#define SFGAO_COMPRESSED        0x04000000L")
204     cpp_quote("#define SFGAO_BROWSABLE         0x08000000L")
205     cpp_quote("#define SFGAO_NONENUMERATED     0x00100000L")
206     cpp_quote("#define SFGAO_NEWCONTENT        0x00200000L")
207     cpp_quote("#define SFGAO_STREAM            0x00400000L")
208     cpp_quote("#define SFGAO_STORAGEANCESTOR   0x00800000L")
209
210     typedef ULONG SFGAOF;
211
212     HRESULT ParseDisplayName(
213         [in] HWND hwndOwner,
214         [in] LPBC pbcReserved,
215         [in, string] LPOLESTR lpszDisplayName,
216         [out] ULONG *pchEaten,
217         [out] LPITEMIDLIST *ppidl,
218         [in, out, unique] ULONG *pdwAttributes);
219
220     HRESULT EnumObjects(
221         [in] HWND hwndOwner,
222         [in] SHCONTF grfFlags,
223         [out] IEnumIDList **ppenumIDList);
224
225     HRESULT BindToObject(
226         [in] LPCITEMIDLIST pidl,
227         [in] LPBC pbcReserved,
228         [in] REFIID riid,
229         [out, iid_is(riid)] void **ppvOut);
230
231     HRESULT BindToStorage(
232         [in] LPCITEMIDLIST pidl,
233         [in] LPBC pbcReserved,
234         [in] REFIID riid,
235         [out, iid_is(riid)] void **ppvObj);
236
237     HRESULT CompareIDs(
238         [in] LPARAM lParam,
239         [in] LPCITEMIDLIST pidl1,
240         [in] LPCITEMIDLIST pidl2);
241
242     HRESULT CreateViewObject(
243         [in] HWND hwndOwner,
244         [in] REFIID riid,
245         [out, iid_is(riid)] void **ppvOut);
246
247     HRESULT GetAttributesOf(
248         [in] UINT cidl,
249         [in, size_is(cidl)] LPCITEMIDLIST *apidl,
250         [in, out] SFGAOF *rgfInOut);
251
252     HRESULT GetUIObjectOf(
253         [in] HWND hwndOwner,
254         [in] UINT cidl,
255         [in, size_is(cidl)] LPCITEMIDLIST *apidl,
256         [in] REFIID riid,
257         [in, out, unique] UINT *prgfInOut,
258         [out, iid_is(riid)] void **ppvOut);
259
260     HRESULT GetDisplayNameOf(
261         [in] LPCITEMIDLIST pidl,
262         [in] SHGDNF uFlags,
263         [out] STRRET *lpName);
264
265     HRESULT SetNameOf(
266         [in] HWND hwnd,
267         [in] LPCITEMIDLIST pidl,
268         [in, string] LPCOLESTR lpszName,
269         [in] SHGDNF uFlags,
270         [out] LPITEMIDLIST *ppidlOut);
271 }
272
273
274 /*****************************************************************************
275  * IEnumExtraSearch interface
276  */
277 [
278     object,
279     uuid(0e700be1-9db6-11d1-a1ce-00c04fd75d13),
280     pointer_default(unique)
281 ]
282 interface IEnumExtraSearch : IUnknown
283 {
284     typedef IEnumExtraSearch *LPENUMEXTRASEARCH;
285
286     typedef struct
287     {
288         GUID guidSearch;
289         WCHAR wszFriendlyName[80];
290         /*
291          *WCHAR wszMenuText[80];
292          *WCHAR wszHelpText[MAX_PATH];
293          */
294         WCHAR wszUrl[2084];
295         /*
296          *WCHAR wszIcon[MAX_PATH+10];
297          *WCHAR wszGreyIcon[MAX_PATH+10];
298          *WCHAR wszClrIcon[MAX_PATH+10];
299          */
300     } EXTRASEARCH, *LPEXTRASEARCH;
301
302     HRESULT Next(
303         [in] ULONG celt,
304         [out, size_is(celt), length_is(*pceltFetched)] EXTRASEARCH *rgelt,
305         [out] ULONG *pceltFetched);
306
307     HRESULT Skip( [in] ULONG celt );
308     HRESULT Reset();
309     HRESULT Clone( [out] IEnumExtraSearch **ppenum );
310 }
311
312
313 /*****************************************************************************
314  * IShellFolder2 interface
315  */
316 [
317     object,
318     uuid(93f2f68c-1d1b-11d3-a30e-00c04f79abd1),
319     pointer_default(unique)
320 ]
321 interface IShellFolder2 : IShellFolder
322 {
323     typedef struct
324     {
325         GUID    fmtid;
326         DWORD   pid;
327     } SHCOLUMNID, *LPSHCOLUMNID;
328     typedef const SHCOLUMNID *LPCSHCOLUMNID;
329
330     HRESULT GetDefaultSearchGUID( [out] GUID *lpguid );
331     HRESULT EnumSearches( [out] IEnumExtraSearch **ppenum );
332     HRESULT GetDefaultColumn( [in] DWORD dwReserved, [out] ULONG *pSort, [out] ULONG *pDisplay );
333     HRESULT GetDefaultColumnState( [in] UINT iColumn, [out] SHCOLSTATEF *pcsFlags );
334     HRESULT GetDetailsEx( [in] LPCITEMIDLIST pidl, [in] const SHCOLUMNID *pscid, [out] VARIANT *pv);
335     HRESULT GetDetailsOf( [in] LPCITEMIDLIST pidl, [in] UINT iColumn, [out] SHELLDETAILS *psd);
336     HRESULT MapColumnToSCID( [in] UINT iColumn, [in] SHCOLUMNID *pscid );
337 }
338
339 /*****************************************************************************
340  * IShellItem interface
341  */
342 [
343     object,
344     uuid(43826d1e-e718-42ee-bc55-a1e261c37bfe),
345     pointer_default(unique)
346 ]
347 interface IShellItem : IUnknown
348 {
349     typedef DWORD SIGDN;
350
351     typedef DWORD SICHINTF;
352
353     HRESULT BindToHandler(
354         [in] IBindCtx *pbc,
355         [in] REFGUID rbhid,
356         [in] REFIID riid,
357         [out, iid_is(riid)] void **ppvOut);
358
359     HRESULT GetParent( [out] IShellItem **ppsi );
360
361     HRESULT GetDisplayName(
362         [in] SIGDN sigdnName,
363         [out] LPWSTR *ppszName);
364
365     HRESULT GetAttributes(
366         [in] SFGAOF sfgaoMask,
367         [out] SFGAOF *psfgaoAttribs);
368
369     HRESULT Compare(
370         [in] IShellItem *psi,
371         [in] SICHINTF hint,
372         [out] int *piOrder);
373 }
374
375 typedef enum tagNWMF {
376     NWMF_UNLOADING        = 0x0001,
377     NWMF_USERINITED       = 0x0002,
378     NWMF_FIRST            = 0x0004,
379     NWMF_OVERRIDEKEY      = 0x0008,
380     NWMF_SHOWHELP         = 0x0010,
381     NWMF_HTMLDIALOG       = 0x0020,
382     NWMF_FROMDIALOGCHILD  = 0x0040,
383     NWMF_USERREQUESTED    = 0x0080,
384     NWMF_USERALLOWED      = 0x0100
385 } NWMF;
386
387 /*****************************************************************************
388  * FOLDERSETTINGS
389  */
390 typedef char *LPVIEWSETTINGS;
391
392 typedef enum
393 {
394     FWF_AUTOARRANGE         = 0x00000001,
395     FWF_ABBREVIATEDNAMES    = 0x00000002,
396     FWF_SNAPTOGRID          = 0x00000004,
397     FWF_OWNERDATA           = 0x00000008,
398     FWF_BESTFITWINDOW       = 0x00000010,
399     FWF_DESKTOP             = 0x00000020,
400     FWF_SINGLESEL           = 0x00000040,
401     FWF_NOSUBFOLDERS        = 0x00000080,
402     FWF_TRANSPARENT         = 0x00000100,
403     FWF_NOCLIENTEDGE        = 0x00000200,
404     FWF_NOSCROLL            = 0x00000400,
405     FWF_ALIGNLEFT           = 0x00000800,
406     FWF_NOICONS             = 0x00001000,
407     FWF_SHOWSELALWAYS       = 0x00002000,
408     FWF_NOVISIBLE           = 0x00004000,
409     FWF_SINGLECLICKACTIVATE = 0x00008000,
410     FWF_NOWEBVIEW           = 0x00010000,
411     FWF_HIDEFILENAMES       = 0x00020000,
412     FWF_CHECKSELECT         = 0x00040000
413 } FOLDERFLAGS;
414
415 typedef enum
416 {
417     FVM_ICON       = 1,
418     FVM_FIRST      = FVM_ICON,
419     FVM_SMALLICON  = 2,
420     FVM_LIST       = 3,
421     FVM_DETAILS    = 4,
422     FVM_THUMBNAIL  = 5,
423     FVM_TILE       = 6,
424     FVM_THUMBSTRIP = 7,
425     FVM_LAST       = FVM_THUMBSTRIP
426 } FOLDERVIEWMODE;
427
428 typedef struct
429 {
430     UINT ViewMode;
431     UINT fFlags;
432 } FOLDERSETTINGS, *PFOLDERSETTINGS, *LPFOLDERSETTINGS;
433 typedef const FOLDERSETTINGS *LPCFOLDERSETTINGS;
434
435 /*****************************************************************************
436  * IShellIcon interface
437  */
438 [
439     uuid(000214e5-0000-0000-c000-000000000046),
440     object,
441     pointer_default(unique)
442 ]
443 interface IShellIcon : IUnknown
444 {
445     HRESULT GetIconOf(
446         [in] PCUITEMID_CHILD pidl,
447         [in] UINT flags,
448         [out] int *pIconIndex);
449 }
450
451 /*****************************************************************************
452  * IShellView interface
453  */
454 interface IShellBrowser;  /* forward declaration */
455 [
456     object,
457     uuid(000214e3-0000-0000-c000-000000000046),
458     pointer_default(unique)
459 ]
460 interface IShellView : IOleWindow
461 {
462     typedef IShellView *LPSHELLVIEW;
463
464     cpp_quote("#define SVSI_DESELECT       0x00000000")
465     cpp_quote("#define SVSI_SELECT         0x00000001")
466     cpp_quote("#define SVSI_EDIT           0x00000003")
467     cpp_quote("#define SVSI_DESELECTOTHERS 0x00000004")
468     cpp_quote("#define SVSI_ENSUREVISIBLE  0x00000008")
469     cpp_quote("#define SVSI_FOCUSED        0x00000010")
470     cpp_quote("#define SVSI_TRANSLATEPT    0x00000020")
471     cpp_quote("#define SVSI_SELECTIONMARK  0x00000040")
472     cpp_quote("#define SVSI_POSITIONITEM   0x00000080")
473     cpp_quote("#define SVSI_CHECK          0x00000100")
474     cpp_quote("#define SVSI_NOSTATECHANGE  0x80000000")
475
476     typedef UINT SVSIF;
477
478     typedef enum
479     {
480         SVGIO_BACKGROUND     = 0x00000000,
481         SVGIO_SELECTION      = 0x00000001,
482         SVGIO_ALLVIEW        = 0x00000002,
483         SVGIO_CHECKED        = 0x00000003,
484         SVGIO_TYPE_MASK      = 0x0000000f,
485         SVGIO_FLAG_VIEWORDER = 0x80000000,
486     } SVGIO;
487
488     typedef enum
489     {
490         SVUIA_DEACTIVATE       = 0,
491         SVUIA_ACTIVATE_NOFOCUS = 1,
492         SVUIA_ACTIVATE_FOCUS   = 2,
493         SVUIA_INPLACEACTIVATE  = 3
494     } SVUIA_STATUS;
495
496     HRESULT TranslateAccelerator( [in] MSG *pmsg );
497     HRESULT EnableModeless( [in] BOOL fEnable );
498     HRESULT UIActivate( [in] UINT uState );
499     HRESULT Refresh();
500     HRESULT CreateViewWindow(
501         [in] IShellView *psvPrevious,
502         [in] LPCFOLDERSETTINGS lpfs,
503         [in] IShellBrowser *psb,
504         [out] RECT *prcView,
505         [out] HWND *phWnd);
506
507     HRESULT DestroyViewWindow();
508     HRESULT GetCurrentInfo( [out] LPFOLDERSETTINGS lpfs );
509
510     [local] HRESULT AddPropertySheetPages(
511         [in] DWORD dwReserved,
512         [in] LPFNSVADDPROPSHEETPAGE pfn,
513         [in] LPARAM lparam);
514
515     HRESULT SaveViewState();
516     HRESULT SelectItem(
517         [in] LPCITEMIDLIST pidlItem,
518         [in] SVSIF uFlags);
519     HRESULT GetItemObject(
520         [in] UINT uItem,
521         [in] REFIID riid,
522         [out, iid_is(riid)] void **ppv);
523 }
524
525 [
526     object,
527     uuid(88e39e80-3578-11cf-ae69-08002b2e1262),
528     pointer_default(unique)
529 ]
530 interface IShellView2 : IShellView
531 {
532     typedef GUID SHELLVIEWID;
533 cpp_quote("#include <pshpack8.h>")
534     typedef struct _SV2CVW2_PARAMS
535     {
536         DWORD cbSize;
537         IShellView *psvPrev;
538         LPCFOLDERSETTINGS pfs;
539         IShellBrowser *psbOwner;
540         RECT *prcView;
541         SHELLVIEWID const *pvid;
542         HWND hwndView;
543     } SV2CVW2_PARAMS, *LPSV2CVW2_PARAMS;
544 cpp_quote("#include <poppack.h>")
545
546     HRESULT GetView(
547         [in, out] SHELLVIEWID *view_guid,
548         [in] ULONG view_type
549     );
550     HRESULT CreateViewWindow2(
551         [in] LPSV2CVW2_PARAMS view_params
552     );
553     HRESULT HandleRename(
554         [in] LPCITEMIDLIST new_pidl
555     );
556     HRESULT SelectAndPositionItem(
557         [in] LPCITEMIDLIST item,
558         [in] UINT flags,
559         [in] POINT *point
560     );
561 }
562
563 /*****************************************************************************
564  * IFolderView interface
565  */
566 [
567     uuid(cde725b0-ccc9-4519-917e-325d72fab4ce),
568     object,
569     pointer_default(unique)
570 ]
571 interface IFolderView : IUnknown
572 {
573     HRESULT GetCurrentViewMode( [out] UINT *mode );
574     HRESULT SetCurrentViewMode( [in] UINT mode );
575     HRESULT GetFolder( [in] REFIID riid, [out, iid_is(riid)] void **ppv );
576     HRESULT Item(
577         [in] int index,
578         [out] PITEMID_CHILD *ppidl
579     );
580     HRESULT ItemCount(
581         [in] UINT flags,
582         [out] int *items
583     );
584     HRESULT Items(
585         [in] UINT flags,
586         [in] REFIID riid,
587         [out, iid_is(riid)] void **ppv
588     );
589     HRESULT GetSelectionMarkedItem( [out] int *item );
590     HRESULT GetFocusedItem( [out] int *item );
591     HRESULT GetItemPosition(
592         [in] PCUITEMID_CHILD pidl,
593         [out] POINT* ppt
594     );
595     HRESULT GetSpacing( [in, out, unique] POINT* pt );
596     HRESULT GetDefaultSpacing( [out] POINT* pt );
597     HRESULT GetAutoArrange();
598     HRESULT SelectItem(
599         [in] int item,
600         [in] DWORD flags
601     );
602     HRESULT SelectAndPositionItems(
603         [in] UINT cidl,
604         [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl,
605         [in, unique, size_is(cidl)] POINT* apt,
606         [in] DWORD flags
607     );
608 }
609
610 /*****************************************************************************
611  * IShellBrowser interface
612  */
613 [
614     object,
615     uuid(000214e2-0000-0000-c000-000000000046),
616     pointer_default(unique)
617 ]
618 interface IShellBrowser : IOleWindow
619 {
620     typedef IShellBrowser *LPSHELLBROWSER;
621
622 cpp_quote("#define SBSP_DEFBROWSER            0x00000000")
623 cpp_quote("#define SBSP_SAMEBROWSER           0x00000001")
624 cpp_quote("#define SBSP_NEWBROWSER            0x00000002")
625 cpp_quote("#define SBSP_DEFMODE               0x00000000")
626 cpp_quote("#define SBSP_OPENMODE              0x00000010")
627 cpp_quote("#define SBSP_EXPLOREMODE           0x00000020")
628 cpp_quote("#define SBSP_HELPMODE              0x00000040")
629 cpp_quote("#define SBSP_NOTRANSFERHIST        0x00000080")
630 cpp_quote("#define SBSP_ABSOLUTE              0x00000000")
631 cpp_quote("#define SBSP_RELATIVE              0x00001000")
632 cpp_quote("#define SBSP_PARENT                0x00002000")
633 cpp_quote("#define SBSP_NAVIGATEBACK          0x00004000")
634 cpp_quote("#define SBSP_NAVIGATEFORWARD       0x00008000")
635 cpp_quote("#define SBSP_ALLOW_AUTONAVIGATE    0x00010000")
636 cpp_quote("#define SBSP_NOAUTOSELECT          0x04000000")
637 cpp_quote("#define SBSP_WRITENOHISTORY        0x08000000")
638 cpp_quote("#define SBSP_REDIRECT              0x40000000")
639 cpp_quote("#define SBSP_INITIATEDBYHLINKFRAME 0x80000000")
640
641 cpp_quote("#define FCW_STATUS      0x0001")
642 cpp_quote("#define FCW_TOOLBAR     0x0002")
643 cpp_quote("#define FCW_TREE        0x0003")
644 cpp_quote("#define FCW_INTERNETBAR 0x0006")
645 cpp_quote("#define FCW_PROGRESS    0x0008")
646
647 cpp_quote("#define FCT_MERGE       0x0001")
648 cpp_quote("#define FCT_CONFIGABLE  0x0002")
649 cpp_quote("#define FCT_ADDTOEND    0x0004")
650
651 cpp_quote("#if 0")
652     typedef LPARAM LPTBBUTTONSB;
653 cpp_quote("#else")
654 cpp_quote("#include <commctrl.h>")
655 cpp_quote("typedef LPTBBUTTON LPTBBUTTONSB;")
656 cpp_quote("#endif")
657
658     HRESULT InsertMenusSB(
659         [in] HMENU hmenuShared,
660         [in, out] LPOLEMENUGROUPWIDTHS lpMenuWidths);
661
662     HRESULT SetMenuSB(
663         [in] HMENU hmenuShared,
664         [in] HOLEMENU holemenuReserved,
665         [in] HWND hwndActiveObject);
666
667     HRESULT RemoveMenusSB( [in] HMENU hmenuShared );
668     HRESULT SetStatusTextSB( [in, unique] LPCOLESTR pszStatusText );
669     HRESULT EnableModelessSB( [in] BOOL fEnable );
670     HRESULT TranslateAcceleratorSB( [in] MSG *pmsg, [in] WORD wID );
671
672     HRESULT BrowseObject(
673         [in] LPCITEMIDLIST pidl,
674         [in] UINT wFlags);
675
676     HRESULT GetViewStateStream(
677         [in] DWORD grfMode,
678         [out] IStream **ppStrm);
679
680     HRESULT GetControlWindow(
681         [in] UINT id,
682         [out] HWND *phwnd);
683
684     [local] HRESULT SendControlMsg(
685         [in] UINT id,
686         [in] UINT uMsg,
687         [in] WPARAM wParam,
688         [in] LPARAM lParam,
689         [in] LRESULT *pret);
690
691     HRESULT QueryActiveShellView( [out] IShellView **ppshv );
692     HRESULT OnViewWindowActive( [in] IShellView *pshv );
693
694     [local]
695     HRESULT SetToolbarItems(
696         [in] LPTBBUTTONSB lpButtons,
697         [in] UINT nButtons,
698         [in] UINT uFlags);
699 }
700
701
702 /*****************************************************************************
703  * IShellLinkA interface
704  */
705 [
706     object,
707     uuid(000214ee-0000-0000-c000-000000000046),
708     pointer_default(unique)
709 ]
710 interface IShellLinkA : IUnknown
711 {
712     typedef enum
713     {
714         SLR_NO_UI               = 0x0001,
715         SLR_ANY_MATCH           = 0x0002,
716         SLR_UPDATE              = 0x0004,
717         SLR_NOUPDATE            = 0x0008,
718         SLR_NOSEARCH            = 0x0010,
719         SLR_NOTRACK             = 0x0020,
720         SLR_NOLINKINFO          = 0x0040,
721         SLR_INVOKE_MSI          = 0x0080,
722         SLR_NO_UI_WITH_MSG_PUMP = 0x0101,
723     } SLR_FLAGS;
724
725     typedef enum
726     {
727         SLGP_SHORTPATH   = 0x0001,
728         SLGP_UNCPRIORITY = 0x0002,
729         SLGP_RAWPATH     = 0x0004,
730     } SLGP_FLAGS;
731
732     HRESULT GetPath(
733         [out, size_is(cch)] LPSTR pszFile,
734         [in] int cch,
735         [in, out, unique] WIN32_FIND_DATAA *pfd,
736         [in] DWORD fFlags);
737
738     HRESULT GetIDList( [out] LPITEMIDLIST * ppidl );
739
740     HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
741
742     HRESULT GetDescription(
743         [out, size_is(cch)] LPSTR pszName,
744         [in] int cch);
745
746     HRESULT SetDescription( [in] LPCSTR pszName );
747
748     HRESULT GetWorkingDirectory(
749         [out, size_is(cch)] LPSTR pszDir,
750         [in] int cch);
751
752     HRESULT SetWorkingDirectory( [in] LPCSTR pszDir );
753
754     HRESULT GetArguments(
755         [out, size_is(cch)] LPSTR pszArgs,
756         [in] int cch);
757
758     HRESULT SetArguments( [in] LPCSTR pszArgs );
759
760     HRESULT GetHotkey( [out] WORD *pwHotkey );
761
762     HRESULT SetHotkey( [in] WORD wHotkey );
763
764     HRESULT GetShowCmd( [out] int *piShowCmd );
765
766     HRESULT SetShowCmd( [in] int iShowCmd );
767
768     HRESULT GetIconLocation(
769         [out, size_is(cch)] LPSTR pszIconPath,
770         [in] int cch,
771         [out] int *piIcon);
772
773     HRESULT SetIconLocation(
774         [in] LPCSTR pszIconPath,
775         [in] int iIcon);
776
777     HRESULT SetRelativePath(
778         [in] LPCSTR pszPathRel,
779         [in] DWORD dwReserved);
780
781     HRESULT Resolve(
782         [in] HWND hwnd,
783         [in] DWORD fFlags);
784
785     HRESULT SetPath( [in] LPCSTR pszFile );
786 }
787
788
789 /*****************************************************************************
790  * IShellLinkW interface
791  */
792 [
793     object,
794     uuid(000214f9-0000-0000-c000-000000000046),
795     pointer_default(unique)
796 ]
797 interface IShellLinkW : IUnknown
798 {
799     HRESULT GetPath(
800         [out, size_is(cch)] LPWSTR pszFile,
801         [in] int cch,
802         [in, out] WIN32_FIND_DATAW *pfd,
803         [in] DWORD fFlags);
804
805     HRESULT GetIDList( [out] LPITEMIDLIST * ppidl );
806
807     HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
808
809     HRESULT GetDescription(
810         [out, size_is(cch)] LPWSTR pszName,
811         [in] int cch);
812
813     HRESULT SetDescription( [in] LPCWSTR pszName );
814
815     HRESULT GetWorkingDirectory(
816         [out, size_is(cch)] LPWSTR pszDir,
817         [in] int cch);
818
819     HRESULT SetWorkingDirectory( [in] LPCWSTR pszDir );
820
821     HRESULT GetArguments(
822         [out, size_is(cch)] LPWSTR pszArgs,
823         [in] int cch);
824
825     HRESULT SetArguments( [in] LPCWSTR pszArgs );
826
827     HRESULT GetHotkey( [out] WORD *pwHotkey );
828
829     HRESULT SetHotkey( [in] WORD wHotkey );
830
831     HRESULT GetShowCmd( [out] int *piShowCmd );
832
833     HRESULT SetShowCmd( [in] int iShowCmd );
834
835     HRESULT GetIconLocation(
836         [out, size_is(cch)] LPWSTR pszIconPath,
837         [in] int cch,
838         [out] int *piIcon);
839
840     HRESULT SetIconLocation(
841         [in] LPCWSTR pszIconPath,
842         [in] int iIcon);
843
844     HRESULT SetRelativePath(
845         [in] LPCWSTR pszPathRel,
846         [in] DWORD dwReserved);
847
848     HRESULT Resolve(
849         [in] HWND hwnd,
850         [in] DWORD fFlags);
851
852     HRESULT SetPath( [in] LPCWSTR pszFile );
853 }
854
855 cpp_quote("#define IShellLink WINELIB_NAME_AW(IShellLink)")
856
857
858 /*****************************************************************************
859  * IShellExtInit interface
860  */
861 [
862     object,
863     uuid(000214e8-0000-0000-c000-000000000046),
864     pointer_default(unique),
865     local
866 ]
867 interface IShellExtInit : IUnknown
868 {
869     typedef IShellExtInit *LPSHELLEXTINIT;
870
871     HRESULT Initialize(
872         [in] LPCITEMIDLIST pidlFolder,
873         [in] IDataObject *pdtobj,
874         [in] HKEY hkeyProgID);
875 }
876
877
878 /*******************************************************************************/
879 /* Note: the following interfaces are not in shobjidl.idl under Windows, they  */
880 /* are declared directly in shlobj.h. It hopefully won't break anything to put */
881 /* them here anyway.                                                           */
882 /*******************************************************************************/
883
884 #ifndef MAX_PATH
885 #define MAX_PATH 260
886 #endif
887
888
889 /*****************************************************************************
890  * IPersistFolder3 interface
891  */
892 [
893     object,
894     uuid(cef04fdf-fe72-11d2-87a5-00c04f6837cf),
895     pointer_default(unique)
896 ]
897 interface IPersistFolder3 : IPersistFolder2
898 {
899     typedef struct
900     {
901         LPITEMIDLIST    pidlTargetFolder;
902         WCHAR           szTargetParsingName[MAX_PATH];
903         WCHAR           szNetworkProvider[MAX_PATH];
904         DWORD           dwAttributes;
905         int             csidl;
906     } PERSIST_FOLDER_TARGET_INFO;
907
908     HRESULT InitializeEx(
909         [in] IBindCtx *pbc,
910         [in] LPCITEMIDLIST pidlRoot,
911         [in] const PERSIST_FOLDER_TARGET_INFO *ppfti);
912
913     HRESULT GetFolderTargetInfo( [out] PERSIST_FOLDER_TARGET_INFO *ppfti );
914 }
915
916
917 /*****************************************************************************
918  * IExtractIconA interface
919  */
920 [
921     object,
922     uuid(000214eb-0000-0000-c000-000000000046),
923     pointer_default(unique),
924     local
925 ]
926 interface IExtractIconA : IUnknown
927 {
928 cpp_quote("#define GIL_OPENICON     0x0001")
929 cpp_quote("#define GIL_FORSHELL     0x0002")
930 cpp_quote("#define GIL_ASYNC        0x0020")
931 cpp_quote("#define GIL_DEFAULTICON  0x0040")
932 cpp_quote("#define GIL_FORSHORTCUT  0x0080")
933
934 cpp_quote("#define GIL_SIMULATEDOC  0x0001")
935 cpp_quote("#define GIL_PERINSTANCE  0x0002")
936 cpp_quote("#define GIL_PERCLASS     0x0004")
937 cpp_quote("#define GIL_NOTFILENAME  0x0008")
938 cpp_quote("#define GIL_DONTCACHE    0x0010")
939
940     typedef IExtractIconA *LPEXTRACTICONA;
941
942     HRESULT GetIconLocation(
943         [in] UINT uFlags,
944         [out, size_is(cchMax)] LPSTR szIconFile,
945         [in] UINT cchMax,
946         [out] INT *piIndex,
947         [out] UINT *pwFlags);
948
949     HRESULT Extract(
950         [in] LPCSTR pszFile,
951         [in] UINT nIconIndex,
952         [out] HICON *phiconLarge,
953         [out] HICON *phiconSmall,
954         [in] UINT nIconSize );
955 }
956
957
958 /*****************************************************************************
959  * IExtractIconW interface
960  */
961 [
962     object,
963     uuid(000214fa-0000-0000-c000-000000000046),
964     pointer_default(unique),
965     local
966 ]
967 interface IExtractIconW : IUnknown
968 {
969     typedef IExtractIconW *LPEXTRACTICONW;
970
971     HRESULT GetIconLocation(
972         [in] UINT uFlags,
973         [out, size_is(cchMax)] LPWSTR szIconFile,
974         [in] UINT cchMax,
975         [out] INT *piIndex,
976         [out] UINT *pwFlags);
977
978     HRESULT Extract(
979         [in] LPCWSTR pszFile,
980         [in] UINT nIconIndex,
981         [out] HICON *phiconLarge,
982         [out] HICON *phiconSmall,
983         [in] UINT nIconSize );
984 }
985
986 cpp_quote("#define LPEXTRACTICON WINELIB_NAME_AW(LPEXTRACTICON)")
987 cpp_quote("#define IExtractIcon WINELIB_NAME_AW(IExtractIcon)")
988
989
990 /*****************************************************************************
991  * ICommDlgBrowser interface
992  */
993 [
994     object,
995     uuid(000214f1-0000-0000-c000-000000000046),
996     pointer_default(unique)
997 ]
998 interface ICommDlgBrowser : IUnknown
999 {
1000 cpp_quote("#define CDBOSC_SETFOCUS     0x00000000")
1001 cpp_quote("#define CDBOSC_KILLFOCUS    0x00000001")
1002 cpp_quote("#define CDBOSC_SELCHANGE    0x00000002")
1003 cpp_quote("#define CDBOSC_RENAME       0x00000003")
1004 cpp_quote("#define CDBOSC_STATECHANGE  0x00000004")
1005
1006     typedef ICommDlgBrowser *LPCOMMDLGBROWSER;
1007
1008     HRESULT OnDefaultCommand( [in] IShellView *shv );
1009     HRESULT OnStateChange( [in] IShellView *shv, [in] ULONG uChange );
1010     HRESULT IncludeObject( [in] IShellView *shv, [in] LPCITEMIDLIST pidl );
1011 }
1012
1013
1014 /*****************************************************************************
1015  * ICommDlgBrowser2 interface
1016  */
1017 [
1018  object,
1019  uuid(10339516-2894-11D2-9039-00C04F8EEB3E),
1020  pointer_default(unique)
1021 ]
1022 interface ICommDlgBrowser2 : ICommDlgBrowser
1023 {
1024
1025     HRESULT Notify(
1026         [in] IShellView *ppshv,
1027         [in] DWORD dwNotifyType);
1028
1029     HRESULT GetDefaultMenuText(
1030         [in] IShellView *ppshv,
1031         [out, string, size_is(cchMax)] LPWSTR pszText,
1032         [in] int cchMax);
1033
1034     HRESULT GetViewFlags(
1035         [out] DWORD *pdwFlags);
1036 }
1037
1038
1039 /*****************************************************************************
1040  * ICommDlgBrowser3 interface
1041  */
1042 [
1043  object,
1044  uuid(C8AD25A1-3294-41EE-8165-71174BD01C57),
1045  pointer_default(unique)
1046 ]
1047 interface ICommDlgBrowser3 : ICommDlgBrowser2
1048 {
1049
1050     HRESULT OnColumnClicked(
1051         [in] IShellView *ppshv,
1052         [in] int iColumn);
1053
1054     HRESULT GetCurrentFilter(
1055         [out, string, size_is(cchFileSpec)] LPWSTR pszFileSpec,
1056         [in] int cchFileSpec);
1057
1058     HRESULT OnPreviewCreated(
1059         [in] IShellView *ppshv);
1060 }
1061
1062
1063 /*****************************************************************************
1064  * IDockingWindowFrame interface
1065  */
1066 [
1067     object,
1068     uuid(47d2657a-7b27-11d0-8ca9-00a0c92dbfe8),
1069     pointer_default(unique),
1070     local
1071 ]
1072 interface IDockingWindowFrame : IOleWindow
1073 {
1074 cpp_quote("#define DWFRF_NORMAL           0x0000")
1075 cpp_quote("#define DWFRF_DELETECONFIGDATA 0x0001")
1076 cpp_quote("#define DWFAF_HIDDEN           0x0001")
1077
1078     HRESULT AddToolbar(
1079         [in] IUnknown *punkSrc,
1080         [in] LPCWSTR pwszItem,
1081         [in] DWORD dwAddFlags);
1082
1083     HRESULT RemoveToolbar(
1084         [in] IUnknown *punkSrc,
1085         [in] DWORD dwRemoveFlags);
1086
1087     HRESULT FindToolbar(
1088         [in] LPCWSTR pwszItem,
1089         [in] REFIID riid,
1090         [out] LPVOID *ppvObj);
1091 }
1092
1093
1094 /*****************************************************************************
1095  * IDragSourceHelper interface
1096  */
1097 [
1098     object,
1099     uuid(de5bf786-477a-11d2-839d-00c04fd918d0),
1100     pointer_default(unique),
1101     local
1102 ]
1103 interface IDragSourceHelper : IUnknown
1104 {
1105     typedef struct
1106     {
1107         SIZE     sizeDragImage;
1108         POINT    ptOffset;
1109         HBITMAP  hbmpDragImage;
1110         COLORREF crColorKey;
1111     } SHDRAGIMAGE, *LPSHDRAGIMAGE;
1112
1113   HRESULT InitializeFromBitmap(
1114       [in] LPSHDRAGIMAGE pshdi,
1115       [in] IDataObject *pDataObject);
1116
1117   HRESULT InitializeFromWindow(
1118       [in] HWND hwnd,
1119       [in] POINT *ppt,
1120       [in] IDataObject *pDataObject);
1121 }
1122
1123
1124 /*****************************************************************************
1125  * IDropTargetHelper interface
1126  */
1127 [
1128     object,
1129     uuid(4657278b-411b-11d2-839a-00c04fd918d0),
1130     pointer_default(unique),
1131     local
1132 ]
1133 interface IDropTargetHelper : IUnknown
1134 {
1135     HRESULT DragEnter(
1136         [in] HWND hwndTarget,
1137         [in] IDataObject *pDataObject,
1138         [in] POINT *ppt,
1139         [in] DWORD dwEffect);
1140
1141     HRESULT DragLeave();
1142
1143     HRESULT DragOver(
1144         [in] POINT *ppt,
1145         [in] DWORD dwEffect);
1146
1147     HRESULT Drop(
1148         [in] IDataObject *pDataObject,
1149         [in] POINT *ppt,
1150         [in] DWORD dwEffect);
1151
1152     HRESULT Show( [in] BOOL fShow );
1153 }
1154
1155
1156 /*****************************************************************************
1157  * IContextMenu interface
1158  */
1159 [
1160     object,
1161     uuid(000214e4-0000-0000-c000-000000000046),
1162     pointer_default(unique),
1163     local
1164 ]
1165 interface IContextMenu : IUnknown
1166 {
1167 cpp_quote("#define CMF_NORMAL        0x00000000")
1168 cpp_quote("#define CMF_DEFAULTONLY   0x00000001")
1169 cpp_quote("#define CMF_VERBSONLY     0x00000002")
1170 cpp_quote("#define CMF_EXPLORE       0x00000004")
1171 cpp_quote("#define CMF_NOVERBS       0x00000008")
1172 cpp_quote("#define CMF_CANRENAME     0x00000010")
1173 cpp_quote("#define CMF_NODEFAULT     0x00000020")
1174 cpp_quote("#define CMF_INCLUDESTATIC 0x00000040")
1175 cpp_quote("#define CMF_EXTENDEDVERBS 0x00000100")
1176 cpp_quote("#define CMF_RESERVED      0xffff0000")
1177
1178 cpp_quote("#define GCS_VERBA         0x00000000")
1179 cpp_quote("#define GCS_HELPTEXTA     0x00000001")
1180 cpp_quote("#define GCS_VALIDATEA     0x00000002")
1181 cpp_quote("#define GCS_VERBW         0x00000004")
1182 cpp_quote("#define GCS_HELPTEXTW     0x00000005")
1183 cpp_quote("#define GCS_VALIDATEW     0x00000006")
1184 cpp_quote("#define GCS_UNICODE       0x00000004")
1185 cpp_quote("#define GCS_VERB          WINELIB_NAME_AW(GCS_VERB)")
1186 cpp_quote("#define GCS_HELPTEXT      WINELIB_NAME_AW(GCS_HELPTEXT)")
1187 cpp_quote("#define GCS_VALIDATE      WINELIB_NAME_AW(GCS_VALIDATE)")
1188
1189 cpp_quote("#define CMDSTR_NEWFOLDERA   \"NewFolder\"")
1190 cpp_quote("#define CMDSTR_VIEWLISTA    \"ViewList\"")
1191 cpp_quote("#define CMDSTR_VIEWDETAILSA \"ViewDetails\"")
1192 cpp_quote("#if defined(__GNUC__)")
1193 cpp_quote("# define CMDSTR_NEWFOLDERW (const WCHAR []){ 'N','e','w','F','o','l','d','e','r',0 }")
1194 cpp_quote("# define CMDSTR_VIEWLISTW (const WCHAR []){ 'V','i','e','w','L','i','s','t',0 }")
1195 cpp_quote("# define CMDSTR_VIEWDETAILSW (const WCHAR []){ 'V','i','e','w','D','e','t','a','i','l','s',0 }")
1196 cpp_quote("#elif defined(_MSC_VER)")
1197 cpp_quote("# define CMDSTR_NEWFOLDERW   L\"NewFolder\"")
1198 cpp_quote("# define CMDSTR_VIEWLISTW    L\"ViewList\"")
1199 cpp_quote("# define CMDSTR_VIEWDETAILSW L\"ViewDetails\"")
1200 cpp_quote("#else")
1201 cpp_quote("static const WCHAR CMDSTR_NEWFOLDERW[] = {'N','e','w','F','o','l','d','e','r',0};")
1202 cpp_quote("static const WCHAR CMDSTR_VIEWLISTW [] = {'V','i','e','w','L','i','s','t',0};")
1203 cpp_quote("static const WCHAR CMDSTR_VIEWDETAILSW[] = {'V','i','e','w','D','e','t','a','i','l','s',0};")
1204 cpp_quote("#endif")
1205 cpp_quote("#define CMDSTR_NEWFOLDER    WINELIB_NAME_AW(CMDSTR_NEWFOLDER)")
1206 cpp_quote("#define CMDSTR_VIEWLIST     WINELIB_NAME_AW(CMDSTR_VIEWLIST)")
1207 cpp_quote("#define CMDSTR_VIEWDETAILS  WINELIB_NAME_AW(CMDSTR_VIEWDETAILS)")
1208
1209 cpp_quote("#define CMIC_MASK_HOTKEY         SEE_MASK_HOTKEY")
1210 cpp_quote("#define CMIC_MASK_ICON           SEE_MASK_ICON")
1211 cpp_quote("#define CMIC_MASK_FLAG_NO_UI     SEE_MASK_FLAG_NO_UI")
1212 cpp_quote("#define CMIC_MASK_UNICODE        SEE_MASK_UNICODE")
1213 cpp_quote("#define CMIC_MASK_NO_CONSOLE     SEE_MASK_NO_CONSOLE")
1214 cpp_quote("#define CMIC_MASK_HASLINKNAME    SEE_MASK_HASLINKNAME")
1215 cpp_quote("#define CMIC_MASK_FLAG_SEP_VDM   SEE_MASK_FLAG_SEPVDM")
1216 cpp_quote("#define CMIC_MASK_HASTITLE       SEE_MASK_HASTITLE")
1217 cpp_quote("#define CMIC_MASK_ASYNCOK        SEE_MASK_ASYNCOK")
1218 cpp_quote("#define CMIC_MASK_SHIFT_DOWN     0x10000000")
1219 cpp_quote("#define CMIC_MASK_PTINVOKE       0x20000000")
1220 cpp_quote("#define CMIC_MASK_CONTROL_DOWN   0x40000000")
1221 cpp_quote("#define CMIC_MASK_FLAG_LOG_USAGE SEE_MASK_FLAG_LOG_USAGE")
1222 cpp_quote("#define CMIC_MASK_NOZONECHECKS   SEE_MASK_NOZONECHECKS")
1223
1224     typedef IContextMenu *LPCONTEXTMENU;
1225
1226     typedef struct tagCMINVOKECOMMANDINFO
1227     {
1228         DWORD cbSize;
1229         DWORD fMask;
1230         HWND hwnd;
1231         LPCSTR lpVerb;
1232         LPCSTR lpParameters;
1233         LPCSTR lpDirectory;
1234         INT nShow;
1235         DWORD dwHotKey;
1236         HANDLE hIcon;
1237     } CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
1238
1239     typedef struct tagCMInvokeCommandInfoEx
1240     {
1241         DWORD cbSize;
1242         DWORD fMask;
1243         HWND hwnd;
1244         LPCSTR lpVerb;
1245         LPCSTR lpParameters;
1246         LPCSTR lpDirectory;
1247         INT nShow;
1248         DWORD dwHotKey;
1249         HANDLE hIcon;
1250         LPCSTR lpTitle;
1251         LPCWSTR lpVerbW;
1252         LPCWSTR lpParametersW;
1253         LPCWSTR lpDirectoryW;
1254         LPCWSTR lpTitleW;
1255         POINT ptInvoke;
1256     } CMINVOKECOMMANDINFOEX, *LPCMINVOKECOMMANDINFOEX;
1257
1258     HRESULT QueryContextMenu(
1259         [in] HMENU hmenu,
1260         [in] UINT indexMenu,
1261         [in] UINT idCmdFirst,
1262         [in] UINT idCmdLast,
1263         [in] UINT uFlags);
1264
1265     HRESULT InvokeCommand( [in] LPCMINVOKECOMMANDINFO lpici );
1266
1267     HRESULT GetCommandString(
1268         [in] UINT_PTR idCmd,
1269         [in] UINT uType,
1270         [out] UINT *pwReserved,
1271         [out, size_is(cchMax)] LPSTR pszName,
1272         [in] UINT cchMax);
1273 }
1274
1275
1276 /*****************************************************************************
1277  * IContextMenu2 interface
1278  */
1279 [
1280     object,
1281     uuid(000214f4-0000-0000-c000-000000000046),
1282     pointer_default(unique),
1283     local
1284 ]
1285 interface IContextMenu2 : IContextMenu
1286 {
1287     typedef IContextMenu2 *LPCONTEXTMENU2;
1288
1289     HRESULT HandleMenuMsg(
1290         [in] UINT uMsg,
1291         [in] WPARAM wParam,
1292         [in] LPARAM lParam);
1293 }
1294
1295
1296 /*****************************************************************************
1297  * IContextMenu3 interface
1298  */
1299 [
1300     object,
1301     uuid(bcfce0a0-ec17-11d0-8d10-00a0c90f2719),
1302     pointer_default(unique),
1303     local
1304 ]
1305 interface IContextMenu3 : IContextMenu2
1306 {
1307     typedef IContextMenu3 *LPCONTEXTMENU3;
1308
1309     HRESULT HandleMenuMsg2(
1310         [in] UINT uMsg,
1311         [in] WPARAM wParam,
1312         [in] LPARAM lParam,
1313         [out] LRESULT *plResult);
1314 }
1315
1316
1317 /*****************************************************************************
1318  * IShellExecuteHookA interface
1319  */
1320 [
1321     object,
1322     uuid(000214f5-0000-0000-c000-000000000046),
1323     pointer_default(unique),
1324     local
1325 ]
1326 interface IShellExecuteHookA : IUnknown
1327 {
1328     cpp_quote("struct _SHELLEXECUTEINFOA;")
1329     HRESULT Execute(
1330         [in, out] struct _SHELLEXECUTEINFOA* pei);
1331 }
1332
1333
1334 /*****************************************************************************
1335  * IShellExecuteHookW interface
1336  */
1337 [
1338     object,
1339     uuid(000214fb-0000-0000-c000-000000000046),
1340     pointer_default(unique),
1341     local
1342 ]
1343 interface IShellExecuteHookW : IUnknown
1344 {
1345     cpp_quote("struct _SHELLEXECUTEINFOW;")
1346     HRESULT Execute(
1347                 [in, out] struct _SHELLEXECUTEINFOW* pei);
1348 }
1349
1350 /*****************************************************************************
1351  * IShellLinkDataList interface
1352  */
1353 [
1354     object,
1355     uuid(45e2b4ae-b1c3-11d0-b92f-00a0c90312e1),
1356     pointer_default(unique)
1357 ]
1358 interface IShellLinkDataList : IUnknown
1359 {
1360     [local] HRESULT AddDataBlock(
1361                 [in] void *pDataBlock);
1362     [local] HRESULT CopyDataBlock(
1363                 [in] DWORD dwSig,
1364                 [out] void **ppDataBlock);
1365     HRESULT RemoveDataBlock(
1366                 [in] DWORD dwSig);
1367     HRESULT GetFlags(
1368                 [out] DWORD *pdwFlags);
1369     HRESULT SetFlags(
1370                 [in] DWORD dwFlags);
1371 }
1372
1373
1374 /*****************************************************************************
1375  * IResolveShellLink interface
1376  */
1377 [
1378     object,
1379     uuid(5cd52983-9449-11d2-963a-00c04f79adf0),
1380     pointer_default(unique)
1381 ]
1382 interface IResolveShellLink : IUnknown
1383 {
1384     HRESULT ResolveShellLink(
1385                 [in] IUnknown *punk,
1386                 [in] HWND hwnd,
1387                 [in] DWORD fFlags);
1388 }
1389
1390
1391 /*****************************************************************************
1392  * IURLSearchHook interface
1393  */
1394 [
1395     object,
1396     uuid(ac60f6a0-0fd9-11d0-99cb-00c04fd64497),
1397     pointer_default(unique),
1398     local
1399 ]
1400 interface IURLSearchHook : IUnknown
1401 {
1402     HRESULT Translate(
1403                 [in, out] LPWSTR lpwszSearchURL,
1404                 [in] DWORD cchBufferSize);
1405 }
1406
1407
1408 /*****************************************************************************
1409  * ISearchContext interface
1410  */
1411 [
1412     object,
1413     uuid(09f656a2-41af-480c-88f7-16cc0d164615),
1414     pointer_default(unique),
1415     local
1416 ]
1417 interface ISearchContext : IUnknown
1418 {
1419     HRESULT GetSearchUrl(
1420                 [in] BSTR *pbstrSearchUrl);
1421     HRESULT GetSearchText(
1422                 [in] BSTR *pbstrSearchText);
1423     HRESULT GetSearchStyle(
1424                 [in] BSTR *pdwSearchStyle);
1425 }
1426
1427
1428 /*****************************************************************************
1429  * IURLSearchHook2 interface
1430  */
1431 [
1432     object,
1433     uuid(5ee44da4-6d32-46e3-86bc-07540dedd0e0),
1434     pointer_default(unique),
1435     local
1436 ]
1437 interface IURLSearchHook2 : IURLSearchHook
1438 {
1439     HRESULT TranslateWithSearchContext(
1440                 [in, out] LPWSTR lpwszSearchURL,
1441                 [in] DWORD cchBufferSize,
1442                 [in] ISearchContext *pSearchContext);
1443 }
1444
1445
1446 cpp_quote("#define INewShortcutHook WINELIB_NAME_AW(INewShortcutHook)")
1447
1448 /*****************************************************************************
1449  * INewShortcutHookA interface
1450  */
1451 [
1452     object,
1453     uuid(000214e1-0000-0000-c000-000000000046),
1454     pointer_default(unique),
1455     local
1456 ]
1457 interface INewShortcutHookA : IUnknown
1458 {
1459     HRESULT SetReferent(
1460                 [in] LPCSTR pcszReferent,
1461                 [in] HWND hwnd);
1462     HRESULT GetReferent(
1463                 [out] LPSTR pcszReferent,
1464                 [in] int cchReferent);
1465     HRESULT SetFolder(
1466                 [in] LPCSTR pcszReferent);
1467     HRESULT GetFolder(
1468                 [out] LPSTR pcszReferent,
1469                 [in] int cchFolder);
1470     HRESULT GetName(
1471                 [out] LPSTR pszName,
1472                 [in] int cchName);
1473     HRESULT GetExtension(
1474                 [out] LPSTR pszExtension,
1475                 [in] int cchExtension);
1476
1477
1478
1479 /*****************************************************************************
1480  * INewShortcutHookW interface
1481  */
1482 [
1483     object,
1484     uuid(000214f7-0000-0000-c000-000000000046),
1485     pointer_default(unique),
1486     local
1487 ]
1488 interface INewShortcutHookW : IUnknown
1489 {
1490     HRESULT SetReferent(
1491                 [in] LPCWSTR pcszReferent,
1492                 [in] HWND hwnd);
1493     HRESULT GetReferent(
1494                 [out] LPWSTR pcszReferent,
1495                 [in] int cchReferent);
1496     HRESULT SetFolder(
1497                 [in] LPCWSTR pcszReferent);
1498     HRESULT GetFolder(
1499                 [out] LPWSTR pcszReferent,
1500                 [in] int cchFolder);
1501     HRESULT GetName(
1502                 [out] LPWSTR pszName,
1503                 [in] int cchName);
1504     HRESULT GetExtension(
1505                 [out] LPWSTR pszExtension,
1506                 [in] int cchExtension);
1507
1508
1509 /*****************************************************************************
1510  * IRunnableTask interface
1511  */
1512 [
1513     object,
1514     uuid(85788d00-6807-11d0-b810-00c04fd706ec),
1515     pointer_default(unique),
1516     local
1517 ]
1518 interface IRunnableTask : IUnknown
1519 {
1520     HRESULT Run();
1521     HRESULT Kill([in] BOOL fWait);
1522     HRESULT Suspend();
1523     HRESULT Resume();
1524     ULONG IsRunning();
1525 }
1526
1527 /*****************************************************************************
1528  * IShellChangeNotify interface
1529  */
1530 [
1531     object,
1532     uuid(d82be2b1-5764-11d0-a96e-00c04fd705a2),
1533     pointer_default(unique),
1534     local
1535 ]
1536 interface IShellChangeNotify : IUnknown
1537 {
1538     HRESULT OnChange(
1539                 [in] LONG lEvent,
1540                 [in] LPCITEMIDLIST pidl1,
1541                 [in] LPCITEMIDLIST pidl2);
1542 }
1543
1544 /*****************************************************************************
1545  * IFileSystemBindData interface
1546  */
1547 [
1548     object,
1549     uuid(01e18d10-4d8b-11d2-855d-006008059367),
1550     pointer_default(unique),
1551     local
1552 ]
1553 interface IFileSystemBindData : IUnknown
1554 {
1555     HRESULT SetFindData(
1556                 [in] const WIN32_FIND_DATAW *pfd);
1557     HRESULT GetFindData(
1558                 [out] WIN32_FIND_DATAW *pfd);
1559 }
1560
1561 /*****************************************************************************
1562  *    ITaskbarList interface
1563  */
1564 [
1565     object,
1566     uuid(56FDF342-FD6D-11d0-958A-006097C9A090),
1567     pointer_default(unique)
1568 ]
1569 interface ITaskbarList : IUnknown
1570 {
1571     HRESULT HrInit();
1572
1573     HRESULT AddTab(
1574         [in] HWND hwnd);
1575
1576     HRESULT DeleteTab(
1577         [in] HWND hwnd);
1578
1579     HRESULT ActivateTab(
1580         [in] HWND hwnd);
1581
1582     HRESULT SetActiveAlt(
1583         [in] HWND hwnd);
1584 }
1585
1586 cpp_quote("EXTERN_C const CLSID CLSID_TaskbarList;")
1587
1588 /*****************************************************************************
1589  *    IAutoCompleteDropDown interface
1590  */
1591 [
1592     object,
1593     uuid(3CD141F4-3C6A-11d2-BCAA-00C04FD929DB),
1594     pointer_default(unique)
1595 ]
1596 interface IAutoCompleteDropDown : IUnknown
1597 {
1598 cpp_quote("#define ACDD_VISIBLE   0x0001")
1599
1600     HRESULT GetDropDownStatus(
1601         [out] DWORD *pdwFlags,
1602         [out, string] LPWSTR *ppwszString);
1603
1604     HRESULT ResetEnumerator();
1605 }
1606
1607 [
1608     object,
1609     uuid(cb728b20-f786-11ce-92ad-00aa00a74cd0),
1610     pointer_default(unique)
1611 ]
1612 interface IProfferService : IUnknown
1613 {
1614     HRESULT ProfferService(
1615         [in] REFGUID service,
1616         [in] IServiceProvider *pService,
1617         [out] DWORD *pCookie);
1618
1619     HRESULT RevokeService([in] DWORD cookie);
1620 }
1621
1622 /*****************************************************************************
1623  * IExplorerBrowserEvents interface
1624  */
1625 [
1626  object,
1627  uuid(361BBDC7-E6EE-4E13-BE58-58E2240C810F)
1628 ]
1629 interface IExplorerBrowserEvents : IUnknown
1630 {
1631     HRESULT OnNavigationPending(
1632         [in] PCIDLIST_ABSOLUTE pidlFolder);
1633
1634     HRESULT OnViewCreated(
1635         [in] IShellView *psv);
1636
1637     HRESULT OnNavigationComplete(
1638         [in] PCIDLIST_ABSOLUTE pidlFolder);
1639
1640     HRESULT OnNavigationFailed(
1641         [in] PCIDLIST_ABSOLUTE pidlFolder);
1642 }
1643
1644 typedef GUID EXPLORERPANE;
1645 typedef EXPLORERPANE *REFEXPLORERPANE;
1646
1647 /*****************************************************************************
1648  * IExplorerPaneVisibility interface
1649  */
1650 [
1651  object,
1652  uuid(E07010EC-BC17-44C0-97B0-46C7C95B9EDC)
1653 ]
1654 interface IExplorerPaneVisibility : IUnknown
1655 {
1656     typedef enum tagEXPLORERPANESTATE {
1657         EPS_DONTCARE     = 0x0,
1658         EPS_DEFAULT_ON   = 0x1,
1659         EPS_DEFAULT_OFF  = 0x2,
1660         EPS_STATE_MASK   = 0xffff,
1661         EPS_INITIALSTATE = 0x10000,
1662         EPS_FORCE        = 0x20000
1663     } EXPLORERPANESTATE;
1664
1665     HRESULT GetPaneState(
1666         [in] REFEXPLORERPANE ep,
1667         [out] EXPLORERPANESTATE *peps);
1668 }
1669
1670 typedef [v1_enum] enum tagEXPLORER_BROWSER_FILL_FLAGS {
1671     EBF_NONE                     = 0,
1672     EBF_SELECTFROMDATAOBJECT     = 0x100,
1673     EBF_NODROPTARGET             = 0x200
1674 } EXPLORER_BROWSER_FILL_FLAGS;
1675
1676 typedef [v1_enum] enum tagEXPLORER_BROWSER_OPTIONS {
1677     EBO_NONE               = 0x00,
1678     EBO_NAVIGATEONCE       = 0x01,
1679     EBO_SHOWFRAMES         = 0x02,
1680     EBO_ALWAYSNAVIGATE     = 0x04,
1681     EBO_NOTRAVELLOG        = 0x08,
1682     EBO_NOWRAPPERWINDOW    = 0x10,
1683     EBO_HTMLSHAREPOINTVIEW = 0x20
1684 } EXPLORER_BROWSER_OPTIONS;
1685
1686 cpp_quote("#define SID_SExplorerBrowserFrame IID_ICommDlgBrowser")
1687
1688 /*****************************************************************************
1689  * IExplorerBrowser interface
1690  */
1691 [
1692  object,
1693  uuid(DFD3B6B5-C10C-4BE9-85F6-A66969F402F6),
1694  pointer_default(unique)
1695 ]
1696 interface IExplorerBrowser : IUnknown
1697 {
1698
1699     [local] HRESULT Initialize(
1700         [in] HWND hwndParent,
1701         [in] const RECT *prc,
1702         [in, unique] const FOLDERSETTINGS *pfs);
1703
1704     HRESULT Destroy();
1705
1706     [local] HRESULT SetRect(
1707         [in,out,unique] HDWP *phdwp,
1708         [in] RECT rcBrowser);
1709
1710     HRESULT SetPropertyBag(
1711         [in, string] LPCWSTR pszPropertyBag);
1712
1713     HRESULT SetEmptyText(
1714         [in, string] LPCWSTR pszEmptyText);
1715
1716     HRESULT SetFolderSettings(
1717         [in] const FOLDERSETTINGS *pfs);
1718
1719     HRESULT Advise(
1720         [in] IExplorerBrowserEvents *psbe,
1721         [out] DWORD *pdwCookie);
1722
1723     HRESULT Unadvise(
1724         [in] DWORD dwCookie);
1725
1726     HRESULT SetOptions(
1727         [in] EXPLORER_BROWSER_OPTIONS dwFlag);
1728
1729     HRESULT GetOptions(
1730         [out] EXPLORER_BROWSER_OPTIONS *pdwFlag);
1731
1732     HRESULT BrowseToIDList(
1733         [in] PCUIDLIST_RELATIVE pidl,
1734         [in] UINT uFlags);
1735
1736     HRESULT BrowseToObject(
1737         [in] IUnknown *punk,
1738         [in] UINT uFlags);
1739
1740     HRESULT FillFromObject(
1741         [in] IUnknown *punk,
1742         [in] EXPLORER_BROWSER_FILL_FLAGS dwFlags);
1743
1744     HRESULT RemoveAll();
1745
1746     HRESULT GetCurrentView(
1747         [in] REFIID riid,
1748         [out, iid_is(riid)] IUnknown **ppv);
1749 }