12 #include "interfaces.h"
14 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
15 #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 tagPERSISTFILE
*LPPERSISTFILE
, IPersistFile
;
30 typedef struct tagCONTEXTMENU
*LPCONTEXTMENU
, IContextMenu
;
31 typedef struct tagSHELLEXTINIT
*LPSHELLEXTINIT
,IShellExtInit
;
32 typedef struct tagENUMIDLIST
*LPENUMIDLIST
, IEnumIDList
;
33 typedef struct tagSHELLFOLDER
*LPSHELLFOLDER
, IShellFolder
;
34 typedef struct tagSHELLVIEW
*LPSHELLVIEW
, IShellView
;
35 typedef struct tagSHELLBROWSER
*LPSHELLBROWSER
,IShellBrowser
;
36 typedef struct tagDATAOBJECT
*LPDATAOBJECT
, IDataObject
;
37 typedef struct tagSHELLICON
*LPSHELLICON
, IShellIcon
;
38 typedef struct tagDOCKINGWINDOWFRAME
*LPDOCKINGWINDOWFRAME
, IDockingWindowFrame
;
39 typedef struct tagSERVICEPROVIDER
*LPSERVICEPROVIDER
, IServiceProvider
;
40 typedef struct tagCOMMDLGBROWSER
*LPCOMMDLGBROWSER
, ICommDlgBrowser
;
41 typedef struct tagENUMFORMATETC
*LPENUMFORMATETC
, IEnumFORMATETC
;
43 /****************************************************************************
46 /* desktop elements */
47 DEFINE_GUID (IID_MyComputer
, 0x20D04FE0L
, 0x3AEA, 0x1069, 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
50 DEFINE_SHLGUID(IID_IEnumUnknown
, 0x00000100L
, 0, 0);
51 DEFINE_SHLGUID(IID_IEnumString
, 0x00000101L
, 0, 0);
52 DEFINE_SHLGUID(IID_IEnumMoniker
, 0x00000102L
, 0, 0);
53 DEFINE_SHLGUID(IID_IEnumFORMATETC
, 0x00000103L
, 0, 0);
54 DEFINE_SHLGUID(IID_IEnumOLEVERB
, 0x00000104L
, 0, 0);
55 DEFINE_SHLGUID(IID_IEnumSTATDATA
, 0x00000105L
, 0, 0);
57 DEFINE_SHLGUID(IID_IPersistStream
, 0x00000109L
, 0, 0);
58 DEFINE_SHLGUID(IID_IPersistStorage
, 0x0000010AL
, 0, 0);
59 DEFINE_SHLGUID(IID_IPersistFile
, 0x0000010BL
, 0, 0);
60 DEFINE_SHLGUID(IID_IPersist
, 0x0000010CL
, 0, 0);
61 DEFINE_SHLGUID(IID_IViewObject
, 0x0000010DL
, 0, 0);
62 DEFINE_SHLGUID(IID_IDataObject
, 0x0000010EL
, 0, 0);
64 DEFINE_SHLGUID(IID_IDropSource
, 0x00000121L
, 0, 0);
65 DEFINE_SHLGUID(IID_IDropTarget
, 0x00000122L
, 0, 0);
67 DEFINE_GUID (IID_IServiceProvider
, 0x6D5140C1L
, 0x7436, 0x11CE, 0x80, 0x34, 0x00, 0xAA, 0x00, 0x60, 0x09, 0xFA);
68 DEFINE_GUID (IID_IDockingWindow
, 0x012dd920L
, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
69 DEFINE_GUID (IID_IDockingWindowSite
, 0x2A342FC2L
, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
70 DEFINE_GUID (IID_IDockingWindowFrame
, 0x47D2657AL
, 0x7B27, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
72 DEFINE_SHLGUID(CLSID_ShellDesktop
, 0x00021400L
, 0, 0);
73 DEFINE_SHLGUID(CLSID_ShellLink
, 0x00021401L
, 0, 0);
75 /* shell32 formatids */
76 DEFINE_SHLGUID(FMTID_Intshcut
, 0x000214A0L
, 0, 0);
77 DEFINE_SHLGUID(FMTID_InternetSite
, 0x000214A1L
, 0, 0);
78 /* command group ids */
79 DEFINE_SHLGUID(CGID_Explorer
, 0x000214D0L
, 0, 0);
80 DEFINE_SHLGUID(CGID_ShellDocView
, 0x000214D1L
, 0, 0);
82 /* shell32interface ids */
83 DEFINE_SHLGUID(IID_INewShortcutHookA
, 0x000214E1L
, 0, 0);
84 DEFINE_SHLGUID(IID_IShellBrowser
, 0x000214E2L
, 0, 0);
85 #define SID_SShellBrowser IID_IShellBrowser
86 DEFINE_SHLGUID(IID_IShellView
, 0x000214E3L
, 0, 0);
87 DEFINE_SHLGUID(IID_IContextMenu
, 0x000214E4L
, 0, 0);
88 DEFINE_SHLGUID(IID_IShellIcon
, 0x000214E5L
, 0, 0);
89 DEFINE_SHLGUID(IID_IShellFolder
, 0x000214E6L
, 0, 0);
90 DEFINE_SHLGUID(IID_IShellExtInit
, 0x000214E8L
, 0, 0);
91 DEFINE_SHLGUID(IID_IShellPropSheetExt
, 0x000214E9L
, 0, 0);
92 DEFINE_SHLGUID(IID_IExtractIcon
, 0x000214EBL
, 0, 0);
93 DEFINE_SHLGUID(IID_IShellLink
, 0x000214EEL
, 0, 0);
94 DEFINE_SHLGUID(IID_IShellCopyHook
, 0x000214EFL
, 0, 0);
95 DEFINE_SHLGUID(IID_IFileViewer
, 0x000214F0L
, 0, 0);
96 DEFINE_SHLGUID(IID_ICommDlgBrowser
, 0x000214F1L
, 0, 0);
97 DEFINE_SHLGUID(IID_IEnumIDList
, 0x000214F2L
, 0, 0);
98 DEFINE_SHLGUID(IID_IFileViewerSite
, 0x000214F3L
, 0, 0);
99 DEFINE_SHLGUID(IID_IContextMenu2
, 0x000214F4L
, 0, 0);
100 DEFINE_SHLGUID(IID_IShellExecuteHookA
, 0x000214F5L
, 0, 0);
101 DEFINE_SHLGUID(IID_IPropSheetPage
, 0x000214F6L
, 0, 0);
102 DEFINE_SHLGUID(IID_INewShortcutHookW
, 0x000214F7L
, 0, 0);
103 DEFINE_SHLGUID(IID_IFileViewerW
, 0x000214F8L
, 0, 0);
104 DEFINE_SHLGUID(IID_IShellLinkW
, 0x000214F9L
, 0, 0);
105 DEFINE_SHLGUID(IID_IExtractIconW
, 0x000214FAL
, 0, 0);
106 DEFINE_SHLGUID(IID_IShellExecuteHookW
, 0x000214FBL
, 0, 0);
107 DEFINE_SHLGUID(IID_IShellCopyHookW
, 0x000214FCL
, 0, 0);
109 /****************************************************************************
112 #define STRRET_WSTR 0x0000
113 #define STRRET_OFFSETA 0x0001
114 #define STRRET_CSTRA 0x0002
115 #define STRRET_ASTR 0X0003
116 #define STRRET_OFFSETW 0X0004
117 #define STRRET_CSTRW 0X0005
120 typedef struct _STRRET
121 { UINT32 uType
; /* STRRET_xxx */
123 { LPWSTR pOleStr
; /* OLESTR that will be freed */
125 UINT32 uOffset
; /* OffsetINT32o SHITEMID (ANSI) */
126 char cStr
[MAX_PATH
]; /* Buffer to fill in */
127 WCHAR cStrW
[MAX_PATH
];
130 /*****************************************************************************
131 * IPersistFile interface
133 #define THIS LPPERSISTFILE this
134 typedef struct IPersistFile_VTable
135 { /* *** IUnknown methods *** */
136 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
137 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
138 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
140 STDMETHOD(GetClassID
)(THIS_ CLSID
*pClassID
) PURE
;
141 STDMETHOD(IsDirty
)(THIS
) PURE
;
142 STDMETHOD(Load
)(THIS_ LPCOLESTR32 pszFileName
, DWORD dwMode
) PURE
;
143 STDMETHOD(Save
)(THIS_ LPCOLESTR32 pszFileName
, BOOL32 fRemember
) PURE
;
144 STDMETHOD(SaveCompleted
)(THIS_ LPCOLESTR32 pszFileName
) PURE
;
145 STDMETHOD(GetCurFile
)(THIS_ LPOLESTR32
*ppszFileName
) PURE
;
147 } IPersistFile_VTable
,*LPPERSISTFILE_VTABLE
;
149 struct tagPERSISTFILE
150 { LPPERSISTFILE_VTABLE lpvtbl
;
155 /*****************************************************************************
156 * IContextMenu interface
158 #define THIS LPCONTEXTMENU this
160 /* default menu items*/
161 #define IDM_EXPLORE 0
164 #define IDM_LAST IDM_RENAME
166 /* QueryContextMenu uFlags */
167 #define CMF_NORMAL 0x00000000
168 #define CMF_DEFAULTONLY 0x00000001
169 #define CMF_VERBSONLY 0x00000002
170 #define CMF_EXPLORE 0x00000004
171 #define CMF_NOVERBS 0x00000008
172 #define CMF_CANRENAME 0x00000010
173 #define CMF_NODEFAULT 0x00000020
174 #define CMF_INCLUDESTATIC 0x00000040
175 #define CMF_RESERVED 0xffff0000 /* View specific */
177 /* GetCommandString uFlags */
178 #define GCS_VERBA 0x00000000 /* canonical verb */
179 #define GCS_HELPTEXTA 0x00000001 /* help text (for status bar) */
180 #define GCS_VALIDATEA 0x00000002 /* validate command exists */
181 #define GCS_VERBW 0x00000004 /* canonical verb (unicode) */
182 #define GCS_HELPTEXTW 0x00000005 /* help text (unicode version) */
183 #define GCS_VALIDATEW 0x00000006 /* validate command exists (unicode) */
184 #define GCS_UNICODE 0x00000004 /* for bit testing - Unicode string */
186 #define GCS_VERB GCS_VERBA
187 #define GCS_HELPTEXT GCS_HELPTEXTA
188 #define GCS_VALIDATE GCS_VALIDATEA
190 #define CMDSTR_NEWFOLDERA "NewFolder"
191 #define CMDSTR_VIEWLISTA "ViewList"
192 #define CMDSTR_VIEWDETAILSA "ViewDetails"
193 #define CMDSTR_NEWFOLDERW L"NewFolder"
194 #define CMDSTR_VIEWLISTW L"ViewList"
195 #define CMDSTR_VIEWDETAILSW L"ViewDetails"
197 #define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERA
198 #define CMDSTR_VIEWLIST CMDSTR_VIEWLISTA
199 #define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSA
201 #define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
202 #define CMIC_MASK_ICON SEE_MASK_ICON
203 #define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
204 #define CMIC_MASK_UNICODE SEE_MASK_UNICODE
205 #define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
206 #define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
207 #define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
208 #define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
209 #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
211 #define CMIC_MASK_PTINVOKE 0x20000000
213 /*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
214 typedef struct tagCMINVOKECOMMANDINFO
215 { DWORD cbSize
; /* sizeof(CMINVOKECOMMANDINFO) */
216 DWORD fMask
; /* any combination of CMIC_MASK_* */
217 HWND32 hwnd
; /* might be NULL (indicating no owner window) */
218 LPCSTR lpVerb
; /* either a string or MAKEINTRESOURCE(idOffset) */
219 LPCSTR lpParameters
; /* might be NULL (indicating no parameter) */
220 LPCSTR lpDirectory
; /* might be NULL (indicating no specific directory) */
221 INT32 nShow
; /* one of SW_ values for ShowWindow() API */
225 } CMINVOKECOMMANDINFO32
, *LPCMINVOKECOMMANDINFO32
;
227 typedef struct tagCMInvokeCommandInfoEx
228 { DWORD cbSize
; /* must be sizeof(CMINVOKECOMMANDINFOEX) */
229 DWORD fMask
; /* any combination of CMIC_MASK_* */
230 HWND32 hwnd
; /* might be NULL (indicating no owner window) */
231 LPCSTR lpVerb
; /* either a string or MAKEINTRESOURCE(idOffset) */
232 LPCSTR lpParameters
; /* might be NULL (indicating no parameter) */
233 LPCSTR lpDirectory
; /* might be NULL (indicating no specific directory) */
234 INT32 nShow
; /* one of SW_ values for ShowWindow() API */
239 LPCSTR lpTitle
; /* For CreateProcess-StartupInfo.lpTitle */
240 LPCWSTR lpVerbW
; /* Unicode verb (for those who can use it) */
241 LPCWSTR lpParametersW
; /* Unicode parameters (for those who can use it) */
242 LPCWSTR lpDirectoryW
; /* Unicode directory (for those who can use it) */
243 LPCWSTR lpTitleW
; /* Unicode title (for those who can use it) */
244 POINT32 ptInvoke
; /* Point where it's invoked */
246 } CMINVOKECOMMANDINFOEX32
, *LPCMINVOKECOMMANDINFOEX32
;
249 typedef struct IContextMenu_VTable
250 { /* *** IUnknown methods *** */
251 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
252 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
253 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
255 STDMETHOD(QueryContextMenu
)(THIS_ HMENU32 hmenu
,UINT32 indexMenu
,UINT32 idCmdFirst
, UINT32 idCmdLast
,UINT32 uFlags
) PURE
;
256 STDMETHOD(InvokeCommand
)(THIS_ LPCMINVOKECOMMANDINFO32 lpici
) PURE
;
257 STDMETHOD(GetCommandString
)(THIS_ UINT32 idCmd
,UINT32 uType
,UINT32
* pwReserved
,LPSTR pszName
,UINT32 cchMax
) PURE
;
259 /* undocumented not only in ContextMenu2 */
260 STDMETHOD(HandleMenuMsg
)(THIS_ UINT32 uMsg
,WPARAM32 wParam
,LPARAM lParam
) PURE
;
262 /* possibly another nasty entry from ContextMenu3 ?*/
264 } IContextMenu_VTable
,*LPCONTEXTMENU_VTABLE
;
266 struct tagCONTEXTMENU
267 { LPCONTEXTMENU_VTABLE lpvtbl
;
269 LPSHELLFOLDER pSFParent
;
270 LPITEMIDLIST
*aPidls
;
275 /*****************************************************************************
276 * structures for shell clipboard formats
278 typedef enum tagDVASPECT
279 { DVASPECT_CONTENT
= 1,
280 DVASPECT_THUMBNAIL
= 2,
282 DVASPECT_DOCPRINT
= 8
285 typedef enum tagTYMED
298 WORD tdDriverNameOffset
;
299 WORD tdDeviceNameOffset
;
300 WORD tdPortNameOffset
;
301 WORD tdExtDevmodeOffset
;
305 typedef WORD CLIPFORMAT32
, *LPCLIPFORMAT32
;
307 /* dataobject as answer to a request */
312 /*HMETAFILEPICT32 hMetaFilePict;*/
313 /*HENHMETAFILE32 hEnhMetaFile;*/
315 LPOLESTR32 lpszFileName
;
319 IUnknown
*pUnkForRelease
;
322 /* wished data format */
324 { CLIPFORMAT32 cfFormat
;
325 DVTARGETDEVICE32
*ptd
;
329 } FORMATETC32
, *LPFORMATETC32
;
331 /* shell specific clipboard formats */
333 /* DATAOBJECT_InitShellIDList*/
334 #define CFSTR_SHELLIDLIST "Shell IDList Array" /* CF_IDLIST */
336 extern UINT32 cfShellIDList
;
343 #define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets" /* CF_OBJECTPOSITIONS */
344 #define CFSTR_NETRESOURCES "Net Resource" /* CF_NETRESOURCE */
346 /* DATAOBJECT_InitFileGroupDesc */
347 #define CFSTR_FILEDESCRIPTORA "FileGroupDescriptor" /* CF_FILEGROUPDESCRIPTORA */
348 extern UINT32 cfFileGroupDesc
;
350 #define CFSTR_FILEDESCRIPTORW "FileGroupDescriptorW" /* CF_FILEGROUPDESCRIPTORW */
352 /* DATAOBJECT_InitFileContents*/
353 #define CFSTR_FILECONTENTS "FileContents" /* CF_FILECONTENTS */
354 extern UINT32 cfFileContents
;
356 #define CFSTR_FILENAMEA "FileName" /* CF_FILENAMEA */
357 #define CFSTR_FILENAMEW "FileNameW" /* CF_FILENAMEW */
358 #define CFSTR_PRINTERGROUP "PrinterFriendlyName" /* CF_PRINTERS */
359 #define CFSTR_FILENAMEMAPA "FileNameMap" /* CF_FILENAMEMAPA */
360 #define CFSTR_FILENAMEMAPW "FileNameMapW" /* CF_FILENAMEMAPW */
361 #define CFSTR_SHELLURL "UniformResourceLocator"
362 #define CFSTR_PREFERREDDROPEFFECT "Preferred DropEffect"
363 #define CFSTR_PERFORMEDDROPEFFECT "Performed DropEffect"
364 #define CFSTR_PASTESUCCEEDED "Paste Succeeded"
365 #define CFSTR_INDRAGLOOP "InShellDragLoop"
367 /**************************************************************************
368 * IDLList "Item ID List List"
371 * interal data holder for IDataObject
373 typedef struct tagLPIDLLIST
*LPIDLLIST
, IDLList
;
375 #define THIS LPIDLLIST this
383 typedef struct IDLList_VTable
384 { STDMETHOD_(UINT32
, GetState
)(THIS
);
385 STDMETHOD_(LPITEMIDLIST
, GetElement
)(THIS_ UINT32 nIndex
);
386 STDMETHOD_(UINT32
, GetCount
)(THIS
);
387 STDMETHOD_(BOOL32
, StoreItem
)(THIS_ LPITEMIDLIST pidl
);
388 STDMETHOD_(BOOL32
, AddItems
)(THIS_ LPITEMIDLIST
*apidl
, UINT32 cidl
);
389 STDMETHOD_(BOOL32
, InitList
)(THIS
);
390 STDMETHOD_(void, CleanList
)(THIS
);
391 } IDLList_VTable
,*LPIDLLIST_VTABLE
;
394 { LPIDLLIST_VTABLE lpvtbl
;
399 extern LPIDLLIST
IDLList_Constructor (UINT32 uStep
);
400 extern void IDLList_Destructor(LPIDLLIST
this);
402 /*****************************************************************************
403 * IEnumFORMATETC interface
405 #define THIS LPENUMFORMATETC this
407 typedef struct IEnumFORMATETC_VTable
408 { /* IUnknown methods */
409 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
410 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
411 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
413 /* IEnumFORMATETC methods */
414 STDMETHOD (Next
)(THIS_ ULONG celt
, FORMATETC32
*rgelt
, ULONG
*pceltFethed
) PURE
;
415 STDMETHOD (Skip
)(THIS_ ULONG celt
) PURE
;
416 STDMETHOD (Reset
)(THIS
) PURE
;
417 STDMETHOD (Clone
)(THIS_ IEnumFORMATETC
** ppenum
) PURE
;
418 } IEnumFORMATETC_VTable
,*LPENUMFORMATETC_VTABLE
;
420 struct tagENUMFORMATETC
421 { LPENUMFORMATETC_VTABLE lpvtbl
;
430 /*****************************************************************************
431 * IDataObject interface
433 #define THIS LPDATAOBJECT this
435 typedef struct IDataObject_VTable
436 { /*** IUnknown methods ***/
437 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
438 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
439 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
441 STDMETHOD (GetData
)(THIS_ LPFORMATETC32 pformatetcIn
, STGMEDIUM32
*pmedium
) PURE
;
442 STDMETHOD (GetDataHere
)(THIS_ LPFORMATETC32 pformatetc
, STGMEDIUM32
*pmedium
) PURE
;
443 STDMETHOD (QueryGetData
)(THIS_ LPFORMATETC32 pformatetc
) PURE
;
444 STDMETHOD (GetCanonicalFormatEtc
)(THIS_ LPFORMATETC32 pformatectIn
, LPFORMATETC32 pformatetcOut
) PURE
;
445 STDMETHOD (SetData
)(THIS_ LPFORMATETC32 pformatetc
, STGMEDIUM32
*pmedium
, BOOL32 fRelease
) PURE
;
446 STDMETHOD (EnumFormatEtc
)(THIS_ DWORD dwDirection
, IEnumFORMATETC
**ppenumFormatEtc
) PURE
;
447 STDMETHOD (DAdvise
)(THIS_ LPFORMATETC32
*pformatetc
, DWORD advf
, IAdviseSink
*pAdvSink
, DWORD
*pdwConnection
) PURE
;
448 STDMETHOD (DUnadvise
)(THIS_ DWORD dwConnection
) PURE
;
449 STDMETHOD (EnumDAdvise
)(THIS_ IEnumSTATDATA
**ppenumAdvise
) PURE
;
450 } IDataObject_VTable
,*LPDATAOBJECT_VTABLE
;
453 { LPDATAOBJECT_VTABLE lpvtbl
;
456 LPIDLLIST lpill
; /* the data of the dataobject */
463 /*****************************************************************************
464 * IShellExtInit interface
466 #define THIS LPSHELLEXTINIT this
468 typedef struct IShellExtInit_VTable
469 { /* *** IUnknown methods *** */
470 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
471 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
472 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
474 /* *** IShellExtInit methods *** */
475 STDMETHOD(Initialize
)(THIS_ LPCITEMIDLIST pidlFolder
, LPDATAOBJECT lpdobj
, HKEY hkeyProgID
) PURE
;
476 } IShellExtInit_VTable
,*LPSHELLEXTINIT_VTABLE
;
478 struct tagSHELLEXTINIT
479 { LPSHELLEXTINIT_VTABLE lpvtbl
;
485 /*****************************************************************************
486 * IEnumIDList interface
488 #define THIS LPENUMIDLIST this
490 typedef struct tagENUMLIST
491 { struct tagENUMLIST
*pNext
;
493 } ENUMLIST
, *LPENUMLIST
;
495 typedef struct IEnumIDList_VTable
496 { /* *** IUnknown methods *** */
497 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
498 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
499 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
501 /* *** IEnumIDList methods *** */
502 STDMETHOD(Next
) (THIS_ ULONG celt
,
504 ULONG
*pceltFetched
) PURE
;
505 STDMETHOD(Skip
) (THIS_ ULONG celt
) PURE
;
506 STDMETHOD(Reset
) (THIS
) PURE
;
507 STDMETHOD(Clone
) (THIS_ IEnumIDList
**ppenum
) PURE
;
508 /* *** private methods *** */
509 STDMETHOD_(BOOL32
,CreateEnumList
)(THIS_ LPCSTR
, DWORD
) PURE
;
510 STDMETHOD_(BOOL32
,AddToEnumList
)(THIS_ LPITEMIDLIST
) PURE
;
511 STDMETHOD_(BOOL32
,DeleteList
)(THIS
) PURE
;
514 } IEnumIDList_VTable
,*LPENUMIDLIST_VTABLE
;
517 { LPENUMIDLIST_VTABLE lpvtbl
;
521 LPENUMLIST mpCurrent
;
525 /*-------------------------------------------------------------------------- */
529 /* FOLDERSETTINGS is a data structure that explorer passes from one folder */
530 /* view to another, when the user is browsing. It calls ISV::GetCurrentInfo */
531 /* member to get the current settings and pass it to ISV::CreateViewWindow */
532 /* to allow the next folder view "inherit" it. These settings assumes a */
533 /* particular UI (which the shell's folder view has), and shell extensions */
534 /* may or may not use those settings. */
536 /*-------------------------------------------------------------------------- */
538 typedef LPBYTE LPVIEWSETTINGS
;
541 /* FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL */
543 { FWF_AUTOARRANGE
= 0x0001,
544 FWF_ABBREVIATEDNAMES
= 0x0002,
545 FWF_SNAPTOGRID
= 0x0004,
546 FWF_OWNERDATA
= 0x0008,
547 FWF_BESTFITWINDOW
= 0x0010,
548 FWF_DESKTOP
= 0x0020,
549 FWF_SINGLESEL
= 0x0040,
550 FWF_NOSUBFOLDERS
= 0x0080,
551 FWF_TRANSPARENT
= 0x0100,
552 FWF_NOCLIENTEDGE
= 0x0200,
553 FWF_NOSCROLL
= 0x0400,
554 FWF_ALIGNLEFT
= 0x0800,
555 FWF_SINGLECLICKACTIVATE
=0x8000 /* TEMPORARY -- NO UI FOR THIS */
566 { UINT32 ViewMode
; /* View mode (FOLDERVIEWMODE values) */
567 UINT32 fFlags
; /* View options (FOLDERFLAGS bits) */
568 } FOLDERSETTINGS
, *LPFOLDERSETTINGS
;
570 typedef const FOLDERSETTINGS
* LPCFOLDERSETTINGS
;
572 /************************************************************************
573 * IShellFolder interface
576 #define THIS LPSHELLFOLDER this
578 /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
580 { SHGDN_NORMAL
= 0, /* default (display purpose) */
581 SHGDN_INFOLDER
= 1, /* displayed under a folder (relative)*/
582 SHGDN_FORPARSING
= 0x8000 /* for ParseDisplayName or path */
585 /* IShellFolder::EnumObjects */
586 typedef enum tagSHCONTF
587 { SHCONTF_FOLDERS
= 32, /* for shell browser */
588 SHCONTF_NONFOLDERS
= 64, /* for default view */
589 SHCONTF_INCLUDEHIDDEN
= 128 /* for hidden/system objects */
593 #define DROPEFFECT_NONE 0
594 #define DROPEFFECT_COPY 1
595 #define DROPEFFECT_MOVE 2
596 #define DROPEFFECT_LINK 4
597 #define DROPEFFECT_SCROLL 0x80000000
599 /* IShellFolder::GetAttributesOf flags */
600 #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
601 #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
602 #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
603 #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
604 #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
605 #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
606 #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
607 #define SFGAO_CAPABILITYMASK 0x00000177L
608 #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
609 #define SFGAO_SHARE 0x00020000L /* shared */
610 #define SFGAO_READONLY 0x00040000L /* read-only */
611 #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
612 #define SFGAO_DISPLAYATTRMASK 0x000F0000L
613 #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
614 #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
615 #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
616 #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
617 #define SFGAO_CONTENTSMASK 0x80000000L
618 #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
619 #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
621 typedef struct IShellFolder_VTable
{
622 /* *** IUnknown methods *** */
623 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
624 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
625 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
627 /* *** IShellFolder methods *** */
628 STDMETHOD(ParseDisplayName
) (THIS_ HWND32 hwndOwner
,LPBC pbcReserved
, LPOLESTR32 lpszDisplayName
,ULONG
* pchEaten
, LPITEMIDLIST
* ppidl
, ULONG
*pdwAttributes
) PURE
;
629 STDMETHOD(EnumObjects
)( THIS_ HWND32 hwndOwner
, DWORD grfFlags
, LPENUMIDLIST
* ppenumIDList
) PURE
;
630 STDMETHOD(BindToObject
)(THIS_ LPCITEMIDLIST pidl
, LPBC pbcReserved
,REFIID riid
, LPVOID
* ppvOut
) PURE
;
631 STDMETHOD(BindToStorage
)(THIS_ LPCITEMIDLIST pidl
, LPBC pbcReserved
,REFIID riid
, LPVOID
* ppvObj
) PURE
;
632 STDMETHOD(CompareIDs
)(THIS_ LPARAM lParam
, LPCITEMIDLIST pidl1
, LPCITEMIDLIST pidl2
) PURE
;
633 STDMETHOD(CreateViewObject
)(THIS_ HWND32 hwndOwner
, REFIID riid
, LPVOID
* ppvOut
) PURE
;
634 STDMETHOD(GetAttributesOf
)(THIS_ UINT32 cidl
, LPCITEMIDLIST
* apidl
,ULONG
* rgfInOut
) PURE
;
635 STDMETHOD(GetUIObjectOf
)(THIS_ HWND32 hwndOwner
, UINT32 cidl
, LPCITEMIDLIST
* apidl
,REFIID riid
, UINT32
* prgfInOut
, LPVOID
* ppvOut
) PURE
;
636 STDMETHOD(GetDisplayNameOf
)(THIS_ LPCITEMIDLIST pidl
, DWORD uFlags
, LPSTRRET lpName
) PURE
;
637 STDMETHOD(SetNameOf
)(THIS_ HWND32 hwndOwner
, LPCITEMIDLIST pidl
,LPCOLESTR32 lpszName
, DWORD uFlags
,LPITEMIDLIST
* ppidlOut
) PURE
;
639 /* utility functions */
640 STDMETHOD_(BOOL32
,GetFolderPath
)(THIS_ LPSTR
, DWORD
);
642 } *LPSHELLFOLDER_VTABLE
,IShellFolder_VTable
;
644 struct tagSHELLFOLDER
{
645 LPSHELLFOLDER_VTABLE lpvtbl
;
648 LPITEMIDLIST pMyPidl
;
650 LPSHELLFOLDER mpSFParent
;
653 extern LPSHELLFOLDER pdesktopfolder
;
655 /************************
658 DWORD WINAPI
SHGetDesktopFolder(LPSHELLFOLDER
*);
661 /************************************************************************
662 * IShellBrowser interface
664 #define THIS LPSHELLBROWSER this
665 /* targets for GetWindow/SendControlMsg */
666 #define FCW_STATUS 0x0001
667 #define FCW_TOOLBAR 0x0002
668 #define FCW_TREE 0x0003
669 #define FCW_INTERNETBAR 0x0006
670 #define FCW_PROGRESS 0x0008
672 /* wFlags for BrowseObject*/
673 #define SBSP_DEFBROWSER 0x0000
674 #define SBSP_SAMEBROWSER 0x0001
675 #define SBSP_NEWBROWSER 0x0002
677 #define SBSP_DEFMODE 0x0000
678 #define SBSP_OPENMODE 0x0010
679 #define SBSP_EXPLOREMODE 0x0020
681 #define SBSP_ABSOLUTE 0x0000
682 #define SBSP_RELATIVE 0x1000
683 #define SBSP_PARENT 0x2000
684 #define SBSP_NAVIGATEBACK 0x4000
685 #define SBSP_NAVIGATEFORWARD 0x8000
687 #define SBSP_ALLOW_AUTONAVIGATE 0x10000
689 #define SBSP_INITIATEDBYHLINKFRAME 0x80000000
690 #define SBSP_REDIRECT 0x40000000
691 #define SBSP_WRITENOHISTORY 0x08000000
693 /* uFlage for SetToolbarItems */
694 #define FCT_MERGE 0x0001
695 #define FCT_CONFIGABLE 0x0002
696 #define FCT_ADDTOEND 0x0004
698 /* undocumented, found in the web posted by Chris Becke */
699 #define CWM_SETPATH (WM_USER+2)
700 #define CWM_WANTIDLE (WM_USER+3)
701 #define CWM_GETSETCURRENTINFO (WM_USER+4)
702 #define CWM_SELECTITEM (WM_USER+5)
703 #define CWM_STOPWAITING (WM_USER+6)
704 #define CWM_GETISHELLBROWSER (WM_USER+7)
706 typedef struct IShellBrowser_VTable
707 { /* *** IUnknown methods *** */
708 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
709 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
710 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
712 /* *** IOleWindow methods *** */
713 STDMETHOD(GetWindow
) (THIS_ HWND32
* lphwnd
) PURE
;
714 STDMETHOD(ContextSensitiveHelp
) (THIS_ BOOL32 fEnterMode
) PURE
;
716 /* *** IShellBrowser methods *** (same as IOleInPlaceFrame) */
717 STDMETHOD(InsertMenusSB
) (THIS_ HMENU32 hmenuShared
, LPOLEMENUGROUPWIDTHS32 lpMenuWidths
) PURE
;
718 STDMETHOD(SetMenuSB
) (THIS_ HMENU32 hmenuShared
, HOLEMENU32 holemenuReserved
, HWND32 hwndActiveObject
) PURE
;
719 STDMETHOD(RemoveMenusSB
) (THIS_ HMENU32 hmenuShared
) PURE
;
720 STDMETHOD(SetStatusTextSB
) (THIS_ LPCOLESTR32 lpszStatusText
) PURE
;
721 STDMETHOD(EnableModelessSB
) (THIS_ BOOL32 fEnable
) PURE
;
722 STDMETHOD(TranslateAcceleratorSB
) (THIS_ LPMSG32 lpmsg
, WORD wID
) PURE
;
724 /* *** IShellBrowser methods *** */
725 STDMETHOD(BrowseObject
)(THIS_ LPCITEMIDLIST pidl
, UINT32 wFlags
) PURE
;
726 STDMETHOD(GetViewStateStream
)(THIS_ DWORD grfMode
, LPSTREAM32
*ppStrm
) PURE
;
727 STDMETHOD(GetControlWindow
)(THIS_ UINT32 id
, HWND32
* lphwnd
) PURE
;
728 STDMETHOD(SendControlMsg
)(THIS_ UINT32 id
, UINT32 uMsg
, WPARAM32 wParam
, LPARAM lParam
, LRESULT
* pret
) PURE
;
729 STDMETHOD(QueryActiveShellView
)(THIS_ IShellView
** ppshv
) PURE
;
730 STDMETHOD(OnViewWindowActive
)(THIS_ IShellView
* ppshv
) PURE
;
731 STDMETHOD(SetToolbarItems
)(THIS_ LPTBBUTTON lpButtons
, UINT32 nButtons
, UINT32 uFlags
) PURE
;
732 } *LPSHELLBROWSER_VTABLE
,IShellBrowser_VTable
;
734 struct tagSHELLBROWSER
735 { LPSHELLBROWSER_VTABLE lpvtbl
;
741 /************************************************************************
742 * IShellView interface
744 #define THIS LPSHELLVIEW this
746 /* shellview select item flags*/
747 #define SVSI_DESELECT 0x0000
748 #define SVSI_SELECT 0x0001
749 #define SVSI_EDIT 0x0003 /* includes select */
750 #define SVSI_DESELECTOTHERS 0x0004
751 #define SVSI_ENSUREVISIBLE 0x0008
752 #define SVSI_FOCUSED 0x0010
754 /* shellview get item object flags */
755 #define SVGIO_BACKGROUND 0x00000000
756 #define SVGIO_SELECTION 0x00000001
757 #define SVGIO_ALLVIEW 0x00000002
759 /* The explorer dispatches WM_COMMAND messages based on the range of
760 command/menuitem IDs. All the IDs of menuitems that the view (right
761 pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
762 won't dispatch them). The view should not deal with any menuitems
763 in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
764 version of the shell).
766 FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
767 FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
768 FCIDM_GLOBAL/LAST for the explorer's submenu IDs
770 #define FCIDM_SHVIEWFIRST 0x0000
772 #define FCIDM_SHVIEW_ARRANGE 0x7001
773 #define FCIDM_SHVIEW_DELETE 0x7011
774 #define FCIDM_SHVIEW_PROPERTIES 0x7013
775 #define FCIDM_SHVIEW_CUT 0x7018
776 #define FCIDM_SHVIEW_COPY 0x7019
777 #define FCIDM_SHVIEW_INSERT 0x701A
778 #define FCIDM_SHVIEW_UNDO 0x701B
779 #define FCIDM_SHVIEW_INSERTLINK 0x701C
780 #define FCIDM_SHVIEW_SELECTALL 0x7021
781 #define FCIDM_SHVIEW_INVERTSELECTION 0x7022
782 #define FCIDM_SHVIEW_BIGICON 0x7029
783 #define FCIDM_SHVIEW_SMALLICON 0x702A
784 #define FCIDM_SHVIEW_LISTVIEW 0x702B
785 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
786 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
787 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
788 #define FCIDM_SHVIEW_HELP 0x7041
790 #define FCIDM_SHVIEWLAST 0x7fff
791 #define FCIDM_BROWSERFIRST 0xA000
792 /* undocumented toolbar items from stddlg's*/
793 #define FCIDM_TB_SMALLICON 0xA003
794 #define FCIDM_TB_REPORTVIEW 0xA004
796 #define FCIDM_BROWSERLAST 0xbf00
797 #define FCIDM_GLOBALFIRST 0x8000
798 #define FCIDM_GLOBALLAST 0x9fff
801 * Global submenu IDs and separator IDs
803 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
804 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
805 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
806 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
807 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
808 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
809 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
810 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
811 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
812 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
814 /* control IDs known to the view */
815 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
816 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
818 /* uState values for IShellView::UIActivate */
820 { SVUIA_DEACTIVATE
= 0,
821 SVUIA_ACTIVATE_NOFOCUS
= 1,
822 SVUIA_ACTIVATE_FOCUS
= 2,
823 SVUIA_INPLACEACTIVATE
= 3 /* new flag for IShellView2 */
828 typedef struct IShellView_VTable
829 { /* *** IUnknown methods *** */
830 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
831 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
832 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
834 /* *** IOleWindow methods *** */
835 STDMETHOD(GetWindow
) (THIS_ HWND32
* lphwnd
) PURE
;
836 STDMETHOD(ContextSensitiveHelp
) (THIS_ BOOL32 fEnterMode
) PURE
;
838 /* *** IShellView methods *** */
839 STDMETHOD(TranslateAccelerator
) (THIS_ LPMSG32 lpmsg
) PURE
;
840 STDMETHOD(EnableModeless
) (THIS_ BOOL32 fEnable
) PURE
;
841 STDMETHOD(UIActivate
) (THIS_ UINT32 uState
) PURE
;
842 STDMETHOD(Refresh
) (THIS
) PURE
;
843 STDMETHOD(CreateViewWindow
)(THIS_ IShellView
*lpPrevView
,LPCFOLDERSETTINGS lpfs
, IShellBrowser
* psb
,RECT32
* prcView
, HWND32
*phWnd
) PURE
;
844 STDMETHOD(DestroyViewWindow
)(THIS
) PURE
;
845 STDMETHOD(GetCurrentInfo
)(THIS_ LPFOLDERSETTINGS lpfs
) PURE
;
846 STDMETHOD(AddPropertySheetPages
)(THIS_ DWORD dwReserved
,LPFNADDPROPSHEETPAGE lpfn
, LPARAM lparam
) PURE
;
847 STDMETHOD(SaveViewState
)(THIS
) PURE
;
848 STDMETHOD(SelectItem
)(THIS_ LPCITEMIDLIST pidlItem
, UINT32 uFlags
) PURE
;
849 STDMETHOD(GetItemObject
)(THIS_ UINT32 uItem
, REFIID riid
,LPVOID
*ppv
) PURE
;
850 } IShellView_VTable
,*LPSHELLVIEW_VTABLE
;
853 { LPSHELLVIEW_VTABLE lpvtbl
;
856 LPSHELLFOLDER pSFParent
;
857 LPSHELLBROWSER pShellBrowser
;
858 LPCOMMDLGBROWSER pCommDlgBrowser
;
862 FOLDERSETTINGS FolderSettings
;
866 LPITEMIDLIST
*aSelectedItems
;
869 typedef GUID SHELLVIEWID
;
870 #define SV_CLASS_NAME ("SHELLDLL_DefView")
873 /****************************************************************************
874 * ICommDlgBrowser interface
876 #define THIS LPCOMMDLGBROWSER this
878 /* for OnStateChange*/
879 #define CDBOSC_SETFOCUS 0x00000000
880 #define CDBOSC_KILLFOCUS 0x00000001
881 #define CDBOSC_SELCHANGE 0x00000002
882 #define CDBOSC_RENAME 0x00000003
884 typedef struct ICommDlgBrowser_VTable
885 { /* IUnknown methods */
886 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
887 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
888 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
890 /* ICommDlgBrowser methods */
891 STDMETHOD(OnDefaultCommand
) (THIS_ LPSHELLVIEW ppshv
) PURE
;
892 STDMETHOD(OnStateChange
) (THIS_ LPSHELLVIEW ppshv
, ULONG uChange
) PURE
;
893 STDMETHOD(IncludeObject
) (THIS_ LPSHELLVIEW ppshv
, LPCITEMIDLIST pidl
) PURE
;
894 } ICommDlgBrowser_VTable
,*LPCOMMDLGBROWSER_VTABLE
;
896 struct tagCOMMDLGBROWSER
897 { LPCOMMDLGBROWSER_VTABLE lpvtbl
;
901 /****************************************************************************
902 * IShellLink interface
905 #define THIS LPSHELLLINK this
906 /* IShellLink::Resolve fFlags */
909 SLR_ANY_MATCH
= 0x0002,
913 /* IShellLink::GetPath fFlags */
915 SLGP_SHORTPATH
= 0x0001,
916 SLGP_UNCPRIORITY
= 0x0002
921 typedef struct IShellLink IShellLink
,*LPSHELLLINK
;
922 typedef struct IShellLink_VTable
924 /* *** IUnknown methods *** */
925 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
926 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
927 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
929 STDMETHOD(GetPath
)(THIS_ LPSTR pszFile
,INT32 cchMaxPath
, WIN32_FIND_DATA32A
*pfd
, DWORD fFlags
) PURE
;
931 STDMETHOD(GetIDList
)(THIS_ LPITEMIDLIST
* ppidl
) PURE
;
932 STDMETHOD(SetIDList
)(THIS_ LPCITEMIDLIST pidl
) PURE
;
934 STDMETHOD(GetDescription
)(THIS_ LPSTR pszName
,INT32 cchMaxName
) PURE
;
935 STDMETHOD(SetDescription
)(THIS_ LPCSTR pszName
) PURE
;
937 STDMETHOD(GetWorkingDirectory
)(THIS_ LPSTR pszDir
,INT32 cchMaxPath
) PURE
;
938 STDMETHOD(SetWorkingDirectory
)(THIS_ LPCSTR pszDir
) PURE
;
940 STDMETHOD(GetArguments
)(THIS_ LPSTR pszArgs
,INT32 cchMaxPath
) PURE
;
941 STDMETHOD(SetArguments
)(THIS_ LPCSTR pszArgs
) PURE
;
943 STDMETHOD(GetHotkey
)(THIS_ WORD
*pwHotkey
) PURE
;
944 STDMETHOD(SetHotkey
)(THIS_ WORD wHotkey
) PURE
;
946 STDMETHOD(GetShowCmd
)(THIS_ INT32
*piShowCmd
) PURE
;
947 STDMETHOD(SetShowCmd
)(THIS_ INT32 iShowCmd
) PURE
;
949 STDMETHOD(GetIconLocation
)(THIS_ LPSTR pszIconPath
,INT32 cchIconPath
,INT32
*piIcon
) PURE
;
950 STDMETHOD(SetIconLocation
)(THIS_ LPCSTR pszIconPath
,INT32 iIcon
) PURE
;
952 STDMETHOD(SetRelativePath
)(THIS_ LPCSTR pszPathRel
, DWORD dwReserved
) PURE
;
954 STDMETHOD(Resolve
)(THIS_ HWND32 hwnd
, DWORD fFlags
) PURE
;
956 STDMETHOD(SetPath
)(THIS_ LPCSTR pszFile
) PURE
;
957 } IShellLink_VTable
,*LPSHELLLINK_VTABLE
;
960 LPSHELLLINK_VTABLE lpvtbl
;
962 /* IPersistfile interface */
968 #define THIS LPSHELLLINKW this
970 typedef struct IShellLinkW IShellLinkW
,*LPSHELLLINKW
;
971 typedef struct IShellLinkW_VTable
973 /* *** IUnknown methods *** */
974 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
975 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
976 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
978 STDMETHOD(GetPath
)(THIS_ LPWSTR pszFile
,INT32 cchMaxPath
, WIN32_FIND_DATA32A
*pfd
, DWORD fFlags
) PURE
;
980 STDMETHOD(GetIDList
)(THIS_ LPITEMIDLIST
* ppidl
) PURE
;
981 STDMETHOD(SetIDList
)(THIS_ LPCITEMIDLIST pidl
) PURE
;
983 STDMETHOD(GetDescription
)(THIS_ LPWSTR pszName
,INT32 cchMaxName
) PURE
;
984 STDMETHOD(SetDescription
)(THIS_ LPCWSTR pszName
) PURE
;
986 STDMETHOD(GetWorkingDirectory
)(THIS_ LPWSTR pszDir
,INT32 cchMaxPath
) PURE
;
987 STDMETHOD(SetWorkingDirectory
)(THIS_ LPCWSTR pszDir
) PURE
;
989 STDMETHOD(GetArguments
)(THIS_ LPWSTR pszArgs
,INT32 cchMaxPath
) PURE
;
990 STDMETHOD(SetArguments
)(THIS_ LPCWSTR pszArgs
) PURE
;
992 STDMETHOD(GetHotkey
)(THIS_ WORD
*pwHotkey
) PURE
;
993 STDMETHOD(SetHotkey
)(THIS_ WORD wHotkey
) PURE
;
995 STDMETHOD(GetShowCmd
)(THIS_ INT32
*piShowCmd
) PURE
;
996 STDMETHOD(SetShowCmd
)(THIS_ INT32 iShowCmd
) PURE
;
998 STDMETHOD(GetIconLocation
)(THIS_ LPWSTR pszIconPath
,INT32 cchIconPath
,INT32
*piIcon
) PURE
;
999 STDMETHOD(SetIconLocation
)(THIS_ LPCWSTR pszIconPath
,INT32 iIcon
) PURE
;
1001 STDMETHOD(SetRelativePath
)(THIS_ LPCWSTR pszPathRel
, DWORD dwReserved
) PURE
;
1003 STDMETHOD(Resolve
)(THIS_ HWND32 hwnd
, DWORD fFlags
) PURE
;
1005 STDMETHOD(SetPath
)(THIS_ LPCWSTR pszFile
) PURE
;
1006 } IShellLinkW_VTable
,*LPSHELLLINKW_VTABLE
;
1008 struct IShellLinkW
{
1009 LPSHELLLINKW_VTABLE lpvtbl
;
1011 /* IPersistfile interface */
1017 /****************************************************************************
1018 * IExtractIconinterface
1021 * Is the ExtractIconA interface
1023 #define THIS LPEXTRACTICON this
1025 /* GetIconLocation() input flags*/
1026 #define GIL_OPENICON 0x0001 /* allows containers to specify an "open" look */
1027 #define GIL_FORSHELL 0x0002 /* icon is to be displayed in a ShellFolder */
1028 #define GIL_ASYNC 0x0020 /* this is an async extract, return E_ASYNC */
1030 /* GetIconLocation() return flags */
1031 #define GIL_SIMULATEDOC 0x0001 /* simulate this document icon for this */
1032 #define GIL_PERINSTANCE 0x0002 /* icons from this class are per instance (each file has its own) */
1033 #define GIL_PERCLASS 0x0004 /* icons from this class per class (shared for all files of this type) */
1034 #define GIL_NOTFILENAME 0x0008 /* location is not a filename, must call ::ExtractIcon */
1035 #define GIL_DONTCACHE 0x0010 /* this icon should not be cached */
1037 typedef struct IExtractIcon IExtractIcon
,*LPEXTRACTICON
;
1038 typedef struct IExtractIcon_VTable
1039 { /*** IUnknown methods ***/
1040 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
1041 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
1042 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
1044 /*** IExtractIcon methods ***/
1045 STDMETHOD(GetIconLocation
)(THIS_ UINT32 uFlags
, LPSTR szIconFile
, UINT32 cchMax
,INT32
* piIndex
, UINT32
* pwFlags
) PURE
;
1046 STDMETHOD(Extract
)(THIS_ LPCSTR pszFile
, UINT32 nIconIndex
, HICON32
*phiconLarge
, HICON32
*phiconSmall
, UINT32 nIconSize
) PURE
;
1047 }IExtractIcon_VTable
,*LPEXTRACTICON_VTABLE
;
1050 { LPEXTRACTICON_VTABLE lpvtbl
;
1057 DWORD WINAPI
SHMapPIDLToSystemImageListIndex(LPSHELLFOLDER sh
,LPITEMIDLIST pidl
,DWORD z
);
1059 /****************************************************************************
1060 * IShellIcon interface
1063 #define THIS LPSHELLICON this
1065 typedef struct IShellIcon_VTable
1066 { /*** IUnknown methods ***/
1067 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
1068 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
1069 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
1071 /*** IShellIcon methods ***/
1072 STDMETHOD(GetIconOf
)(THIS_ LPCITEMIDLIST pidl
, UINT32 flags
, LPINT32 lpIconIndex
) PURE
;
1073 } IShellIcon_VTable
,*LPSHELLICON_VTABLE
;
1076 { LPSHELLICON_VTABLE lpvtbl
;
1080 /****************************************************************************
1081 * IDockingWindowFrame interface
1083 #define THIS LPDOCKINGWINDOWFRAME this
1085 #define DWFRF_NORMAL 0x0000 /* femove toolbar flags*/
1086 #define DWFRF_DELETECONFIGDATA 0x0001
1087 #define DWFAF_HIDDEN 0x0001 /* add tolbar*/
1089 typedef struct IDockingWindowFrame_VTable
1090 { STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
1091 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
1092 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
1094 /*** IOleWindow methods ***/
1095 STDMETHOD(GetWindow
) (THIS_ HWND32
* lphwnd
) PURE
;
1096 STDMETHOD(ContextSensitiveHelp
) (THIS_ BOOL32 fEnterMode
) PURE
;
1098 /*** IDockingWindowFrame methods ***/
1099 STDMETHOD(AddToolbar
) (THIS_ IUnknown
* punkSrc
, LPCWSTR pwszItem
, DWORD dwAddFlags
) PURE
;
1100 STDMETHOD(RemoveToolbar
) (THIS_ IUnknown
* punkSrc
, DWORD dwRemoveFlags
) PURE
;
1101 STDMETHOD(FindToolbar
) (THIS_ LPCWSTR pwszItem
, REFIID riid
, LPVOID
* ppvObj
) PURE
;
1102 } IDockingWindowFrame_VTable
, *LPDOCKINGWINDOWFRAME_VTABLE
;
1104 struct tagDOCKINGWINDOWFRAME
1105 { LPDOCKINGWINDOWFRAME_VTABLE lpvtbl
;
1110 /****************************************************************************
1111 * IServiceProvider interface
1113 #define THIS LPSERVICEPROVIDER this
1115 typedef struct IServiceProvider_VTable
1116 { /*** IUnknown methods ***/
1117 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
1118 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
1119 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
1121 STDMETHOD(QueryService
)(THIS_ REFGUID guidService
, REFIID riid
, void **ppvObject
);
1122 } IServiceProvider_VTable
, *LPSERVICEPROVIDER_VTABLE
;
1124 struct tagSERVICEPROVIDER
1125 { LPSERVICEPROVIDER_VTABLE lpvtbl
;
1128 /****************************************************************************
1131 #define SE_ERR_FNF 2 /* file not found */
1132 #define SE_ERR_PNF 3 /* path not found */
1133 #define SE_ERR_ACCESSDENIED 5 /* access denied */
1134 #define SE_ERR_OOM 8 /* out of memory */
1135 #define SE_ERR_DLLNOTFOUND 32
1136 #define SE_ERR_SHARE 26
1137 #define SE_ERR_ASSOCINCOMPLETE 27
1138 #define SE_ERR_DDETIMEOUT 28
1139 #define SE_ERR_DDEFAIL 29
1140 #define SE_ERR_DDEBUSY 30
1141 #define SE_ERR_NOASSOC 31
1143 #define SEE_MASK_CLASSNAME 0x00000001
1144 #define SEE_MASK_CLASSKEY 0x00000003
1145 #define SEE_MASK_IDLIST 0x00000004
1146 #define SEE_MASK_INVOKEIDLIST 0x0000000c
1147 #define SEE_MASK_ICON 0x00000010
1148 #define SEE_MASK_HOTKEY 0x00000020
1149 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
1150 #define SEE_MASK_CONNECTNETDRV 0x00000080
1151 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
1152 #define SEE_MASK_DOENVSUBST 0x00000200
1153 #define SEE_MASK_FLAG_NO_UI 0x00000400
1154 #define SEE_MASK_UNICODE 0x00004000
1155 #define SEE_MASK_NO_CONSOLE 0x00008000
1156 #define SEE_MASK_ASYNCOK 0x00100000
1157 #define SEE_MASK_HMONITOR 0x00200000
1159 typedef struct _SHELLEXECUTEINFOA
1165 LPCSTR lpParameters
;
1168 HINSTANCE32 hInstApp
;
1169 /* Optional fields */
1179 } SHELLEXECUTEINFO32A
, *LPSHELLEXECUTEINFO32A
;
1181 typedef struct _SHELLEXECUTEINFOW
1187 LPCWSTR lpParameters
;
1188 LPCWSTR lpDirectory
;
1190 HINSTANCE32 hInstApp
;
1191 /* Optional fields*/
1201 } SHELLEXECUTEINFO32W
, *LPSHELLEXECUTEINFO32W
;
1203 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
1204 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
1206 BOOL32 WINAPI
ShellExecuteEx32A(LPSHELLEXECUTEINFO32A lpExecInfo
);
1207 BOOL32 WINAPI
ShellExecuteEx32W(LPSHELLEXECUTEINFO32W lpExecInfo
);
1208 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
1210 void WINAPI
WinExecError32A(HWND32 hwnd
,INT32 error
, LPCSTR lpstrFileName
, LPCSTR lpstrTitle
);
1211 void WINAPI
WinExecError32W(HWND32 hwnd
,INT32 error
, LPCWSTR lpstrFileName
, LPCWSTR lpstrTitle
);
1212 #define WinExecError WINELIB_NAME_AW(WinExecError)
1216 /****************************************************************************
1217 * SHBrowseForFolder API
1219 typedef INT32 (CALLBACK
* BFFCALLBACK
)(HWND32 hwnd
, UINT32 uMsg
, LPARAM lParam
, LPARAM lpData
);
1221 typedef struct tagBROWSEINFO32A
{
1223 LPCITEMIDLIST pidlRoot
;
1224 LPSTR pszDisplayName
;
1230 } BROWSEINFO32A
, *PBROWSEINFO32A
, *LPBROWSEINFO32A
;
1232 typedef struct tagBROWSEINFO32W
{
1234 LPCITEMIDLIST pidlRoot
;
1235 LPWSTR pszDisplayName
;
1241 } BROWSEINFO32W
, *PBROWSEINFO32W
, *LPBROWSEINFO32W
;
1243 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
1244 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
1245 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
1247 /* Browsing for directory. */
1248 #define BIF_RETURNONLYFSDIRS 0x0001
1249 #define BIF_DONTGOBELOWDOMAIN 0x0002
1250 #define BIF_STATUSTEXT 0x0004
1251 #define BIF_RETURNFSANCESTORS 0x0008
1252 #define BIF_EDITBOX 0x0010
1253 #define BIF_VALIDATE 0x0020
1255 #define BIF_BROWSEFORCOMPUTER 0x1000
1256 #define BIF_BROWSEFORPRINTER 0x2000
1257 #define BIF_BROWSEINCLUDEFILES 0x4000
1259 /* message from browser */
1260 #define BFFM_INITIALIZED 1
1261 #define BFFM_SELCHANGED 2
1262 #define BFFM_VALIDATEFAILEDA 3 /* lParam:szPath ret:1(cont),0(EndDialog) */
1263 #define BFFM_VALIDATEFAILEDW 4 /* lParam:wzPath ret:1(cont),0(EndDialog) */
1265 /* messages to browser */
1266 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
1267 #define BFFM_ENABLEOK (WM_USER+101)
1268 #define BFFM_SETSELECTIONA (WM_USER+102)
1269 #define BFFM_SETSELECTIONW (WM_USER+103)
1270 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
1274 #define SHBrowseForFolder SHBrowseForFolderW
1275 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
1276 #define BFFM_SETSELECTION BFFM_SETSELECTIONW
1278 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
1280 #define SHBrowseForFolder SHBrowseForFolderA
1281 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
1282 #define BFFM_SETSELECTION BFFM_SETSELECTIONA
1284 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
1288 LPITEMIDLIST WINAPI
SHBrowseForFolder32A(LPBROWSEINFO32A lpbi
);
1289 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
1290 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
1292 /****************************************************************************
1293 * SHGetDataFromIDList API
1295 #define SHGDFIL_FINDDATA 1
1296 #define SHGDFIL_NETRESOURCE 2
1297 #define SHGDFIL_DESCRIPTIONID 3
1299 #define SHDID_ROOT_REGITEM 1
1300 #define SHDID_FS_FILE 2
1301 #define SHDID_FS_DIRECTORY 3
1302 #define SHDID_FS_OTHER 4
1303 #define SHDID_COMPUTER_DRIVE35 5
1304 #define SHDID_COMPUTER_DRIVE525 6
1305 #define SHDID_COMPUTER_REMOVABLE 7
1306 #define SHDID_COMPUTER_FIXED 8
1307 #define SHDID_COMPUTER_NETDRIVE 9
1308 #define SHDID_COMPUTER_CDROM 10
1309 #define SHDID_COMPUTER_RAMDISK 11
1310 #define SHDID_COMPUTER_OTHER 12
1311 #define SHDID_NET_DOMAIN 13
1312 #define SHDID_NET_SERVER 14
1313 #define SHDID_NET_SHARE 15
1314 #define SHDID_NET_RESTOFNET 16
1315 #define SHDID_NET_OTHER 17
1317 typedef struct _SHDESCRIPTIONID
1318 { DWORD dwDescriptionId
;
1320 } SHDESCRIPTIONID
, *LPSHDESCRIPTIONID
;
1322 HRESULT WINAPI
SHGetDataFromIDListA(LPSHELLFOLDER psf
, LPCITEMIDLIST pidl
, int nFormat
, LPVOID pv
, int cb
);
1323 HRESULT WINAPI
SHGetDataFromIDListW(LPSHELLFOLDER psf
, LPCITEMIDLIST pidl
, int nFormat
, LPVOID pv
, int cb
);
1324 #define SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
1327 /****************************************************************************
1328 * shlview structures
1332 * IShellFolderViewCallback Callback
1333 * This "callback" is called by the shells default IShellView implementation (that
1334 * we got using SHCreateShellViewEx()), to notify us of the various things that
1335 * are happening to the shellview (and ask for things too).
1337 * You don't have to support anything here - anything you don't want to
1338 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
1339 * that the shell passes to this function are entirely undocumented.
1341 * HOWEVER, as the cabview sample as originally written used this callback, the
1342 * writers implemented the callback mechanism on top of their own IShellView.
1343 * Look there for some clues on what to do here.
1346 typedef HRESULT(CALLBACK
*SHELLVIEWPROC
)(DWORD dwUserParam
,LPSHELLFOLDER psf
,
1347 HWND32 hwnd
,UINT32 uMsg
,UINT32 wParam
,LPARAM lParam
);
1349 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
1350 #define NF_INHERITVIEW 0x0000
1351 #define NF_LOCALVIEW 0x0001
1353 typedef struct _SHELLVIEWDATA
/* idl */
1355 LPSHELLFOLDER pShellFolder
;
1358 DWORD v3
; /* always 0 */
1359 SHELLVIEWPROC pCallBack
;
1360 DWORD viewmode
; /* NF_* enum */
1361 } SHELLVIEWDATA
, * LPSHELLVIEWDATA
;
1364 The shell keeps track of some per-user state to handle display
1365 options that is of majorinterest to ISVs.
1366 The key one requested right now is "DoubleClickInWebView".
1369 { BOOL32 fShowAllObjects
: 1;
1370 BOOL32 fShowExtensions
: 1;
1371 BOOL32 fNoConfirmRecycle
: 1;
1372 BOOL32 fShowSysFiles
: 1;
1373 BOOL32 fShowCompColor
: 1;
1374 BOOL32 fDoubleClickInWebView
: 1;
1375 BOOL32 fDesktopHTML
: 1;
1376 BOOL32 fWin95Classic
: 1;
1377 BOOL32 fDontPrettyPath
: 1;
1378 BOOL32 fShowAttribCol
: 1;
1379 BOOL32 fMapNetDrvBtn
: 1;
1380 BOOL32 fShowInfoTip
: 1;
1381 BOOL32 fHideIcons
: 1;
1382 UINT32 fRestFlags
: 3;
1383 } SHELLFLAGSTATE
, * LPSHELLFLAGSTATE
;
1392 #endif /*_WINE_SHLOBJ_H*/