Fix includes.
[wine/multimedia.git] / include / shlobj.h
blob459d3f7807faf04f67ce0a9e9a44a2df3f748b09
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 "oleobj.h"
9 #include "storage.h"
10 #include "commctrl.h"
11 #include "interfaces.h"
13 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
14 #define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
15 #define PURE
16 #define FAR
17 #define THIS_ THIS,
19 #define __T(x) x
20 #define _T(x) __T(x)
21 #define TEXT _T
23 /****************************************************************************
24 * DllGetClassObject
26 DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*);
29 typedef LPVOID LPBC; /* *IBindCtx really */
31 /* foreward declaration of the objects*/
32 typedef struct tagCONTEXTMENU *LPCONTEXTMENU, IContextMenu;
33 typedef struct tagSHELLEXTINIT *LPSHELLEXTINIT,IShellExtInit;
34 typedef struct tagENUMIDLIST *LPENUMIDLIST, IEnumIDList;
35 typedef struct tagSHELLFOLDER *LPSHELLFOLDER, IShellFolder;
36 typedef struct tagSHELLVIEW *LPSHELLVIEW, IShellView;
37 typedef struct tagSHELLBROWSER *LPSHELLBROWSER,IShellBrowser;
38 typedef struct tagDATAOBJECT *LPDATAOBJECT, IDataObject;
39 typedef struct tagSHELLICON *LPSHELLICON, IShellIcon;
40 typedef struct tagDOCKINGWINDOWFRAME *LPDOCKINGWINDOWFRAME, IDockingWindowFrame;
41 typedef struct tagSERVICEPROVIDER *LPSERVICEPROVIDER, IServiceProvider;
42 typedef struct tagCOMMDLGBROWSER *LPCOMMDLGBROWSER, ICommDlgBrowser;
43 typedef struct tagENUMFORMATETC *LPENUMFORMATETC, IEnumFORMATETC;
45 /****************************************************************************
46 * SHELL ID
48 /* strange Objects */
49 DEFINE_SHLGUID(IID_IEnumUnknown, 0x00000100L, 0, 0);
50 DEFINE_SHLGUID(IID_IEnumString, 0x00000101L, 0, 0);
51 DEFINE_SHLGUID(IID_IEnumMoniker, 0x00000102L, 0, 0);
52 DEFINE_SHLGUID(IID_IEnumFORMATETC, 0x00000103L, 0, 0);
53 DEFINE_SHLGUID(IID_IEnumOLEVERB, 0x00000104L, 0, 0);
54 DEFINE_SHLGUID(IID_IEnumSTATDATA, 0x00000105L, 0, 0);
56 DEFINE_SHLGUID(IID_IPersistStream, 0x00000109L, 0, 0);
57 DEFINE_SHLGUID(IID_IPersistStorage, 0x0000010AL, 0, 0);
58 DEFINE_SHLGUID(IID_IPersistFile, 0x0000010BL, 0, 0);
59 DEFINE_SHLGUID(IID_IPersist, 0x0000010CL, 0, 0);
60 DEFINE_SHLGUID(IID_IViewObject, 0x0000010DL, 0, 0);
61 DEFINE_SHLGUID(IID_IDataObject, 0x0000010EL, 0, 0);
63 DEFINE_SHLGUID(IID_IDropSource, 0x00000121L, 0, 0);
64 DEFINE_SHLGUID(IID_IDropTarget, 0x00000122L, 0, 0);
66 DEFINE_GUID (IID_IServiceProvider, 0x6D5140C1L, 0x7436, 0x11CE, 0x80, 0x34, 0x00, 0xAA, 0x00, 0x60, 0x09, 0xFA);
67 DEFINE_GUID (IID_IDockingWindow, 0x012dd920L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
68 DEFINE_GUID (IID_IDockingWindowSite, 0x2A342FC2L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
69 DEFINE_GUID (IID_IDockingWindowFrame, 0x47D2657AL, 0x7B27, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
71 DEFINE_SHLGUID(CLSID_ShellDesktop, 0x00021400L, 0, 0);
72 DEFINE_SHLGUID(CLSID_ShellLink, 0x00021401L, 0, 0);
73 /* shell32 formatids */
74 DEFINE_SHLGUID(FMTID_Intshcut, 0x000214A0L, 0, 0);
75 DEFINE_SHLGUID(FMTID_InternetSite, 0x000214A1L, 0, 0);
76 /* command group ids */
77 DEFINE_SHLGUID(CGID_Explorer, 0x000214D0L, 0, 0);
78 DEFINE_SHLGUID(CGID_ShellDocView, 0x000214D1L, 0, 0);
80 /* shell32interface ids */
81 DEFINE_SHLGUID(IID_INewShortcutHookA, 0x000214E1L, 0, 0);
82 DEFINE_SHLGUID(IID_IShellBrowser, 0x000214E2L, 0, 0);
83 #define SID_SShellBrowser IID_IShellBrowser
84 DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0);
85 DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
86 DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0);
87 DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
88 DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
89 DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
90 DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0);
91 DEFINE_SHLGUID(IID_IShellLink, 0x000214EEL, 0, 0);
92 DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0);
93 DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0);
94 DEFINE_SHLGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0);
95 DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
96 DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
97 DEFINE_SHLGUID(IID_IContextMenu2, 0x000214F4L, 0, 0);
98 DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
99 DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
100 DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0);
101 DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0);
102 DEFINE_SHLGUID(IID_IShellLinkW, 0x000214F9L, 0, 0);
103 DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0);
104 DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0);
105 DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0);
107 /****************************************************************************
108 * STRRET
110 #define STRRET_WSTR 0x0000
111 #define STRRET_OFFSETA 0x0001
112 #define STRRET_CSTRA 0x0002
113 #define STRRET_ASTR 0X0003
114 #define STRRET_OFFSETW 0X0004
115 #define STRRET_CSTRW 0X0005
118 typedef struct _STRRET
119 { UINT32 uType; /* STRRET_xxx */
120 union
121 { LPWSTR pOleStr; /* OLESTR that will be freed */
122 LPSTR pStr;
123 UINT32 uOffset; /* OffsetINT32o SHITEMID (ANSI) */
124 char cStr[MAX_PATH]; /* Buffer to fill in */
125 WCHAR cStrW[MAX_PATH];
127 } STRRET,*LPSTRRET;
129 /*****************************************************************************
130 * IContextMenu interface
132 #define THIS LPCONTEXTMENU this
134 /* default menu items*/
135 #define IDM_EXPLORE 0
136 #define IDM_OPEN 1
137 #define IDM_RENAME 2
138 #define IDM_LAST IDM_RENAME
140 /* QueryContextMenu uFlags */
141 #define CMF_NORMAL 0x00000000
142 #define CMF_DEFAULTONLY 0x00000001
143 #define CMF_VERBSONLY 0x00000002
144 #define CMF_EXPLORE 0x00000004
145 #define CMF_NOVERBS 0x00000008
146 #define CMF_CANRENAME 0x00000010
147 #define CMF_NODEFAULT 0x00000020
148 #define CMF_INCLUDESTATIC 0x00000040
149 #define CMF_RESERVED 0xffff0000 // View specific
151 /* GetCommandString uFlags */
152 #define GCS_VERBA 0x00000000 // canonical verb
153 #define GCS_HELPTEXTA 0x00000001 // help text (for status bar)
154 #define GCS_VALIDATEA 0x00000002 // validate command exists
155 #define GCS_VERBW 0x00000004 // canonical verb (unicode)
156 #define GCS_HELPTEXTW 0x00000005 // help text (unicode version)
157 #define GCS_VALIDATEW 0x00000006 // validate command exists (unicode)
158 #define GCS_UNICODE 0x00000004 // for bit testing - Unicode string
160 #define GCS_VERB GCS_VERBA
161 #define GCS_HELPTEXT GCS_HELPTEXTA
162 #define GCS_VALIDATE GCS_VALIDATEA
164 #define CMDSTR_NEWFOLDERA "NewFolder"
165 #define CMDSTR_VIEWLISTA "ViewList"
166 #define CMDSTR_VIEWDETAILSA "ViewDetails"
167 #define CMDSTR_NEWFOLDERW L"NewFolder"
168 #define CMDSTR_VIEWLISTW L"ViewList"
169 #define CMDSTR_VIEWDETAILSW L"ViewDetails"
171 #define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERA
172 #define CMDSTR_VIEWLIST CMDSTR_VIEWLISTA
173 #define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSA
175 #define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
176 #define CMIC_MASK_ICON SEE_MASK_ICON
177 #define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
178 #define CMIC_MASK_UNICODE SEE_MASK_UNICODE
179 #define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
180 #define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
181 #define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
182 #define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
183 #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
185 #define CMIC_MASK_PTINVOKE 0x20000000
187 /*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
188 typedef struct tagCMINVOKECOMMANDINFO
189 { DWORD cbSize; // sizeof(CMINVOKECOMMANDINFO)
190 DWORD fMask; // any combination of CMIC_MASK_*
191 HWND32 hwnd; // might be NULL (indicating no owner window)
192 LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
193 LPCSTR lpParameters; // might be NULL (indicating no parameter)
194 LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
195 INT32 nShow; // one of SW_ values for ShowWindow() API
197 DWORD dwHotKey;
198 HANDLE32 hIcon;
199 } CMINVOKECOMMANDINFO32, *LPCMINVOKECOMMANDINFO32;
201 typedef struct tagCMInvokeCommandInfoEx
202 { DWORD cbSize; // must be sizeof(CMINVOKECOMMANDINFOEX)
203 DWORD fMask; // any combination of CMIC_MASK_*
204 HWND32 hwnd; // might be NULL (indicating no owner window)
205 LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
206 LPCSTR lpParameters; // might be NULL (indicating no parameter)
207 LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
208 INT32 nShow; // one of SW_ values for ShowWindow() API
210 DWORD dwHotKey;
212 HANDLE32 hIcon;
213 LPCSTR lpTitle; // For CreateProcess-StartupInfo.lpTitle
214 LPCWSTR lpVerbW; // Unicode verb (for those who can use it)
215 LPCWSTR lpParametersW; // Unicode parameters (for those who can use it)
216 LPCWSTR lpDirectoryW; // Unicode directory (for those who can use it)
217 LPCWSTR lpTitleW; // Unicode title (for those who can use it)
218 POINT32 ptInvoke; // Point where it's invoked
220 } CMINVOKECOMMANDINFOEX32, *LPCMINVOKECOMMANDINFOEX32;
223 typedef struct IContextMenu_VTable
224 { // *** IUnknown methods ***
225 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
226 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
227 STDMETHOD_(ULONG,Release) (THIS) PURE;
229 STDMETHOD(QueryContextMenu)(THIS_ HMENU32 hmenu,UINT32 indexMenu,UINT32 idCmdFirst, UINT32 idCmdLast,UINT32 uFlags) PURE;
230 STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO32 lpici) PURE;
231 STDMETHOD(GetCommandString)(THIS_ UINT32 idCmd,UINT32 uType,UINT32 * pwReserved,LPSTR pszName,UINT32 cchMax) PURE;
233 /* undocumented not only in ContextMenu2 */
234 STDMETHOD(HandleMenuMsg)(THIS_ UINT32 uMsg,WPARAM32 wParam,LPARAM lParam) PURE;
236 /* possibly another nasty entry from ContextMenu3 ?*/
237 void * guard;
238 } IContextMenu_VTable,*LPCONTEXTMENU_VTABLE;
240 struct tagCONTEXTMENU
241 { LPCONTEXTMENU_VTABLE lpvtbl;
242 DWORD ref;
243 LPSHELLFOLDER pSFParent;
244 LPITEMIDLIST *aPidls;
245 BOOL32 bAllValues;
248 #undef THIS
249 /*****************************************************************************
250 * structures for shell clipboard formats
252 typedef enum tagDVASPECT
253 { DVASPECT_CONTENT = 1,
254 DVASPECT_THUMBNAIL = 2,
255 DVASPECT_ICON = 4,
256 DVASPECT_DOCPRINT = 8
257 } DVASPECT;
259 typedef enum tagTYMED
260 { TYMED_HGLOBAL = 1,
261 TYMED_FILE = 2,
262 TYMED_ISTREAM = 4,
263 TYMED_ISTORAGE = 8,
264 TYMED_GDI = 16,
265 TYMED_MFPICT = 32,
266 TYMED_ENHMF = 64,
267 TYMED_NULL = 0
268 } TYMED;
270 typedef struct
271 { DWORD tdSize;
272 WORD tdDriverNameOffset;
273 WORD tdDeviceNameOffset;
274 WORD tdPortNameOffset;
275 WORD tdExtDevmodeOffset;
276 BYTE tdData[ 1 ];
277 } DVTARGETDEVICE32;
279 typedef WORD CLIPFORMAT32, *LPCLIPFORMAT32;
281 /* dataobject as answer to a request */
282 typedef struct
283 { DWORD tymed;
284 union
285 { HBITMAP32 hBitmap;
286 /*HMETAFILEPICT32 hMetaFilePict;*/
287 /*HENHMETAFILE32 hEnhMetaFile;*/
288 HGLOBAL32 hGlobal;
289 LPOLESTR32 lpszFileName;
290 IStream32 *pstm;
291 IStorage32 *pstg;
292 } u;
293 IUnknown *pUnkForRelease;
294 } STGMEDIUM32;
296 /* wished data format */
297 typedef struct
298 { CLIPFORMAT32 cfFormat;
299 DVTARGETDEVICE32 *ptd;
300 DWORD dwAspect;
301 LONG lindex;
302 DWORD tymed;
303 } FORMATETC32, *LPFORMATETC32;
305 /* shell specific clipboard formats */
307 /* DATAOBJECT_InitShellIDList*/
308 #define CFSTR_SHELLIDLIST TEXT("Shell IDList Array") /* CF_IDLIST */
310 extern UINT32 cfShellIDList;
312 typedef struct
313 { UINT32 cidl;
314 UINT32 aoffset[1];
315 } CIDA, *LPCIDA;
317 #define CFSTR_SHELLIDLISTOFFSET TEXT("Shell Object Offsets") /* CF_OBJECTPOSITIONS */
318 #define CFSTR_NETRESOURCES TEXT("Net Resource") /* CF_NETRESOURCE */
320 /* DATAOBJECT_InitFileGroupDesc */
321 #define CFSTR_FILEDESCRIPTORA TEXT("FileGroupDescriptor") /* CF_FILEGROUPDESCRIPTORA */
322 extern UINT32 cfFileGroupDesc;
324 #define CFSTR_FILEDESCRIPTORW TEXT("FileGroupDescriptorW") /* CF_FILEGROUPDESCRIPTORW */
326 /* DATAOBJECT_InitFileContents*/
327 #define CFSTR_FILECONTENTS TEXT("FileContents") /* CF_FILECONTENTS */
328 extern UINT32 cfFileContents;
330 #define CFSTR_FILENAMEA TEXT("FileName") /* CF_FILENAMEA */
331 #define CFSTR_FILENAMEW TEXT("FileNameW") /* CF_FILENAMEW */
332 #define CFSTR_PRINTERGROUP TEXT("PrinterFriendlyName") /* CF_PRINTERS */
333 #define CFSTR_FILENAMEMAPA TEXT("FileNameMap") /* CF_FILENAMEMAPA */
334 #define CFSTR_FILENAMEMAPW TEXT("FileNameMapW") /* CF_FILENAMEMAPW */
335 #define CFSTR_SHELLURL TEXT("UniformResourceLocator")
336 #define CFSTR_PREFERREDDROPEFFECT TEXT("Preferred DropEffect")
337 #define CFSTR_PERFORMEDDROPEFFECT TEXT("Performed DropEffect")
338 #define CFSTR_PASTESUCCEEDED TEXT("Paste Succeeded")
339 #define CFSTR_INDRAGLOOP TEXT("InShellDragLoop")
341 /**************************************************************************
342 * IDLList "Item ID List List"
344 * NOTES
345 * interal data holder for IDataObject
347 typedef struct tagLPIDLLIST *LPIDLLIST, IDLList;
349 #define THIS LPIDLLIST this
351 typedef enum
352 { State_UnInit=1,
353 State_Init=2,
354 State_OutOfMem=3
355 } IDLListState;
357 typedef struct IDLList_VTable
358 { STDMETHOD_(UINT32, GetState)(THIS);
359 STDMETHOD_(LPITEMIDLIST, GetElement)(THIS_ UINT32 nIndex);
360 STDMETHOD_(UINT32, GetCount)(THIS);
361 STDMETHOD_(BOOL32, StoreItem)(THIS_ LPITEMIDLIST pidl);
362 STDMETHOD_(BOOL32, AddItems)(THIS_ LPITEMIDLIST *apidl, UINT32 cidl);
363 STDMETHOD_(BOOL32, InitList)(THIS);
364 STDMETHOD_(void, CleanList)(THIS);
365 } IDLList_VTable,*LPIDLLIST_VTABLE;
367 struct tagLPIDLLIST
368 { LPIDLLIST_VTABLE lpvtbl;
369 HDPA dpa;
370 UINT32 uStep;
373 extern LPIDLLIST IDLList_Constructor (UINT32 uStep);
374 extern void IDLList_Destructor(LPIDLLIST this);
375 #undef THIS
376 /*****************************************************************************
377 * IEnumFORMATETC interface
379 #define THIS LPENUMFORMATETC this
381 typedef struct IEnumFORMATETC_VTable
382 { /* IUnknown methods */
383 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
384 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
385 STDMETHOD_(ULONG,Release) (THIS) PURE;
387 /* IEnumFORMATETC methods */
388 STDMETHOD (Next)(THIS_ ULONG celt, FORMATETC32 *rgelt, ULONG *pceltFethed) PURE;
389 STDMETHOD (Skip)(THIS_ ULONG celt) PURE;
390 STDMETHOD (Reset)(THIS) PURE;
391 STDMETHOD (Clone)(THIS_ IEnumFORMATETC ** ppenum) PURE;
392 } IEnumFORMATETC_VTable,*LPENUMFORMATETC_VTABLE;
394 struct tagENUMFORMATETC
395 { LPENUMFORMATETC_VTABLE lpvtbl;
396 DWORD ref;
397 UINT32 posFmt;
398 UINT32 countFmt;
399 LPFORMATETC32 pFmt;
402 #undef THIS
404 /*****************************************************************************
405 * IDataObject interface
407 #define THIS LPDATAOBJECT this
409 typedef struct IDataObject_VTable
410 { /*** IUnknown methods ***/
411 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
412 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
413 STDMETHOD_(ULONG,Release) (THIS) PURE;
415 STDMETHOD (GetData )(THIS_ LPFORMATETC32 pformatetcIn, STGMEDIUM32 *pmedium) PURE;
416 STDMETHOD (GetDataHere)(THIS_ LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium) PURE;
417 STDMETHOD (QueryGetData)(THIS_ LPFORMATETC32 pformatetc) PURE;
418 STDMETHOD (GetCanonicalFormatEtc)(THIS_ LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut) PURE;
419 STDMETHOD (SetData)(THIS_ LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium, BOOL32 fRelease) PURE;
420 STDMETHOD (EnumFormatEtc)(THIS_ DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc) PURE;
421 STDMETHOD (DAdvise )(THIS_ LPFORMATETC32 *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) PURE;
422 STDMETHOD (DUnadvise)(THIS_ DWORD dwConnection) PURE;
423 STDMETHOD (EnumDAdvise)(THIS_ IEnumSTATDATA **ppenumAdvise) PURE;
424 } IDataObject_VTable,*LPDATAOBJECT_VTABLE;
426 struct tagDATAOBJECT
427 { LPDATAOBJECT_VTABLE lpvtbl;
428 DWORD ref;
429 LPSHELLFOLDER psf;
430 LPIDLLIST lpill; /* the data of the dataobject */
431 LPITEMIDLIST pidl;
434 #undef THIS
437 /*****************************************************************************
438 * IShellExtInit interface
440 #define THIS LPSHELLEXTINIT this
442 typedef struct IShellExtInit_VTable
443 { // *** IUnknown methods ***
444 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
445 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
446 STDMETHOD_(ULONG,Release) (THIS) PURE;
448 // *** IShellExtInit methods ***
449 STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID) PURE;
450 } IShellExtInit_VTable,*LPSHELLEXTINIT_VTABLE;
452 struct tagSHELLEXTINIT
453 { LPSHELLEXTINIT_VTABLE lpvtbl;
454 DWORD ref;
457 #undef THIS
459 /*****************************************************************************
460 * IEnumIDList interface
462 #define THIS LPENUMIDLIST this
464 typedef struct tagENUMLIST
465 { struct tagENUMLIST *pNext;
466 LPITEMIDLIST pidl;
467 } ENUMLIST, *LPENUMLIST;
469 typedef struct IEnumIDList_VTable
470 { /* *** IUnknown methods *** */
471 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
472 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
473 STDMETHOD_(ULONG,Release) (THIS) PURE;
475 /* *** IEnumIDList methods *** */
476 STDMETHOD(Next) (THIS_ ULONG celt,
477 LPITEMIDLIST *rgelt,
478 ULONG *pceltFetched) PURE;
479 STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
480 STDMETHOD(Reset) (THIS) PURE;
481 STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
482 /* *** private methods *** */
483 STDMETHOD_(BOOL32,CreateEnumList)(THIS_ LPCSTR, DWORD) PURE;
484 STDMETHOD_(BOOL32,AddToEnumList)(THIS_ LPITEMIDLIST) PURE;
485 STDMETHOD_(BOOL32,DeleteList)(THIS) PURE;
488 } IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
490 struct tagENUMIDLIST
491 { LPENUMIDLIST_VTABLE lpvtbl;
492 DWORD ref;
493 LPENUMLIST mpFirst;
494 LPENUMLIST mpLast;
495 LPENUMLIST mpCurrent;
498 #undef THIS
499 //--------------------------------------------------------------------------
501 // FOLDERSETTINGS
503 // FOLDERSETTINGS is a data structure that explorer passes from one folder
504 // view to another, when the user is browsing. It calls ISV::GetCurrentInfo
505 // member to get the current settings and pass it to ISV::CreateViewWindow
506 // to allow the next folder view "inherit" it. These settings assumes a
507 // particular UI (which the shell's folder view has), and shell extensions
508 // may or may not use those settings.
510 //--------------------------------------------------------------------------
512 typedef LPBYTE LPVIEWSETTINGS;
514 // NB Bitfields.
515 // FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL
516 typedef enum
517 { FWF_AUTOARRANGE = 0x0001,
518 FWF_ABBREVIATEDNAMES = 0x0002,
519 FWF_SNAPTOGRID = 0x0004,
520 FWF_OWNERDATA = 0x0008,
521 FWF_BESTFITWINDOW = 0x0010,
522 FWF_DESKTOP = 0x0020,
523 FWF_SINGLESEL = 0x0040,
524 FWF_NOSUBFOLDERS = 0x0080,
525 FWF_TRANSPARENT = 0x0100,
526 FWF_NOCLIENTEDGE = 0x0200,
527 FWF_NOSCROLL = 0x0400,
528 FWF_ALIGNLEFT = 0x0800,
529 FWF_SINGLECLICKACTIVATE=0x8000 // TEMPORARY -- NO UI FOR THIS
530 } FOLDERFLAGS;
532 typedef enum
533 { FVM_ICON = 1,
534 FVM_SMALLICON = 2,
535 FVM_LIST = 3,
536 FVM_DETAILS = 4
537 } FOLDERVIEWMODE;
539 typedef struct
540 { UINT32 ViewMode; // View mode (FOLDERVIEWMODE values)
541 UINT32 fFlags; // View options (FOLDERFLAGS bits)
542 } FOLDERSETTINGS, *LPFOLDERSETTINGS;
544 typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
546 /* FIXME; the next two lines are propersheet related, move to prsht.h when created */
547 struct _PSP;
548 typedef struct _PSP FAR* HPROPSHEETPAGE;
550 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
551 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE,LPARAM);
553 /************************************************************************
554 * IShellFolder interface
557 #define THIS LPSHELLFOLDER this
559 /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
560 typedef enum
561 { SHGDN_NORMAL = 0, /* default (display purpose) */
562 SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
563 SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
564 } SHGNO;
566 /* IShellFolder::EnumObjects */
567 typedef enum tagSHCONTF
568 { SHCONTF_FOLDERS = 32, /* for shell browser */
569 SHCONTF_NONFOLDERS = 64, /* for default view */
570 SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
571 } SHCONTF;
573 /* from oleidl.h */
574 #define DROPEFFECT_NONE 0
575 #define DROPEFFECT_COPY 1
576 #define DROPEFFECT_MOVE 2
577 #define DROPEFFECT_LINK 4
578 #define DROPEFFECT_SCROLL 0x80000000
580 /* IShellFolder::GetAttributesOf flags */
581 #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
582 #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
583 #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
584 #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
585 #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
586 #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
587 #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
588 #define SFGAO_CAPABILITYMASK 0x00000177L
589 #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
590 #define SFGAO_SHARE 0x00020000L /* shared */
591 #define SFGAO_READONLY 0x00040000L /* read-only */
592 #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
593 #define SFGAO_DISPLAYATTRMASK 0x000F0000L
594 #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
595 #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
596 #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
597 #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
598 #define SFGAO_CONTENTSMASK 0x80000000L
599 #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
600 #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
602 typedef struct IShellFolder_VTable {
603 /* *** IUnknown methods *** */
604 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
605 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
606 STDMETHOD_(ULONG,Release) (THIS) PURE;
608 /* *** IShellFolder methods *** */
609 STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,LPBC pbcReserved, LPOLESTR32 lpszDisplayName,ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
610 STDMETHOD(EnumObjects)( THIS_ HWND32 hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList) PURE;
611 STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvOut) PURE;
612 STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvObj) PURE;
613 STDMETHOD(CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
614 STDMETHOD(CreateViewObject)(THIS_ HWND32 hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
615 STDMETHOD(GetAttributesOf)(THIS_ UINT32 cidl, LPCITEMIDLIST * apidl,ULONG * rgfInOut) PURE;
616 STDMETHOD(GetUIObjectOf)(THIS_ HWND32 hwndOwner, UINT32 cidl, LPCITEMIDLIST * apidl,REFIID riid, UINT32 * prgfInOut, LPVOID * ppvOut) PURE;
617 STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
618 STDMETHOD(SetNameOf)(THIS_ HWND32 hwndOwner, LPCITEMIDLIST pidl,LPCOLESTR32 lpszName, DWORD uFlags,LPITEMIDLIST * ppidlOut) PURE;
620 /* utility functions */
621 STDMETHOD_(BOOL32,GetFolderPath)(THIS_ LPSTR, DWORD);
623 } *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
625 struct tagSHELLFOLDER {
626 LPSHELLFOLDER_VTABLE lpvtbl;
627 DWORD ref;
628 LPSTR sMyPath;
629 LPITEMIDLIST pMyPidl;
630 LPITEMIDLIST mpidl;
631 LPSHELLFOLDER mpSFParent;
634 extern LPSHELLFOLDER pdesktopfolder;
636 /************************
637 * Shellfolder API
639 DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *);
640 #undef THIS
642 /************************************************************************
643 * IShellBrowser interface
645 #define THIS LPSHELLBROWSER this
646 /* targets for GetWindow/SendControlMsg */
647 #define FCW_STATUS 0x0001
648 #define FCW_TOOLBAR 0x0002
649 #define FCW_TREE 0x0003
650 #define FCW_INTERNETBAR 0x0006
651 #define FCW_PROGRESS 0x0008
653 /* wFlags for BrowseObject*/
654 #define SBSP_DEFBROWSER 0x0000
655 #define SBSP_SAMEBROWSER 0x0001
656 #define SBSP_NEWBROWSER 0x0002
658 #define SBSP_DEFMODE 0x0000
659 #define SBSP_OPENMODE 0x0010
660 #define SBSP_EXPLOREMODE 0x0020
662 #define SBSP_ABSOLUTE 0x0000
663 #define SBSP_RELATIVE 0x1000
664 #define SBSP_PARENT 0x2000
665 #define SBSP_NAVIGATEBACK 0x4000
666 #define SBSP_NAVIGATEFORWARD 0x8000
668 #define SBSP_ALLOW_AUTONAVIGATE 0x10000
670 #define SBSP_INITIATEDBYHLINKFRAME 0x80000000
671 #define SBSP_REDIRECT 0x40000000
672 #define SBSP_WRITENOHISTORY 0x08000000
674 /* uFlage for SetToolbarItems */
675 #define FCT_MERGE 0x0001
676 #define FCT_CONFIGABLE 0x0002
677 #define FCT_ADDTOEND 0x0004
679 /* undocumented, found in the web posted by Chris Becke */
680 #define CWM_SETPATH (WM_USER+2)
681 #define CWM_WANTIDLE (WM_USER+3)
682 #define CWM_GETSETCURRENTINFO (WM_USER+4)
683 #define CWM_SELECTITEM (WM_USER+5)
684 #define CWM_STOPWAITING (WM_USER+6)
685 #define CWM_GETISHELLBROWSER (WM_USER+7)
687 typedef struct IShellBrowser_VTable
688 { // *** IUnknown methods ***
689 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
690 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
691 STDMETHOD_(ULONG,Release) (THIS) PURE;
693 // *** IOleWindow methods ***
694 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
695 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
697 // *** IShellBrowser methods *** (same as IOleInPlaceFrame)
698 STDMETHOD(InsertMenusSB) (THIS_ HMENU32 hmenuShared, LPOLEMENUGROUPWIDTHS32 lpMenuWidths) PURE;
699 STDMETHOD(SetMenuSB) (THIS_ HMENU32 hmenuShared, HOLEMENU32 holemenuReserved, HWND32 hwndActiveObject) PURE;
700 STDMETHOD(RemoveMenusSB) (THIS_ HMENU32 hmenuShared) PURE;
701 STDMETHOD(SetStatusTextSB) (THIS_ LPCOLESTR32 lpszStatusText) PURE;
702 STDMETHOD(EnableModelessSB) (THIS_ BOOL32 fEnable) PURE;
703 STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG32 lpmsg, WORD wID) PURE;
705 // *** IShellBrowser methods ***
706 STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST pidl, UINT32 wFlags) PURE;
707 STDMETHOD(GetViewStateStream)(THIS_ DWORD grfMode, LPSTREAM32 *ppStrm) PURE;
708 STDMETHOD(GetControlWindow)(THIS_ UINT32 id, HWND32 * lphwnd) PURE;
709 STDMETHOD(SendControlMsg)(THIS_ UINT32 id, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, LRESULT * pret) PURE;
710 STDMETHOD(QueryActiveShellView)(THIS_ IShellView ** ppshv) PURE;
711 STDMETHOD(OnViewWindowActive)(THIS_ IShellView * ppshv) PURE;
712 STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON lpButtons, UINT32 nButtons, UINT32 uFlags) PURE;
713 } *LPSHELLBROWSER_VTABLE,IShellBrowser_VTable;
715 struct tagSHELLBROWSER
716 { LPSHELLBROWSER_VTABLE lpvtbl;
717 DWORD ref;
720 #undef THIS
722 /************************************************************************
723 * IShellView interface
725 #define THIS LPSHELLVIEW this
727 /* shellview select item flags*/
728 #define SVSI_DESELECT 0x0000
729 #define SVSI_SELECT 0x0001
730 #define SVSI_EDIT 0x0003 // includes select
731 #define SVSI_DESELECTOTHERS 0x0004
732 #define SVSI_ENSUREVISIBLE 0x0008
733 #define SVSI_FOCUSED 0x0010
735 /* shellview get item object flags */
736 #define SVGIO_BACKGROUND 0x00000000
737 #define SVGIO_SELECTION 0x00000001
738 #define SVGIO_ALLVIEW 0x00000002
740 /* The explorer dispatches WM_COMMAND messages based on the range of
741 command/menuitem IDs. All the IDs of menuitems that the view (right
742 pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
743 won't dispatch them). The view should not deal with any menuitems
744 in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
745 version of the shell).
747 FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
748 FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
749 FCIDM_GLOBAL/LAST for the explorer's submenu IDs
751 #define FCIDM_SHVIEWFIRST 0x0000
752 /* undocumented */
753 #define FCIDM_SHVIEW_ARRANGE 0x7001
754 #define FCIDM_SHVIEW_DELETE 0x7011
755 #define FCIDM_SHVIEW_PROPERTIES 0x7013
756 #define FCIDM_SHVIEW_CUT 0x7018
757 #define FCIDM_SHVIEW_COPY 0x7019
758 #define FCIDM_SHVIEW_INSERT 0x701A
759 #define FCIDM_SHVIEW_UNDO 0x701B
760 #define FCIDM_SHVIEW_INSERTLINK 0x701C
761 #define FCIDM_SHVIEW_SELECTALL 0x7021
762 #define FCIDM_SHVIEW_INVERTSELECTION 0x7022
763 #define FCIDM_SHVIEW_BIGICON 0x7029
764 #define FCIDM_SHVIEW_SMALLICON 0x702A
765 #define FCIDM_SHVIEW_LISTVIEW 0x702B
766 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
767 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
768 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
769 #define FCIDM_SHVIEW_HELP 0x7041
771 #define FCIDM_SHVIEWLAST 0x7fff
772 #define FCIDM_BROWSERFIRST 0xA000
773 /* undocumented toolbar items from stddlg's*/
774 #define FCIDM_TB_SMALLICON 0xA003
775 #define FCIDM_TB_REPORTVIEW 0xA004
777 #define FCIDM_BROWSERLAST 0xbf00
778 #define FCIDM_GLOBALFIRST 0x8000
779 #define FCIDM_GLOBALLAST 0x9fff
782 * Global submenu IDs and separator IDs
784 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
785 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
786 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
787 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
788 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
789 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
790 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
791 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
792 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
793 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
795 /* control IDs known to the view */
796 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
797 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
799 /* uState values for IShellView::UIActivate */
800 typedef enum
801 { SVUIA_DEACTIVATE = 0,
802 SVUIA_ACTIVATE_NOFOCUS = 1,
803 SVUIA_ACTIVATE_FOCUS = 2,
804 SVUIA_INPLACEACTIVATE = 3 // new flag for IShellView2
805 } SVUIA_STATUS;
809 typedef struct IShellView_VTable
810 { // *** IUnknown methods ***
811 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
812 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
813 STDMETHOD_(ULONG,Release) (THIS) PURE;
815 // *** IOleWindow methods ***
816 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
817 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
819 // *** IShellView methods ***
820 STDMETHOD(TranslateAccelerator) (THIS_ LPMSG32 lpmsg) PURE;
821 STDMETHOD(EnableModeless) (THIS_ BOOL32 fEnable) PURE;
822 STDMETHOD(UIActivate) (THIS_ UINT32 uState) PURE;
823 STDMETHOD(Refresh) (THIS) PURE;
824 STDMETHOD(CreateViewWindow)(THIS_ IShellView *lpPrevView,LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,RECT32 * prcView, HWND32 *phWnd) PURE;
825 STDMETHOD(DestroyViewWindow)(THIS) PURE;
826 STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS lpfs) PURE;
827 STDMETHOD(AddPropertySheetPages)(THIS_ DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) PURE;
828 STDMETHOD(SaveViewState)(THIS) PURE;
829 STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST pidlItem, UINT32 uFlags) PURE;
830 STDMETHOD(GetItemObject)(THIS_ UINT32 uItem, REFIID riid,LPVOID *ppv) PURE;
831 } IShellView_VTable,*LPSHELLVIEW_VTABLE;
833 struct tagSHELLVIEW
834 { LPSHELLVIEW_VTABLE lpvtbl;
835 DWORD ref;
836 LPITEMIDLIST mpidl;
837 LPSHELLFOLDER pSFParent;
838 LPSHELLBROWSER pShellBrowser;
839 LPCOMMDLGBROWSER pCommDlgBrowser;
840 HWND32 hWnd;
841 HWND32 hWndList;
842 HWND32 hWndParent;
843 FOLDERSETTINGS FolderSettings;
844 HMENU32 hMenu;
845 UINT32 uState;
846 UINT32 uSelected;
847 LPITEMIDLIST *aSelectedItems;
850 typedef GUID SHELLVIEWID;
851 #define SV_CLASS_NAME ("SHELLDLL_DefView")
853 #undef THIS
854 /****************************************************************************
855 * ICommDlgBrowser interface
857 #define THIS LPCOMMDLGBROWSER this
859 /* for OnStateChange*/
860 #define CDBOSC_SETFOCUS 0x00000000
861 #define CDBOSC_KILLFOCUS 0x00000001
862 #define CDBOSC_SELCHANGE 0x00000002
863 #define CDBOSC_RENAME 0x00000003
865 typedef struct ICommDlgBrowser_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 /* ICommDlgBrowser methods */
872 STDMETHOD(OnDefaultCommand) (THIS_ LPSHELLVIEW ppshv) PURE;
873 STDMETHOD(OnStateChange) (THIS_ LPSHELLVIEW ppshv, ULONG uChange) PURE;
874 STDMETHOD(IncludeObject) (THIS_ LPSHELLVIEW ppshv, LPCITEMIDLIST pidl) PURE;
875 } ICommDlgBrowser_VTable,*LPCOMMDLGBROWSER_VTABLE;
877 struct tagCOMMDLGBROWSER
878 { LPCOMMDLGBROWSER_VTABLE lpvtbl;
879 DWORD ref;
881 #undef THIS
882 /****************************************************************************
883 * IShellLink interface
886 #define THIS LPSHELLLINK this
887 /* IShellLink::Resolve fFlags */
888 typedef enum {
889 SLR_NO_UI = 0x0001,
890 SLR_ANY_MATCH = 0x0002,
891 SLR_UPDATE = 0x0004
892 } SLR_FLAGS;
894 /* IShellLink::GetPath fFlags */
895 typedef enum {
896 SLGP_SHORTPATH = 0x0001,
897 SLGP_UNCPRIORITY = 0x0002
898 } SLGP_FLAGS;
902 typedef struct IShellLink IShellLink,*LPSHELLLINK;
903 typedef struct IShellLink_VTable
905 /* *** IUnknown methods *** */
906 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
907 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
908 STDMETHOD_(ULONG,Release) (THIS) PURE;
910 STDMETHOD(GetPath)(THIS_ LPSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
912 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
913 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
915 STDMETHOD(GetDescription)(THIS_ LPSTR pszName,INT32 cchMaxName) PURE;
916 STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE;
918 STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir,INT32 cchMaxPath) PURE;
919 STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE;
921 STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs,INT32 cchMaxPath) PURE;
922 STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE;
924 STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
925 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
927 STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
928 STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
930 STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
931 STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath,INT32 iIcon) PURE;
933 STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
935 STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
937 STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
938 } IShellLink_VTable,*LPSHELLLINK_VTABLE;
940 struct IShellLink {
941 LPSHELLLINK_VTABLE lpvtbl;
942 DWORD ref;
945 #undef THIS
947 #define THIS LPSHELLLINKW this
949 typedef struct IShellLinkW IShellLinkW,*LPSHELLLINKW;
950 typedef struct IShellLinkW_VTable
952 /* *** IUnknown methods *** */
953 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
954 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
955 STDMETHOD_(ULONG,Release) (THIS) PURE;
957 STDMETHOD(GetPath)(THIS_ LPWSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
959 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
960 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
962 STDMETHOD(GetDescription)(THIS_ LPWSTR pszName,INT32 cchMaxName) PURE;
963 STDMETHOD(SetDescription)(THIS_ LPCWSTR pszName) PURE;
965 STDMETHOD(GetWorkingDirectory)(THIS_ LPWSTR pszDir,INT32 cchMaxPath) PURE;
966 STDMETHOD(SetWorkingDirectory)(THIS_ LPCWSTR pszDir) PURE;
968 STDMETHOD(GetArguments)(THIS_ LPWSTR pszArgs,INT32 cchMaxPath) PURE;
969 STDMETHOD(SetArguments)(THIS_ LPCWSTR pszArgs) PURE;
971 STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
972 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
974 STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
975 STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
977 STDMETHOD(GetIconLocation)(THIS_ LPWSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
978 STDMETHOD(SetIconLocation)(THIS_ LPCWSTR pszIconPath,INT32 iIcon) PURE;
980 STDMETHOD(SetRelativePath)(THIS_ LPCWSTR pszPathRel, DWORD dwReserved) PURE;
982 STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
984 STDMETHOD(SetPath)(THIS_ LPCWSTR pszFile) PURE;
985 } IShellLinkW_VTable,*LPSHELLLINKW_VTABLE;
987 struct IShellLinkW {
988 LPSHELLLINKW_VTABLE lpvtbl;
989 DWORD ref;
992 #undef THIS
994 /****************************************************************************
995 * IExtractIconinterface
997 * FIXME
998 * Is the ExtractIconA interface
1000 #define THIS LPEXTRACTICON this
1002 /* GetIconLocation() input flags*/
1003 #define GIL_OPENICON 0x0001 // allows containers to specify an "open" look
1004 #define GIL_FORSHELL 0x0002 // icon is to be displayed in a ShellFolder
1005 #define GIL_ASYNC 0x0020 // this is an async extract, return E_ASYNC
1007 /* GetIconLocation() return flags */
1008 #define GIL_SIMULATEDOC 0x0001 // simulate this document icon for this
1009 #define GIL_PERINSTANCE 0x0002 // icons from this class are per instance (each file has its own)
1010 #define GIL_PERCLASS 0x0004 // icons from this class per class (shared for all files of this type)
1011 #define GIL_NOTFILENAME 0x0008 // location is not a filename, must call ::ExtractIcon
1012 #define GIL_DONTCACHE 0x0010 // this icon should not be cached
1014 typedef struct IExtractIcon IExtractIcon,*LPEXTRACTICON;
1015 typedef struct IExtractIcon_VTable
1016 { /*** IUnknown methods ***/
1017 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1018 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1019 STDMETHOD_(ULONG,Release) (THIS) PURE;
1021 /*** IExtractIcon methods ***/
1022 STDMETHOD(GetIconLocation)(THIS_ UINT32 uFlags, LPSTR szIconFile, UINT32 cchMax,INT32 * piIndex, UINT32 * pwFlags) PURE;
1023 STDMETHOD(Extract)(THIS_ LPCSTR pszFile, UINT32 nIconIndex, HICON32 *phiconLarge, HICON32 *phiconSmall, UINT32 nIconSize) PURE;
1024 }IExtractIcon_VTable,*LPEXTRACTICON_VTABLE;
1026 struct IExtractIcon
1027 { LPEXTRACTICON_VTABLE lpvtbl;
1028 DWORD ref;
1029 LPITEMIDLIST pidl;
1032 #undef THIS
1034 DWORD WINAPI SHMapPIDLToSystemImageListIndex(LPSHELLFOLDER sh,LPITEMIDLIST pidl,DWORD z);
1036 /****************************************************************************
1037 * IShellIcon interface
1040 #define THIS LPSHELLICON this
1042 typedef struct IShellIcon_VTable
1043 { /*** IUnknown methods ***/
1044 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1045 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1046 STDMETHOD_(ULONG,Release) (THIS) PURE;
1048 /*** IShellIcon methods ***/
1049 STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT32 flags, LPINT32 lpIconIndex) PURE;
1050 } IShellIcon_VTable,*LPSHELLICON_VTABLE;
1052 struct tagSHELLICON
1053 { LPSHELLICON_VTABLE lpvtbl;
1054 DWORD ref;
1056 #undef THIS
1057 /****************************************************************************
1058 * IDockingWindowFrame interface
1060 #define THIS LPDOCKINGWINDOWFRAME this
1062 #define DWFRF_NORMAL 0x0000 /* femove toolbar flags*/
1063 #define DWFRF_DELETECONFIGDATA 0x0001
1064 #define DWFAF_HIDDEN 0x0001 /* add tolbar*/
1066 typedef struct IDockingWindowFrame_VTable
1067 { STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1068 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1069 STDMETHOD_(ULONG,Release) (THIS) PURE;
1071 /*** IOleWindow methods ***/
1072 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
1073 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
1075 /*** IDockingWindowFrame methods ***/
1076 STDMETHOD(AddToolbar) (THIS_ IUnknown* punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags) PURE;
1077 STDMETHOD(RemoveToolbar) (THIS_ IUnknown* punkSrc, DWORD dwRemoveFlags) PURE;
1078 STDMETHOD(FindToolbar) (THIS_ LPCWSTR pwszItem, REFIID riid, LPVOID* ppvObj) PURE;
1079 } IDockingWindowFrame_VTable, *LPDOCKINGWINDOWFRAME_VTABLE;
1081 struct tagDOCKINGWINDOWFRAME
1082 { LPDOCKINGWINDOWFRAME_VTABLE lpvtbl;
1083 DWORD ref;
1086 #undef THIS
1087 /****************************************************************************
1088 * IServiceProvider interface
1090 #define THIS LPSERVICEPROVIDER this
1092 typedef struct IServiceProvider_VTable
1093 { /*** IUnknown methods ***/
1094 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1095 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1096 STDMETHOD_(ULONG,Release) (THIS) PURE;
1098 STDMETHOD(QueryService)(THIS_ REFGUID guidService, REFIID riid, void **ppvObject);
1099 } IServiceProvider_VTable, *LPSERVICEPROVIDER_VTABLE;
1101 struct tagSERVICEPROVIDER
1102 { LPSERVICEPROVIDER_VTABLE lpvtbl;
1103 DWORD ref;
1105 /****************************************************************************
1106 * Class constructors
1108 #ifdef __WINE__
1109 extern LPDATAOBJECT IDataObject_Constructor(HWND32 hwndOwner, LPSHELLFOLDER psf, LPITEMIDLIST * apidl, UINT32 cidl);
1110 extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT32, const FORMATETC32 []);
1112 extern LPCLASSFACTORY IClassFactory_Constructor(void);
1113 extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT32);
1114 extern LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER,LPITEMIDLIST);
1115 extern LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER, LPCITEMIDLIST);
1116 extern LPSHELLLINK IShellLink_Constructor(void);
1117 extern LPSHELLLINKW IShellLinkW_Constructor(void);
1118 extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD);
1119 extern LPEXTRACTICON IExtractIcon_Constructor(LPITEMIDLIST);
1120 #endif
1121 /****************************************************************************
1122 * Shell Execute API
1124 #define SE_ERR_FNF 2 // file not found
1125 #define SE_ERR_PNF 3 // path not found
1126 #define SE_ERR_ACCESSDENIED 5 // access denied
1127 #define SE_ERR_OOM 8 // out of memory
1128 #define SE_ERR_DLLNOTFOUND 32
1129 #define SE_ERR_SHARE 26
1130 #define SE_ERR_ASSOCINCOMPLETE 27
1131 #define SE_ERR_DDETIMEOUT 28
1132 #define SE_ERR_DDEFAIL 29
1133 #define SE_ERR_DDEBUSY 30
1134 #define SE_ERR_NOASSOC 31
1136 #define SEE_MASK_CLASSNAME 0x00000001
1137 #define SEE_MASK_CLASSKEY 0x00000003
1138 #define SEE_MASK_IDLIST 0x00000004
1139 #define SEE_MASK_INVOKEIDLIST 0x0000000c
1140 #define SEE_MASK_ICON 0x00000010
1141 #define SEE_MASK_HOTKEY 0x00000020
1142 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
1143 #define SEE_MASK_CONNECTNETDRV 0x00000080
1144 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
1145 #define SEE_MASK_DOENVSUBST 0x00000200
1146 #define SEE_MASK_FLAG_NO_UI 0x00000400
1147 #define SEE_MASK_UNICODE 0x00004000
1148 #define SEE_MASK_NO_CONSOLE 0x00008000
1149 #define SEE_MASK_ASYNCOK 0x00100000
1150 #define SEE_MASK_HMONITOR 0x00200000
1152 typedef struct _SHELLEXECUTEINFOA
1153 { DWORD cbSize;
1154 ULONG fMask;
1155 HWND32 hwnd;
1156 LPCSTR lpVerb;
1157 LPCSTR lpFile;
1158 LPCSTR lpParameters;
1159 LPCSTR lpDirectory;
1160 INT32 nShow;
1161 HINSTANCE32 hInstApp;
1162 /* Optional fields */
1163 LPVOID lpIDList;
1164 LPCSTR lpClass;
1165 HKEY hkeyClass;
1166 DWORD dwHotKey;
1167 union
1168 { HANDLE32 hIcon;
1169 HANDLE32 hMonitor;
1170 } u;
1171 HANDLE32 hProcess;
1172 } SHELLEXECUTEINFO32A, *LPSHELLEXECUTEINFO32A;
1174 typedef struct _SHELLEXECUTEINFOW
1175 { DWORD cbSize;
1176 ULONG fMask;
1177 HWND32 hwnd;
1178 LPCWSTR lpVerb;
1179 LPCWSTR lpFile;
1180 LPCWSTR lpParameters;
1181 LPCWSTR lpDirectory;
1182 INT32 nShow;
1183 HINSTANCE32 hInstApp;
1184 /* Optional fields*/
1185 LPVOID lpIDList;
1186 LPCWSTR lpClass;
1187 HKEY hkeyClass;
1188 DWORD dwHotKey;
1189 union
1190 { HANDLE32 hIcon;
1191 HANDLE32 hMonitor;
1192 } u;
1193 HANDLE32 hProcess;
1194 } SHELLEXECUTEINFO32W, *LPSHELLEXECUTEINFO32W;
1196 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
1197 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
1199 BOOL32 WINAPI ShellExecuteEx32A(LPSHELLEXECUTEINFO32A lpExecInfo);
1200 BOOL32 WINAPI ShellExecuteEx32W(LPSHELLEXECUTEINFO32W lpExecInfo);
1201 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
1203 void WINAPI WinExecError32A(HWND32 hwnd,INT32 error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
1204 void WINAPI WinExecError32W(HWND32 hwnd,INT32 error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
1205 #define WinExecError WINELIB_NAME_AW(WinExecError)
1209 /****************************************************************************
1210 * SHBrowseForFolder API
1212 typedef INT32 (CALLBACK* BFFCALLBACK)(HWND32 hwnd, UINT32 uMsg, LPARAM lParam, LPARAM lpData);
1214 typedef struct tagBROWSEINFO32A {
1215 HWND32 hwndOwner;
1216 LPCITEMIDLIST pidlRoot;
1217 LPSTR pszDisplayName;
1218 LPCSTR lpszTitle;
1219 UINT32 ulFlags;
1220 BFFCALLBACK lpfn;
1221 LPARAM lParam;
1222 INT32 iImage;
1223 } BROWSEINFO32A, *PBROWSEINFO32A, *LPBROWSEINFO32A;
1225 typedef struct tagBROWSEINFO32W {
1226 HWND32 hwndOwner;
1227 LPCITEMIDLIST pidlRoot;
1228 LPWSTR pszDisplayName;
1229 LPCWSTR lpszTitle;
1230 UINT32 ulFlags;
1231 BFFCALLBACK lpfn;
1232 LPARAM lParam;
1233 INT32 iImage;
1234 } BROWSEINFO32W, *PBROWSEINFO32W, *LPBROWSEINFO32W;
1236 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
1237 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
1238 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
1240 // Browsing for directory.
1241 #define BIF_RETURNONLYFSDIRS 0x0001
1242 #define BIF_DONTGOBELOWDOMAIN 0x0002
1243 #define BIF_STATUSTEXT 0x0004
1244 #define BIF_RETURNFSANCESTORS 0x0008
1245 #define BIF_EDITBOX 0x0010
1246 #define BIF_VALIDATE 0x0020
1248 #define BIF_BROWSEFORCOMPUTER 0x1000
1249 #define BIF_BROWSEFORPRINTER 0x2000
1250 #define BIF_BROWSEINCLUDEFILES 0x4000
1252 // message from browser
1253 #define BFFM_INITIALIZED 1
1254 #define BFFM_SELCHANGED 2
1255 #define BFFM_VALIDATEFAILEDA 3 // lParam:szPath ret:1(cont),0(EndDialog)
1256 #define BFFM_VALIDATEFAILEDW 4 // lParam:wzPath ret:1(cont),0(EndDialog)
1258 // messages to browser
1259 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
1260 #define BFFM_ENABLEOK (WM_USER+101)
1261 #define BFFM_SETSELECTIONA (WM_USER+102)
1262 #define BFFM_SETSELECTIONW (WM_USER+103)
1263 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
1266 #ifdef UNICODE
1267 #define SHBrowseForFolder SHBrowseForFolderW
1268 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
1269 #define BFFM_SETSELECTION BFFM_SETSELECTIONW
1271 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
1272 #else
1273 #define SHBrowseForFolder SHBrowseForFolderA
1274 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
1275 #define BFFM_SETSELECTION BFFM_SETSELECTIONA
1277 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
1278 #endif
1281 LPITEMIDLIST WINAPI SHBrowseForFolder32A(LPBROWSEINFO32A lpbi);
1282 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
1283 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
1285 /****************************************************************************
1286 * shlview structures
1290 * IShellFolderViewCallback Callback
1291 * This "callback" is called by the shells default IShellView implementation (that
1292 * we got using SHCreateShellViewEx()), to notify us of the various things that
1293 * are happening to the shellview (and ask for things too).
1295 * You don't have to support anything here - anything you don't want to
1296 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
1297 * that the shell passes to this function are entirely undocumented.
1299 * HOWEVER, as the cabview sample as originally written used this callback, the
1300 * writers implemented the callback mechanism on top of their own IShellView.
1301 * Look there for some clues on what to do here.
1304 typedef HRESULT(CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
1305 HWND32 hwnd,UINT32 uMsg,UINT32 wParam,LPARAM lParam);
1307 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
1308 #define NF_INHERITVIEW 0x0000
1309 #define NF_LOCALVIEW 0x0001
1311 typedef struct _SHELLVIEWDATA // idl
1312 { DWORD dwSize;
1313 LPSHELLFOLDER pShellFolder;
1314 DWORD dwUserParam;
1315 LPCITEMIDLIST pidl;
1316 DWORD v3; // always 0
1317 SHELLVIEWPROC pCallBack;
1318 DWORD viewmode; // NF_* enum
1319 } SHELLVIEWDATA, * LPSHELLVIEWDATA;
1322 The shell keeps track of some per-user state to handle display
1323 options that is of majorinterest to ISVs.
1324 The key one requested right now is "DoubleClickInWebView".
1326 typedef struct
1327 { BOOL32 fShowAllObjects : 1;
1328 BOOL32 fShowExtensions : 1;
1329 BOOL32 fNoConfirmRecycle : 1;
1330 BOOL32 fShowSysFiles : 1;
1331 BOOL32 fShowCompColor : 1;
1332 BOOL32 fDoubleClickInWebView : 1;
1333 BOOL32 fDesktopHTML : 1;
1334 BOOL32 fWin95Classic : 1;
1335 BOOL32 fDontPrettyPath : 1;
1336 BOOL32 fShowAttribCol : 1;
1337 BOOL32 fMapNetDrvBtn : 1;
1338 BOOL32 fShowInfoTip : 1;
1339 BOOL32 fHideIcons : 1;
1340 UINT32 fRestFlags : 3;
1341 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
1344 #undef PURE
1345 #undef FAR
1346 #undef THIS
1347 #undef THIS_
1348 #undef STDMETHOD
1349 #undef STDMETHOD_
1350 #endif /*_WINE_SHLOBJ_H*/