Implement AbortDoc16, move AbortDoc32 and StartDoc32W to
[wine/multimedia.git] / include / shlobj.h
blobae5af71de16724877f01e2baf643e21e55a22da0
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 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
547 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE,LPARAM);
549 /************************************************************************
550 * IShellFolder interface
553 #define THIS LPSHELLFOLDER this
555 /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
556 typedef enum
557 { SHGDN_NORMAL = 0, /* default (display purpose) */
558 SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
559 SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
560 } SHGNO;
562 /* IShellFolder::EnumObjects */
563 typedef enum tagSHCONTF
564 { SHCONTF_FOLDERS = 32, /* for shell browser */
565 SHCONTF_NONFOLDERS = 64, /* for default view */
566 SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
567 } SHCONTF;
569 /* from oleidl.h */
570 #define DROPEFFECT_NONE 0
571 #define DROPEFFECT_COPY 1
572 #define DROPEFFECT_MOVE 2
573 #define DROPEFFECT_LINK 4
574 #define DROPEFFECT_SCROLL 0x80000000
576 /* IShellFolder::GetAttributesOf flags */
577 #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
578 #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
579 #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
580 #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
581 #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
582 #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
583 #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
584 #define SFGAO_CAPABILITYMASK 0x00000177L
585 #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
586 #define SFGAO_SHARE 0x00020000L /* shared */
587 #define SFGAO_READONLY 0x00040000L /* read-only */
588 #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
589 #define SFGAO_DISPLAYATTRMASK 0x000F0000L
590 #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
591 #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
592 #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
593 #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
594 #define SFGAO_CONTENTSMASK 0x80000000L
595 #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
596 #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
598 typedef struct IShellFolder_VTable {
599 /* *** IUnknown methods *** */
600 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
601 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
602 STDMETHOD_(ULONG,Release) (THIS) PURE;
604 /* *** IShellFolder methods *** */
605 STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,LPBC pbcReserved, LPOLESTR32 lpszDisplayName,ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
606 STDMETHOD(EnumObjects)( THIS_ HWND32 hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList) PURE;
607 STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvOut) PURE;
608 STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvObj) PURE;
609 STDMETHOD(CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
610 STDMETHOD(CreateViewObject)(THIS_ HWND32 hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
611 STDMETHOD(GetAttributesOf)(THIS_ UINT32 cidl, LPCITEMIDLIST * apidl,ULONG * rgfInOut) PURE;
612 STDMETHOD(GetUIObjectOf)(THIS_ HWND32 hwndOwner, UINT32 cidl, LPCITEMIDLIST * apidl,REFIID riid, UINT32 * prgfInOut, LPVOID * ppvOut) PURE;
613 STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
614 STDMETHOD(SetNameOf)(THIS_ HWND32 hwndOwner, LPCITEMIDLIST pidl,LPCOLESTR32 lpszName, DWORD uFlags,LPITEMIDLIST * ppidlOut) PURE;
616 /* utility functions */
617 STDMETHOD_(BOOL32,GetFolderPath)(THIS_ LPSTR, DWORD);
619 } *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
621 struct tagSHELLFOLDER {
622 LPSHELLFOLDER_VTABLE lpvtbl;
623 DWORD ref;
624 LPSTR sMyPath;
625 LPITEMIDLIST pMyPidl;
626 LPITEMIDLIST mpidl;
627 LPSHELLFOLDER mpSFParent;
630 extern LPSHELLFOLDER pdesktopfolder;
632 /************************
633 * Shellfolder API
635 DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *);
636 #undef THIS
638 /************************************************************************
639 * IShellBrowser interface
641 #define THIS LPSHELLBROWSER this
642 /* targets for GetWindow/SendControlMsg */
643 #define FCW_STATUS 0x0001
644 #define FCW_TOOLBAR 0x0002
645 #define FCW_TREE 0x0003
646 #define FCW_INTERNETBAR 0x0006
647 #define FCW_PROGRESS 0x0008
649 /* wFlags for BrowseObject*/
650 #define SBSP_DEFBROWSER 0x0000
651 #define SBSP_SAMEBROWSER 0x0001
652 #define SBSP_NEWBROWSER 0x0002
654 #define SBSP_DEFMODE 0x0000
655 #define SBSP_OPENMODE 0x0010
656 #define SBSP_EXPLOREMODE 0x0020
658 #define SBSP_ABSOLUTE 0x0000
659 #define SBSP_RELATIVE 0x1000
660 #define SBSP_PARENT 0x2000
661 #define SBSP_NAVIGATEBACK 0x4000
662 #define SBSP_NAVIGATEFORWARD 0x8000
664 #define SBSP_ALLOW_AUTONAVIGATE 0x10000
666 #define SBSP_INITIATEDBYHLINKFRAME 0x80000000
667 #define SBSP_REDIRECT 0x40000000
668 #define SBSP_WRITENOHISTORY 0x08000000
670 /* uFlage for SetToolbarItems */
671 #define FCT_MERGE 0x0001
672 #define FCT_CONFIGABLE 0x0002
673 #define FCT_ADDTOEND 0x0004
675 /* undocumented, found in the web posted by Chris Becke */
676 #define CWM_SETPATH (WM_USER+2)
677 #define CWM_WANTIDLE (WM_USER+3)
678 #define CWM_GETSETCURRENTINFO (WM_USER+4)
679 #define CWM_SELECTITEM (WM_USER+5)
680 #define CWM_STOPWAITING (WM_USER+6)
681 #define CWM_GETISHELLBROWSER (WM_USER+7)
683 typedef struct IShellBrowser_VTable
684 { // *** IUnknown methods ***
685 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
686 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
687 STDMETHOD_(ULONG,Release) (THIS) PURE;
689 // *** IOleWindow methods ***
690 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
691 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
693 // *** IShellBrowser methods *** (same as IOleInPlaceFrame)
694 STDMETHOD(InsertMenusSB) (THIS_ HMENU32 hmenuShared, LPOLEMENUGROUPWIDTHS32 lpMenuWidths) PURE;
695 STDMETHOD(SetMenuSB) (THIS_ HMENU32 hmenuShared, HOLEMENU32 holemenuReserved, HWND32 hwndActiveObject) PURE;
696 STDMETHOD(RemoveMenusSB) (THIS_ HMENU32 hmenuShared) PURE;
697 STDMETHOD(SetStatusTextSB) (THIS_ LPCOLESTR32 lpszStatusText) PURE;
698 STDMETHOD(EnableModelessSB) (THIS_ BOOL32 fEnable) PURE;
699 STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG32 lpmsg, WORD wID) PURE;
701 // *** IShellBrowser methods ***
702 STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST pidl, UINT32 wFlags) PURE;
703 STDMETHOD(GetViewStateStream)(THIS_ DWORD grfMode, LPSTREAM32 *ppStrm) PURE;
704 STDMETHOD(GetControlWindow)(THIS_ UINT32 id, HWND32 * lphwnd) PURE;
705 STDMETHOD(SendControlMsg)(THIS_ UINT32 id, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, LRESULT * pret) PURE;
706 STDMETHOD(QueryActiveShellView)(THIS_ IShellView ** ppshv) PURE;
707 STDMETHOD(OnViewWindowActive)(THIS_ IShellView * ppshv) PURE;
708 STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON lpButtons, UINT32 nButtons, UINT32 uFlags) PURE;
709 } *LPSHELLBROWSER_VTABLE,IShellBrowser_VTable;
711 struct tagSHELLBROWSER
712 { LPSHELLBROWSER_VTABLE lpvtbl;
713 DWORD ref;
716 #undef THIS
718 /************************************************************************
719 * IShellView interface
721 #define THIS LPSHELLVIEW this
723 /* shellview select item flags*/
724 #define SVSI_DESELECT 0x0000
725 #define SVSI_SELECT 0x0001
726 #define SVSI_EDIT 0x0003 // includes select
727 #define SVSI_DESELECTOTHERS 0x0004
728 #define SVSI_ENSUREVISIBLE 0x0008
729 #define SVSI_FOCUSED 0x0010
731 /* shellview get item object flags */
732 #define SVGIO_BACKGROUND 0x00000000
733 #define SVGIO_SELECTION 0x00000001
734 #define SVGIO_ALLVIEW 0x00000002
736 /* The explorer dispatches WM_COMMAND messages based on the range of
737 command/menuitem IDs. All the IDs of menuitems that the view (right
738 pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
739 won't dispatch them). The view should not deal with any menuitems
740 in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
741 version of the shell).
743 FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
744 FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
745 FCIDM_GLOBAL/LAST for the explorer's submenu IDs
747 #define FCIDM_SHVIEWFIRST 0x0000
748 /* undocumented */
749 #define FCIDM_SHVIEW_ARRANGE 0x7001
750 #define FCIDM_SHVIEW_DELETE 0x7011
751 #define FCIDM_SHVIEW_PROPERTIES 0x7013
752 #define FCIDM_SHVIEW_CUT 0x7018
753 #define FCIDM_SHVIEW_COPY 0x7019
754 #define FCIDM_SHVIEW_INSERT 0x701A
755 #define FCIDM_SHVIEW_UNDO 0x701B
756 #define FCIDM_SHVIEW_INSERTLINK 0x701C
757 #define FCIDM_SHVIEW_SELECTALL 0x7021
758 #define FCIDM_SHVIEW_INVERTSELECTION 0x7022
759 #define FCIDM_SHVIEW_BIGICON 0x7029
760 #define FCIDM_SHVIEW_SMALLICON 0x702A
761 #define FCIDM_SHVIEW_LISTVIEW 0x702B
762 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
763 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
764 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
765 #define FCIDM_SHVIEW_HELP 0x7041
767 #define FCIDM_SHVIEWLAST 0x7fff
768 #define FCIDM_BROWSERFIRST 0xA000
769 /* undocumented toolbar items from stddlg's*/
770 #define FCIDM_TB_SMALLICON 0xA003
771 #define FCIDM_TB_REPORTVIEW 0xA004
773 #define FCIDM_BROWSERLAST 0xbf00
774 #define FCIDM_GLOBALFIRST 0x8000
775 #define FCIDM_GLOBALLAST 0x9fff
778 * Global submenu IDs and separator IDs
780 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
781 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
782 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
783 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
784 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
785 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
786 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
787 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
788 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
789 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
791 /* control IDs known to the view */
792 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
793 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
795 /* uState values for IShellView::UIActivate */
796 typedef enum
797 { SVUIA_DEACTIVATE = 0,
798 SVUIA_ACTIVATE_NOFOCUS = 1,
799 SVUIA_ACTIVATE_FOCUS = 2,
800 SVUIA_INPLACEACTIVATE = 3 // new flag for IShellView2
801 } SVUIA_STATUS;
805 typedef struct IShellView_VTable
806 { // *** IUnknown methods ***
807 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
808 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
809 STDMETHOD_(ULONG,Release) (THIS) PURE;
811 // *** IOleWindow methods ***
812 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
813 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
815 // *** IShellView methods ***
816 STDMETHOD(TranslateAccelerator) (THIS_ LPMSG32 lpmsg) PURE;
817 STDMETHOD(EnableModeless) (THIS_ BOOL32 fEnable) PURE;
818 STDMETHOD(UIActivate) (THIS_ UINT32 uState) PURE;
819 STDMETHOD(Refresh) (THIS) PURE;
820 STDMETHOD(CreateViewWindow)(THIS_ IShellView *lpPrevView,LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,RECT32 * prcView, HWND32 *phWnd) PURE;
821 STDMETHOD(DestroyViewWindow)(THIS) PURE;
822 STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS lpfs) PURE;
823 STDMETHOD(AddPropertySheetPages)(THIS_ DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) PURE;
824 STDMETHOD(SaveViewState)(THIS) PURE;
825 STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST pidlItem, UINT32 uFlags) PURE;
826 STDMETHOD(GetItemObject)(THIS_ UINT32 uItem, REFIID riid,LPVOID *ppv) PURE;
827 } IShellView_VTable,*LPSHELLVIEW_VTABLE;
829 struct tagSHELLVIEW
830 { LPSHELLVIEW_VTABLE lpvtbl;
831 DWORD ref;
832 LPITEMIDLIST mpidl;
833 LPSHELLFOLDER pSFParent;
834 LPSHELLBROWSER pShellBrowser;
835 LPCOMMDLGBROWSER pCommDlgBrowser;
836 HWND32 hWnd;
837 HWND32 hWndList;
838 HWND32 hWndParent;
839 FOLDERSETTINGS FolderSettings;
840 HMENU32 hMenu;
841 UINT32 uState;
842 UINT32 uSelected;
843 LPITEMIDLIST *aSelectedItems;
846 typedef GUID SHELLVIEWID;
847 #define SV_CLASS_NAME ("SHELLDLL_DefView")
849 #undef THIS
850 /****************************************************************************
851 * ICommDlgBrowser interface
853 #define THIS LPCOMMDLGBROWSER this
855 /* for OnStateChange*/
856 #define CDBOSC_SETFOCUS 0x00000000
857 #define CDBOSC_KILLFOCUS 0x00000001
858 #define CDBOSC_SELCHANGE 0x00000002
859 #define CDBOSC_RENAME 0x00000003
861 typedef struct ICommDlgBrowser_VTable
862 { /* IUnknown methods */
863 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
864 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
865 STDMETHOD_(ULONG,Release) (THIS) PURE;
867 /* ICommDlgBrowser methods */
868 STDMETHOD(OnDefaultCommand) (THIS_ LPSHELLVIEW ppshv) PURE;
869 STDMETHOD(OnStateChange) (THIS_ LPSHELLVIEW ppshv, ULONG uChange) PURE;
870 STDMETHOD(IncludeObject) (THIS_ LPSHELLVIEW ppshv, LPCITEMIDLIST pidl) PURE;
871 } ICommDlgBrowser_VTable,*LPCOMMDLGBROWSER_VTABLE;
873 struct tagCOMMDLGBROWSER
874 { LPCOMMDLGBROWSER_VTABLE lpvtbl;
875 DWORD ref;
877 #undef THIS
878 /****************************************************************************
879 * IShellLink interface
882 #define THIS LPSHELLLINK this
883 /* IShellLink::Resolve fFlags */
884 typedef enum {
885 SLR_NO_UI = 0x0001,
886 SLR_ANY_MATCH = 0x0002,
887 SLR_UPDATE = 0x0004
888 } SLR_FLAGS;
890 /* IShellLink::GetPath fFlags */
891 typedef enum {
892 SLGP_SHORTPATH = 0x0001,
893 SLGP_UNCPRIORITY = 0x0002
894 } SLGP_FLAGS;
898 typedef struct IShellLink IShellLink,*LPSHELLLINK;
899 typedef struct IShellLink_VTable
901 /* *** IUnknown methods *** */
902 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
903 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
904 STDMETHOD_(ULONG,Release) (THIS) PURE;
906 STDMETHOD(GetPath)(THIS_ LPSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
908 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
909 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
911 STDMETHOD(GetDescription)(THIS_ LPSTR pszName,INT32 cchMaxName) PURE;
912 STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE;
914 STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir,INT32 cchMaxPath) PURE;
915 STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE;
917 STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs,INT32 cchMaxPath) PURE;
918 STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE;
920 STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
921 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
923 STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
924 STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
926 STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
927 STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath,INT32 iIcon) PURE;
929 STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
931 STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
933 STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
934 } IShellLink_VTable,*LPSHELLLINK_VTABLE;
936 struct IShellLink {
937 LPSHELLLINK_VTABLE lpvtbl;
938 DWORD ref;
941 #undef THIS
943 #define THIS LPSHELLLINKW this
945 typedef struct IShellLinkW IShellLinkW,*LPSHELLLINKW;
946 typedef struct IShellLinkW_VTable
948 /* *** IUnknown methods *** */
949 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
950 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
951 STDMETHOD_(ULONG,Release) (THIS) PURE;
953 STDMETHOD(GetPath)(THIS_ LPWSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
955 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
956 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
958 STDMETHOD(GetDescription)(THIS_ LPWSTR pszName,INT32 cchMaxName) PURE;
959 STDMETHOD(SetDescription)(THIS_ LPCWSTR pszName) PURE;
961 STDMETHOD(GetWorkingDirectory)(THIS_ LPWSTR pszDir,INT32 cchMaxPath) PURE;
962 STDMETHOD(SetWorkingDirectory)(THIS_ LPCWSTR pszDir) PURE;
964 STDMETHOD(GetArguments)(THIS_ LPWSTR pszArgs,INT32 cchMaxPath) PURE;
965 STDMETHOD(SetArguments)(THIS_ LPCWSTR pszArgs) PURE;
967 STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
968 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
970 STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
971 STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
973 STDMETHOD(GetIconLocation)(THIS_ LPWSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
974 STDMETHOD(SetIconLocation)(THIS_ LPCWSTR pszIconPath,INT32 iIcon) PURE;
976 STDMETHOD(SetRelativePath)(THIS_ LPCWSTR pszPathRel, DWORD dwReserved) PURE;
978 STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
980 STDMETHOD(SetPath)(THIS_ LPCWSTR pszFile) PURE;
981 } IShellLinkW_VTable,*LPSHELLLINKW_VTABLE;
983 struct IShellLinkW {
984 LPSHELLLINKW_VTABLE lpvtbl;
985 DWORD ref;
988 #undef THIS
990 /****************************************************************************
991 * IExtractIconinterface
993 * FIXME
994 * Is the ExtractIconA interface
996 #define THIS LPEXTRACTICON this
998 /* GetIconLocation() input flags*/
999 #define GIL_OPENICON 0x0001 // allows containers to specify an "open" look
1000 #define GIL_FORSHELL 0x0002 // icon is to be displayed in a ShellFolder
1001 #define GIL_ASYNC 0x0020 // this is an async extract, return E_ASYNC
1003 /* GetIconLocation() return flags */
1004 #define GIL_SIMULATEDOC 0x0001 // simulate this document icon for this
1005 #define GIL_PERINSTANCE 0x0002 // icons from this class are per instance (each file has its own)
1006 #define GIL_PERCLASS 0x0004 // icons from this class per class (shared for all files of this type)
1007 #define GIL_NOTFILENAME 0x0008 // location is not a filename, must call ::ExtractIcon
1008 #define GIL_DONTCACHE 0x0010 // this icon should not be cached
1010 typedef struct IExtractIcon IExtractIcon,*LPEXTRACTICON;
1011 typedef struct IExtractIcon_VTable
1012 { /*** IUnknown methods ***/
1013 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1014 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1015 STDMETHOD_(ULONG,Release) (THIS) PURE;
1017 /*** IExtractIcon methods ***/
1018 STDMETHOD(GetIconLocation)(THIS_ UINT32 uFlags, LPSTR szIconFile, UINT32 cchMax,INT32 * piIndex, UINT32 * pwFlags) PURE;
1019 STDMETHOD(Extract)(THIS_ LPCSTR pszFile, UINT32 nIconIndex, HICON32 *phiconLarge, HICON32 *phiconSmall, UINT32 nIconSize) PURE;
1020 }IExtractIcon_VTable,*LPEXTRACTICON_VTABLE;
1022 struct IExtractIcon
1023 { LPEXTRACTICON_VTABLE lpvtbl;
1024 DWORD ref;
1025 LPITEMIDLIST pidl;
1028 #undef THIS
1030 DWORD WINAPI SHMapPIDLToSystemImageListIndex(LPSHELLFOLDER sh,LPITEMIDLIST pidl,DWORD z);
1032 /****************************************************************************
1033 * IShellIcon interface
1036 #define THIS LPSHELLICON this
1038 typedef struct IShellIcon_VTable
1039 { /*** IUnknown methods ***/
1040 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1041 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1042 STDMETHOD_(ULONG,Release) (THIS) PURE;
1044 /*** IShellIcon methods ***/
1045 STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT32 flags, LPINT32 lpIconIndex) PURE;
1046 } IShellIcon_VTable,*LPSHELLICON_VTABLE;
1048 struct tagSHELLICON
1049 { LPSHELLICON_VTABLE lpvtbl;
1050 DWORD ref;
1052 #undef THIS
1053 /****************************************************************************
1054 * IDockingWindowFrame interface
1056 #define THIS LPDOCKINGWINDOWFRAME this
1058 #define DWFRF_NORMAL 0x0000 /* femove toolbar flags*/
1059 #define DWFRF_DELETECONFIGDATA 0x0001
1060 #define DWFAF_HIDDEN 0x0001 /* add tolbar*/
1062 typedef struct IDockingWindowFrame_VTable
1063 { STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1064 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1065 STDMETHOD_(ULONG,Release) (THIS) PURE;
1067 /*** IOleWindow methods ***/
1068 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
1069 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
1071 /*** IDockingWindowFrame methods ***/
1072 STDMETHOD(AddToolbar) (THIS_ IUnknown* punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags) PURE;
1073 STDMETHOD(RemoveToolbar) (THIS_ IUnknown* punkSrc, DWORD dwRemoveFlags) PURE;
1074 STDMETHOD(FindToolbar) (THIS_ LPCWSTR pwszItem, REFIID riid, LPVOID* ppvObj) PURE;
1075 } IDockingWindowFrame_VTable, *LPDOCKINGWINDOWFRAME_VTABLE;
1077 struct tagDOCKINGWINDOWFRAME
1078 { LPDOCKINGWINDOWFRAME_VTABLE lpvtbl;
1079 DWORD ref;
1082 #undef THIS
1083 /****************************************************************************
1084 * IServiceProvider interface
1086 #define THIS LPSERVICEPROVIDER this
1088 typedef struct IServiceProvider_VTable
1089 { /*** IUnknown methods ***/
1090 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1091 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1092 STDMETHOD_(ULONG,Release) (THIS) PURE;
1094 STDMETHOD(QueryService)(THIS_ REFGUID guidService, REFIID riid, void **ppvObject);
1095 } IServiceProvider_VTable, *LPSERVICEPROVIDER_VTABLE;
1097 struct tagSERVICEPROVIDER
1098 { LPSERVICEPROVIDER_VTABLE lpvtbl;
1099 DWORD ref;
1101 /****************************************************************************
1102 * Class constructors
1104 #ifdef __WINE__
1105 extern LPDATAOBJECT IDataObject_Constructor(HWND32 hwndOwner, LPSHELLFOLDER psf, LPITEMIDLIST * apidl, UINT32 cidl);
1106 extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT32, const FORMATETC32 []);
1108 extern LPCLASSFACTORY IClassFactory_Constructor(void);
1109 extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT32);
1110 extern LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER,LPITEMIDLIST);
1111 extern LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER, LPCITEMIDLIST);
1112 extern LPSHELLLINK IShellLink_Constructor(void);
1113 extern LPSHELLLINKW IShellLinkW_Constructor(void);
1114 extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD);
1115 extern LPEXTRACTICON IExtractIcon_Constructor(LPITEMIDLIST);
1116 #endif
1117 /****************************************************************************
1118 * Shell Execute API
1120 #define SE_ERR_FNF 2 // file not found
1121 #define SE_ERR_PNF 3 // path not found
1122 #define SE_ERR_ACCESSDENIED 5 // access denied
1123 #define SE_ERR_OOM 8 // out of memory
1124 #define SE_ERR_DLLNOTFOUND 32
1125 #define SE_ERR_SHARE 26
1126 #define SE_ERR_ASSOCINCOMPLETE 27
1127 #define SE_ERR_DDETIMEOUT 28
1128 #define SE_ERR_DDEFAIL 29
1129 #define SE_ERR_DDEBUSY 30
1130 #define SE_ERR_NOASSOC 31
1132 #define SEE_MASK_CLASSNAME 0x00000001
1133 #define SEE_MASK_CLASSKEY 0x00000003
1134 #define SEE_MASK_IDLIST 0x00000004
1135 #define SEE_MASK_INVOKEIDLIST 0x0000000c
1136 #define SEE_MASK_ICON 0x00000010
1137 #define SEE_MASK_HOTKEY 0x00000020
1138 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
1139 #define SEE_MASK_CONNECTNETDRV 0x00000080
1140 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
1141 #define SEE_MASK_DOENVSUBST 0x00000200
1142 #define SEE_MASK_FLAG_NO_UI 0x00000400
1143 #define SEE_MASK_UNICODE 0x00004000
1144 #define SEE_MASK_NO_CONSOLE 0x00008000
1145 #define SEE_MASK_ASYNCOK 0x00100000
1146 #define SEE_MASK_HMONITOR 0x00200000
1148 typedef struct _SHELLEXECUTEINFOA
1149 { DWORD cbSize;
1150 ULONG fMask;
1151 HWND32 hwnd;
1152 LPCSTR lpVerb;
1153 LPCSTR lpFile;
1154 LPCSTR lpParameters;
1155 LPCSTR lpDirectory;
1156 INT32 nShow;
1157 HINSTANCE32 hInstApp;
1158 /* Optional fields */
1159 LPVOID lpIDList;
1160 LPCSTR lpClass;
1161 HKEY hkeyClass;
1162 DWORD dwHotKey;
1163 union
1164 { HANDLE32 hIcon;
1165 HANDLE32 hMonitor;
1166 } u;
1167 HANDLE32 hProcess;
1168 } SHELLEXECUTEINFO32A, *LPSHELLEXECUTEINFO32A;
1170 typedef struct _SHELLEXECUTEINFOW
1171 { DWORD cbSize;
1172 ULONG fMask;
1173 HWND32 hwnd;
1174 LPCWSTR lpVerb;
1175 LPCWSTR lpFile;
1176 LPCWSTR lpParameters;
1177 LPCWSTR lpDirectory;
1178 INT32 nShow;
1179 HINSTANCE32 hInstApp;
1180 /* Optional fields*/
1181 LPVOID lpIDList;
1182 LPCWSTR lpClass;
1183 HKEY hkeyClass;
1184 DWORD dwHotKey;
1185 union
1186 { HANDLE32 hIcon;
1187 HANDLE32 hMonitor;
1188 } u;
1189 HANDLE32 hProcess;
1190 } SHELLEXECUTEINFO32W, *LPSHELLEXECUTEINFO32W;
1192 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
1193 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
1195 BOOL32 WINAPI ShellExecuteEx32A(LPSHELLEXECUTEINFO32A lpExecInfo);
1196 BOOL32 WINAPI ShellExecuteEx32W(LPSHELLEXECUTEINFO32W lpExecInfo);
1197 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
1199 void WINAPI WinExecError32A(HWND32 hwnd,INT32 error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
1200 void WINAPI WinExecError32W(HWND32 hwnd,INT32 error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
1201 #define WinExecError WINELIB_NAME_AW(WinExecError)
1205 /****************************************************************************
1206 * SHBrowseForFolder API
1208 typedef INT32 (CALLBACK* BFFCALLBACK)(HWND32 hwnd, UINT32 uMsg, LPARAM lParam, LPARAM lpData);
1210 typedef struct tagBROWSEINFO32A {
1211 HWND32 hwndOwner;
1212 LPCITEMIDLIST pidlRoot;
1213 LPSTR pszDisplayName;
1214 LPCSTR lpszTitle;
1215 UINT32 ulFlags;
1216 BFFCALLBACK lpfn;
1217 LPARAM lParam;
1218 INT32 iImage;
1219 } BROWSEINFO32A, *PBROWSEINFO32A, *LPBROWSEINFO32A;
1221 typedef struct tagBROWSEINFO32W {
1222 HWND32 hwndOwner;
1223 LPCITEMIDLIST pidlRoot;
1224 LPWSTR pszDisplayName;
1225 LPCWSTR lpszTitle;
1226 UINT32 ulFlags;
1227 BFFCALLBACK lpfn;
1228 LPARAM lParam;
1229 INT32 iImage;
1230 } BROWSEINFO32W, *PBROWSEINFO32W, *LPBROWSEINFO32W;
1232 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
1233 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
1234 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
1236 // Browsing for directory.
1237 #define BIF_RETURNONLYFSDIRS 0x0001
1238 #define BIF_DONTGOBELOWDOMAIN 0x0002
1239 #define BIF_STATUSTEXT 0x0004
1240 #define BIF_RETURNFSANCESTORS 0x0008
1241 #define BIF_EDITBOX 0x0010
1242 #define BIF_VALIDATE 0x0020
1244 #define BIF_BROWSEFORCOMPUTER 0x1000
1245 #define BIF_BROWSEFORPRINTER 0x2000
1246 #define BIF_BROWSEINCLUDEFILES 0x4000
1248 // message from browser
1249 #define BFFM_INITIALIZED 1
1250 #define BFFM_SELCHANGED 2
1251 #define BFFM_VALIDATEFAILEDA 3 // lParam:szPath ret:1(cont),0(EndDialog)
1252 #define BFFM_VALIDATEFAILEDW 4 // lParam:wzPath ret:1(cont),0(EndDialog)
1254 // messages to browser
1255 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
1256 #define BFFM_ENABLEOK (WM_USER+101)
1257 #define BFFM_SETSELECTIONA (WM_USER+102)
1258 #define BFFM_SETSELECTIONW (WM_USER+103)
1259 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
1262 #ifdef UNICODE
1263 #define SHBrowseForFolder SHBrowseForFolderW
1264 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
1265 #define BFFM_SETSELECTION BFFM_SETSELECTIONW
1267 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
1268 #else
1269 #define SHBrowseForFolder SHBrowseForFolderA
1270 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
1271 #define BFFM_SETSELECTION BFFM_SETSELECTIONA
1273 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
1274 #endif
1277 LPITEMIDLIST WINAPI SHBrowseForFolder32A(LPBROWSEINFO32A lpbi);
1278 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
1279 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
1281 /****************************************************************************
1282 * shlview structures
1286 * IShellFolderViewCallback Callback
1287 * This "callback" is called by the shells default IShellView implementation (that
1288 * we got using SHCreateShellViewEx()), to notify us of the various things that
1289 * are happening to the shellview (and ask for things too).
1291 * You don't have to support anything here - anything you don't want to
1292 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
1293 * that the shell passes to this function are entirely undocumented.
1295 * HOWEVER, as the cabview sample as originally written used this callback, the
1296 * writers implemented the callback mechanism on top of their own IShellView.
1297 * Look there for some clues on what to do here.
1300 typedef HRESULT(CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
1301 HWND32 hwnd,UINT32 uMsg,UINT32 wParam,LPARAM lParam);
1303 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
1304 #define NF_INHERITVIEW 0x0000
1305 #define NF_LOCALVIEW 0x0001
1307 typedef struct _SHELLVIEWDATA // idl
1308 { DWORD dwSize;
1309 LPSHELLFOLDER pShellFolder;
1310 DWORD dwUserParam;
1311 LPCITEMIDLIST pidl;
1312 DWORD v3; // always 0
1313 SHELLVIEWPROC pCallBack;
1314 DWORD viewmode; // NF_* enum
1315 } SHELLVIEWDATA, * LPSHELLVIEWDATA;
1318 The shell keeps track of some per-user state to handle display
1319 options that is of majorinterest to ISVs.
1320 The key one requested right now is "DoubleClickInWebView".
1322 typedef struct
1323 { BOOL32 fShowAllObjects : 1;
1324 BOOL32 fShowExtensions : 1;
1325 BOOL32 fNoConfirmRecycle : 1;
1326 BOOL32 fShowSysFiles : 1;
1327 BOOL32 fShowCompColor : 1;
1328 BOOL32 fDoubleClickInWebView : 1;
1329 BOOL32 fDesktopHTML : 1;
1330 BOOL32 fWin95Classic : 1;
1331 BOOL32 fDontPrettyPath : 1;
1332 BOOL32 fShowAttribCol : 1;
1333 BOOL32 fMapNetDrvBtn : 1;
1334 BOOL32 fShowInfoTip : 1;
1335 BOOL32 fHideIcons : 1;
1336 UINT32 fRestFlags : 3;
1337 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
1340 #undef PURE
1341 #undef FAR
1342 #undef THIS
1343 #undef THIS_
1344 #undef STDMETHOD
1345 #undef STDMETHOD_
1346 #endif /*_WINE_SHLOBJ_H*/