10 #include "interfaces.h"
12 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
13 #define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
20 /****************************************************************************
23 DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*);
26 typedef LPVOID LPBC; /* *IBindCtx really */
28 /* foreward declaration of the objects*/
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 typedef struct IAdviseSink IAdviseSink, *LPIADVISESINK;
43 typedef struct IEnumSTATDATA IEnumSTATDATA, *LPENUMSTATDATA;
44 /****************************************************************************
48 DEFINE_SHLGUID(IID_IEnumUnknown, 0x00000100L, 0, 0);
49 DEFINE_SHLGUID(IID_IEnumString, 0x00000101L, 0, 0);
50 DEFINE_SHLGUID(IID_IEnumMoniker, 0x00000102L, 0, 0);
51 DEFINE_SHLGUID(IID_IEnumFORMATETC, 0x00000103L, 0, 0);
52 DEFINE_SHLGUID(IID_IEnumOLEVERB, 0x00000104L, 0, 0);
53 DEFINE_SHLGUID(IID_IEnumSTATDATA, 0x00000105L, 0, 0);
55 DEFINE_SHLGUID(IID_IPersistStream, 0x00000109L, 0, 0);
56 DEFINE_SHLGUID(IID_IPersistStorage, 0x0000010AL, 0, 0);
57 DEFINE_SHLGUID(IID_IPersistFile, 0x0000010BL, 0, 0);
58 DEFINE_SHLGUID(IID_IPersist, 0x0000010CL, 0, 0);
59 DEFINE_SHLGUID(IID_IViewObject, 0x0000010DL, 0, 0);
60 DEFINE_SHLGUID(IID_IDataObject, 0x0000010EL, 0, 0);
62 DEFINE_GUID (IID_IServiceProvider, 0x6D5140C1L, 0x7436, 0x11CE, 0x80, 0x34, 0x00, 0xAA, 0x00, 0x60, 0x09, 0xFA);
63 DEFINE_GUID (IID_IDockingWindow, 0x012dd920L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
64 DEFINE_GUID (IID_IDockingWindowSite, 0x2A342FC2L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
65 DEFINE_GUID (IID_IDockingWindowFrame, 0x47D2657AL, 0x7B27, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
67 DEFINE_SHLGUID(CLSID_ShellDesktop, 0x00021400L, 0, 0);
68 DEFINE_SHLGUID(CLSID_ShellLink, 0x00021401L, 0, 0);
69 /* shell32 formatids */
70 DEFINE_SHLGUID(FMTID_Intshcut, 0x000214A0L, 0, 0);
71 DEFINE_SHLGUID(FMTID_InternetSite, 0x000214A1L, 0, 0);
72 /* command group ids */
73 DEFINE_SHLGUID(CGID_Explorer, 0x000214D0L, 0, 0);
74 DEFINE_SHLGUID(CGID_ShellDocView, 0x000214D1L, 0, 0);
76 /* shell32interface ids */
77 DEFINE_SHLGUID(IID_INewShortcutHookA, 0x000214E1L, 0, 0);
78 DEFINE_SHLGUID(IID_IShellBrowser, 0x000214E2L, 0, 0);
79 #define SID_SShellBrowser IID_IShellBrowser
80 DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0);
81 DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
82 DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0);
83 DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
84 DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
85 DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
86 DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0);
87 DEFINE_SHLGUID(IID_IShellLink, 0x000214EEL, 0, 0);
88 DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0);
89 DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0);
90 DEFINE_SHLGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0);
91 DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
92 DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
93 DEFINE_SHLGUID(IID_IContextMenu2, 0x000214F4L, 0, 0);
94 DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
95 DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
96 DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0);
97 DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0);
98 DEFINE_SHLGUID(IID_IShellLinkW, 0x000214F9L, 0, 0);
99 DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0);
100 DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0);
101 DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0);
103 /****************************************************************************
106 #define STRRET_WSTR 0x0000
107 #define STRRET_OFFSET 0x0001
108 #define STRRET_CSTR 0x0002
110 typedef struct _STRRET
111 { UINT32 uType; /* STRRET_xxx */
113 { LPWSTR pOleStr; /* OLESTR that will be freed */
114 UINT32 uOffset; /* OffsetINT32o SHITEMID (ANSI) */
115 char cStr[MAX_PATH]; /* Buffer to fill in */
119 /*****************************************************************************
120 * IContextMenu interface
122 #define THIS LPCONTEXTMENU this
124 /* default menu items*/
125 #define IDM_EXPLORE 0
128 #define IDM_LAST IDM_RENAME
130 /* QueryContextMenu uFlags */
131 #define CMF_NORMAL 0x00000000
132 #define CMF_DEFAULTONLY 0x00000001
133 #define CMF_VERBSONLY 0x00000002
134 #define CMF_EXPLORE 0x00000004
135 #define CMF_NOVERBS 0x00000008
136 #define CMF_CANRENAME 0x00000010
137 #define CMF_NODEFAULT 0x00000020
138 #define CMF_INCLUDESTATIC 0x00000040
139 #define CMF_RESERVED 0xffff0000 // View specific
141 /* GetCommandString uFlags */
142 #define GCS_VERBA 0x00000000 // canonical verb
143 #define GCS_HELPTEXTA 0x00000001 // help text (for status bar)
144 #define GCS_VALIDATEA 0x00000002 // validate command exists
145 #define GCS_VERBW 0x00000004 // canonical verb (unicode)
146 #define GCS_HELPTEXTW 0x00000005 // help text (unicode version)
147 #define GCS_VALIDATEW 0x00000006 // validate command exists (unicode)
148 #define GCS_UNICODE 0x00000004 // for bit testing - Unicode string
150 #define GCS_VERB GCS_VERBA
151 #define GCS_HELPTEXT GCS_HELPTEXTA
152 #define GCS_VALIDATE GCS_VALIDATEA
154 #define CMDSTR_NEWFOLDERA "NewFolder"
155 #define CMDSTR_VIEWLISTA "ViewList"
156 #define CMDSTR_VIEWDETAILSA "ViewDetails"
157 #define CMDSTR_NEWFOLDERW L"NewFolder"
158 #define CMDSTR_VIEWLISTW L"ViewList"
159 #define CMDSTR_VIEWDETAILSW L"ViewDetails"
161 #define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERA
162 #define CMDSTR_VIEWLIST CMDSTR_VIEWLISTA
163 #define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSA
165 #define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
166 #define CMIC_MASK_ICON SEE_MASK_ICON
167 #define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
168 #define CMIC_MASK_UNICODE SEE_MASK_UNICODE
169 #define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
170 #define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
171 #define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
172 #define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
173 #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
175 #define CMIC_MASK_PTINVOKE 0x20000000
177 /*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
178 typedef struct tagCMINVOKECOMMANDINFO
179 { DWORD cbSize; // sizeof(CMINVOKECOMMANDINFO)
180 DWORD fMask; // any combination of CMIC_MASK_*
181 HWND32 hwnd; // might be NULL (indicating no owner window)
182 LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
183 LPCSTR lpParameters; // might be NULL (indicating no parameter)
184 LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
185 INT32 nShow; // one of SW_ values for ShowWindow() API
189 } CMINVOKECOMMANDINFO32, *LPCMINVOKECOMMANDINFO32;
191 typedef struct tagCMInvokeCommandInfoEx
192 { DWORD cbSize; // must be sizeof(CMINVOKECOMMANDINFOEX)
193 DWORD fMask; // any combination of CMIC_MASK_*
194 HWND32 hwnd; // might be NULL (indicating no owner window)
195 LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
196 LPCSTR lpParameters; // might be NULL (indicating no parameter)
197 LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
198 INT32 nShow; // one of SW_ values for ShowWindow() API
203 LPCSTR lpTitle; // For CreateProcess-StartupInfo.lpTitle
204 LPCWSTR lpVerbW; // Unicode verb (for those who can use it)
205 LPCWSTR lpParametersW; // Unicode parameters (for those who can use it)
206 LPCWSTR lpDirectoryW; // Unicode directory (for those who can use it)
207 LPCWSTR lpTitleW; // Unicode title (for those who can use it)
208 POINT32 ptInvoke; // Point where it's invoked
210 } CMINVOKECOMMANDINFOEX32, *LPCMINVOKECOMMANDINFOEX32;
213 typedef struct IContextMenu_VTable
214 { // *** IUnknown methods ***
215 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
216 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
217 STDMETHOD_(ULONG,Release) (THIS) PURE;
219 STDMETHOD(QueryContextMenu)(THIS_ HMENU32 hmenu,UINT32 indexMenu,UINT32 idCmdFirst, UINT32 idCmdLast,UINT32 uFlags) PURE;
220 STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO32 lpici) PURE;
221 STDMETHOD(GetCommandString)(THIS_ UINT32 idCmd,UINT32 uType,UINT32 * pwReserved,LPSTR pszName,UINT32 cchMax) PURE;
223 /* undocumented not only in ContextMenu2 */
224 STDMETHOD(HandleMenuMsg)(THIS_ UINT32 uMsg,WPARAM32 wParam,LPARAM lParam) PURE;
226 /* possibly another nasty entry from ContextMenu3 ?*/
228 } IContextMenu_VTable,*LPCONTEXTMENU_VTABLE;
230 struct tagCONTEXTMENU
231 { LPCONTEXTMENU_VTABLE lpvtbl;
233 LPSHELLFOLDER pSFParent;
234 LPITEMIDLIST *aPidls;
239 /*****************************************************************************
244 WORD tdDriverNameOffset;
245 WORD tdDeviceNameOffset;
246 WORD tdPortNameOffset;
247 WORD tdExtDevmodeOffset;
251 typedef WORD CLIPFORMAT32, *LPCLIPFORMAT32;
257 /*HMETAFILEPICT32 hMetaFilePict;*/
258 /*HENHMETAFILE32 hEnhMetaFile;*/
260 LPOLESTR32 lpszFileName;
264 IUnknown *pUnkForRelease;
268 { CLIPFORMAT32 cfFormat;
269 DVTARGETDEVICE32 *ptd;
273 } FORMATETC32, *LPFORMATETC32;
275 /*****************************************************************************
276 * IEnumFORMATETC interface
278 #define THIS LPENUMFORMATETC this
280 typedef struct IEnumFORMATETC_VTable
281 { /* IUnknown methods */
282 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
283 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
284 STDMETHOD_(ULONG,Release) (THIS) PURE;
286 /* IEnumFORMATETC methods */
287 STDMETHOD (Next)(THIS_ ULONG celt, FORMATETC32 *rgelt, ULONG *pceltFethed) PURE;
288 STDMETHOD (Skip)(THIS_ ULONG celt) PURE;
289 STDMETHOD (Reset)(THIS) PURE;
290 STDMETHOD (Clone)(THIS_ IEnumFORMATETC ** ppenum) PURE;
291 } IEnumFORMATETC_VTable,*LPENUMFORMATETC_VTABLE;
293 struct tagENUMFORMATETC
294 { LPENUMFORMATETC_VTABLE lpvtbl;
303 /*****************************************************************************
304 * IDataObject interface
306 #define THIS LPDATAOBJECT this
308 typedef struct IDataObject_VTable
309 { /*** IUnknown methods ***/
310 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
311 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
312 STDMETHOD_(ULONG,Release) (THIS) PURE;
314 STDMETHOD (GetData )(THIS_ LPFORMATETC32 pformatetcIn, STGMEDIUM32 *pmedium) PURE;
315 STDMETHOD (GetDataHere)(THIS_ LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium) PURE;
316 STDMETHOD (QueryGetData)(THIS_ LPFORMATETC32 pformatetc) PURE;
317 STDMETHOD (GetCanonicalFormatEtc)(THIS_ LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut) PURE;
318 STDMETHOD (SetData)(THIS_ LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium, BOOL32 fRelease) PURE;
319 STDMETHOD (EnumFormatEtc)(THIS_ DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc) PURE;
320 STDMETHOD (DAdvise )(THIS_ LPFORMATETC32 *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) PURE;
321 STDMETHOD (DUnadvise)(THIS_ DWORD dwConnection) PURE;
322 STDMETHOD (EnumDAdvise)(THIS_ IEnumSTATDATA **ppenumAdvise) PURE;
323 } IDataObject_VTable,*LPDATAOBJECT_VTABLE;
326 { LPDATAOBJECT_VTABLE lpvtbl;
333 /*****************************************************************************
334 * IShellExtInit interface
336 #define THIS LPSHELLEXTINIT this
338 typedef struct IShellExtInit_VTable
339 { // *** IUnknown methods ***
340 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
341 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
342 STDMETHOD_(ULONG,Release) (THIS) PURE;
344 // *** IShellExtInit methods ***
345 STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID) PURE;
346 } IShellExtInit_VTable,*LPSHELLEXTINIT_VTABLE;
348 struct tagSHELLEXTINIT
349 { LPSHELLEXTINIT_VTABLE lpvtbl;
355 /*****************************************************************************
356 * IEnumIDList interface
358 #define THIS LPENUMIDLIST this
360 typedef struct tagENUMLIST
361 { struct tagENUMLIST *pNext;
363 } ENUMLIST, *LPENUMLIST;
365 typedef struct IEnumIDList_VTable
366 { /* *** IUnknown methods *** */
367 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
368 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
369 STDMETHOD_(ULONG,Release) (THIS) PURE;
371 /* *** IEnumIDList methods *** */
372 STDMETHOD(Next) (THIS_ ULONG celt,
374 ULONG *pceltFetched) PURE;
375 STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
376 STDMETHOD(Reset) (THIS) PURE;
377 STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
378 /* *** private methods *** */
379 STDMETHOD_(BOOL32,CreateEnumList)(THIS_ LPCSTR, DWORD) PURE;
380 STDMETHOD_(BOOL32,AddToEnumList)(THIS_ LPITEMIDLIST) PURE;
381 STDMETHOD_(BOOL32,DeleteList)(THIS) PURE;
384 } IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
387 { LPENUMIDLIST_VTABLE lpvtbl;
391 LPENUMLIST mpCurrent;
395 //--------------------------------------------------------------------------
399 // FOLDERSETTINGS is a data structure that explorer passes from one folder
400 // view to another, when the user is browsing. It calls ISV::GetCurrentInfo
401 // member to get the current settings and pass it to ISV::CreateViewWindow
402 // to allow the next folder view "inherit" it. These settings assumes a
403 // particular UI (which the shell's folder view has), and shell extensions
404 // may or may not use those settings.
406 //--------------------------------------------------------------------------
408 typedef LPBYTE LPVIEWSETTINGS;
411 // FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL
413 { FWF_AUTOARRANGE = 0x0001,
414 FWF_ABBREVIATEDNAMES = 0x0002,
415 FWF_SNAPTOGRID = 0x0004,
416 FWF_OWNERDATA = 0x0008,
417 FWF_BESTFITWINDOW = 0x0010,
418 FWF_DESKTOP = 0x0020,
419 FWF_SINGLESEL = 0x0040,
420 FWF_NOSUBFOLDERS = 0x0080,
421 FWF_TRANSPARENT = 0x0100,
422 FWF_NOCLIENTEDGE = 0x0200,
423 FWF_NOSCROLL = 0x0400,
424 FWF_ALIGNLEFT = 0x0800,
425 FWF_SINGLECLICKACTIVATE=0x8000 // TEMPORARY -- NO UI FOR THIS
436 { UINT32 ViewMode; // View mode (FOLDERVIEWMODE values)
437 UINT32 fFlags; // View options (FOLDERFLAGS bits)
438 } FOLDERSETTINGS, *LPFOLDERSETTINGS;
440 typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
442 /* FIXME; the next two lines are propersheet related, move to prsht.h when created */
444 typedef struct _PSP FAR* HPROPSHEETPAGE;
446 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
447 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE,LPARAM);
449 /************************************************************************
450 * IShellFolder interface
453 #define THIS LPSHELLFOLDER this
455 /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
457 { SHGDN_NORMAL = 0, /* default (display purpose) */
458 SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
459 SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
462 /* IShellFolder::EnumObjects */
463 typedef enum tagSHCONTF
464 { SHCONTF_FOLDERS = 32, /* for shell browser */
465 SHCONTF_NONFOLDERS = 64, /* for default view */
466 SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
470 #define DROPEFFECT_NONE 0
471 #define DROPEFFECT_COPY 1
472 #define DROPEFFECT_MOVE 2
473 #define DROPEFFECT_LINK 4
474 #define DROPEFFECT_SCROLL 0x80000000
476 /* IShellFolder::GetAttributesOf flags */
477 #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
478 #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
479 #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
480 #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
481 #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
482 #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
483 #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
484 #define SFGAO_CAPABILITYMASK 0x00000177L
485 #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
486 #define SFGAO_SHARE 0x00020000L /* shared */
487 #define SFGAO_READONLY 0x00040000L /* read-only */
488 #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
489 #define SFGAO_DISPLAYATTRMASK 0x000F0000L
490 #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
491 #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
492 #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
493 #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
494 #define SFGAO_CONTENTSMASK 0x80000000L
495 #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
496 #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
498 typedef struct IShellFolder_VTable {
499 /* *** IUnknown methods *** */
500 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
501 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
502 STDMETHOD_(ULONG,Release) (THIS) PURE;
504 /* *** IShellFolder methods *** */
505 STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,LPBC pbcReserved, LPOLESTR32 lpszDisplayName,ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
506 STDMETHOD(EnumObjects)( THIS_ HWND32 hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList) PURE;
507 STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvOut) PURE;
508 STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvObj) PURE;
509 STDMETHOD(CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
510 STDMETHOD(CreateViewObject)(THIS_ HWND32 hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
511 STDMETHOD(GetAttributesOf)(THIS_ UINT32 cidl, LPCITEMIDLIST * apidl,ULONG * rgfInOut) PURE;
512 STDMETHOD(GetUIObjectOf)(THIS_ HWND32 hwndOwner, UINT32 cidl, LPCITEMIDLIST * apidl,REFIID riid, UINT32 * prgfInOut, LPVOID * ppvOut) PURE;
513 STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
514 STDMETHOD(SetNameOf)(THIS_ HWND32 hwndOwner, LPCITEMIDLIST pidl,LPCOLESTR32 lpszName, DWORD uFlags,LPITEMIDLIST * ppidlOut) PURE;
516 /* utility functions */
517 STDMETHOD_(BOOL32,GetFolderPath)(THIS_ LPSTR, DWORD);
519 } *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
521 struct tagSHELLFOLDER {
522 LPSHELLFOLDER_VTABLE lpvtbl;
526 LPITEMIDLIST mpidlNSRoot;
527 LPSHELLFOLDER mpSFParent;
530 extern LPSHELLFOLDER pdesktopfolder;
532 /************************
535 DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *);
538 /************************************************************************
539 * IShellBrowser interface
541 #define THIS LPSHELLBROWSER this
542 /* targets for GetWindow/SendControlMsg */
543 #define FCW_STATUS 0x0001
544 #define FCW_TOOLBAR 0x0002
545 #define FCW_TREE 0x0003
546 #define FCW_INTERNETBAR 0x0006
547 #define FCW_PROGRESS 0x0008
549 /* wFlags for BrowseObject*/
550 #define SBSP_DEFBROWSER 0x0000
551 #define SBSP_SAMEBROWSER 0x0001
552 #define SBSP_NEWBROWSER 0x0002
554 #define SBSP_DEFMODE 0x0000
555 #define SBSP_OPENMODE 0x0010
556 #define SBSP_EXPLOREMODE 0x0020
558 #define SBSP_ABSOLUTE 0x0000
559 #define SBSP_RELATIVE 0x1000
560 #define SBSP_PARENT 0x2000
561 #define SBSP_NAVIGATEBACK 0x4000
562 #define SBSP_NAVIGATEFORWARD 0x8000
564 #define SBSP_ALLOW_AUTONAVIGATE 0x10000
566 #define SBSP_INITIATEDBYHLINKFRAME 0x80000000
567 #define SBSP_REDIRECT 0x40000000
568 #define SBSP_WRITENOHISTORY 0x08000000
570 /* uFlage for SetToolbarItems */
571 #define FCT_MERGE 0x0001
572 #define FCT_CONFIGABLE 0x0002
573 #define FCT_ADDTOEND 0x0004
575 typedef struct IShellBrowser_VTable
576 { // *** IUnknown methods ***
577 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
578 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
579 STDMETHOD_(ULONG,Release) (THIS) PURE;
581 // *** IOleWindow methods ***
582 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
583 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
585 // *** IShellBrowser methods *** (same as IOleInPlaceFrame)
586 STDMETHOD(InsertMenusSB) (THIS_ HMENU32 hmenuShared, LPOLEMENUGROUPWIDTHS32 lpMenuWidths) PURE;
587 STDMETHOD(SetMenuSB) (THIS_ HMENU32 hmenuShared, HOLEMENU32 holemenuReserved, HWND32 hwndActiveObject) PURE;
588 STDMETHOD(RemoveMenusSB) (THIS_ HMENU32 hmenuShared) PURE;
589 STDMETHOD(SetStatusTextSB) (THIS_ LPCOLESTR32 lpszStatusText) PURE;
590 STDMETHOD(EnableModelessSB) (THIS_ BOOL32 fEnable) PURE;
591 STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG32 lpmsg, WORD wID) PURE;
593 // *** IShellBrowser methods ***
594 STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST pidl, UINT32 wFlags) PURE;
595 STDMETHOD(GetViewStateStream)(THIS_ DWORD grfMode, LPSTREAM32 *ppStrm) PURE;
596 STDMETHOD(GetControlWindow)(THIS_ UINT32 id, HWND32 * lphwnd) PURE;
597 STDMETHOD(SendControlMsg)(THIS_ UINT32 id, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, LRESULT * pret) PURE;
598 STDMETHOD(QueryActiveShellView)(THIS_ IShellView ** ppshv) PURE;
599 STDMETHOD(OnViewWindowActive)(THIS_ IShellView * ppshv) PURE;
600 STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON lpButtons, UINT32 nButtons, UINT32 uFlags) PURE;
601 } *LPSHELLBROWSER_VTABLE,IShellBrowser_VTable;;
603 struct tagSHELLBROWSER
604 { LPSHELLBROWSER_VTABLE lpvtbl;
610 /************************************************************************
611 * IShellView interface
613 #define THIS LPSHELLVIEW this
615 /* shellview select item flags*/
616 #define SVSI_DESELECT 0x0000
617 #define SVSI_SELECT 0x0001
618 #define SVSI_EDIT 0x0003 // includes select
619 #define SVSI_DESELECTOTHERS 0x0004
620 #define SVSI_ENSUREVISIBLE 0x0008
621 #define SVSI_FOCUSED 0x0010
623 /* shellview get item object flags */
624 #define SVGIO_BACKGROUND 0x00000000
625 #define SVGIO_SELECTION 0x00000001
626 #define SVGIO_ALLVIEW 0x00000002
628 /* The explorer dispatches WM_COMMAND messages based on the range of
629 command/menuitem IDs. All the IDs of menuitems that the view (right
630 pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
631 won't dispatch them). The view should not deal with any menuitems
632 in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
633 version of the shell).
635 FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
636 FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
637 FCIDM_GLOBAL/LAST for the explorer's submenu IDs
639 #define FCIDM_SHVIEWFIRST 0x0000
640 #define FCIDM_SHVIEWLAST 0x7fff
641 #define FCIDM_BROWSERFIRST 0xa000
642 #define FCIDM_BROWSERLAST 0xbf00
643 #define FCIDM_GLOBALFIRST 0x8000
644 #define FCIDM_GLOBALLAST 0x9fff
647 * Global submenu IDs and separator IDs
649 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
650 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
651 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
652 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
653 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
654 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
655 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
656 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
657 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
658 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
660 /* control IDs known to the view */
661 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
662 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
664 /* uState values for IShellView::UIActivate */
666 { SVUIA_DEACTIVATE = 0,
667 SVUIA_ACTIVATE_NOFOCUS = 1,
668 SVUIA_ACTIVATE_FOCUS = 2,
669 SVUIA_INPLACEACTIVATE = 3 // new flag for IShellView2
674 typedef struct IShellView_VTable
675 { // *** IUnknown methods ***
676 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
677 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
678 STDMETHOD_(ULONG,Release) (THIS) PURE;
680 // *** IOleWindow methods ***
681 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
682 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
684 // *** IShellView methods ***
685 STDMETHOD(TranslateAccelerator) (THIS_ LPMSG32 lpmsg) PURE;
686 STDMETHOD(EnableModeless) (THIS_ BOOL32 fEnable) PURE;
687 STDMETHOD(UIActivate) (THIS_ UINT32 uState) PURE;
688 STDMETHOD(Refresh) (THIS) PURE;
689 STDMETHOD(CreateViewWindow)(THIS_ IShellView *lpPrevView,LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,RECT32 * prcView, HWND32 *phWnd) PURE;
690 STDMETHOD(DestroyViewWindow)(THIS) PURE;
691 STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS lpfs) PURE;
692 STDMETHOD(AddPropertySheetPages)(THIS_ DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) PURE;
693 STDMETHOD(SaveViewState)(THIS) PURE;
694 STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST pidlItem, UINT32 uFlags) PURE;
695 STDMETHOD(GetItemObject)(THIS_ UINT32 uItem, REFIID riid,LPVOID *ppv) PURE;
696 } IShellView_VTable,*LPSHELLVIEW_VTABLE;
699 { LPSHELLVIEW_VTABLE lpvtbl;
702 LPSHELLFOLDER pSFParent;
703 LPSHELLBROWSER pShellBrowser;
704 LPCOMMDLGBROWSER pCommDlgBrowser;
707 FOLDERSETTINGS FolderSettings;
713 typedef GUID SHELLVIEWID;
714 #define SV_CLASS_NAME ("SHELLDLL_DefView")
717 /****************************************************************************
718 * ICommDlgBrowser interface
720 #define THIS LPCOMMDLGBROWSER this
722 /* for OnStateChange*/
723 #define CDBOSC_SETFOCUS 0x00000000
724 #define CDBOSC_KILLFOCUS 0x00000001
725 #define CDBOSC_SELCHANGE 0x00000002
726 #define CDBOSC_RENAME 0x00000003
728 typedef struct ICommDlgBrowser_VTable
729 { /* IUnknown methods */
730 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
731 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
732 STDMETHOD_(ULONG,Release) (THIS) PURE;
734 /* ICommDlgBrowser methods */
735 STDMETHOD(OnDefaultCommand) (THIS_ LPSHELLVIEW ppshv) PURE;
736 STDMETHOD(OnStateChange) (THIS_ LPSHELLVIEW ppshv, ULONG uChange) PURE;
737 STDMETHOD(IncludeObject) (THIS_ LPSHELLVIEW ppshv, LPCITEMIDLIST pidl) PURE;
738 } ICommDlgBrowser_VTable,*LPCOMMDLGBROWSER_VTABLE;
740 struct tagCOMMDLGBROWSER
741 { LPCOMMDLGBROWSER_VTABLE lpvtbl;
745 /****************************************************************************
746 * IShellLink interface
749 #define THIS LPSHELLLINK this
750 /* IShellLink::Resolve fFlags */
753 SLR_ANY_MATCH = 0x0002,
757 /* IShellLink::GetPath fFlags */
759 SLGP_SHORTPATH = 0x0001,
760 SLGP_UNCPRIORITY = 0x0002
765 typedef struct IShellLink IShellLink,*LPSHELLLINK;
766 typedef struct IShellLink_VTable
768 /* *** IUnknown methods *** */
769 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
770 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
771 STDMETHOD_(ULONG,Release) (THIS) PURE;
773 STDMETHOD(GetPath)(THIS_ LPSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
775 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
776 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
778 STDMETHOD(GetDescription)(THIS_ LPSTR pszName,INT32 cchMaxName) PURE;
779 STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE;
781 STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir,INT32 cchMaxPath) PURE;
782 STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE;
784 STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs,INT32 cchMaxPath) PURE;
785 STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE;
787 STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
788 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
790 STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
791 STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
793 STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
794 STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath,INT32 iIcon) PURE;
796 STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
798 STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
800 STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
801 } IShellLink_VTable,*LPSHELLLINK_VTABLE;
804 LPSHELLLINK_VTABLE lpvtbl;
810 /****************************************************************************
811 * IExtractIconinterface
814 * Is the ExtractIconA interface
816 #define THIS LPEXTRACTICON this
818 /* GetIconLocation() input flags*/
819 #define GIL_OPENICON 0x0001 // allows containers to specify an "open" look
820 #define GIL_FORSHELL 0x0002 // icon is to be displayed in a ShellFolder
821 #define GIL_ASYNC 0x0020 // this is an async extract, return E_ASYNC
823 /* GetIconLocation() return flags */
824 #define GIL_SIMULATEDOC 0x0001 // simulate this document icon for this
825 #define GIL_PERINSTANCE 0x0002 // icons from this class are per instance (each file has its own)
826 #define GIL_PERCLASS 0x0004 // icons from this class per class (shared for all files of this type)
827 #define GIL_NOTFILENAME 0x0008 // location is not a filename, must call ::ExtractIcon
828 #define GIL_DONTCACHE 0x0010 // this icon should not be cached
830 typedef struct IExtractIcon IExtractIcon,*LPEXTRACTICON;
831 typedef struct IExtractIcon_VTable
832 { /*** IUnknown methods ***/
833 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
834 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
835 STDMETHOD_(ULONG,Release) (THIS) PURE;
837 /*** IExtractIcon methods ***/
838 STDMETHOD(GetIconLocation)(THIS_ UINT32 uFlags, LPSTR szIconFile, UINT32 cchMax,INT32 * piIndex, UINT32 * pwFlags) PURE;
839 STDMETHOD(Extract)(THIS_ LPCSTR pszFile, UINT32 nIconIndex, HICON32 *phiconLarge, HICON32 *phiconSmall, UINT32 nIconSize) PURE;
840 }IExtractIccon_VTable,*LPEXTRACTICON_VTABLE;
843 { LPEXTRACTICON_VTABLE lpvtbl;
849 /****************************************************************************
850 * IShellIcon interface
853 #define THIS LPSHELLICON this
855 typedef struct IShellIcon_VTable
856 { /*** IUnknown methods ***/
857 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
858 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
859 STDMETHOD_(ULONG,Release) (THIS) PURE;
861 /*** IShellIcon methods ***/
862 STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT32 flags, LPINT32 lpIconIndex) PURE;
863 } IShellIcon_VTable,*LPSHELLICON_VTABLE;
866 { LPSHELLICON_VTABLE lpvtbl;
870 /****************************************************************************
871 * IDockingWindowFrame interface
873 #define THIS LPDOCKINGWINDOWFRAME this
875 #define DWFRF_NORMAL 0x0000 /* femove toolbar flags*/
876 #define DWFRF_DELETECONFIGDATA 0x0001
877 #define DWFAF_HIDDEN 0x0001 /* add tolbar*/
879 typedef struct IDockingWindowFrame_VTable
880 { STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
881 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
882 STDMETHOD_(ULONG,Release) (THIS) PURE;
884 /*** IOleWindow methods ***/
885 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
886 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
888 /*** IDockingWindowFrame methods ***/
889 STDMETHOD(AddToolbar) (THIS_ IUnknown* punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags) PURE;
890 STDMETHOD(RemoveToolbar) (THIS_ IUnknown* punkSrc, DWORD dwRemoveFlags) PURE;
891 STDMETHOD(FindToolbar) (THIS_ LPCWSTR pwszItem, REFIID riid, LPVOID* ppvObj) PURE;
892 } IDockingWindowFrame_VTable, *LPDOCKINGWINDOWFRAME_VTABLE;
894 struct tagDOCKINGWINDOWFRAME
895 { LPDOCKINGWINDOWFRAME_VTABLE lpvtbl;
900 /****************************************************************************
901 * IServiceProvider interface
903 #define THIS LPSERVICEPROVIDER this
905 typedef struct IServiceProvider_VTable
906 { /*** IUnknown methods ***/
907 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
908 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
909 STDMETHOD_(ULONG,Release) (THIS) PURE;
911 STDMETHOD(QueryService)(THIS_ REFGUID guidService, REFIID riid, void **ppvObject);
912 } IServiceProvider_VTable, *LPSERVICEPROVIDER_VTABLE;
914 struct tagSERVICEPROVIDER
915 { LPSERVICEPROVIDER_VTABLE lpvtbl;
918 /****************************************************************************
922 extern LPDATAOBJECT IDataObject_Constructor();
923 extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT32, const FORMATETC32 []);
925 extern LPCLASSFACTORY IClassFactory_Constructor();
926 extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT32);
927 extern LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER,LPITEMIDLIST);
928 extern LPSHELLVIEW IShellView_Constructor();
929 extern LPSHELLLINK IShellLink_Constructor();
930 extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD);
931 extern LPEXTRACTICON IExtractIcon_Constructor(LPITEMIDLIST);
933 /****************************************************************************
936 #define SE_ERR_FNF 2 // file not found
937 #define SE_ERR_PNF 3 // path not found
938 #define SE_ERR_ACCESSDENIED 5 // access denied
939 #define SE_ERR_OOM 8 // out of memory
940 #define SE_ERR_DLLNOTFOUND 32
941 #define SE_ERR_SHARE 26
942 #define SE_ERR_ASSOCINCOMPLETE 27
943 #define SE_ERR_DDETIMEOUT 28
944 #define SE_ERR_DDEFAIL 29
945 #define SE_ERR_DDEBUSY 30
946 #define SE_ERR_NOASSOC 31
948 #define SEE_MASK_CLASSNAME 0x00000001
949 #define SEE_MASK_CLASSKEY 0x00000003
950 #define SEE_MASK_IDLIST 0x00000004
951 #define SEE_MASK_INVOKEIDLIST 0x0000000c
952 #define SEE_MASK_ICON 0x00000010
953 #define SEE_MASK_HOTKEY 0x00000020
954 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
955 #define SEE_MASK_CONNECTNETDRV 0x00000080
956 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
957 #define SEE_MASK_DOENVSUBST 0x00000200
958 #define SEE_MASK_FLAG_NO_UI 0x00000400
959 #define SEE_MASK_UNICODE 0x00004000
960 #define SEE_MASK_NO_CONSOLE 0x00008000
961 #define SEE_MASK_ASYNCOK 0x00100000
962 #define SEE_MASK_HMONITOR 0x00200000
964 typedef struct _SHELLEXECUTEINFOA
973 HINSTANCE32 hInstApp;
974 /* Optional fields */
984 } SHELLEXECUTEINFO32A, *LPSHELLEXECUTEINFO32A;
986 typedef struct _SHELLEXECUTEINFOW
992 LPCWSTR lpParameters;
995 HINSTANCE32 hInstApp;
1006 } SHELLEXECUTEINFO32W, *LPSHELLEXECUTEINFO32W;
1008 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
1009 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
1011 BOOL32 WINAPI ShellExecuteEx32A(LPSHELLEXECUTEINFO32A lpExecInfo);
1012 BOOL32 WINAPI ShellExecuteEx32W(LPSHELLEXECUTEINFO32W lpExecInfo);
1013 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
1015 void WINAPI WinExecError32A(HWND32 hwnd,INT32 error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
1016 void WINAPI WinExecError32W(HWND32 hwnd,INT32 error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
1017 #define WinExecError WINELIB_NAME_AW(WinExecError)
1021 /****************************************************************************
1022 * SHBrowseForFolder API
1024 typedef INT32 (CALLBACK* BFFCALLBACK)(HWND32 hwnd, UINT32 uMsg, LPARAM lParam, LPARAM lpData);
1026 typedef struct tagBROWSEINFO32A {
1028 LPCITEMIDLIST pidlRoot;
1029 LPSTR pszDisplayName;
1035 } BROWSEINFO32A, *PBROWSEINFO32A, *LPBROWSEINFO32A;
1037 typedef struct tagBROWSEINFO32W {
1039 LPCITEMIDLIST pidlRoot;
1040 LPWSTR pszDisplayName;
1046 } BROWSEINFO32W, *PBROWSEINFO32W, *LPBROWSEINFO32W;
1048 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
1049 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
1050 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
1052 // Browsing for directory.
1053 #define BIF_RETURNONLYFSDIRS 0x0001
1054 #define BIF_DONTGOBELOWDOMAIN 0x0002
1055 #define BIF_STATUSTEXT 0x0004
1056 #define BIF_RETURNFSANCESTORS 0x0008
1057 #define BIF_EDITBOX 0x0010
1058 #define BIF_VALIDATE 0x0020
1060 #define BIF_BROWSEFORCOMPUTER 0x1000
1061 #define BIF_BROWSEFORPRINTER 0x2000
1062 #define BIF_BROWSEINCLUDEFILES 0x4000
1064 // message from browser
1065 #define BFFM_INITIALIZED 1
1066 #define BFFM_SELCHANGED 2
1067 #define BFFM_VALIDATEFAILEDA 3 // lParam:szPath ret:1(cont),0(EndDialog)
1068 #define BFFM_VALIDATEFAILEDW 4 // lParam:wzPath ret:1(cont),0(EndDialog)
1070 // messages to browser
1071 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
1072 #define BFFM_ENABLEOK (WM_USER+101)
1073 #define BFFM_SETSELECTIONA (WM_USER+102)
1074 #define BFFM_SETSELECTIONW (WM_USER+103)
1075 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
1079 #define SHBrowseForFolder SHBrowseForFolderW
1080 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
1081 #define BFFM_SETSELECTION BFFM_SETSELECTIONW
1083 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
1085 #define SHBrowseForFolder SHBrowseForFolderA
1086 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
1087 #define BFFM_SETSELECTION BFFM_SETSELECTIONA
1089 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
1093 LPITEMIDLIST WINAPI SHBrowseForFolder32A(LPBROWSEINFO32A lpbi);
1094 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
1095 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
1097 /****************************************************************************
1098 * shlview structures
1102 * IShellFolderViewCallback Callback
1103 * This "callback" is called by the shells default IShellView implementation (that
1104 * we got using SHCreateShellViewEx()), to notify us of the various things that
1105 * are happening to the shellview (and ask for things too).
1107 * You don't have to support anything here - anything you don't want to
1108 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
1109 * that the shell passes to this function are entirely undocumented.
1111 * HOWEVER, as the cabview sample as originally written used this callback, the
1112 * writers implemented the callback mechanism on top of their own IShellView.
1113 * Look there for some clues on what to do here.
1116 typedef HRESULT(CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
1117 HWND32 hwnd,UINT32 uMsg,UINT32 wParam,LPARAM lParam);
1119 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
1120 #define NF_INHERITVIEW 0x0000
1121 #define NF_LOCALVIEW 0x0001
1123 typedef struct _SHELLVIEWDATA // idl
1125 LPSHELLFOLDER pShellFolder;
1128 DWORD v3; // always 0
1129 SHELLVIEWPROC pCallBack;
1130 DWORD viewmode; // NF_* enum
1131 } SHELLVIEWDATA, * LPSHELLVIEWDATA;
1134 The shell keeps track of some per-user state to handle display
1135 options that is of majorinterest to ISVs.
1136 The key one requested right now is "DoubleClickInWebView".
1139 { BOOL32 fShowAllObjects : 1;
1140 BOOL32 fShowExtensions : 1;
1141 BOOL32 fNoConfirmRecycle : 1;
1142 BOOL32 fShowSysFiles : 1;
1143 BOOL32 fShowCompColor : 1;
1144 BOOL32 fDoubleClickInWebView : 1;
1145 BOOL32 fDesktopHTML : 1;
1146 BOOL32 fWin95Classic : 1;
1147 BOOL32 fDontPrettyPath : 1;
1148 BOOL32 fShowAttribCol : 1;
1149 BOOL32 fMapNetDrvBtn : 1;
1150 BOOL32 fShowInfoTip : 1;
1151 BOOL32 fHideIcons : 1;
1152 UINT32 fRestFlags : 3;
1153 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
1162 #endif /*_WINE_SHLOBJ_H*/