Small fix.
[wine/multimedia.git] / include / shlobj.h
blob64dfa1dac51f02ec07c8f455d8bac5dfea67b8c4
1 #ifndef _WINE_SHLOBJ_H
2 #define _WINE_SHLOBJ_H
4 #include "shell.h"
5 #include "ole.h"
6 #include "ole2.h"
7 #include "compobj.h"
8 #include "storage.h"
9 #include "commctrl.h"
10 #include "interfaces.h"
12 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
13 #define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
14 #define PURE
15 #define FAR
16 #define THIS_ THIS,
18 #define __T(x) x
19 #define _T(x) __T(x)
20 #define TEXT _T
22 /****************************************************************************
23 * DllGetClassObject
25 DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*);
28 typedef LPVOID LPBC; /* *IBindCtx really */
30 /* foreward declaration of the objects*/
31 typedef struct tagCONTEXTMENU *LPCONTEXTMENU, IContextMenu;
32 typedef struct tagSHELLEXTINIT *LPSHELLEXTINIT,IShellExtInit;
33 typedef struct tagENUMIDLIST *LPENUMIDLIST, IEnumIDList;
34 typedef struct tagSHELLFOLDER *LPSHELLFOLDER, IShellFolder;
35 typedef struct tagSHELLVIEW *LPSHELLVIEW, IShellView;
36 typedef struct tagSHELLBROWSER *LPSHELLBROWSER,IShellBrowser;
37 typedef struct tagDATAOBJECT *LPDATAOBJECT, IDataObject;
38 typedef struct tagSHELLICON *LPSHELLICON, IShellIcon;
39 typedef struct tagDOCKINGWINDOWFRAME *LPDOCKINGWINDOWFRAME, IDockingWindowFrame;
40 typedef struct tagSERVICEPROVIDER *LPSERVICEPROVIDER, IServiceProvider;
41 typedef struct tagCOMMDLGBROWSER *LPCOMMDLGBROWSER, ICommDlgBrowser;
42 typedef struct tagENUMFORMATETC *LPENUMFORMATETC, IEnumFORMATETC;
44 typedef struct IAdviseSink IAdviseSink, *LPIADVISESINK;
45 typedef struct IEnumSTATDATA IEnumSTATDATA, *LPENUMSTATDATA;
46 /****************************************************************************
47 * SHELL ID
49 /* strange Objects */
50 DEFINE_SHLGUID(IID_IEnumUnknown, 0x00000100L, 0, 0);
51 DEFINE_SHLGUID(IID_IEnumString, 0x00000101L, 0, 0);
52 DEFINE_SHLGUID(IID_IEnumMoniker, 0x00000102L, 0, 0);
53 DEFINE_SHLGUID(IID_IEnumFORMATETC, 0x00000103L, 0, 0);
54 DEFINE_SHLGUID(IID_IEnumOLEVERB, 0x00000104L, 0, 0);
55 DEFINE_SHLGUID(IID_IEnumSTATDATA, 0x00000105L, 0, 0);
57 DEFINE_SHLGUID(IID_IPersistStream, 0x00000109L, 0, 0);
58 DEFINE_SHLGUID(IID_IPersistStorage, 0x0000010AL, 0, 0);
59 DEFINE_SHLGUID(IID_IPersistFile, 0x0000010BL, 0, 0);
60 DEFINE_SHLGUID(IID_IPersist, 0x0000010CL, 0, 0);
61 DEFINE_SHLGUID(IID_IViewObject, 0x0000010DL, 0, 0);
62 DEFINE_SHLGUID(IID_IDataObject, 0x0000010EL, 0, 0);
64 DEFINE_GUID (IID_IServiceProvider, 0x6D5140C1L, 0x7436, 0x11CE, 0x80, 0x34, 0x00, 0xAA, 0x00, 0x60, 0x09, 0xFA);
65 DEFINE_GUID (IID_IDockingWindow, 0x012dd920L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
66 DEFINE_GUID (IID_IDockingWindowSite, 0x2A342FC2L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
67 DEFINE_GUID (IID_IDockingWindowFrame, 0x47D2657AL, 0x7B27, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
69 DEFINE_SHLGUID(CLSID_ShellDesktop, 0x00021400L, 0, 0);
70 DEFINE_SHLGUID(CLSID_ShellLink, 0x00021401L, 0, 0);
71 /* shell32 formatids */
72 DEFINE_SHLGUID(FMTID_Intshcut, 0x000214A0L, 0, 0);
73 DEFINE_SHLGUID(FMTID_InternetSite, 0x000214A1L, 0, 0);
74 /* command group ids */
75 DEFINE_SHLGUID(CGID_Explorer, 0x000214D0L, 0, 0);
76 DEFINE_SHLGUID(CGID_ShellDocView, 0x000214D1L, 0, 0);
78 /* shell32interface ids */
79 DEFINE_SHLGUID(IID_INewShortcutHookA, 0x000214E1L, 0, 0);
80 DEFINE_SHLGUID(IID_IShellBrowser, 0x000214E2L, 0, 0);
81 #define SID_SShellBrowser IID_IShellBrowser
82 DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0);
83 DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
84 DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0);
85 DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
86 DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
87 DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
88 DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0);
89 DEFINE_SHLGUID(IID_IShellLink, 0x000214EEL, 0, 0);
90 DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0);
91 DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0);
92 DEFINE_SHLGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0);
93 DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
94 DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
95 DEFINE_SHLGUID(IID_IContextMenu2, 0x000214F4L, 0, 0);
96 DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
97 DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
98 DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0);
99 DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0);
100 DEFINE_SHLGUID(IID_IShellLinkW, 0x000214F9L, 0, 0);
101 DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0);
102 DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0);
103 DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0);
105 /****************************************************************************
106 * STRRET
108 #define STRRET_WSTR 0x0000
109 #define STRRET_OFFSET 0x0001
110 #define STRRET_CSTR 0x0002
112 typedef struct _STRRET
113 { UINT32 uType; /* STRRET_xxx */
114 union
115 { LPWSTR pOleStr; /* OLESTR that will be freed */
116 UINT32 uOffset; /* OffsetINT32o SHITEMID (ANSI) */
117 char cStr[MAX_PATH]; /* Buffer to fill in */
119 } STRRET,*LPSTRRET;
121 /*****************************************************************************
122 * IContextMenu interface
124 #define THIS LPCONTEXTMENU this
126 /* default menu items*/
127 #define IDM_EXPLORE 0
128 #define IDM_OPEN 1
129 #define IDM_RENAME 2
130 #define IDM_LAST IDM_RENAME
132 /* QueryContextMenu uFlags */
133 #define CMF_NORMAL 0x00000000
134 #define CMF_DEFAULTONLY 0x00000001
135 #define CMF_VERBSONLY 0x00000002
136 #define CMF_EXPLORE 0x00000004
137 #define CMF_NOVERBS 0x00000008
138 #define CMF_CANRENAME 0x00000010
139 #define CMF_NODEFAULT 0x00000020
140 #define CMF_INCLUDESTATIC 0x00000040
141 #define CMF_RESERVED 0xffff0000 // View specific
143 /* GetCommandString uFlags */
144 #define GCS_VERBA 0x00000000 // canonical verb
145 #define GCS_HELPTEXTA 0x00000001 // help text (for status bar)
146 #define GCS_VALIDATEA 0x00000002 // validate command exists
147 #define GCS_VERBW 0x00000004 // canonical verb (unicode)
148 #define GCS_HELPTEXTW 0x00000005 // help text (unicode version)
149 #define GCS_VALIDATEW 0x00000006 // validate command exists (unicode)
150 #define GCS_UNICODE 0x00000004 // for bit testing - Unicode string
152 #define GCS_VERB GCS_VERBA
153 #define GCS_HELPTEXT GCS_HELPTEXTA
154 #define GCS_VALIDATE GCS_VALIDATEA
156 #define CMDSTR_NEWFOLDERA "NewFolder"
157 #define CMDSTR_VIEWLISTA "ViewList"
158 #define CMDSTR_VIEWDETAILSA "ViewDetails"
159 #define CMDSTR_NEWFOLDERW L"NewFolder"
160 #define CMDSTR_VIEWLISTW L"ViewList"
161 #define CMDSTR_VIEWDETAILSW L"ViewDetails"
163 #define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERA
164 #define CMDSTR_VIEWLIST CMDSTR_VIEWLISTA
165 #define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSA
167 #define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
168 #define CMIC_MASK_ICON SEE_MASK_ICON
169 #define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
170 #define CMIC_MASK_UNICODE SEE_MASK_UNICODE
171 #define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
172 #define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
173 #define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
174 #define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
175 #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
177 #define CMIC_MASK_PTINVOKE 0x20000000
179 /*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
180 typedef struct tagCMINVOKECOMMANDINFO
181 { DWORD cbSize; // sizeof(CMINVOKECOMMANDINFO)
182 DWORD fMask; // any combination of CMIC_MASK_*
183 HWND32 hwnd; // might be NULL (indicating no owner window)
184 LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
185 LPCSTR lpParameters; // might be NULL (indicating no parameter)
186 LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
187 INT32 nShow; // one of SW_ values for ShowWindow() API
189 DWORD dwHotKey;
190 HANDLE32 hIcon;
191 } CMINVOKECOMMANDINFO32, *LPCMINVOKECOMMANDINFO32;
193 typedef struct tagCMInvokeCommandInfoEx
194 { DWORD cbSize; // must be sizeof(CMINVOKECOMMANDINFOEX)
195 DWORD fMask; // any combination of CMIC_MASK_*
196 HWND32 hwnd; // might be NULL (indicating no owner window)
197 LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
198 LPCSTR lpParameters; // might be NULL (indicating no parameter)
199 LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
200 INT32 nShow; // one of SW_ values for ShowWindow() API
202 DWORD dwHotKey;
204 HANDLE32 hIcon;
205 LPCSTR lpTitle; // For CreateProcess-StartupInfo.lpTitle
206 LPCWSTR lpVerbW; // Unicode verb (for those who can use it)
207 LPCWSTR lpParametersW; // Unicode parameters (for those who can use it)
208 LPCWSTR lpDirectoryW; // Unicode directory (for those who can use it)
209 LPCWSTR lpTitleW; // Unicode title (for those who can use it)
210 POINT32 ptInvoke; // Point where it's invoked
212 } CMINVOKECOMMANDINFOEX32, *LPCMINVOKECOMMANDINFOEX32;
215 typedef struct IContextMenu_VTable
216 { // *** IUnknown methods ***
217 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
218 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
219 STDMETHOD_(ULONG,Release) (THIS) PURE;
221 STDMETHOD(QueryContextMenu)(THIS_ HMENU32 hmenu,UINT32 indexMenu,UINT32 idCmdFirst, UINT32 idCmdLast,UINT32 uFlags) PURE;
222 STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO32 lpici) PURE;
223 STDMETHOD(GetCommandString)(THIS_ UINT32 idCmd,UINT32 uType,UINT32 * pwReserved,LPSTR pszName,UINT32 cchMax) PURE;
225 /* undocumented not only in ContextMenu2 */
226 STDMETHOD(HandleMenuMsg)(THIS_ UINT32 uMsg,WPARAM32 wParam,LPARAM lParam) PURE;
228 /* possibly another nasty entry from ContextMenu3 ?*/
229 void * guard;
230 } IContextMenu_VTable,*LPCONTEXTMENU_VTABLE;
232 struct tagCONTEXTMENU
233 { LPCONTEXTMENU_VTABLE lpvtbl;
234 DWORD ref;
235 LPSHELLFOLDER pSFParent;
236 LPITEMIDLIST *aPidls;
237 BOOL32 bAllValues;
240 #undef THIS
241 /*****************************************************************************
242 * structures for shell clipboard formats
244 typedef enum tagDVASPECT
245 { DVASPECT_CONTENT = 1,
246 DVASPECT_THUMBNAIL = 2,
247 DVASPECT_ICON = 4,
248 DVASPECT_DOCPRINT = 8
249 } DVASPECT;
251 enum tagTYMED
252 { TYMED_HGLOBAL = 1,
253 TYMED_FILE = 2,
254 TYMED_ISTREAM = 4,
255 TYMED_ISTORAGE = 8,
256 TYMED_GDI = 16,
257 TYMED_MFPICT = 32,
258 TYMED_ENHMF = 64,
259 TYMED_NULL = 0
260 } TYMED;
262 typedef struct
263 { DWORD tdSize;
264 WORD tdDriverNameOffset;
265 WORD tdDeviceNameOffset;
266 WORD tdPortNameOffset;
267 WORD tdExtDevmodeOffset;
268 BYTE tdData[ 1 ];
269 } DVTARGETDEVICE32;
271 typedef WORD CLIPFORMAT32, *LPCLIPFORMAT32;
273 /* dataobject as answer to a request */
274 typedef struct
275 { DWORD tymed;
276 union
277 { HBITMAP32 hBitmap;
278 /*HMETAFILEPICT32 hMetaFilePict;*/
279 /*HENHMETAFILE32 hEnhMetaFile;*/
280 HGLOBAL32 hGlobal;
281 LPOLESTR32 lpszFileName;
282 IStream32 *pstm;
283 IStorage32 *pstg;
284 } u;
285 IUnknown *pUnkForRelease;
286 } STGMEDIUM32;
288 /* wished data format */
289 typedef struct
290 { CLIPFORMAT32 cfFormat;
291 DVTARGETDEVICE32 *ptd;
292 DWORD dwAspect;
293 LONG lindex;
294 DWORD tymed;
295 } FORMATETC32, *LPFORMATETC32;
297 /* shell specific clipboard formats */
299 /* DATAOBJECT_InitShellIDList*/
300 #define CFSTR_SHELLIDLIST TEXT("Shell IDList Array") /* CF_IDLIST */
302 extern UINT32 cfShellIDList;
304 typedef struct
305 { UINT32 cidl;
306 UINT32 aoffset[1];
307 } CIDA, *LPCIDA;
309 #define CFSTR_SHELLIDLISTOFFSET TEXT("Shell Object Offsets") /* CF_OBJECTPOSITIONS */
310 #define CFSTR_NETRESOURCES TEXT("Net Resource") /* CF_NETRESOURCE */
312 /* DATAOBJECT_InitFileGroupDesc */
313 #define CFSTR_FILEDESCRIPTORA TEXT("FileGroupDescriptor") /* CF_FILEGROUPDESCRIPTORA */
314 extern UINT32 cfFileGroupDesc;
316 #define CFSTR_FILEDESCRIPTORW TEXT("FileGroupDescriptorW") /* CF_FILEGROUPDESCRIPTORW */
318 /* DATAOBJECT_InitFileContents*/
319 #define CFSTR_FILECONTENTS TEXT("FileContents") /* CF_FILECONTENTS */
320 extern UINT32 cfFileContents;
322 #define CFSTR_FILENAMEA TEXT("FileName") /* CF_FILENAMEA */
323 #define CFSTR_FILENAMEW TEXT("FileNameW") /* CF_FILENAMEW */
324 #define CFSTR_PRINTERGROUP TEXT("PrinterFriendlyName") /* CF_PRINTERS */
325 #define CFSTR_FILENAMEMAPA TEXT("FileNameMap") /* CF_FILENAMEMAPA */
326 #define CFSTR_FILENAMEMAPW TEXT("FileNameMapW") /* CF_FILENAMEMAPW */
327 #define CFSTR_SHELLURL TEXT("UniformResourceLocator")
328 #define CFSTR_PREFERREDDROPEFFECT TEXT("Preferred DropEffect")
329 #define CFSTR_PERFORMEDDROPEFFECT TEXT("Performed DropEffect")
330 #define CFSTR_PASTESUCCEEDED TEXT("Paste Succeeded")
331 #define CFSTR_INDRAGLOOP TEXT("InShellDragLoop")
333 /**************************************************************************
334 * IDLList "Item ID List List"
336 * NOTES
337 * interal data holder for IDataObject
339 typedef struct tagLPIDLLIST *LPIDLLIST, IDLList;
341 #define THIS LPIDLLIST this
343 enum
344 { State_UnInit=1,
345 State_Init=2,
346 State_OutOfMem=3
347 } IDLListState;
349 typedef struct IDLList_VTable
350 { STDMETHOD_(UINT32, GetState)(THIS);
351 STDMETHOD_(LPITEMIDLIST, GetElement)(THIS_ UINT32 nIndex);
352 STDMETHOD_(UINT32, GetCount)(THIS);
353 STDMETHOD_(BOOL32, StoreItem)(THIS_ LPITEMIDLIST pidl);
354 STDMETHOD_(BOOL32, AddItems)(THIS_ LPITEMIDLIST *apidl, UINT32 cidl);
355 STDMETHOD_(BOOL32, InitList)(THIS);
356 STDMETHOD_(void, CleanList)(THIS);
357 } IDLList_VTable,*LPIDLLIST_VTABLE;
359 struct tagLPIDLLIST
360 { LPIDLLIST_VTABLE lpvtbl;
361 HDPA dpa;
362 UINT32 uStep;
365 extern LPIDLLIST IDLList_Constructor (UINT32 uStep);
366 extern void IDLList_Destructor(LPIDLLIST this);
367 #undef THIS
368 /*****************************************************************************
369 * IEnumFORMATETC interface
371 #define THIS LPENUMFORMATETC this
373 typedef struct IEnumFORMATETC_VTable
374 { /* IUnknown methods */
375 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
376 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
377 STDMETHOD_(ULONG,Release) (THIS) PURE;
379 /* IEnumFORMATETC methods */
380 STDMETHOD (Next)(THIS_ ULONG celt, FORMATETC32 *rgelt, ULONG *pceltFethed) PURE;
381 STDMETHOD (Skip)(THIS_ ULONG celt) PURE;
382 STDMETHOD (Reset)(THIS) PURE;
383 STDMETHOD (Clone)(THIS_ IEnumFORMATETC ** ppenum) PURE;
384 } IEnumFORMATETC_VTable,*LPENUMFORMATETC_VTABLE;
386 struct tagENUMFORMATETC
387 { LPENUMFORMATETC_VTABLE lpvtbl;
388 DWORD ref;
389 UINT32 posFmt;
390 UINT32 countFmt;
391 LPFORMATETC32 pFmt;
394 #undef THIS
396 /*****************************************************************************
397 * IDataObject interface
399 #define THIS LPDATAOBJECT this
401 typedef struct IDataObject_VTable
402 { /*** IUnknown methods ***/
403 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
404 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
405 STDMETHOD_(ULONG,Release) (THIS) PURE;
407 STDMETHOD (GetData )(THIS_ LPFORMATETC32 pformatetcIn, STGMEDIUM32 *pmedium) PURE;
408 STDMETHOD (GetDataHere)(THIS_ LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium) PURE;
409 STDMETHOD (QueryGetData)(THIS_ LPFORMATETC32 pformatetc) PURE;
410 STDMETHOD (GetCanonicalFormatEtc)(THIS_ LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut) PURE;
411 STDMETHOD (SetData)(THIS_ LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium, BOOL32 fRelease) PURE;
412 STDMETHOD (EnumFormatEtc)(THIS_ DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc) PURE;
413 STDMETHOD (DAdvise )(THIS_ LPFORMATETC32 *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) PURE;
414 STDMETHOD (DUnadvise)(THIS_ DWORD dwConnection) PURE;
415 STDMETHOD (EnumDAdvise)(THIS_ IEnumSTATDATA **ppenumAdvise) PURE;
416 } IDataObject_VTable,*LPDATAOBJECT_VTABLE;
418 struct tagDATAOBJECT
419 { LPDATAOBJECT_VTABLE lpvtbl;
420 DWORD ref;
421 LPSHELLFOLDER psf;
422 LPIDLLIST lpill; /* the data of the dataobject */
423 LPITEMIDLIST pidl;
426 #undef THIS
429 /*****************************************************************************
430 * IShellExtInit interface
432 #define THIS LPSHELLEXTINIT this
434 typedef struct IShellExtInit_VTable
435 { // *** IUnknown methods ***
436 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
437 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
438 STDMETHOD_(ULONG,Release) (THIS) PURE;
440 // *** IShellExtInit methods ***
441 STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID) PURE;
442 } IShellExtInit_VTable,*LPSHELLEXTINIT_VTABLE;
444 struct tagSHELLEXTINIT
445 { LPSHELLEXTINIT_VTABLE lpvtbl;
446 DWORD ref;
449 #undef THIS
451 /*****************************************************************************
452 * IEnumIDList interface
454 #define THIS LPENUMIDLIST this
456 typedef struct tagENUMLIST
457 { struct tagENUMLIST *pNext;
458 LPITEMIDLIST pidl;
459 } ENUMLIST, *LPENUMLIST;
461 typedef struct IEnumIDList_VTable
462 { /* *** IUnknown methods *** */
463 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
464 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
465 STDMETHOD_(ULONG,Release) (THIS) PURE;
467 /* *** IEnumIDList methods *** */
468 STDMETHOD(Next) (THIS_ ULONG celt,
469 LPITEMIDLIST *rgelt,
470 ULONG *pceltFetched) PURE;
471 STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
472 STDMETHOD(Reset) (THIS) PURE;
473 STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
474 /* *** private methods *** */
475 STDMETHOD_(BOOL32,CreateEnumList)(THIS_ LPCSTR, DWORD) PURE;
476 STDMETHOD_(BOOL32,AddToEnumList)(THIS_ LPITEMIDLIST) PURE;
477 STDMETHOD_(BOOL32,DeleteList)(THIS) PURE;
480 } IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
482 struct tagENUMIDLIST
483 { LPENUMIDLIST_VTABLE lpvtbl;
484 DWORD ref;
485 LPENUMLIST mpFirst;
486 LPENUMLIST mpLast;
487 LPENUMLIST mpCurrent;
490 #undef THIS
491 //--------------------------------------------------------------------------
493 // FOLDERSETTINGS
495 // FOLDERSETTINGS is a data structure that explorer passes from one folder
496 // view to another, when the user is browsing. It calls ISV::GetCurrentInfo
497 // member to get the current settings and pass it to ISV::CreateViewWindow
498 // to allow the next folder view "inherit" it. These settings assumes a
499 // particular UI (which the shell's folder view has), and shell extensions
500 // may or may not use those settings.
502 //--------------------------------------------------------------------------
504 typedef LPBYTE LPVIEWSETTINGS;
506 // NB Bitfields.
507 // FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL
508 typedef enum
509 { FWF_AUTOARRANGE = 0x0001,
510 FWF_ABBREVIATEDNAMES = 0x0002,
511 FWF_SNAPTOGRID = 0x0004,
512 FWF_OWNERDATA = 0x0008,
513 FWF_BESTFITWINDOW = 0x0010,
514 FWF_DESKTOP = 0x0020,
515 FWF_SINGLESEL = 0x0040,
516 FWF_NOSUBFOLDERS = 0x0080,
517 FWF_TRANSPARENT = 0x0100,
518 FWF_NOCLIENTEDGE = 0x0200,
519 FWF_NOSCROLL = 0x0400,
520 FWF_ALIGNLEFT = 0x0800,
521 FWF_SINGLECLICKACTIVATE=0x8000 // TEMPORARY -- NO UI FOR THIS
522 } FOLDERFLAGS;
524 typedef enum
525 { FVM_ICON = 1,
526 FVM_SMALLICON = 2,
527 FVM_LIST = 3,
528 FVM_DETAILS = 4,
529 } FOLDERVIEWMODE;
531 typedef struct
532 { UINT32 ViewMode; // View mode (FOLDERVIEWMODE values)
533 UINT32 fFlags; // View options (FOLDERFLAGS bits)
534 } FOLDERSETTINGS, *LPFOLDERSETTINGS;
536 typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
538 /* FIXME; the next two lines are propersheet related, move to prsht.h when created */
539 struct _PSP;
540 typedef struct _PSP FAR* HPROPSHEETPAGE;
542 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
543 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE,LPARAM);
545 /************************************************************************
546 * IShellFolder interface
549 #define THIS LPSHELLFOLDER this
551 /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
552 typedef enum
553 { SHGDN_NORMAL = 0, /* default (display purpose) */
554 SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
555 SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
556 } SHGNO;
558 /* IShellFolder::EnumObjects */
559 typedef enum tagSHCONTF
560 { SHCONTF_FOLDERS = 32, /* for shell browser */
561 SHCONTF_NONFOLDERS = 64, /* for default view */
562 SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
563 } SHCONTF;
565 /* from oleidl.h */
566 #define DROPEFFECT_NONE 0
567 #define DROPEFFECT_COPY 1
568 #define DROPEFFECT_MOVE 2
569 #define DROPEFFECT_LINK 4
570 #define DROPEFFECT_SCROLL 0x80000000
572 /* IShellFolder::GetAttributesOf flags */
573 #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
574 #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
575 #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
576 #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
577 #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
578 #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
579 #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
580 #define SFGAO_CAPABILITYMASK 0x00000177L
581 #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
582 #define SFGAO_SHARE 0x00020000L /* shared */
583 #define SFGAO_READONLY 0x00040000L /* read-only */
584 #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
585 #define SFGAO_DISPLAYATTRMASK 0x000F0000L
586 #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
587 #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
588 #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
589 #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
590 #define SFGAO_CONTENTSMASK 0x80000000L
591 #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
592 #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
594 typedef struct IShellFolder_VTable {
595 /* *** IUnknown methods *** */
596 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
597 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
598 STDMETHOD_(ULONG,Release) (THIS) PURE;
600 /* *** IShellFolder methods *** */
601 STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,LPBC pbcReserved, LPOLESTR32 lpszDisplayName,ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
602 STDMETHOD(EnumObjects)( THIS_ HWND32 hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList) PURE;
603 STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvOut) PURE;
604 STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvObj) PURE;
605 STDMETHOD(CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
606 STDMETHOD(CreateViewObject)(THIS_ HWND32 hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
607 STDMETHOD(GetAttributesOf)(THIS_ UINT32 cidl, LPCITEMIDLIST * apidl,ULONG * rgfInOut) PURE;
608 STDMETHOD(GetUIObjectOf)(THIS_ HWND32 hwndOwner, UINT32 cidl, LPCITEMIDLIST * apidl,REFIID riid, UINT32 * prgfInOut, LPVOID * ppvOut) PURE;
609 STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
610 STDMETHOD(SetNameOf)(THIS_ HWND32 hwndOwner, LPCITEMIDLIST pidl,LPCOLESTR32 lpszName, DWORD uFlags,LPITEMIDLIST * ppidlOut) PURE;
612 /* utility functions */
613 STDMETHOD_(BOOL32,GetFolderPath)(THIS_ LPSTR, DWORD);
615 } *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
617 struct tagSHELLFOLDER {
618 LPSHELLFOLDER_VTABLE lpvtbl;
619 DWORD ref;
620 LPSTR mlpszFolder;
621 LPITEMIDLIST mpidl;
622 LPITEMIDLIST mpidlNSRoot;
623 LPSHELLFOLDER mpSFParent;
626 extern LPSHELLFOLDER pdesktopfolder;
628 /************************
629 * Shellfolder API
631 DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *);
632 #undef THIS
634 /************************************************************************
635 * IShellBrowser interface
637 #define THIS LPSHELLBROWSER this
638 /* targets for GetWindow/SendControlMsg */
639 #define FCW_STATUS 0x0001
640 #define FCW_TOOLBAR 0x0002
641 #define FCW_TREE 0x0003
642 #define FCW_INTERNETBAR 0x0006
643 #define FCW_PROGRESS 0x0008
645 /* wFlags for BrowseObject*/
646 #define SBSP_DEFBROWSER 0x0000
647 #define SBSP_SAMEBROWSER 0x0001
648 #define SBSP_NEWBROWSER 0x0002
650 #define SBSP_DEFMODE 0x0000
651 #define SBSP_OPENMODE 0x0010
652 #define SBSP_EXPLOREMODE 0x0020
654 #define SBSP_ABSOLUTE 0x0000
655 #define SBSP_RELATIVE 0x1000
656 #define SBSP_PARENT 0x2000
657 #define SBSP_NAVIGATEBACK 0x4000
658 #define SBSP_NAVIGATEFORWARD 0x8000
660 #define SBSP_ALLOW_AUTONAVIGATE 0x10000
662 #define SBSP_INITIATEDBYHLINKFRAME 0x80000000
663 #define SBSP_REDIRECT 0x40000000
664 #define SBSP_WRITENOHISTORY 0x08000000
666 /* uFlage for SetToolbarItems */
667 #define FCT_MERGE 0x0001
668 #define FCT_CONFIGABLE 0x0002
669 #define FCT_ADDTOEND 0x0004
671 typedef struct IShellBrowser_VTable
672 { // *** IUnknown methods ***
673 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
674 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
675 STDMETHOD_(ULONG,Release) (THIS) PURE;
677 // *** IOleWindow methods ***
678 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
679 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
681 // *** IShellBrowser methods *** (same as IOleInPlaceFrame)
682 STDMETHOD(InsertMenusSB) (THIS_ HMENU32 hmenuShared, LPOLEMENUGROUPWIDTHS32 lpMenuWidths) PURE;
683 STDMETHOD(SetMenuSB) (THIS_ HMENU32 hmenuShared, HOLEMENU32 holemenuReserved, HWND32 hwndActiveObject) PURE;
684 STDMETHOD(RemoveMenusSB) (THIS_ HMENU32 hmenuShared) PURE;
685 STDMETHOD(SetStatusTextSB) (THIS_ LPCOLESTR32 lpszStatusText) PURE;
686 STDMETHOD(EnableModelessSB) (THIS_ BOOL32 fEnable) PURE;
687 STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG32 lpmsg, WORD wID) PURE;
689 // *** IShellBrowser methods ***
690 STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST pidl, UINT32 wFlags) PURE;
691 STDMETHOD(GetViewStateStream)(THIS_ DWORD grfMode, LPSTREAM32 *ppStrm) PURE;
692 STDMETHOD(GetControlWindow)(THIS_ UINT32 id, HWND32 * lphwnd) PURE;
693 STDMETHOD(SendControlMsg)(THIS_ UINT32 id, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, LRESULT * pret) PURE;
694 STDMETHOD(QueryActiveShellView)(THIS_ IShellView ** ppshv) PURE;
695 STDMETHOD(OnViewWindowActive)(THIS_ IShellView * ppshv) PURE;
696 STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON lpButtons, UINT32 nButtons, UINT32 uFlags) PURE;
697 } *LPSHELLBROWSER_VTABLE,IShellBrowser_VTable;;
699 struct tagSHELLBROWSER
700 { LPSHELLBROWSER_VTABLE lpvtbl;
701 DWORD ref;
704 #undef THIS
706 /************************************************************************
707 * IShellView interface
709 #define THIS LPSHELLVIEW this
711 /* shellview select item flags*/
712 #define SVSI_DESELECT 0x0000
713 #define SVSI_SELECT 0x0001
714 #define SVSI_EDIT 0x0003 // includes select
715 #define SVSI_DESELECTOTHERS 0x0004
716 #define SVSI_ENSUREVISIBLE 0x0008
717 #define SVSI_FOCUSED 0x0010
719 /* shellview get item object flags */
720 #define SVGIO_BACKGROUND 0x00000000
721 #define SVGIO_SELECTION 0x00000001
722 #define SVGIO_ALLVIEW 0x00000002
724 /* The explorer dispatches WM_COMMAND messages based on the range of
725 command/menuitem IDs. All the IDs of menuitems that the view (right
726 pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
727 won't dispatch them). The view should not deal with any menuitems
728 in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
729 version of the shell).
731 FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
732 FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
733 FCIDM_GLOBAL/LAST for the explorer's submenu IDs
735 #define FCIDM_SHVIEWFIRST 0x0000
736 #define FCIDM_SHVIEWLAST 0x7fff
737 #define FCIDM_BROWSERFIRST 0xa000
738 #define FCIDM_BROWSERLAST 0xbf00
739 #define FCIDM_GLOBALFIRST 0x8000
740 #define FCIDM_GLOBALLAST 0x9fff
743 * Global submenu IDs and separator IDs
745 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
746 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
747 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
748 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
749 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
750 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
751 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
752 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
753 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
754 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
756 /* control IDs known to the view */
757 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
758 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
760 /* uState values for IShellView::UIActivate */
761 typedef enum
762 { SVUIA_DEACTIVATE = 0,
763 SVUIA_ACTIVATE_NOFOCUS = 1,
764 SVUIA_ACTIVATE_FOCUS = 2,
765 SVUIA_INPLACEACTIVATE = 3 // new flag for IShellView2
766 } SVUIA_STATUS;
770 typedef struct IShellView_VTable
771 { // *** IUnknown methods ***
772 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
773 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
774 STDMETHOD_(ULONG,Release) (THIS) PURE;
776 // *** IOleWindow methods ***
777 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
778 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
780 // *** IShellView methods ***
781 STDMETHOD(TranslateAccelerator) (THIS_ LPMSG32 lpmsg) PURE;
782 STDMETHOD(EnableModeless) (THIS_ BOOL32 fEnable) PURE;
783 STDMETHOD(UIActivate) (THIS_ UINT32 uState) PURE;
784 STDMETHOD(Refresh) (THIS) PURE;
785 STDMETHOD(CreateViewWindow)(THIS_ IShellView *lpPrevView,LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,RECT32 * prcView, HWND32 *phWnd) PURE;
786 STDMETHOD(DestroyViewWindow)(THIS) PURE;
787 STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS lpfs) PURE;
788 STDMETHOD(AddPropertySheetPages)(THIS_ DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) PURE;
789 STDMETHOD(SaveViewState)(THIS) PURE;
790 STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST pidlItem, UINT32 uFlags) PURE;
791 STDMETHOD(GetItemObject)(THIS_ UINT32 uItem, REFIID riid,LPVOID *ppv) PURE;
792 } IShellView_VTable,*LPSHELLVIEW_VTABLE;
794 struct tagSHELLVIEW
795 { LPSHELLVIEW_VTABLE lpvtbl;
796 DWORD ref;
797 LPITEMIDLIST mpidl;
798 LPSHELLFOLDER pSFParent;
799 LPSHELLBROWSER pShellBrowser;
800 LPCOMMDLGBROWSER pCommDlgBrowser;
801 HWND32 hWnd;
802 HWND32 hWndList;
803 HWND32 hWndParent;
804 FOLDERSETTINGS FolderSettings;
805 HMENU32 hMenu;
806 UINT32 uState;
807 UINT32 uSelected;
808 LPITEMIDLIST *aSelectedItems;
811 typedef GUID SHELLVIEWID;
812 #define SV_CLASS_NAME ("SHELLDLL_DefView")
814 #undef THIS
815 /****************************************************************************
816 * ICommDlgBrowser interface
818 #define THIS LPCOMMDLGBROWSER this
820 /* for OnStateChange*/
821 #define CDBOSC_SETFOCUS 0x00000000
822 #define CDBOSC_KILLFOCUS 0x00000001
823 #define CDBOSC_SELCHANGE 0x00000002
824 #define CDBOSC_RENAME 0x00000003
826 typedef struct ICommDlgBrowser_VTable
827 { /* IUnknown methods */
828 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
829 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
830 STDMETHOD_(ULONG,Release) (THIS) PURE;
832 /* ICommDlgBrowser methods */
833 STDMETHOD(OnDefaultCommand) (THIS_ LPSHELLVIEW ppshv) PURE;
834 STDMETHOD(OnStateChange) (THIS_ LPSHELLVIEW ppshv, ULONG uChange) PURE;
835 STDMETHOD(IncludeObject) (THIS_ LPSHELLVIEW ppshv, LPCITEMIDLIST pidl) PURE;
836 } ICommDlgBrowser_VTable,*LPCOMMDLGBROWSER_VTABLE;
838 struct tagCOMMDLGBROWSER
839 { LPCOMMDLGBROWSER_VTABLE lpvtbl;
840 DWORD ref;
842 #undef THIS
843 /****************************************************************************
844 * IShellLink interface
847 #define THIS LPSHELLLINK this
848 /* IShellLink::Resolve fFlags */
849 typedef enum {
850 SLR_NO_UI = 0x0001,
851 SLR_ANY_MATCH = 0x0002,
852 SLR_UPDATE = 0x0004
853 } SLR_FLAGS;
855 /* IShellLink::GetPath fFlags */
856 typedef enum {
857 SLGP_SHORTPATH = 0x0001,
858 SLGP_UNCPRIORITY = 0x0002
859 } SLGP_FLAGS;
863 typedef struct IShellLink IShellLink,*LPSHELLLINK;
864 typedef struct IShellLink_VTable
866 /* *** IUnknown methods *** */
867 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
868 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
869 STDMETHOD_(ULONG,Release) (THIS) PURE;
871 STDMETHOD(GetPath)(THIS_ LPSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
873 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
874 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
876 STDMETHOD(GetDescription)(THIS_ LPSTR pszName,INT32 cchMaxName) PURE;
877 STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE;
879 STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir,INT32 cchMaxPath) PURE;
880 STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE;
882 STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs,INT32 cchMaxPath) PURE;
883 STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE;
885 STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
886 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
888 STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
889 STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
891 STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
892 STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath,INT32 iIcon) PURE;
894 STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
896 STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
898 STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
899 } IShellLink_VTable,*LPSHELLLINK_VTABLE;
901 struct IShellLink {
902 LPSHELLLINK_VTABLE lpvtbl;
903 DWORD ref;
906 #undef THIS
908 /****************************************************************************
909 * IExtractIconinterface
911 * FIXME
912 * Is the ExtractIconA interface
914 #define THIS LPEXTRACTICON this
916 /* GetIconLocation() input flags*/
917 #define GIL_OPENICON 0x0001 // allows containers to specify an "open" look
918 #define GIL_FORSHELL 0x0002 // icon is to be displayed in a ShellFolder
919 #define GIL_ASYNC 0x0020 // this is an async extract, return E_ASYNC
921 /* GetIconLocation() return flags */
922 #define GIL_SIMULATEDOC 0x0001 // simulate this document icon for this
923 #define GIL_PERINSTANCE 0x0002 // icons from this class are per instance (each file has its own)
924 #define GIL_PERCLASS 0x0004 // icons from this class per class (shared for all files of this type)
925 #define GIL_NOTFILENAME 0x0008 // location is not a filename, must call ::ExtractIcon
926 #define GIL_DONTCACHE 0x0010 // this icon should not be cached
928 typedef struct IExtractIcon IExtractIcon,*LPEXTRACTICON;
929 typedef struct IExtractIcon_VTable
930 { /*** IUnknown methods ***/
931 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
932 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
933 STDMETHOD_(ULONG,Release) (THIS) PURE;
935 /*** IExtractIcon methods ***/
936 STDMETHOD(GetIconLocation)(THIS_ UINT32 uFlags, LPSTR szIconFile, UINT32 cchMax,INT32 * piIndex, UINT32 * pwFlags) PURE;
937 STDMETHOD(Extract)(THIS_ LPCSTR pszFile, UINT32 nIconIndex, HICON32 *phiconLarge, HICON32 *phiconSmall, UINT32 nIconSize) PURE;
938 }IExtractIccon_VTable,*LPEXTRACTICON_VTABLE;
940 struct IExtractIcon
941 { LPEXTRACTICON_VTABLE lpvtbl;
942 DWORD ref;
943 LPITEMIDLIST pidl;
946 #undef THIS
947 /****************************************************************************
948 * IShellIcon interface
951 #define THIS LPSHELLICON this
953 typedef struct IShellIcon_VTable
954 { /*** IUnknown methods ***/
955 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
956 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
957 STDMETHOD_(ULONG,Release) (THIS) PURE;
959 /*** IShellIcon methods ***/
960 STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT32 flags, LPINT32 lpIconIndex) PURE;
961 } IShellIcon_VTable,*LPSHELLICON_VTABLE;
963 struct tagSHELLICON
964 { LPSHELLICON_VTABLE lpvtbl;
965 DWORD ref;
967 #undef THIS
968 /****************************************************************************
969 * IDockingWindowFrame interface
971 #define THIS LPDOCKINGWINDOWFRAME this
973 #define DWFRF_NORMAL 0x0000 /* femove toolbar flags*/
974 #define DWFRF_DELETECONFIGDATA 0x0001
975 #define DWFAF_HIDDEN 0x0001 /* add tolbar*/
977 typedef struct IDockingWindowFrame_VTable
978 { STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
979 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
980 STDMETHOD_(ULONG,Release) (THIS) PURE;
982 /*** IOleWindow methods ***/
983 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
984 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
986 /*** IDockingWindowFrame methods ***/
987 STDMETHOD(AddToolbar) (THIS_ IUnknown* punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags) PURE;
988 STDMETHOD(RemoveToolbar) (THIS_ IUnknown* punkSrc, DWORD dwRemoveFlags) PURE;
989 STDMETHOD(FindToolbar) (THIS_ LPCWSTR pwszItem, REFIID riid, LPVOID* ppvObj) PURE;
990 } IDockingWindowFrame_VTable, *LPDOCKINGWINDOWFRAME_VTABLE;
992 struct tagDOCKINGWINDOWFRAME
993 { LPDOCKINGWINDOWFRAME_VTABLE lpvtbl;
994 DWORD ref;
997 #undef THIS
998 /****************************************************************************
999 * IServiceProvider interface
1001 #define THIS LPSERVICEPROVIDER this
1003 typedef struct IServiceProvider_VTable
1004 { /*** IUnknown methods ***/
1005 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1006 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1007 STDMETHOD_(ULONG,Release) (THIS) PURE;
1009 STDMETHOD(QueryService)(THIS_ REFGUID guidService, REFIID riid, void **ppvObject);
1010 } IServiceProvider_VTable, *LPSERVICEPROVIDER_VTABLE;
1012 struct tagSERVICEPROVIDER
1013 { LPSERVICEPROVIDER_VTABLE lpvtbl;
1014 DWORD ref;
1016 /****************************************************************************
1017 * Class constructors
1019 #ifdef __WINE__
1020 extern LPDATAOBJECT IDataObject_Constructor();
1021 extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT32, const FORMATETC32 []);
1023 extern LPCLASSFACTORY IClassFactory_Constructor();
1024 extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT32);
1025 extern LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER,LPITEMIDLIST);
1026 extern LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER, LPCITEMIDLIST);
1027 extern LPSHELLLINK IShellLink_Constructor();
1028 extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD);
1029 extern LPEXTRACTICON IExtractIcon_Constructor(LPITEMIDLIST);
1030 #endif
1031 /****************************************************************************
1032 * Shell Execute API
1034 #define SE_ERR_FNF 2 // file not found
1035 #define SE_ERR_PNF 3 // path not found
1036 #define SE_ERR_ACCESSDENIED 5 // access denied
1037 #define SE_ERR_OOM 8 // out of memory
1038 #define SE_ERR_DLLNOTFOUND 32
1039 #define SE_ERR_SHARE 26
1040 #define SE_ERR_ASSOCINCOMPLETE 27
1041 #define SE_ERR_DDETIMEOUT 28
1042 #define SE_ERR_DDEFAIL 29
1043 #define SE_ERR_DDEBUSY 30
1044 #define SE_ERR_NOASSOC 31
1046 #define SEE_MASK_CLASSNAME 0x00000001
1047 #define SEE_MASK_CLASSKEY 0x00000003
1048 #define SEE_MASK_IDLIST 0x00000004
1049 #define SEE_MASK_INVOKEIDLIST 0x0000000c
1050 #define SEE_MASK_ICON 0x00000010
1051 #define SEE_MASK_HOTKEY 0x00000020
1052 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
1053 #define SEE_MASK_CONNECTNETDRV 0x00000080
1054 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
1055 #define SEE_MASK_DOENVSUBST 0x00000200
1056 #define SEE_MASK_FLAG_NO_UI 0x00000400
1057 #define SEE_MASK_UNICODE 0x00004000
1058 #define SEE_MASK_NO_CONSOLE 0x00008000
1059 #define SEE_MASK_ASYNCOK 0x00100000
1060 #define SEE_MASK_HMONITOR 0x00200000
1062 typedef struct _SHELLEXECUTEINFOA
1063 { DWORD cbSize;
1064 ULONG fMask;
1065 HWND32 hwnd;
1066 LPCSTR lpVerb;
1067 LPCSTR lpFile;
1068 LPCSTR lpParameters;
1069 LPCSTR lpDirectory;
1070 INT32 nShow;
1071 HINSTANCE32 hInstApp;
1072 /* Optional fields */
1073 LPVOID lpIDList;
1074 LPCSTR lpClass;
1075 HKEY hkeyClass;
1076 DWORD dwHotKey;
1077 union
1078 { HANDLE32 hIcon;
1079 HANDLE32 hMonitor;
1080 } u;
1081 HANDLE32 hProcess;
1082 } SHELLEXECUTEINFO32A, *LPSHELLEXECUTEINFO32A;
1084 typedef struct _SHELLEXECUTEINFOW
1085 { DWORD cbSize;
1086 ULONG fMask;
1087 HWND32 hwnd;
1088 LPCWSTR lpVerb;
1089 LPCWSTR lpFile;
1090 LPCWSTR lpParameters;
1091 LPCWSTR lpDirectory;
1092 INT32 nShow;
1093 HINSTANCE32 hInstApp;
1094 /* Optional fields*/
1095 LPVOID lpIDList;
1096 LPCWSTR lpClass;
1097 HKEY hkeyClass;
1098 DWORD dwHotKey;
1099 union
1100 { HANDLE32 hIcon;
1101 HANDLE32 hMonitor;
1102 } u;
1103 HANDLE32 hProcess;
1104 } SHELLEXECUTEINFO32W, *LPSHELLEXECUTEINFO32W;
1106 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
1107 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
1109 BOOL32 WINAPI ShellExecuteEx32A(LPSHELLEXECUTEINFO32A lpExecInfo);
1110 BOOL32 WINAPI ShellExecuteEx32W(LPSHELLEXECUTEINFO32W lpExecInfo);
1111 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
1113 void WINAPI WinExecError32A(HWND32 hwnd,INT32 error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
1114 void WINAPI WinExecError32W(HWND32 hwnd,INT32 error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
1115 #define WinExecError WINELIB_NAME_AW(WinExecError)
1119 /****************************************************************************
1120 * SHBrowseForFolder API
1122 typedef INT32 (CALLBACK* BFFCALLBACK)(HWND32 hwnd, UINT32 uMsg, LPARAM lParam, LPARAM lpData);
1124 typedef struct tagBROWSEINFO32A {
1125 HWND32 hwndOwner;
1126 LPCITEMIDLIST pidlRoot;
1127 LPSTR pszDisplayName;
1128 LPCSTR lpszTitle;
1129 UINT32 ulFlags;
1130 BFFCALLBACK lpfn;
1131 LPARAM lParam;
1132 INT32 iImage;
1133 } BROWSEINFO32A, *PBROWSEINFO32A, *LPBROWSEINFO32A;
1135 typedef struct tagBROWSEINFO32W {
1136 HWND32 hwndOwner;
1137 LPCITEMIDLIST pidlRoot;
1138 LPWSTR pszDisplayName;
1139 LPCWSTR lpszTitle;
1140 UINT32 ulFlags;
1141 BFFCALLBACK lpfn;
1142 LPARAM lParam;
1143 INT32 iImage;
1144 } BROWSEINFO32W, *PBROWSEINFO32W, *LPBROWSEINFO32W;
1146 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
1147 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
1148 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
1150 // Browsing for directory.
1151 #define BIF_RETURNONLYFSDIRS 0x0001
1152 #define BIF_DONTGOBELOWDOMAIN 0x0002
1153 #define BIF_STATUSTEXT 0x0004
1154 #define BIF_RETURNFSANCESTORS 0x0008
1155 #define BIF_EDITBOX 0x0010
1156 #define BIF_VALIDATE 0x0020
1158 #define BIF_BROWSEFORCOMPUTER 0x1000
1159 #define BIF_BROWSEFORPRINTER 0x2000
1160 #define BIF_BROWSEINCLUDEFILES 0x4000
1162 // message from browser
1163 #define BFFM_INITIALIZED 1
1164 #define BFFM_SELCHANGED 2
1165 #define BFFM_VALIDATEFAILEDA 3 // lParam:szPath ret:1(cont),0(EndDialog)
1166 #define BFFM_VALIDATEFAILEDW 4 // lParam:wzPath ret:1(cont),0(EndDialog)
1168 // messages to browser
1169 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
1170 #define BFFM_ENABLEOK (WM_USER+101)
1171 #define BFFM_SETSELECTIONA (WM_USER+102)
1172 #define BFFM_SETSELECTIONW (WM_USER+103)
1173 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
1176 #ifdef UNICODE
1177 #define SHBrowseForFolder SHBrowseForFolderW
1178 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
1179 #define BFFM_SETSELECTION BFFM_SETSELECTIONW
1181 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
1182 #else
1183 #define SHBrowseForFolder SHBrowseForFolderA
1184 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
1185 #define BFFM_SETSELECTION BFFM_SETSELECTIONA
1187 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
1188 #endif
1191 LPITEMIDLIST WINAPI SHBrowseForFolder32A(LPBROWSEINFO32A lpbi);
1192 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
1193 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
1195 /****************************************************************************
1196 * shlview structures
1200 * IShellFolderViewCallback Callback
1201 * This "callback" is called by the shells default IShellView implementation (that
1202 * we got using SHCreateShellViewEx()), to notify us of the various things that
1203 * are happening to the shellview (and ask for things too).
1205 * You don't have to support anything here - anything you don't want to
1206 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
1207 * that the shell passes to this function are entirely undocumented.
1209 * HOWEVER, as the cabview sample as originally written used this callback, the
1210 * writers implemented the callback mechanism on top of their own IShellView.
1211 * Look there for some clues on what to do here.
1214 typedef HRESULT(CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
1215 HWND32 hwnd,UINT32 uMsg,UINT32 wParam,LPARAM lParam);
1217 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
1218 #define NF_INHERITVIEW 0x0000
1219 #define NF_LOCALVIEW 0x0001
1221 typedef struct _SHELLVIEWDATA // idl
1222 { DWORD dwSize;
1223 LPSHELLFOLDER pShellFolder;
1224 DWORD dwUserParam;
1225 LPCITEMIDLIST pidl;
1226 DWORD v3; // always 0
1227 SHELLVIEWPROC pCallBack;
1228 DWORD viewmode; // NF_* enum
1229 } SHELLVIEWDATA, * LPSHELLVIEWDATA;
1232 The shell keeps track of some per-user state to handle display
1233 options that is of majorinterest to ISVs.
1234 The key one requested right now is "DoubleClickInWebView".
1236 typedef struct
1237 { BOOL32 fShowAllObjects : 1;
1238 BOOL32 fShowExtensions : 1;
1239 BOOL32 fNoConfirmRecycle : 1;
1240 BOOL32 fShowSysFiles : 1;
1241 BOOL32 fShowCompColor : 1;
1242 BOOL32 fDoubleClickInWebView : 1;
1243 BOOL32 fDesktopHTML : 1;
1244 BOOL32 fWin95Classic : 1;
1245 BOOL32 fDontPrettyPath : 1;
1246 BOOL32 fShowAttribCol : 1;
1247 BOOL32 fMapNetDrvBtn : 1;
1248 BOOL32 fShowInfoTip : 1;
1249 BOOL32 fHideIcons : 1;
1250 UINT32 fRestFlags : 3;
1251 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
1254 #undef PURE
1255 #undef FAR
1256 #undef THIS
1257 #undef THIS_
1258 #undef STDMETHOD
1259 #undef STDMETHOD_
1260 #endif /*_WINE_SHLOBJ_H*/