Reading joystick 5 when we only support 4 should fail instead of
[wine/multimedia.git] / include / shlobj.h
blob67e49e585de04cbfe4305d68e2c90f9e2cd76762
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 /****************************************************************************
20 * DllGetClassObject
22 DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*);
25 typedef LPVOID LPBC; /* *IBindCtx really */
27 /* foreward declaration of the objects*/
28 typedef struct tagPERSISTFILE *LPPERSISTFILE, IPersistFile;
29 typedef struct tagCONTEXTMENU *LPCONTEXTMENU, IContextMenu;
30 typedef struct tagSHELLEXTINIT *LPSHELLEXTINIT,IShellExtInit;
31 typedef struct tagENUMIDLIST *LPENUMIDLIST, IEnumIDList;
32 typedef struct tagSHELLFOLDER *LPSHELLFOLDER, IShellFolder;
33 typedef struct tagSHELLVIEW *LPSHELLVIEW, IShellView;
34 typedef struct tagSHELLBROWSER *LPSHELLBROWSER,IShellBrowser;
35 typedef struct tagDATAOBJECT *LPDATAOBJECT, IDataObject;
36 typedef struct tagSHELLICON *LPSHELLICON, IShellIcon;
37 typedef struct tagDOCKINGWINDOWFRAME *LPDOCKINGWINDOWFRAME, IDockingWindowFrame;
38 typedef struct tagSERVICEPROVIDER *LPSERVICEPROVIDER, IServiceProvider;
39 typedef struct tagCOMMDLGBROWSER *LPCOMMDLGBROWSER, ICommDlgBrowser;
40 typedef struct tagENUMFORMATETC *LPENUMFORMATETC, IEnumFORMATETC;
42 /****************************************************************************
43 * SHELL ID
45 /* desktop elements */
46 DEFINE_GUID (IID_MyComputer, 0x20D04FE0L, 0x3AEA, 0x1069, 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
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);
74 /* shell32 formatids */
75 DEFINE_SHLGUID(FMTID_Intshcut, 0x000214A0L, 0, 0);
76 DEFINE_SHLGUID(FMTID_InternetSite, 0x000214A1L, 0, 0);
77 /* command group ids */
78 DEFINE_SHLGUID(CGID_Explorer, 0x000214D0L, 0, 0);
79 DEFINE_SHLGUID(CGID_ShellDocView, 0x000214D1L, 0, 0);
81 /* shell32interface ids */
82 DEFINE_SHLGUID(IID_INewShortcutHookA, 0x000214E1L, 0, 0);
83 DEFINE_SHLGUID(IID_IShellBrowser, 0x000214E2L, 0, 0);
84 #define SID_SShellBrowser IID_IShellBrowser
85 DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0);
86 DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
87 DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0);
88 DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
89 DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
90 DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
91 DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0);
92 DEFINE_SHLGUID(IID_IShellLink, 0x000214EEL, 0, 0);
93 DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0);
94 DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0);
95 DEFINE_SHLGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0);
96 DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
97 DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
98 DEFINE_SHLGUID(IID_IContextMenu2, 0x000214F4L, 0, 0);
99 DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
100 DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
101 DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0);
102 DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0);
103 DEFINE_SHLGUID(IID_IShellLinkW, 0x000214F9L, 0, 0);
104 DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0);
105 DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0);
106 DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0);
108 /****************************************************************************
109 * STRRET
111 #define STRRET_WSTR 0x0000
112 #define STRRET_OFFSETA 0x0001
113 #define STRRET_CSTRA 0x0002
114 #define STRRET_ASTR 0X0003
115 #define STRRET_OFFSETW 0X0004
116 #define STRRET_CSTRW 0X0005
119 typedef struct _STRRET
120 { UINT32 uType; /* STRRET_xxx */
121 union
122 { LPWSTR pOleStr; /* OLESTR that will be freed */
123 LPSTR pStr;
124 UINT32 uOffset; /* OffsetINT32o SHITEMID (ANSI) */
125 char cStr[MAX_PATH]; /* Buffer to fill in */
126 WCHAR cStrW[MAX_PATH];
128 } STRRET,*LPSTRRET;
129 /*****************************************************************************
130 * IPersistFile interface
132 #define THIS LPPERSISTFILE this
133 typedef struct IPersistFile_VTable
134 { /* *** IUnknown methods *** */
135 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
136 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
137 STDMETHOD_(ULONG,Release) (THIS) PURE;
139 STDMETHOD(GetClassID )(THIS_ CLSID *pClassID) PURE;
140 STDMETHOD(IsDirty )(THIS) PURE;
141 STDMETHOD(Load )(THIS_ LPCOLESTR32 pszFileName, DWORD dwMode) PURE;
142 STDMETHOD(Save )(THIS_ LPCOLESTR32 pszFileName, BOOL32 fRemember) PURE;
143 STDMETHOD(SaveCompleted )(THIS_ LPCOLESTR32 pszFileName) PURE;
144 STDMETHOD(GetCurFile )(THIS_ LPOLESTR32 *ppszFileName) PURE;
146 } IPersistFile_VTable,*LPPERSISTFILE_VTABLE;
148 struct tagPERSISTFILE
149 { LPPERSISTFILE_VTABLE lpvtbl;
150 DWORD ref;
153 #undef THIS
154 /*****************************************************************************
155 * IContextMenu interface
157 #define THIS LPCONTEXTMENU this
159 /* default menu items*/
160 #define IDM_EXPLORE 0
161 #define IDM_OPEN 1
162 #define IDM_RENAME 2
163 #define IDM_LAST IDM_RENAME
165 /* QueryContextMenu uFlags */
166 #define CMF_NORMAL 0x00000000
167 #define CMF_DEFAULTONLY 0x00000001
168 #define CMF_VERBSONLY 0x00000002
169 #define CMF_EXPLORE 0x00000004
170 #define CMF_NOVERBS 0x00000008
171 #define CMF_CANRENAME 0x00000010
172 #define CMF_NODEFAULT 0x00000020
173 #define CMF_INCLUDESTATIC 0x00000040
174 #define CMF_RESERVED 0xffff0000 /* View specific */
176 /* GetCommandString uFlags */
177 #define GCS_VERBA 0x00000000 /* canonical verb */
178 #define GCS_HELPTEXTA 0x00000001 /* help text (for status bar) */
179 #define GCS_VALIDATEA 0x00000002 /* validate command exists */
180 #define GCS_VERBW 0x00000004 /* canonical verb (unicode) */
181 #define GCS_HELPTEXTW 0x00000005 /* help text (unicode version) */
182 #define GCS_VALIDATEW 0x00000006 /* validate command exists (unicode) */
183 #define GCS_UNICODE 0x00000004 /* for bit testing - Unicode string */
185 #define GCS_VERB GCS_VERBA
186 #define GCS_HELPTEXT GCS_HELPTEXTA
187 #define GCS_VALIDATE GCS_VALIDATEA
189 #define CMDSTR_NEWFOLDERA "NewFolder"
190 #define CMDSTR_VIEWLISTA "ViewList"
191 #define CMDSTR_VIEWDETAILSA "ViewDetails"
192 #define CMDSTR_NEWFOLDERW L"NewFolder"
193 #define CMDSTR_VIEWLISTW L"ViewList"
194 #define CMDSTR_VIEWDETAILSW L"ViewDetails"
196 #define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERA
197 #define CMDSTR_VIEWLIST CMDSTR_VIEWLISTA
198 #define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSA
200 #define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
201 #define CMIC_MASK_ICON SEE_MASK_ICON
202 #define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
203 #define CMIC_MASK_UNICODE SEE_MASK_UNICODE
204 #define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
205 #define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
206 #define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
207 #define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
208 #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
210 #define CMIC_MASK_PTINVOKE 0x20000000
212 /*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
213 typedef struct tagCMINVOKECOMMANDINFO
214 { DWORD cbSize; /* sizeof(CMINVOKECOMMANDINFO) */
215 DWORD fMask; /* any combination of CMIC_MASK_* */
216 HWND32 hwnd; /* might be NULL (indicating no owner window) */
217 LPCSTR lpVerb; /* either a string or MAKEINTRESOURCE(idOffset) */
218 LPCSTR lpParameters; /* might be NULL (indicating no parameter) */
219 LPCSTR lpDirectory; /* might be NULL (indicating no specific directory) */
220 INT32 nShow; /* one of SW_ values for ShowWindow() API */
222 DWORD dwHotKey;
223 HANDLE32 hIcon;
224 } CMINVOKECOMMANDINFO32, *LPCMINVOKECOMMANDINFO32;
226 typedef struct tagCMInvokeCommandInfoEx
227 { DWORD cbSize; /* must be sizeof(CMINVOKECOMMANDINFOEX) */
228 DWORD fMask; /* any combination of CMIC_MASK_* */
229 HWND32 hwnd; /* might be NULL (indicating no owner window) */
230 LPCSTR lpVerb; /* either a string or MAKEINTRESOURCE(idOffset) */
231 LPCSTR lpParameters; /* might be NULL (indicating no parameter) */
232 LPCSTR lpDirectory; /* might be NULL (indicating no specific directory) */
233 INT32 nShow; /* one of SW_ values for ShowWindow() API */
235 DWORD dwHotKey;
237 HANDLE32 hIcon;
238 LPCSTR lpTitle; /* For CreateProcess-StartupInfo.lpTitle */
239 LPCWSTR lpVerbW; /* Unicode verb (for those who can use it) */
240 LPCWSTR lpParametersW; /* Unicode parameters (for those who can use it) */
241 LPCWSTR lpDirectoryW; /* Unicode directory (for those who can use it) */
242 LPCWSTR lpTitleW; /* Unicode title (for those who can use it) */
243 POINT32 ptInvoke; /* Point where it's invoked */
245 } CMINVOKECOMMANDINFOEX32, *LPCMINVOKECOMMANDINFOEX32;
248 typedef struct IContextMenu_VTable
249 { /* *** IUnknown methods *** */
250 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
251 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
252 STDMETHOD_(ULONG,Release) (THIS) PURE;
254 STDMETHOD(QueryContextMenu)(THIS_ HMENU32 hmenu,UINT32 indexMenu,UINT32 idCmdFirst, UINT32 idCmdLast,UINT32 uFlags) PURE;
255 STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO32 lpici) PURE;
256 STDMETHOD(GetCommandString)(THIS_ UINT32 idCmd,UINT32 uType,UINT32 * pwReserved,LPSTR pszName,UINT32 cchMax) PURE;
258 /* undocumented not only in ContextMenu2 */
259 STDMETHOD(HandleMenuMsg)(THIS_ UINT32 uMsg,WPARAM32 wParam,LPARAM lParam) PURE;
261 /* possibly another nasty entry from ContextMenu3 ?*/
262 void * guard;
263 } IContextMenu_VTable,*LPCONTEXTMENU_VTABLE;
265 struct tagCONTEXTMENU
266 { LPCONTEXTMENU_VTABLE lpvtbl;
267 DWORD ref;
268 LPSHELLFOLDER pSFParent;
269 LPITEMIDLIST *aPidls;
270 BOOL32 bAllValues;
273 #undef THIS
274 /*****************************************************************************
275 * structures for shell clipboard formats
277 typedef enum tagDVASPECT
278 { DVASPECT_CONTENT = 1,
279 DVASPECT_THUMBNAIL = 2,
280 DVASPECT_ICON = 4,
281 DVASPECT_DOCPRINT = 8
282 } DVASPECT;
284 typedef enum tagTYMED
285 { TYMED_HGLOBAL = 1,
286 TYMED_FILE = 2,
287 TYMED_ISTREAM = 4,
288 TYMED_ISTORAGE = 8,
289 TYMED_GDI = 16,
290 TYMED_MFPICT = 32,
291 TYMED_ENHMF = 64,
292 TYMED_NULL = 0
293 } TYMED;
295 typedef struct
296 { DWORD tdSize;
297 WORD tdDriverNameOffset;
298 WORD tdDeviceNameOffset;
299 WORD tdPortNameOffset;
300 WORD tdExtDevmodeOffset;
301 BYTE tdData[ 1 ];
302 } DVTARGETDEVICE32;
304 typedef WORD CLIPFORMAT32, *LPCLIPFORMAT32;
306 /* dataobject as answer to a request */
307 typedef struct
308 { DWORD tymed;
309 union
310 { HBITMAP32 hBitmap;
311 /*HMETAFILEPICT32 hMetaFilePict;*/
312 /*HENHMETAFILE32 hEnhMetaFile;*/
313 HGLOBAL32 hGlobal;
314 LPOLESTR32 lpszFileName;
315 IStream32 *pstm;
316 IStorage32 *pstg;
317 } u;
318 IUnknown *pUnkForRelease;
319 } STGMEDIUM32;
321 /* wished data format */
322 typedef struct
323 { CLIPFORMAT32 cfFormat;
324 DVTARGETDEVICE32 *ptd;
325 DWORD dwAspect;
326 LONG lindex;
327 DWORD tymed;
328 } FORMATETC32, *LPFORMATETC32;
330 /* shell specific clipboard formats */
332 /* DATAOBJECT_InitShellIDList*/
333 #define CFSTR_SHELLIDLIST "Shell IDList Array" /* CF_IDLIST */
335 extern UINT32 cfShellIDList;
337 typedef struct
338 { UINT32 cidl;
339 UINT32 aoffset[1];
340 } CIDA, *LPCIDA;
342 #define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets" /* CF_OBJECTPOSITIONS */
343 #define CFSTR_NETRESOURCES "Net Resource" /* CF_NETRESOURCE */
345 /* DATAOBJECT_InitFileGroupDesc */
346 #define CFSTR_FILEDESCRIPTORA "FileGroupDescriptor" /* CF_FILEGROUPDESCRIPTORA */
347 extern UINT32 cfFileGroupDesc;
349 #define CFSTR_FILEDESCRIPTORW "FileGroupDescriptorW" /* CF_FILEGROUPDESCRIPTORW */
351 /* DATAOBJECT_InitFileContents*/
352 #define CFSTR_FILECONTENTS "FileContents" /* CF_FILECONTENTS */
353 extern UINT32 cfFileContents;
355 #define CFSTR_FILENAMEA "FileName" /* CF_FILENAMEA */
356 #define CFSTR_FILENAMEW "FileNameW" /* CF_FILENAMEW */
357 #define CFSTR_PRINTERGROUP "PrinterFriendlyName" /* CF_PRINTERS */
358 #define CFSTR_FILENAMEMAPA "FileNameMap" /* CF_FILENAMEMAPA */
359 #define CFSTR_FILENAMEMAPW "FileNameMapW" /* CF_FILENAMEMAPW */
360 #define CFSTR_SHELLURL "UniformResourceLocator"
361 #define CFSTR_PREFERREDDROPEFFECT "Preferred DropEffect"
362 #define CFSTR_PERFORMEDDROPEFFECT "Performed DropEffect"
363 #define CFSTR_PASTESUCCEEDED "Paste Succeeded"
364 #define CFSTR_INDRAGLOOP "InShellDragLoop"
366 /**************************************************************************
367 * IDLList "Item ID List List"
369 * NOTES
370 * interal data holder for IDataObject
372 typedef struct tagLPIDLLIST *LPIDLLIST, IDLList;
374 #define THIS LPIDLLIST this
376 typedef enum
377 { State_UnInit=1,
378 State_Init=2,
379 State_OutOfMem=3
380 } IDLListState;
382 typedef struct IDLList_VTable
383 { STDMETHOD_(UINT32, GetState)(THIS);
384 STDMETHOD_(LPITEMIDLIST, GetElement)(THIS_ UINT32 nIndex);
385 STDMETHOD_(UINT32, GetCount)(THIS);
386 STDMETHOD_(BOOL32, StoreItem)(THIS_ LPITEMIDLIST pidl);
387 STDMETHOD_(BOOL32, AddItems)(THIS_ LPITEMIDLIST *apidl, UINT32 cidl);
388 STDMETHOD_(BOOL32, InitList)(THIS);
389 STDMETHOD_(void, CleanList)(THIS);
390 } IDLList_VTable,*LPIDLLIST_VTABLE;
392 struct tagLPIDLLIST
393 { LPIDLLIST_VTABLE lpvtbl;
394 HDPA dpa;
395 UINT32 uStep;
398 extern LPIDLLIST IDLList_Constructor (UINT32 uStep);
399 extern void IDLList_Destructor(LPIDLLIST this);
400 #undef THIS
401 /*****************************************************************************
402 * IEnumFORMATETC interface
404 #define THIS LPENUMFORMATETC this
406 typedef struct IEnumFORMATETC_VTable
407 { /* IUnknown methods */
408 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
409 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
410 STDMETHOD_(ULONG,Release) (THIS) PURE;
412 /* IEnumFORMATETC methods */
413 STDMETHOD (Next)(THIS_ ULONG celt, FORMATETC32 *rgelt, ULONG *pceltFethed) PURE;
414 STDMETHOD (Skip)(THIS_ ULONG celt) PURE;
415 STDMETHOD (Reset)(THIS) PURE;
416 STDMETHOD (Clone)(THIS_ IEnumFORMATETC ** ppenum) PURE;
417 } IEnumFORMATETC_VTable,*LPENUMFORMATETC_VTABLE;
419 struct tagENUMFORMATETC
420 { LPENUMFORMATETC_VTABLE lpvtbl;
421 DWORD ref;
422 UINT32 posFmt;
423 UINT32 countFmt;
424 LPFORMATETC32 pFmt;
427 #undef THIS
429 /*****************************************************************************
430 * IDataObject interface
432 #define THIS LPDATAOBJECT this
434 typedef struct IDataObject_VTable
435 { /*** IUnknown methods ***/
436 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
437 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
438 STDMETHOD_(ULONG,Release) (THIS) PURE;
440 STDMETHOD (GetData )(THIS_ LPFORMATETC32 pformatetcIn, STGMEDIUM32 *pmedium) PURE;
441 STDMETHOD (GetDataHere)(THIS_ LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium) PURE;
442 STDMETHOD (QueryGetData)(THIS_ LPFORMATETC32 pformatetc) PURE;
443 STDMETHOD (GetCanonicalFormatEtc)(THIS_ LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut) PURE;
444 STDMETHOD (SetData)(THIS_ LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium, BOOL32 fRelease) PURE;
445 STDMETHOD (EnumFormatEtc)(THIS_ DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc) PURE;
446 STDMETHOD (DAdvise )(THIS_ LPFORMATETC32 *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) PURE;
447 STDMETHOD (DUnadvise)(THIS_ DWORD dwConnection) PURE;
448 STDMETHOD (EnumDAdvise)(THIS_ IEnumSTATDATA **ppenumAdvise) PURE;
449 } IDataObject_VTable,*LPDATAOBJECT_VTABLE;
451 struct tagDATAOBJECT
452 { LPDATAOBJECT_VTABLE lpvtbl;
453 DWORD ref;
454 LPSHELLFOLDER psf;
455 LPIDLLIST lpill; /* the data of the dataobject */
456 LPITEMIDLIST pidl;
459 #undef THIS
462 /*****************************************************************************
463 * IShellExtInit interface
465 #define THIS LPSHELLEXTINIT this
467 typedef struct IShellExtInit_VTable
468 { /* *** IUnknown methods *** */
469 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
470 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
471 STDMETHOD_(ULONG,Release) (THIS) PURE;
473 /* *** IShellExtInit methods *** */
474 STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID) PURE;
475 } IShellExtInit_VTable,*LPSHELLEXTINIT_VTABLE;
477 struct tagSHELLEXTINIT
478 { LPSHELLEXTINIT_VTABLE lpvtbl;
479 DWORD ref;
482 #undef THIS
484 /*****************************************************************************
485 * IEnumIDList interface
487 #define THIS LPENUMIDLIST this
489 typedef struct tagENUMLIST
490 { struct tagENUMLIST *pNext;
491 LPITEMIDLIST pidl;
492 } ENUMLIST, *LPENUMLIST;
494 typedef struct IEnumIDList_VTable
495 { /* *** IUnknown methods *** */
496 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
497 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
498 STDMETHOD_(ULONG,Release) (THIS) PURE;
500 /* *** IEnumIDList methods *** */
501 STDMETHOD(Next) (THIS_ ULONG celt,
502 LPITEMIDLIST *rgelt,
503 ULONG *pceltFetched) PURE;
504 STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
505 STDMETHOD(Reset) (THIS) PURE;
506 STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
507 /* *** private methods *** */
508 STDMETHOD_(BOOL32,CreateEnumList)(THIS_ LPCSTR, DWORD) PURE;
509 STDMETHOD_(BOOL32,AddToEnumList)(THIS_ LPITEMIDLIST) PURE;
510 STDMETHOD_(BOOL32,DeleteList)(THIS) PURE;
513 } IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
515 struct tagENUMIDLIST
516 { LPENUMIDLIST_VTABLE lpvtbl;
517 DWORD ref;
518 LPENUMLIST mpFirst;
519 LPENUMLIST mpLast;
520 LPENUMLIST mpCurrent;
523 #undef THIS
524 /*-------------------------------------------------------------------------- */
525 /* */
526 /* FOLDERSETTINGS */
527 /* */
528 /* FOLDERSETTINGS is a data structure that explorer passes from one folder */
529 /* view to another, when the user is browsing. It calls ISV::GetCurrentInfo */
530 /* member to get the current settings and pass it to ISV::CreateViewWindow */
531 /* to allow the next folder view "inherit" it. These settings assumes a */
532 /* particular UI (which the shell's folder view has), and shell extensions */
533 /* may or may not use those settings. */
534 /* */
535 /*-------------------------------------------------------------------------- */
537 typedef LPBYTE LPVIEWSETTINGS;
539 /* NB Bitfields. */
540 /* FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL */
541 typedef enum
542 { FWF_AUTOARRANGE = 0x0001,
543 FWF_ABBREVIATEDNAMES = 0x0002,
544 FWF_SNAPTOGRID = 0x0004,
545 FWF_OWNERDATA = 0x0008,
546 FWF_BESTFITWINDOW = 0x0010,
547 FWF_DESKTOP = 0x0020,
548 FWF_SINGLESEL = 0x0040,
549 FWF_NOSUBFOLDERS = 0x0080,
550 FWF_TRANSPARENT = 0x0100,
551 FWF_NOCLIENTEDGE = 0x0200,
552 FWF_NOSCROLL = 0x0400,
553 FWF_ALIGNLEFT = 0x0800,
554 FWF_SINGLECLICKACTIVATE=0x8000 /* TEMPORARY -- NO UI FOR THIS */
555 } FOLDERFLAGS;
557 typedef enum
558 { FVM_ICON = 1,
559 FVM_SMALLICON = 2,
560 FVM_LIST = 3,
561 FVM_DETAILS = 4
562 } FOLDERVIEWMODE;
564 typedef struct
565 { UINT32 ViewMode; /* View mode (FOLDERVIEWMODE values) */
566 UINT32 fFlags; /* View options (FOLDERFLAGS bits) */
567 } FOLDERSETTINGS, *LPFOLDERSETTINGS;
569 typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
571 /************************************************************************
572 * IShellFolder interface
575 #define THIS LPSHELLFOLDER this
577 /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
578 typedef enum
579 { SHGDN_NORMAL = 0, /* default (display purpose) */
580 SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
581 SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
582 } SHGNO;
584 /* IShellFolder::EnumObjects */
585 typedef enum tagSHCONTF
586 { SHCONTF_FOLDERS = 32, /* for shell browser */
587 SHCONTF_NONFOLDERS = 64, /* for default view */
588 SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
589 } SHCONTF;
591 /* from oleidl.h */
592 #define DROPEFFECT_NONE 0
593 #define DROPEFFECT_COPY 1
594 #define DROPEFFECT_MOVE 2
595 #define DROPEFFECT_LINK 4
596 #define DROPEFFECT_SCROLL 0x80000000
598 /* IShellFolder::GetAttributesOf flags */
599 #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
600 #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
601 #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
602 #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
603 #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
604 #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
605 #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
606 #define SFGAO_CAPABILITYMASK 0x00000177L
607 #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
608 #define SFGAO_SHARE 0x00020000L /* shared */
609 #define SFGAO_READONLY 0x00040000L /* read-only */
610 #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
611 #define SFGAO_DISPLAYATTRMASK 0x000F0000L
612 #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
613 #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
614 #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
615 #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
616 #define SFGAO_CONTENTSMASK 0x80000000L
617 #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
618 #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
620 typedef struct IShellFolder_VTable {
621 /* *** IUnknown methods *** */
622 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
623 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
624 STDMETHOD_(ULONG,Release) (THIS) PURE;
626 /* *** IShellFolder methods *** */
627 STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,LPBC pbcReserved, LPOLESTR32 lpszDisplayName,ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
628 STDMETHOD(EnumObjects)( THIS_ HWND32 hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList) PURE;
629 STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvOut) PURE;
630 STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvObj) PURE;
631 STDMETHOD(CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
632 STDMETHOD(CreateViewObject)(THIS_ HWND32 hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
633 STDMETHOD(GetAttributesOf)(THIS_ UINT32 cidl, LPCITEMIDLIST * apidl,ULONG * rgfInOut) PURE;
634 STDMETHOD(GetUIObjectOf)(THIS_ HWND32 hwndOwner, UINT32 cidl, LPCITEMIDLIST * apidl,REFIID riid, UINT32 * prgfInOut, LPVOID * ppvOut) PURE;
635 STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
636 STDMETHOD(SetNameOf)(THIS_ HWND32 hwndOwner, LPCITEMIDLIST pidl,LPCOLESTR32 lpszName, DWORD uFlags,LPITEMIDLIST * ppidlOut) PURE;
638 /* utility functions */
639 STDMETHOD_(BOOL32,GetFolderPath)(THIS_ LPSTR, DWORD);
641 } *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
643 struct tagSHELLFOLDER {
644 LPSHELLFOLDER_VTABLE lpvtbl;
645 DWORD ref;
646 LPSTR sMyPath;
647 LPITEMIDLIST pMyPidl;
648 LPITEMIDLIST mpidl;
649 LPSHELLFOLDER mpSFParent;
652 extern LPSHELLFOLDER pdesktopfolder;
654 /************************
655 * Shellfolder API
657 DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *);
658 #undef THIS
660 /************************************************************************
661 * IShellBrowser interface
663 #define THIS LPSHELLBROWSER this
664 /* targets for GetWindow/SendControlMsg */
665 #define FCW_STATUS 0x0001
666 #define FCW_TOOLBAR 0x0002
667 #define FCW_TREE 0x0003
668 #define FCW_INTERNETBAR 0x0006
669 #define FCW_PROGRESS 0x0008
671 /* wFlags for BrowseObject*/
672 #define SBSP_DEFBROWSER 0x0000
673 #define SBSP_SAMEBROWSER 0x0001
674 #define SBSP_NEWBROWSER 0x0002
676 #define SBSP_DEFMODE 0x0000
677 #define SBSP_OPENMODE 0x0010
678 #define SBSP_EXPLOREMODE 0x0020
680 #define SBSP_ABSOLUTE 0x0000
681 #define SBSP_RELATIVE 0x1000
682 #define SBSP_PARENT 0x2000
683 #define SBSP_NAVIGATEBACK 0x4000
684 #define SBSP_NAVIGATEFORWARD 0x8000
686 #define SBSP_ALLOW_AUTONAVIGATE 0x10000
688 #define SBSP_INITIATEDBYHLINKFRAME 0x80000000
689 #define SBSP_REDIRECT 0x40000000
690 #define SBSP_WRITENOHISTORY 0x08000000
692 /* uFlage for SetToolbarItems */
693 #define FCT_MERGE 0x0001
694 #define FCT_CONFIGABLE 0x0002
695 #define FCT_ADDTOEND 0x0004
697 /* undocumented, found in the web posted by Chris Becke */
698 #define CWM_SETPATH (WM_USER+2)
699 #define CWM_WANTIDLE (WM_USER+3)
700 #define CWM_GETSETCURRENTINFO (WM_USER+4)
701 #define CWM_SELECTITEM (WM_USER+5)
702 #define CWM_STOPWAITING (WM_USER+6)
703 #define CWM_GETISHELLBROWSER (WM_USER+7)
705 typedef struct IShellBrowser_VTable
706 { /* *** IUnknown methods *** */
707 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
708 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
709 STDMETHOD_(ULONG,Release) (THIS) PURE;
711 /* *** IOleWindow methods *** */
712 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
713 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
715 /* *** IShellBrowser methods *** (same as IOleInPlaceFrame) */
716 STDMETHOD(InsertMenusSB) (THIS_ HMENU32 hmenuShared, LPOLEMENUGROUPWIDTHS32 lpMenuWidths) PURE;
717 STDMETHOD(SetMenuSB) (THIS_ HMENU32 hmenuShared, HOLEMENU32 holemenuReserved, HWND32 hwndActiveObject) PURE;
718 STDMETHOD(RemoveMenusSB) (THIS_ HMENU32 hmenuShared) PURE;
719 STDMETHOD(SetStatusTextSB) (THIS_ LPCOLESTR32 lpszStatusText) PURE;
720 STDMETHOD(EnableModelessSB) (THIS_ BOOL32 fEnable) PURE;
721 STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG32 lpmsg, WORD wID) PURE;
723 /* *** IShellBrowser methods *** */
724 STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST pidl, UINT32 wFlags) PURE;
725 STDMETHOD(GetViewStateStream)(THIS_ DWORD grfMode, LPSTREAM32 *ppStrm) PURE;
726 STDMETHOD(GetControlWindow)(THIS_ UINT32 id, HWND32 * lphwnd) PURE;
727 STDMETHOD(SendControlMsg)(THIS_ UINT32 id, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, LRESULT * pret) PURE;
728 STDMETHOD(QueryActiveShellView)(THIS_ IShellView ** ppshv) PURE;
729 STDMETHOD(OnViewWindowActive)(THIS_ IShellView * ppshv) PURE;
730 STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON lpButtons, UINT32 nButtons, UINT32 uFlags) PURE;
731 } *LPSHELLBROWSER_VTABLE,IShellBrowser_VTable;
733 struct tagSHELLBROWSER
734 { LPSHELLBROWSER_VTABLE lpvtbl;
735 DWORD ref;
738 #undef THIS
740 /************************************************************************
741 * IShellView interface
743 #define THIS LPSHELLVIEW this
745 /* shellview select item flags*/
746 #define SVSI_DESELECT 0x0000
747 #define SVSI_SELECT 0x0001
748 #define SVSI_EDIT 0x0003 /* includes select */
749 #define SVSI_DESELECTOTHERS 0x0004
750 #define SVSI_ENSUREVISIBLE 0x0008
751 #define SVSI_FOCUSED 0x0010
753 /* shellview get item object flags */
754 #define SVGIO_BACKGROUND 0x00000000
755 #define SVGIO_SELECTION 0x00000001
756 #define SVGIO_ALLVIEW 0x00000002
758 /* The explorer dispatches WM_COMMAND messages based on the range of
759 command/menuitem IDs. All the IDs of menuitems that the view (right
760 pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
761 won't dispatch them). The view should not deal with any menuitems
762 in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
763 version of the shell).
765 FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
766 FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
767 FCIDM_GLOBAL/LAST for the explorer's submenu IDs
769 #define FCIDM_SHVIEWFIRST 0x0000
770 /* undocumented */
771 #define FCIDM_SHVIEW_ARRANGE 0x7001
772 #define FCIDM_SHVIEW_DELETE 0x7011
773 #define FCIDM_SHVIEW_PROPERTIES 0x7013
774 #define FCIDM_SHVIEW_CUT 0x7018
775 #define FCIDM_SHVIEW_COPY 0x7019
776 #define FCIDM_SHVIEW_INSERT 0x701A
777 #define FCIDM_SHVIEW_UNDO 0x701B
778 #define FCIDM_SHVIEW_INSERTLINK 0x701C
779 #define FCIDM_SHVIEW_SELECTALL 0x7021
780 #define FCIDM_SHVIEW_INVERTSELECTION 0x7022
781 #define FCIDM_SHVIEW_BIGICON 0x7029
782 #define FCIDM_SHVIEW_SMALLICON 0x702A
783 #define FCIDM_SHVIEW_LISTVIEW 0x702B
784 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
785 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
786 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
787 #define FCIDM_SHVIEW_HELP 0x7041
789 #define FCIDM_SHVIEWLAST 0x7fff
790 #define FCIDM_BROWSERFIRST 0xA000
791 /* undocumented toolbar items from stddlg's*/
792 #define FCIDM_TB_SMALLICON 0xA003
793 #define FCIDM_TB_REPORTVIEW 0xA004
795 #define FCIDM_BROWSERLAST 0xbf00
796 #define FCIDM_GLOBALFIRST 0x8000
797 #define FCIDM_GLOBALLAST 0x9fff
800 * Global submenu IDs and separator IDs
802 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
803 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
804 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
805 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
806 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
807 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
808 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
809 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
810 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
811 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
813 /* control IDs known to the view */
814 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
815 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
817 /* uState values for IShellView::UIActivate */
818 typedef enum
819 { SVUIA_DEACTIVATE = 0,
820 SVUIA_ACTIVATE_NOFOCUS = 1,
821 SVUIA_ACTIVATE_FOCUS = 2,
822 SVUIA_INPLACEACTIVATE = 3 /* new flag for IShellView2 */
823 } SVUIA_STATUS;
827 typedef struct IShellView_VTable
828 { /* *** IUnknown methods *** */
829 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
830 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
831 STDMETHOD_(ULONG,Release) (THIS) PURE;
833 /* *** IOleWindow methods *** */
834 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
835 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
837 /* *** IShellView methods *** */
838 STDMETHOD(TranslateAccelerator) (THIS_ LPMSG32 lpmsg) PURE;
839 STDMETHOD(EnableModeless) (THIS_ BOOL32 fEnable) PURE;
840 STDMETHOD(UIActivate) (THIS_ UINT32 uState) PURE;
841 STDMETHOD(Refresh) (THIS) PURE;
842 STDMETHOD(CreateViewWindow)(THIS_ IShellView *lpPrevView,LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,RECT32 * prcView, HWND32 *phWnd) PURE;
843 STDMETHOD(DestroyViewWindow)(THIS) PURE;
844 STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS lpfs) PURE;
845 STDMETHOD(AddPropertySheetPages)(THIS_ DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) PURE;
846 STDMETHOD(SaveViewState)(THIS) PURE;
847 STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST pidlItem, UINT32 uFlags) PURE;
848 STDMETHOD(GetItemObject)(THIS_ UINT32 uItem, REFIID riid,LPVOID *ppv) PURE;
849 } IShellView_VTable,*LPSHELLVIEW_VTABLE;
851 struct tagSHELLVIEW
852 { LPSHELLVIEW_VTABLE lpvtbl;
853 DWORD ref;
854 LPITEMIDLIST mpidl;
855 LPSHELLFOLDER pSFParent;
856 LPSHELLBROWSER pShellBrowser;
857 LPCOMMDLGBROWSER pCommDlgBrowser;
858 HWND32 hWnd;
859 HWND32 hWndList;
860 HWND32 hWndParent;
861 FOLDERSETTINGS FolderSettings;
862 HMENU32 hMenu;
863 UINT32 uState;
864 UINT32 uSelected;
865 LPITEMIDLIST *aSelectedItems;
868 typedef GUID SHELLVIEWID;
869 #define SV_CLASS_NAME ("SHELLDLL_DefView")
871 #undef THIS
872 /****************************************************************************
873 * ICommDlgBrowser interface
875 #define THIS LPCOMMDLGBROWSER this
877 /* for OnStateChange*/
878 #define CDBOSC_SETFOCUS 0x00000000
879 #define CDBOSC_KILLFOCUS 0x00000001
880 #define CDBOSC_SELCHANGE 0x00000002
881 #define CDBOSC_RENAME 0x00000003
883 typedef struct ICommDlgBrowser_VTable
884 { /* IUnknown methods */
885 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
886 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
887 STDMETHOD_(ULONG,Release) (THIS) PURE;
889 /* ICommDlgBrowser methods */
890 STDMETHOD(OnDefaultCommand) (THIS_ LPSHELLVIEW ppshv) PURE;
891 STDMETHOD(OnStateChange) (THIS_ LPSHELLVIEW ppshv, ULONG uChange) PURE;
892 STDMETHOD(IncludeObject) (THIS_ LPSHELLVIEW ppshv, LPCITEMIDLIST pidl) PURE;
893 } ICommDlgBrowser_VTable,*LPCOMMDLGBROWSER_VTABLE;
895 struct tagCOMMDLGBROWSER
896 { LPCOMMDLGBROWSER_VTABLE lpvtbl;
897 DWORD ref;
899 #undef THIS
900 /****************************************************************************
901 * IShellLink interface
904 #define THIS LPSHELLLINK this
905 /* IShellLink::Resolve fFlags */
906 typedef enum {
907 SLR_NO_UI = 0x0001,
908 SLR_ANY_MATCH = 0x0002,
909 SLR_UPDATE = 0x0004
910 } SLR_FLAGS;
912 /* IShellLink::GetPath fFlags */
913 typedef enum {
914 SLGP_SHORTPATH = 0x0001,
915 SLGP_UNCPRIORITY = 0x0002
916 } SLGP_FLAGS;
920 typedef struct IShellLink IShellLink,*LPSHELLLINK;
921 typedef struct IShellLink_VTable
923 /* *** IUnknown methods *** */
924 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
925 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
926 STDMETHOD_(ULONG,Release) (THIS) PURE;
928 STDMETHOD(GetPath)(THIS_ LPSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
930 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
931 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
933 STDMETHOD(GetDescription)(THIS_ LPSTR pszName,INT32 cchMaxName) PURE;
934 STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE;
936 STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir,INT32 cchMaxPath) PURE;
937 STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE;
939 STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs,INT32 cchMaxPath) PURE;
940 STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE;
942 STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
943 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
945 STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
946 STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
948 STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
949 STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath,INT32 iIcon) PURE;
951 STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
953 STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
955 STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
956 } IShellLink_VTable,*LPSHELLLINK_VTABLE;
958 struct IShellLink {
959 LPSHELLLINK_VTABLE lpvtbl;
960 DWORD ref;
961 /* IPersistfile interface */
962 LPPERSISTFILE lppf;
965 #undef THIS
967 #define THIS LPSHELLLINKW this
969 typedef struct IShellLinkW IShellLinkW,*LPSHELLLINKW;
970 typedef struct IShellLinkW_VTable
972 /* *** IUnknown methods *** */
973 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
974 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
975 STDMETHOD_(ULONG,Release) (THIS) PURE;
977 STDMETHOD(GetPath)(THIS_ LPWSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
979 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
980 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
982 STDMETHOD(GetDescription)(THIS_ LPWSTR pszName,INT32 cchMaxName) PURE;
983 STDMETHOD(SetDescription)(THIS_ LPCWSTR pszName) PURE;
985 STDMETHOD(GetWorkingDirectory)(THIS_ LPWSTR pszDir,INT32 cchMaxPath) PURE;
986 STDMETHOD(SetWorkingDirectory)(THIS_ LPCWSTR pszDir) PURE;
988 STDMETHOD(GetArguments)(THIS_ LPWSTR pszArgs,INT32 cchMaxPath) PURE;
989 STDMETHOD(SetArguments)(THIS_ LPCWSTR pszArgs) PURE;
991 STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
992 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
994 STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
995 STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
997 STDMETHOD(GetIconLocation)(THIS_ LPWSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
998 STDMETHOD(SetIconLocation)(THIS_ LPCWSTR pszIconPath,INT32 iIcon) PURE;
1000 STDMETHOD(SetRelativePath)(THIS_ LPCWSTR pszPathRel, DWORD dwReserved) PURE;
1002 STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
1004 STDMETHOD(SetPath)(THIS_ LPCWSTR pszFile) PURE;
1005 } IShellLinkW_VTable,*LPSHELLLINKW_VTABLE;
1007 struct IShellLinkW {
1008 LPSHELLLINKW_VTABLE lpvtbl;
1009 DWORD ref;
1010 /* IPersistfile interface */
1011 LPPERSISTFILE lppf;
1014 #undef THIS
1016 /****************************************************************************
1017 * IExtractIconinterface
1019 * FIXME
1020 * Is the ExtractIconA interface
1022 #define THIS LPEXTRACTICON this
1024 /* GetIconLocation() input flags*/
1025 #define GIL_OPENICON 0x0001 /* allows containers to specify an "open" look */
1026 #define GIL_FORSHELL 0x0002 /* icon is to be displayed in a ShellFolder */
1027 #define GIL_ASYNC 0x0020 /* this is an async extract, return E_ASYNC */
1029 /* GetIconLocation() return flags */
1030 #define GIL_SIMULATEDOC 0x0001 /* simulate this document icon for this */
1031 #define GIL_PERINSTANCE 0x0002 /* icons from this class are per instance (each file has its own) */
1032 #define GIL_PERCLASS 0x0004 /* icons from this class per class (shared for all files of this type) */
1033 #define GIL_NOTFILENAME 0x0008 /* location is not a filename, must call ::ExtractIcon */
1034 #define GIL_DONTCACHE 0x0010 /* this icon should not be cached */
1036 typedef struct IExtractIcon IExtractIcon,*LPEXTRACTICON;
1037 typedef struct IExtractIcon_VTable
1038 { /*** IUnknown methods ***/
1039 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1040 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1041 STDMETHOD_(ULONG,Release) (THIS) PURE;
1043 /*** IExtractIcon methods ***/
1044 STDMETHOD(GetIconLocation)(THIS_ UINT32 uFlags, LPSTR szIconFile, UINT32 cchMax,INT32 * piIndex, UINT32 * pwFlags) PURE;
1045 STDMETHOD(Extract)(THIS_ LPCSTR pszFile, UINT32 nIconIndex, HICON32 *phiconLarge, HICON32 *phiconSmall, UINT32 nIconSize) PURE;
1046 }IExtractIcon_VTable,*LPEXTRACTICON_VTABLE;
1048 struct IExtractIcon
1049 { LPEXTRACTICON_VTABLE lpvtbl;
1050 DWORD ref;
1051 LPITEMIDLIST pidl;
1054 #undef THIS
1056 DWORD WINAPI SHMapPIDLToSystemImageListIndex(LPSHELLFOLDER sh,LPITEMIDLIST pidl,DWORD z);
1058 /****************************************************************************
1059 * IShellIcon interface
1062 #define THIS LPSHELLICON this
1064 typedef struct IShellIcon_VTable
1065 { /*** IUnknown methods ***/
1066 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1067 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1068 STDMETHOD_(ULONG,Release) (THIS) PURE;
1070 /*** IShellIcon methods ***/
1071 STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT32 flags, LPINT32 lpIconIndex) PURE;
1072 } IShellIcon_VTable,*LPSHELLICON_VTABLE;
1074 struct tagSHELLICON
1075 { LPSHELLICON_VTABLE lpvtbl;
1076 DWORD ref;
1078 #undef THIS
1079 /****************************************************************************
1080 * IDockingWindowFrame interface
1082 #define THIS LPDOCKINGWINDOWFRAME this
1084 #define DWFRF_NORMAL 0x0000 /* femove toolbar flags*/
1085 #define DWFRF_DELETECONFIGDATA 0x0001
1086 #define DWFAF_HIDDEN 0x0001 /* add tolbar*/
1088 typedef struct IDockingWindowFrame_VTable
1089 { STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1090 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1091 STDMETHOD_(ULONG,Release) (THIS) PURE;
1093 /*** IOleWindow methods ***/
1094 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
1095 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
1097 /*** IDockingWindowFrame methods ***/
1098 STDMETHOD(AddToolbar) (THIS_ IUnknown* punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags) PURE;
1099 STDMETHOD(RemoveToolbar) (THIS_ IUnknown* punkSrc, DWORD dwRemoveFlags) PURE;
1100 STDMETHOD(FindToolbar) (THIS_ LPCWSTR pwszItem, REFIID riid, LPVOID* ppvObj) PURE;
1101 } IDockingWindowFrame_VTable, *LPDOCKINGWINDOWFRAME_VTABLE;
1103 struct tagDOCKINGWINDOWFRAME
1104 { LPDOCKINGWINDOWFRAME_VTABLE lpvtbl;
1105 DWORD ref;
1108 #undef THIS
1109 /****************************************************************************
1110 * IServiceProvider interface
1112 #define THIS LPSERVICEPROVIDER this
1114 typedef struct IServiceProvider_VTable
1115 { /*** IUnknown methods ***/
1116 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1117 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1118 STDMETHOD_(ULONG,Release) (THIS) PURE;
1120 STDMETHOD(QueryService)(THIS_ REFGUID guidService, REFIID riid, void **ppvObject);
1121 } IServiceProvider_VTable, *LPSERVICEPROVIDER_VTABLE;
1123 struct tagSERVICEPROVIDER
1124 { LPSERVICEPROVIDER_VTABLE lpvtbl;
1125 DWORD ref;
1127 /****************************************************************************
1128 * Shell Execute API
1130 #define SE_ERR_FNF 2 /* file not found */
1131 #define SE_ERR_PNF 3 /* path not found */
1132 #define SE_ERR_ACCESSDENIED 5 /* access denied */
1133 #define SE_ERR_OOM 8 /* out of memory */
1134 #define SE_ERR_DLLNOTFOUND 32
1135 #define SE_ERR_SHARE 26
1136 #define SE_ERR_ASSOCINCOMPLETE 27
1137 #define SE_ERR_DDETIMEOUT 28
1138 #define SE_ERR_DDEFAIL 29
1139 #define SE_ERR_DDEBUSY 30
1140 #define SE_ERR_NOASSOC 31
1142 #define SEE_MASK_CLASSNAME 0x00000001
1143 #define SEE_MASK_CLASSKEY 0x00000003
1144 #define SEE_MASK_IDLIST 0x00000004
1145 #define SEE_MASK_INVOKEIDLIST 0x0000000c
1146 #define SEE_MASK_ICON 0x00000010
1147 #define SEE_MASK_HOTKEY 0x00000020
1148 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
1149 #define SEE_MASK_CONNECTNETDRV 0x00000080
1150 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
1151 #define SEE_MASK_DOENVSUBST 0x00000200
1152 #define SEE_MASK_FLAG_NO_UI 0x00000400
1153 #define SEE_MASK_UNICODE 0x00004000
1154 #define SEE_MASK_NO_CONSOLE 0x00008000
1155 #define SEE_MASK_ASYNCOK 0x00100000
1156 #define SEE_MASK_HMONITOR 0x00200000
1158 typedef struct _SHELLEXECUTEINFOA
1159 { DWORD cbSize;
1160 ULONG fMask;
1161 HWND32 hwnd;
1162 LPCSTR lpVerb;
1163 LPCSTR lpFile;
1164 LPCSTR lpParameters;
1165 LPCSTR lpDirectory;
1166 INT32 nShow;
1167 HINSTANCE32 hInstApp;
1168 /* Optional fields */
1169 LPVOID lpIDList;
1170 LPCSTR lpClass;
1171 HKEY hkeyClass;
1172 DWORD dwHotKey;
1173 union
1174 { HANDLE32 hIcon;
1175 HANDLE32 hMonitor;
1176 } u;
1177 HANDLE32 hProcess;
1178 } SHELLEXECUTEINFO32A, *LPSHELLEXECUTEINFO32A;
1180 typedef struct _SHELLEXECUTEINFOW
1181 { DWORD cbSize;
1182 ULONG fMask;
1183 HWND32 hwnd;
1184 LPCWSTR lpVerb;
1185 LPCWSTR lpFile;
1186 LPCWSTR lpParameters;
1187 LPCWSTR lpDirectory;
1188 INT32 nShow;
1189 HINSTANCE32 hInstApp;
1190 /* Optional fields*/
1191 LPVOID lpIDList;
1192 LPCWSTR lpClass;
1193 HKEY hkeyClass;
1194 DWORD dwHotKey;
1195 union
1196 { HANDLE32 hIcon;
1197 HANDLE32 hMonitor;
1198 } u;
1199 HANDLE32 hProcess;
1200 } SHELLEXECUTEINFO32W, *LPSHELLEXECUTEINFO32W;
1202 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
1203 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
1205 BOOL32 WINAPI ShellExecuteEx32A(LPSHELLEXECUTEINFO32A lpExecInfo);
1206 BOOL32 WINAPI ShellExecuteEx32W(LPSHELLEXECUTEINFO32W lpExecInfo);
1207 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
1209 void WINAPI WinExecError32A(HWND32 hwnd,INT32 error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
1210 void WINAPI WinExecError32W(HWND32 hwnd,INT32 error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
1211 #define WinExecError WINELIB_NAME_AW(WinExecError)
1215 /****************************************************************************
1216 * SHBrowseForFolder API
1218 typedef INT32 (CALLBACK* BFFCALLBACK)(HWND32 hwnd, UINT32 uMsg, LPARAM lParam, LPARAM lpData);
1220 typedef struct tagBROWSEINFO32A {
1221 HWND32 hwndOwner;
1222 LPCITEMIDLIST pidlRoot;
1223 LPSTR pszDisplayName;
1224 LPCSTR lpszTitle;
1225 UINT32 ulFlags;
1226 BFFCALLBACK lpfn;
1227 LPARAM lParam;
1228 INT32 iImage;
1229 } BROWSEINFO32A, *PBROWSEINFO32A, *LPBROWSEINFO32A;
1231 typedef struct tagBROWSEINFO32W {
1232 HWND32 hwndOwner;
1233 LPCITEMIDLIST pidlRoot;
1234 LPWSTR pszDisplayName;
1235 LPCWSTR lpszTitle;
1236 UINT32 ulFlags;
1237 BFFCALLBACK lpfn;
1238 LPARAM lParam;
1239 INT32 iImage;
1240 } BROWSEINFO32W, *PBROWSEINFO32W, *LPBROWSEINFO32W;
1242 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
1243 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
1244 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
1246 /* Browsing for directory. */
1247 #define BIF_RETURNONLYFSDIRS 0x0001
1248 #define BIF_DONTGOBELOWDOMAIN 0x0002
1249 #define BIF_STATUSTEXT 0x0004
1250 #define BIF_RETURNFSANCESTORS 0x0008
1251 #define BIF_EDITBOX 0x0010
1252 #define BIF_VALIDATE 0x0020
1254 #define BIF_BROWSEFORCOMPUTER 0x1000
1255 #define BIF_BROWSEFORPRINTER 0x2000
1256 #define BIF_BROWSEINCLUDEFILES 0x4000
1258 /* message from browser */
1259 #define BFFM_INITIALIZED 1
1260 #define BFFM_SELCHANGED 2
1261 #define BFFM_VALIDATEFAILEDA 3 /* lParam:szPath ret:1(cont),0(EndDialog) */
1262 #define BFFM_VALIDATEFAILEDW 4 /* lParam:wzPath ret:1(cont),0(EndDialog) */
1264 /* messages to browser */
1265 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
1266 #define BFFM_ENABLEOK (WM_USER+101)
1267 #define BFFM_SETSELECTIONA (WM_USER+102)
1268 #define BFFM_SETSELECTIONW (WM_USER+103)
1269 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
1272 #ifdef UNICODE
1273 #define SHBrowseForFolder SHBrowseForFolderW
1274 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
1275 #define BFFM_SETSELECTION BFFM_SETSELECTIONW
1277 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
1278 #else
1279 #define SHBrowseForFolder SHBrowseForFolderA
1280 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
1281 #define BFFM_SETSELECTION BFFM_SETSELECTIONA
1283 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
1284 #endif
1287 LPITEMIDLIST WINAPI SHBrowseForFolder32A(LPBROWSEINFO32A lpbi);
1288 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
1289 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
1291 /****************************************************************************
1292 * shlview structures
1296 * IShellFolderViewCallback Callback
1297 * This "callback" is called by the shells default IShellView implementation (that
1298 * we got using SHCreateShellViewEx()), to notify us of the various things that
1299 * are happening to the shellview (and ask for things too).
1301 * You don't have to support anything here - anything you don't want to
1302 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
1303 * that the shell passes to this function are entirely undocumented.
1305 * HOWEVER, as the cabview sample as originally written used this callback, the
1306 * writers implemented the callback mechanism on top of their own IShellView.
1307 * Look there for some clues on what to do here.
1310 typedef HRESULT(CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
1311 HWND32 hwnd,UINT32 uMsg,UINT32 wParam,LPARAM lParam);
1313 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
1314 #define NF_INHERITVIEW 0x0000
1315 #define NF_LOCALVIEW 0x0001
1317 typedef struct _SHELLVIEWDATA /* idl */
1318 { DWORD dwSize;
1319 LPSHELLFOLDER pShellFolder;
1320 DWORD dwUserParam;
1321 LPCITEMIDLIST pidl;
1322 DWORD v3; /* always 0 */
1323 SHELLVIEWPROC pCallBack;
1324 DWORD viewmode; /* NF_* enum */
1325 } SHELLVIEWDATA, * LPSHELLVIEWDATA;
1328 The shell keeps track of some per-user state to handle display
1329 options that is of majorinterest to ISVs.
1330 The key one requested right now is "DoubleClickInWebView".
1332 typedef struct
1333 { BOOL32 fShowAllObjects : 1;
1334 BOOL32 fShowExtensions : 1;
1335 BOOL32 fNoConfirmRecycle : 1;
1336 BOOL32 fShowSysFiles : 1;
1337 BOOL32 fShowCompColor : 1;
1338 BOOL32 fDoubleClickInWebView : 1;
1339 BOOL32 fDesktopHTML : 1;
1340 BOOL32 fWin95Classic : 1;
1341 BOOL32 fDontPrettyPath : 1;
1342 BOOL32 fShowAttribCol : 1;
1343 BOOL32 fMapNetDrvBtn : 1;
1344 BOOL32 fShowInfoTip : 1;
1345 BOOL32 fHideIcons : 1;
1346 UINT32 fRestFlags : 3;
1347 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
1350 #undef PURE
1351 #undef FAR
1352 #undef THIS
1353 #undef THIS_
1354 #undef STDMETHOD
1355 #undef STDMETHOD_
1356 #endif /*_WINE_SHLOBJ_H*/