11 #include "interfaces.h"
13 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
14 #define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
19 /****************************************************************************
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 /****************************************************************************
45 /* desktop elements */
46 DEFINE_GUID (IID_MyComputer, 0x20D04FE0L, 0x3AEA, 0x1069, 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
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 /****************************************************************************
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 */
122 { LPWSTR pOleStr; /* OLESTR that will be freed */
124 UINT32 uOffset; /* OffsetINT32o SHITEMID (ANSI) */
125 char cStr[MAX_PATH]; /* Buffer to fill in */
126 WCHAR cStrW[MAX_PATH];
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;
154 /*****************************************************************************
155 * IContextMenu interface
157 #define THIS LPCONTEXTMENU this
159 /* default menu items*/
160 #define IDM_EXPLORE 0
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
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
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 ?*/
263 } IContextMenu_VTable,*LPCONTEXTMENU_VTABLE;
265 struct tagCONTEXTMENU
266 { LPCONTEXTMENU_VTABLE lpvtbl;
268 LPSHELLFOLDER pSFParent;
269 LPITEMIDLIST *aPidls;
274 /*****************************************************************************
275 * structures for shell clipboard formats
277 typedef enum tagDVASPECT
278 { DVASPECT_CONTENT = 1,
279 DVASPECT_THUMBNAIL = 2,
281 DVASPECT_DOCPRINT = 8
284 typedef enum tagTYMED
297 WORD tdDriverNameOffset;
298 WORD tdDeviceNameOffset;
299 WORD tdPortNameOffset;
300 WORD tdExtDevmodeOffset;
304 typedef WORD CLIPFORMAT32, *LPCLIPFORMAT32;
306 /* dataobject as answer to a request */
311 /*HMETAFILEPICT32 hMetaFilePict;*/
312 /*HENHMETAFILE32 hEnhMetaFile;*/
314 LPOLESTR32 lpszFileName;
318 IUnknown *pUnkForRelease;
321 /* wished data format */
323 { CLIPFORMAT32 cfFormat;
324 DVTARGETDEVICE32 *ptd;
328 } FORMATETC32, *LPFORMATETC32;
330 /* shell specific clipboard formats */
332 /* DATAOBJECT_InitShellIDList*/
333 #define CFSTR_SHELLIDLIST TEXT("Shell IDList Array") /* CF_IDLIST */
335 extern UINT32 cfShellIDList;
342 #define CFSTR_SHELLIDLISTOFFSET TEXT("Shell Object Offsets") /* CF_OBJECTPOSITIONS */
343 #define CFSTR_NETRESOURCES TEXT("Net Resource") /* CF_NETRESOURCE */
345 /* DATAOBJECT_InitFileGroupDesc */
346 #define CFSTR_FILEDESCRIPTORA TEXT("FileGroupDescriptor") /* CF_FILEGROUPDESCRIPTORA */
347 extern UINT32 cfFileGroupDesc;
349 #define CFSTR_FILEDESCRIPTORW TEXT("FileGroupDescriptorW") /* CF_FILEGROUPDESCRIPTORW */
351 /* DATAOBJECT_InitFileContents*/
352 #define CFSTR_FILECONTENTS TEXT("FileContents") /* CF_FILECONTENTS */
353 extern UINT32 cfFileContents;
355 #define CFSTR_FILENAMEA TEXT("FileName") /* CF_FILENAMEA */
356 #define CFSTR_FILENAMEW TEXT("FileNameW") /* CF_FILENAMEW */
357 #define CFSTR_PRINTERGROUP TEXT("PrinterFriendlyName") /* CF_PRINTERS */
358 #define CFSTR_FILENAMEMAPA TEXT("FileNameMap") /* CF_FILENAMEMAPA */
359 #define CFSTR_FILENAMEMAPW TEXT("FileNameMapW") /* CF_FILENAMEMAPW */
360 #define CFSTR_SHELLURL TEXT("UniformResourceLocator")
361 #define CFSTR_PREFERREDDROPEFFECT TEXT("Preferred DropEffect")
362 #define CFSTR_PERFORMEDDROPEFFECT TEXT("Performed DropEffect")
363 #define CFSTR_PASTESUCCEEDED TEXT("Paste Succeeded")
364 #define CFSTR_INDRAGLOOP TEXT("InShellDragLoop")
366 /**************************************************************************
367 * IDLList "Item ID List List"
370 * interal data holder for IDataObject
372 typedef struct tagLPIDLLIST *LPIDLLIST, IDLList;
374 #define THIS LPIDLLIST this
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;
393 { LPIDLLIST_VTABLE lpvtbl;
398 extern LPIDLLIST IDLList_Constructor (UINT32 uStep);
399 extern void IDLList_Destructor(LPIDLLIST 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;
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;
452 { LPDATAOBJECT_VTABLE lpvtbl;
455 LPIDLLIST lpill; /* the data of the dataobject */
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;
484 /*****************************************************************************
485 * IEnumIDList interface
487 #define THIS LPENUMIDLIST this
489 typedef struct tagENUMLIST
490 { struct tagENUMLIST *pNext;
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,
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;
516 { LPENUMIDLIST_VTABLE lpvtbl;
520 LPENUMLIST mpCurrent;
524 //--------------------------------------------------------------------------
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.
535 //--------------------------------------------------------------------------
537 typedef LPBYTE LPVIEWSETTINGS;
540 // FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL
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
565 { UINT32 ViewMode; // View mode (FOLDERVIEWMODE values)
566 UINT32 fFlags; // View options (FOLDERFLAGS bits)
567 } FOLDERSETTINGS, *LPFOLDERSETTINGS;
569 typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
571 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
572 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE,LPARAM);
574 /************************************************************************
575 * IShellFolder interface
578 #define THIS LPSHELLFOLDER this
580 /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
582 { SHGDN_NORMAL = 0, /* default (display purpose) */
583 SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
584 SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
587 /* IShellFolder::EnumObjects */
588 typedef enum tagSHCONTF
589 { SHCONTF_FOLDERS = 32, /* for shell browser */
590 SHCONTF_NONFOLDERS = 64, /* for default view */
591 SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
595 #define DROPEFFECT_NONE 0
596 #define DROPEFFECT_COPY 1
597 #define DROPEFFECT_MOVE 2
598 #define DROPEFFECT_LINK 4
599 #define DROPEFFECT_SCROLL 0x80000000
601 /* IShellFolder::GetAttributesOf flags */
602 #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
603 #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
604 #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
605 #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
606 #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
607 #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
608 #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
609 #define SFGAO_CAPABILITYMASK 0x00000177L
610 #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
611 #define SFGAO_SHARE 0x00020000L /* shared */
612 #define SFGAO_READONLY 0x00040000L /* read-only */
613 #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
614 #define SFGAO_DISPLAYATTRMASK 0x000F0000L
615 #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
616 #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
617 #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
618 #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
619 #define SFGAO_CONTENTSMASK 0x80000000L
620 #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
621 #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
623 typedef struct IShellFolder_VTable {
624 /* *** IUnknown methods *** */
625 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
626 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
627 STDMETHOD_(ULONG,Release) (THIS) PURE;
629 /* *** IShellFolder methods *** */
630 STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,LPBC pbcReserved, LPOLESTR32 lpszDisplayName,ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
631 STDMETHOD(EnumObjects)( THIS_ HWND32 hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList) PURE;
632 STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvOut) PURE;
633 STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvObj) PURE;
634 STDMETHOD(CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
635 STDMETHOD(CreateViewObject)(THIS_ HWND32 hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
636 STDMETHOD(GetAttributesOf)(THIS_ UINT32 cidl, LPCITEMIDLIST * apidl,ULONG * rgfInOut) PURE;
637 STDMETHOD(GetUIObjectOf)(THIS_ HWND32 hwndOwner, UINT32 cidl, LPCITEMIDLIST * apidl,REFIID riid, UINT32 * prgfInOut, LPVOID * ppvOut) PURE;
638 STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
639 STDMETHOD(SetNameOf)(THIS_ HWND32 hwndOwner, LPCITEMIDLIST pidl,LPCOLESTR32 lpszName, DWORD uFlags,LPITEMIDLIST * ppidlOut) PURE;
641 /* utility functions */
642 STDMETHOD_(BOOL32,GetFolderPath)(THIS_ LPSTR, DWORD);
644 } *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
646 struct tagSHELLFOLDER {
647 LPSHELLFOLDER_VTABLE lpvtbl;
650 LPITEMIDLIST pMyPidl;
652 LPSHELLFOLDER mpSFParent;
655 extern LPSHELLFOLDER pdesktopfolder;
657 /************************
660 DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *);
663 /************************************************************************
664 * IShellBrowser interface
666 #define THIS LPSHELLBROWSER this
667 /* targets for GetWindow/SendControlMsg */
668 #define FCW_STATUS 0x0001
669 #define FCW_TOOLBAR 0x0002
670 #define FCW_TREE 0x0003
671 #define FCW_INTERNETBAR 0x0006
672 #define FCW_PROGRESS 0x0008
674 /* wFlags for BrowseObject*/
675 #define SBSP_DEFBROWSER 0x0000
676 #define SBSP_SAMEBROWSER 0x0001
677 #define SBSP_NEWBROWSER 0x0002
679 #define SBSP_DEFMODE 0x0000
680 #define SBSP_OPENMODE 0x0010
681 #define SBSP_EXPLOREMODE 0x0020
683 #define SBSP_ABSOLUTE 0x0000
684 #define SBSP_RELATIVE 0x1000
685 #define SBSP_PARENT 0x2000
686 #define SBSP_NAVIGATEBACK 0x4000
687 #define SBSP_NAVIGATEFORWARD 0x8000
689 #define SBSP_ALLOW_AUTONAVIGATE 0x10000
691 #define SBSP_INITIATEDBYHLINKFRAME 0x80000000
692 #define SBSP_REDIRECT 0x40000000
693 #define SBSP_WRITENOHISTORY 0x08000000
695 /* uFlage for SetToolbarItems */
696 #define FCT_MERGE 0x0001
697 #define FCT_CONFIGABLE 0x0002
698 #define FCT_ADDTOEND 0x0004
700 /* undocumented, found in the web posted by Chris Becke */
701 #define CWM_SETPATH (WM_USER+2)
702 #define CWM_WANTIDLE (WM_USER+3)
703 #define CWM_GETSETCURRENTINFO (WM_USER+4)
704 #define CWM_SELECTITEM (WM_USER+5)
705 #define CWM_STOPWAITING (WM_USER+6)
706 #define CWM_GETISHELLBROWSER (WM_USER+7)
708 typedef struct IShellBrowser_VTable
709 { // *** IUnknown methods ***
710 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
711 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
712 STDMETHOD_(ULONG,Release) (THIS) PURE;
714 // *** IOleWindow methods ***
715 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
716 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
718 // *** IShellBrowser methods *** (same as IOleInPlaceFrame)
719 STDMETHOD(InsertMenusSB) (THIS_ HMENU32 hmenuShared, LPOLEMENUGROUPWIDTHS32 lpMenuWidths) PURE;
720 STDMETHOD(SetMenuSB) (THIS_ HMENU32 hmenuShared, HOLEMENU32 holemenuReserved, HWND32 hwndActiveObject) PURE;
721 STDMETHOD(RemoveMenusSB) (THIS_ HMENU32 hmenuShared) PURE;
722 STDMETHOD(SetStatusTextSB) (THIS_ LPCOLESTR32 lpszStatusText) PURE;
723 STDMETHOD(EnableModelessSB) (THIS_ BOOL32 fEnable) PURE;
724 STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG32 lpmsg, WORD wID) PURE;
726 // *** IShellBrowser methods ***
727 STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST pidl, UINT32 wFlags) PURE;
728 STDMETHOD(GetViewStateStream)(THIS_ DWORD grfMode, LPSTREAM32 *ppStrm) PURE;
729 STDMETHOD(GetControlWindow)(THIS_ UINT32 id, HWND32 * lphwnd) PURE;
730 STDMETHOD(SendControlMsg)(THIS_ UINT32 id, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, LRESULT * pret) PURE;
731 STDMETHOD(QueryActiveShellView)(THIS_ IShellView ** ppshv) PURE;
732 STDMETHOD(OnViewWindowActive)(THIS_ IShellView * ppshv) PURE;
733 STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON lpButtons, UINT32 nButtons, UINT32 uFlags) PURE;
734 } *LPSHELLBROWSER_VTABLE,IShellBrowser_VTable;
736 struct tagSHELLBROWSER
737 { LPSHELLBROWSER_VTABLE lpvtbl;
743 /************************************************************************
744 * IShellView interface
746 #define THIS LPSHELLVIEW this
748 /* shellview select item flags*/
749 #define SVSI_DESELECT 0x0000
750 #define SVSI_SELECT 0x0001
751 #define SVSI_EDIT 0x0003 // includes select
752 #define SVSI_DESELECTOTHERS 0x0004
753 #define SVSI_ENSUREVISIBLE 0x0008
754 #define SVSI_FOCUSED 0x0010
756 /* shellview get item object flags */
757 #define SVGIO_BACKGROUND 0x00000000
758 #define SVGIO_SELECTION 0x00000001
759 #define SVGIO_ALLVIEW 0x00000002
761 /* The explorer dispatches WM_COMMAND messages based on the range of
762 command/menuitem IDs. All the IDs of menuitems that the view (right
763 pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
764 won't dispatch them). The view should not deal with any menuitems
765 in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
766 version of the shell).
768 FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
769 FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
770 FCIDM_GLOBAL/LAST for the explorer's submenu IDs
772 #define FCIDM_SHVIEWFIRST 0x0000
774 #define FCIDM_SHVIEW_ARRANGE 0x7001
775 #define FCIDM_SHVIEW_DELETE 0x7011
776 #define FCIDM_SHVIEW_PROPERTIES 0x7013
777 #define FCIDM_SHVIEW_CUT 0x7018
778 #define FCIDM_SHVIEW_COPY 0x7019
779 #define FCIDM_SHVIEW_INSERT 0x701A
780 #define FCIDM_SHVIEW_UNDO 0x701B
781 #define FCIDM_SHVIEW_INSERTLINK 0x701C
782 #define FCIDM_SHVIEW_SELECTALL 0x7021
783 #define FCIDM_SHVIEW_INVERTSELECTION 0x7022
784 #define FCIDM_SHVIEW_BIGICON 0x7029
785 #define FCIDM_SHVIEW_SMALLICON 0x702A
786 #define FCIDM_SHVIEW_LISTVIEW 0x702B
787 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
788 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
789 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
790 #define FCIDM_SHVIEW_HELP 0x7041
792 #define FCIDM_SHVIEWLAST 0x7fff
793 #define FCIDM_BROWSERFIRST 0xA000
794 /* undocumented toolbar items from stddlg's*/
795 #define FCIDM_TB_SMALLICON 0xA003
796 #define FCIDM_TB_REPORTVIEW 0xA004
798 #define FCIDM_BROWSERLAST 0xbf00
799 #define FCIDM_GLOBALFIRST 0x8000
800 #define FCIDM_GLOBALLAST 0x9fff
803 * Global submenu IDs and separator IDs
805 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
806 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
807 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
808 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
809 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
810 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
811 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
812 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
813 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
814 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
816 /* control IDs known to the view */
817 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
818 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
820 /* uState values for IShellView::UIActivate */
822 { SVUIA_DEACTIVATE = 0,
823 SVUIA_ACTIVATE_NOFOCUS = 1,
824 SVUIA_ACTIVATE_FOCUS = 2,
825 SVUIA_INPLACEACTIVATE = 3 // new flag for IShellView2
830 typedef struct IShellView_VTable
831 { // *** IUnknown methods ***
832 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
833 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
834 STDMETHOD_(ULONG,Release) (THIS) PURE;
836 // *** IOleWindow methods ***
837 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
838 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
840 // *** IShellView methods ***
841 STDMETHOD(TranslateAccelerator) (THIS_ LPMSG32 lpmsg) PURE;
842 STDMETHOD(EnableModeless) (THIS_ BOOL32 fEnable) PURE;
843 STDMETHOD(UIActivate) (THIS_ UINT32 uState) PURE;
844 STDMETHOD(Refresh) (THIS) PURE;
845 STDMETHOD(CreateViewWindow)(THIS_ IShellView *lpPrevView,LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,RECT32 * prcView, HWND32 *phWnd) PURE;
846 STDMETHOD(DestroyViewWindow)(THIS) PURE;
847 STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS lpfs) PURE;
848 STDMETHOD(AddPropertySheetPages)(THIS_ DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) PURE;
849 STDMETHOD(SaveViewState)(THIS) PURE;
850 STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST pidlItem, UINT32 uFlags) PURE;
851 STDMETHOD(GetItemObject)(THIS_ UINT32 uItem, REFIID riid,LPVOID *ppv) PURE;
852 } IShellView_VTable,*LPSHELLVIEW_VTABLE;
855 { LPSHELLVIEW_VTABLE lpvtbl;
858 LPSHELLFOLDER pSFParent;
859 LPSHELLBROWSER pShellBrowser;
860 LPCOMMDLGBROWSER pCommDlgBrowser;
864 FOLDERSETTINGS FolderSettings;
868 LPITEMIDLIST *aSelectedItems;
871 typedef GUID SHELLVIEWID;
872 #define SV_CLASS_NAME ("SHELLDLL_DefView")
875 /****************************************************************************
876 * ICommDlgBrowser interface
878 #define THIS LPCOMMDLGBROWSER this
880 /* for OnStateChange*/
881 #define CDBOSC_SETFOCUS 0x00000000
882 #define CDBOSC_KILLFOCUS 0x00000001
883 #define CDBOSC_SELCHANGE 0x00000002
884 #define CDBOSC_RENAME 0x00000003
886 typedef struct ICommDlgBrowser_VTable
887 { /* IUnknown methods */
888 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
889 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
890 STDMETHOD_(ULONG,Release) (THIS) PURE;
892 /* ICommDlgBrowser methods */
893 STDMETHOD(OnDefaultCommand) (THIS_ LPSHELLVIEW ppshv) PURE;
894 STDMETHOD(OnStateChange) (THIS_ LPSHELLVIEW ppshv, ULONG uChange) PURE;
895 STDMETHOD(IncludeObject) (THIS_ LPSHELLVIEW ppshv, LPCITEMIDLIST pidl) PURE;
896 } ICommDlgBrowser_VTable,*LPCOMMDLGBROWSER_VTABLE;
898 struct tagCOMMDLGBROWSER
899 { LPCOMMDLGBROWSER_VTABLE lpvtbl;
903 /****************************************************************************
904 * IShellLink interface
907 #define THIS LPSHELLLINK this
908 /* IShellLink::Resolve fFlags */
911 SLR_ANY_MATCH = 0x0002,
915 /* IShellLink::GetPath fFlags */
917 SLGP_SHORTPATH = 0x0001,
918 SLGP_UNCPRIORITY = 0x0002
923 typedef struct IShellLink IShellLink,*LPSHELLLINK;
924 typedef struct IShellLink_VTable
926 /* *** IUnknown methods *** */
927 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
928 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
929 STDMETHOD_(ULONG,Release) (THIS) PURE;
931 STDMETHOD(GetPath)(THIS_ LPSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
933 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
934 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
936 STDMETHOD(GetDescription)(THIS_ LPSTR pszName,INT32 cchMaxName) PURE;
937 STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE;
939 STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir,INT32 cchMaxPath) PURE;
940 STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE;
942 STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs,INT32 cchMaxPath) PURE;
943 STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE;
945 STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
946 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
948 STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
949 STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
951 STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
952 STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath,INT32 iIcon) PURE;
954 STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
956 STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
958 STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
959 } IShellLink_VTable,*LPSHELLLINK_VTABLE;
962 LPSHELLLINK_VTABLE lpvtbl;
964 /* IPersistfile interface */
970 #define THIS LPSHELLLINKW this
972 typedef struct IShellLinkW IShellLinkW,*LPSHELLLINKW;
973 typedef struct IShellLinkW_VTable
975 /* *** IUnknown methods *** */
976 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
977 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
978 STDMETHOD_(ULONG,Release) (THIS) PURE;
980 STDMETHOD(GetPath)(THIS_ LPWSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
982 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
983 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
985 STDMETHOD(GetDescription)(THIS_ LPWSTR pszName,INT32 cchMaxName) PURE;
986 STDMETHOD(SetDescription)(THIS_ LPCWSTR pszName) PURE;
988 STDMETHOD(GetWorkingDirectory)(THIS_ LPWSTR pszDir,INT32 cchMaxPath) PURE;
989 STDMETHOD(SetWorkingDirectory)(THIS_ LPCWSTR pszDir) PURE;
991 STDMETHOD(GetArguments)(THIS_ LPWSTR pszArgs,INT32 cchMaxPath) PURE;
992 STDMETHOD(SetArguments)(THIS_ LPCWSTR pszArgs) PURE;
994 STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
995 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
997 STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
998 STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
1000 STDMETHOD(GetIconLocation)(THIS_ LPWSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
1001 STDMETHOD(SetIconLocation)(THIS_ LPCWSTR pszIconPath,INT32 iIcon) PURE;
1003 STDMETHOD(SetRelativePath)(THIS_ LPCWSTR pszPathRel, DWORD dwReserved) PURE;
1005 STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
1007 STDMETHOD(SetPath)(THIS_ LPCWSTR pszFile) PURE;
1008 } IShellLinkW_VTable,*LPSHELLLINKW_VTABLE;
1010 struct IShellLinkW {
1011 LPSHELLLINKW_VTABLE lpvtbl;
1013 /* IPersistfile interface */
1019 /****************************************************************************
1020 * IExtractIconinterface
1023 * Is the ExtractIconA interface
1025 #define THIS LPEXTRACTICON this
1027 /* GetIconLocation() input flags*/
1028 #define GIL_OPENICON 0x0001 // allows containers to specify an "open" look
1029 #define GIL_FORSHELL 0x0002 // icon is to be displayed in a ShellFolder
1030 #define GIL_ASYNC 0x0020 // this is an async extract, return E_ASYNC
1032 /* GetIconLocation() return flags */
1033 #define GIL_SIMULATEDOC 0x0001 // simulate this document icon for this
1034 #define GIL_PERINSTANCE 0x0002 // icons from this class are per instance (each file has its own)
1035 #define GIL_PERCLASS 0x0004 // icons from this class per class (shared for all files of this type)
1036 #define GIL_NOTFILENAME 0x0008 // location is not a filename, must call ::ExtractIcon
1037 #define GIL_DONTCACHE 0x0010 // this icon should not be cached
1039 typedef struct IExtractIcon IExtractIcon,*LPEXTRACTICON;
1040 typedef struct IExtractIcon_VTable
1041 { /*** IUnknown methods ***/
1042 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1043 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1044 STDMETHOD_(ULONG,Release) (THIS) PURE;
1046 /*** IExtractIcon methods ***/
1047 STDMETHOD(GetIconLocation)(THIS_ UINT32 uFlags, LPSTR szIconFile, UINT32 cchMax,INT32 * piIndex, UINT32 * pwFlags) PURE;
1048 STDMETHOD(Extract)(THIS_ LPCSTR pszFile, UINT32 nIconIndex, HICON32 *phiconLarge, HICON32 *phiconSmall, UINT32 nIconSize) PURE;
1049 }IExtractIcon_VTable,*LPEXTRACTICON_VTABLE;
1052 { LPEXTRACTICON_VTABLE lpvtbl;
1059 DWORD WINAPI SHMapPIDLToSystemImageListIndex(LPSHELLFOLDER sh,LPITEMIDLIST pidl,DWORD z);
1061 /****************************************************************************
1062 * IShellIcon interface
1065 #define THIS LPSHELLICON this
1067 typedef struct IShellIcon_VTable
1068 { /*** IUnknown methods ***/
1069 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1070 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1071 STDMETHOD_(ULONG,Release) (THIS) PURE;
1073 /*** IShellIcon methods ***/
1074 STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT32 flags, LPINT32 lpIconIndex) PURE;
1075 } IShellIcon_VTable,*LPSHELLICON_VTABLE;
1078 { LPSHELLICON_VTABLE lpvtbl;
1082 /****************************************************************************
1083 * IDockingWindowFrame interface
1085 #define THIS LPDOCKINGWINDOWFRAME this
1087 #define DWFRF_NORMAL 0x0000 /* femove toolbar flags*/
1088 #define DWFRF_DELETECONFIGDATA 0x0001
1089 #define DWFAF_HIDDEN 0x0001 /* add tolbar*/
1091 typedef struct IDockingWindowFrame_VTable
1092 { STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1093 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1094 STDMETHOD_(ULONG,Release) (THIS) PURE;
1096 /*** IOleWindow methods ***/
1097 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
1098 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
1100 /*** IDockingWindowFrame methods ***/
1101 STDMETHOD(AddToolbar) (THIS_ IUnknown* punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags) PURE;
1102 STDMETHOD(RemoveToolbar) (THIS_ IUnknown* punkSrc, DWORD dwRemoveFlags) PURE;
1103 STDMETHOD(FindToolbar) (THIS_ LPCWSTR pwszItem, REFIID riid, LPVOID* ppvObj) PURE;
1104 } IDockingWindowFrame_VTable, *LPDOCKINGWINDOWFRAME_VTABLE;
1106 struct tagDOCKINGWINDOWFRAME
1107 { LPDOCKINGWINDOWFRAME_VTABLE lpvtbl;
1112 /****************************************************************************
1113 * IServiceProvider interface
1115 #define THIS LPSERVICEPROVIDER this
1117 typedef struct IServiceProvider_VTable
1118 { /*** IUnknown methods ***/
1119 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1120 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1121 STDMETHOD_(ULONG,Release) (THIS) PURE;
1123 STDMETHOD(QueryService)(THIS_ REFGUID guidService, REFIID riid, void **ppvObject);
1124 } IServiceProvider_VTable, *LPSERVICEPROVIDER_VTABLE;
1126 struct tagSERVICEPROVIDER
1127 { LPSERVICEPROVIDER_VTABLE lpvtbl;
1130 /****************************************************************************
1133 #define SE_ERR_FNF 2 // file not found
1134 #define SE_ERR_PNF 3 // path not found
1135 #define SE_ERR_ACCESSDENIED 5 // access denied
1136 #define SE_ERR_OOM 8 // out of memory
1137 #define SE_ERR_DLLNOTFOUND 32
1138 #define SE_ERR_SHARE 26
1139 #define SE_ERR_ASSOCINCOMPLETE 27
1140 #define SE_ERR_DDETIMEOUT 28
1141 #define SE_ERR_DDEFAIL 29
1142 #define SE_ERR_DDEBUSY 30
1143 #define SE_ERR_NOASSOC 31
1145 #define SEE_MASK_CLASSNAME 0x00000001
1146 #define SEE_MASK_CLASSKEY 0x00000003
1147 #define SEE_MASK_IDLIST 0x00000004
1148 #define SEE_MASK_INVOKEIDLIST 0x0000000c
1149 #define SEE_MASK_ICON 0x00000010
1150 #define SEE_MASK_HOTKEY 0x00000020
1151 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
1152 #define SEE_MASK_CONNECTNETDRV 0x00000080
1153 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
1154 #define SEE_MASK_DOENVSUBST 0x00000200
1155 #define SEE_MASK_FLAG_NO_UI 0x00000400
1156 #define SEE_MASK_UNICODE 0x00004000
1157 #define SEE_MASK_NO_CONSOLE 0x00008000
1158 #define SEE_MASK_ASYNCOK 0x00100000
1159 #define SEE_MASK_HMONITOR 0x00200000
1161 typedef struct _SHELLEXECUTEINFOA
1167 LPCSTR lpParameters;
1170 HINSTANCE32 hInstApp;
1171 /* Optional fields */
1181 } SHELLEXECUTEINFO32A, *LPSHELLEXECUTEINFO32A;
1183 typedef struct _SHELLEXECUTEINFOW
1189 LPCWSTR lpParameters;
1190 LPCWSTR lpDirectory;
1192 HINSTANCE32 hInstApp;
1193 /* Optional fields*/
1203 } SHELLEXECUTEINFO32W, *LPSHELLEXECUTEINFO32W;
1205 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
1206 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
1208 BOOL32 WINAPI ShellExecuteEx32A(LPSHELLEXECUTEINFO32A lpExecInfo);
1209 BOOL32 WINAPI ShellExecuteEx32W(LPSHELLEXECUTEINFO32W lpExecInfo);
1210 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
1212 void WINAPI WinExecError32A(HWND32 hwnd,INT32 error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
1213 void WINAPI WinExecError32W(HWND32 hwnd,INT32 error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
1214 #define WinExecError WINELIB_NAME_AW(WinExecError)
1218 /****************************************************************************
1219 * SHBrowseForFolder API
1221 typedef INT32 (CALLBACK* BFFCALLBACK)(HWND32 hwnd, UINT32 uMsg, LPARAM lParam, LPARAM lpData);
1223 typedef struct tagBROWSEINFO32A {
1225 LPCITEMIDLIST pidlRoot;
1226 LPSTR pszDisplayName;
1232 } BROWSEINFO32A, *PBROWSEINFO32A, *LPBROWSEINFO32A;
1234 typedef struct tagBROWSEINFO32W {
1236 LPCITEMIDLIST pidlRoot;
1237 LPWSTR pszDisplayName;
1243 } BROWSEINFO32W, *PBROWSEINFO32W, *LPBROWSEINFO32W;
1245 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
1246 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
1247 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
1249 // Browsing for directory.
1250 #define BIF_RETURNONLYFSDIRS 0x0001
1251 #define BIF_DONTGOBELOWDOMAIN 0x0002
1252 #define BIF_STATUSTEXT 0x0004
1253 #define BIF_RETURNFSANCESTORS 0x0008
1254 #define BIF_EDITBOX 0x0010
1255 #define BIF_VALIDATE 0x0020
1257 #define BIF_BROWSEFORCOMPUTER 0x1000
1258 #define BIF_BROWSEFORPRINTER 0x2000
1259 #define BIF_BROWSEINCLUDEFILES 0x4000
1261 // message from browser
1262 #define BFFM_INITIALIZED 1
1263 #define BFFM_SELCHANGED 2
1264 #define BFFM_VALIDATEFAILEDA 3 // lParam:szPath ret:1(cont),0(EndDialog)
1265 #define BFFM_VALIDATEFAILEDW 4 // lParam:wzPath ret:1(cont),0(EndDialog)
1267 // messages to browser
1268 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
1269 #define BFFM_ENABLEOK (WM_USER+101)
1270 #define BFFM_SETSELECTIONA (WM_USER+102)
1271 #define BFFM_SETSELECTIONW (WM_USER+103)
1272 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
1276 #define SHBrowseForFolder SHBrowseForFolderW
1277 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
1278 #define BFFM_SETSELECTION BFFM_SETSELECTIONW
1280 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
1282 #define SHBrowseForFolder SHBrowseForFolderA
1283 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
1284 #define BFFM_SETSELECTION BFFM_SETSELECTIONA
1286 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
1290 LPITEMIDLIST WINAPI SHBrowseForFolder32A(LPBROWSEINFO32A lpbi);
1291 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
1292 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
1294 /****************************************************************************
1295 * shlview structures
1299 * IShellFolderViewCallback Callback
1300 * This "callback" is called by the shells default IShellView implementation (that
1301 * we got using SHCreateShellViewEx()), to notify us of the various things that
1302 * are happening to the shellview (and ask for things too).
1304 * You don't have to support anything here - anything you don't want to
1305 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
1306 * that the shell passes to this function are entirely undocumented.
1308 * HOWEVER, as the cabview sample as originally written used this callback, the
1309 * writers implemented the callback mechanism on top of their own IShellView.
1310 * Look there for some clues on what to do here.
1313 typedef HRESULT(CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
1314 HWND32 hwnd,UINT32 uMsg,UINT32 wParam,LPARAM lParam);
1316 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
1317 #define NF_INHERITVIEW 0x0000
1318 #define NF_LOCALVIEW 0x0001
1320 typedef struct _SHELLVIEWDATA // idl
1322 LPSHELLFOLDER pShellFolder;
1325 DWORD v3; // always 0
1326 SHELLVIEWPROC pCallBack;
1327 DWORD viewmode; // NF_* enum
1328 } SHELLVIEWDATA, * LPSHELLVIEWDATA;
1331 The shell keeps track of some per-user state to handle display
1332 options that is of majorinterest to ISVs.
1333 The key one requested right now is "DoubleClickInWebView".
1336 { BOOL32 fShowAllObjects : 1;
1337 BOOL32 fShowExtensions : 1;
1338 BOOL32 fNoConfirmRecycle : 1;
1339 BOOL32 fShowSysFiles : 1;
1340 BOOL32 fShowCompColor : 1;
1341 BOOL32 fDoubleClickInWebView : 1;
1342 BOOL32 fDesktopHTML : 1;
1343 BOOL32 fWin95Classic : 1;
1344 BOOL32 fDontPrettyPath : 1;
1345 BOOL32 fShowAttribCol : 1;
1346 BOOL32 fMapNetDrvBtn : 1;
1347 BOOL32 fShowInfoTip : 1;
1348 BOOL32 fHideIcons : 1;
1349 UINT32 fRestFlags : 3;
1350 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
1359 #endif /*_WINE_SHLOBJ_H*/