wine/include/shlobj.h
Alexandre Julliard a0d77315e4 Release 980913
Fri Sep 11 13:14:35 1998  Andreas Mohr <100.30936@germany.net>

	* [files/file.c] [include/file.h]
	Fixed SetFilePointer to allow negative positions as in DOS.

	* [graphics/ddraw.c]
	Added some methods to IDirect3D.

	* [ole/compobj.c] [if1632/compobj.spec]
	Added/implemented CoCreateStandardMalloc16,
	CoGetClassObject, CoCreateInstance,
	LookupETask, SetETask, CoGetState16.

	* [loader/task.c]
	MakeProcInstance: return 0 if func == NULL.

	* [*/*] [tools/winapi-check]
	Added zillions of missing WINAPI's and __cdecl's.
	(oops, several caused by myself)
	Wrote script for automated checking.

	* [if1632/compobj.spec]
	Many stub names.

	* [misc/ddeml.c] [ole/compobj.c]
	Some stubs.

Tue Sep  9 21:36:48 1998  Anders Carlsson <anders.carlsson@linux.nu>

	* [dlls/comctl32/Makefile.in] [dlls/comctl32/commctrl.c]
	  [dlls/comctl32/tab.c] [include/commctrl.h] [include/tab.h]
        Added preliminary tab control support.

Sat Sep  5 16:27:20 1998  Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>

	* [graphics/psdrv/*]
	More changes to the PostScript driver:
	Implemented pens and solid brushes.
	Colour/greyscale for fonts, pens and brushes.
	To get coloured output you need to have *ColorDevice set to true
	in your PPD, otherwise you'll get greyscale.
	Landscape mode now works, as does non-A4 page sizes.
	Encoding of fonts to ANSI is better, Symbol works again.

	* [objects/dc.c] [include/gdi.h] [*/*]
	Moved dc->w.{text,background}Pixel to X11DRV_PDEVICE where they
	belong.

Sat Sep  5 05:12:09 1998  Ove Kaaven <ovek@arcticnet.no>

	* [include/dosexe.h] [include/miscemu.h] [include/msdos.h]
	  [loader/dos/dosvm.c] [loader/dos/module.c] [msdos/dpmi.c]
	  [msdos/int2f.c] [msdos/interrupts.c]
	Fixed portability. Adapted some code to make it easier to
	integrate the DOS subsystem with the DPMI subsystem, made
	the DPMI simulated real-mode interrupts be handled the V86
	way. Added support for .COM files. Made int2f DPMI check
	fail, to avoid pkunzip crashing in attempting to use DPMI.
	Generally moved stuff around a little.
	It is now technically possible to load several DOS programs
	into the same memory space. Not tested, though.

Fri Sep  4 21:40:45 1998  Marcus Meissner <marcus@jet.franken.de>

	* [if1632/kernel.spec]
	Changed 500-53x stubnames accordingly to nt3.51 krnl386.exe.

	* [win32/except.c]
	Fixed one bad program behaviour, (deleting SEH while in 
	first walk). RtlUnwind is broken too I think (it should unwind
	on success, not while walking the exception chain).

	* [ole/ole2nls.c]
	Get*DefaultLCID  returns 0x400|id. expected by one application.

	* [if1632/snoop.c]
	Handle non-standard SP returns more graceful.

	* [windows/class.c]
	hinstances are mostly irrelevant for win32.

	* [memory/string.c] [misc/registry.c]
	lstrcmpi32W: use toupper for characters < 0x100. (speedup hack
	for registry.c)
	Some small speedup hacks for registry.c

Thu Sep  3 20:40:16 1998  Eric Kohl <ekohl@abo.rhein-zeitung.de>

	* [Makefile.in][configure][configure.in][dlls/Makefile.in]
	  [dlls/comctl32/Makefile.in]
	Created dlls/comctl32 and moved the common controls stuff to it.

	* [misc/version.c]
	Removed COMCTL32_DllGetVersion. The fixed function is part
	of the common controls stuff.

	* [dlls/comctl32/*.c][include/commctrl.h]
	Added structure size tests.

	* [dlls/comctl32/toolbar.c]
	Fixed a bug in TOOLBAR_GetMaxWidth().

	* [dlls/comctl32/animate.c][include/animate.h]
	  [dlls/comctl32/comboex.c][include/comboex.h]
	  [dlls/comctl32/hotkey.c][include/hotkey.h]
	  [dlls/comctl32/listview.c][include/listview.h]
	  [dlls/comctl32/commctrl.c][include/commctrl.h]
	New files. Added Animation, ComboBoxEx, Hotkey and
	Listview control dummies.

	* [dlls/comctl32/tooltips.c]
	Fixed a display bug and font selection.

	* [dlls/comctl32/comctl32undoc.c][include/commctrl.h]
	Added missing DPA functions. Fixed bugs and published the
	function prototypes.

	* [documentation/common_controls]
	Updated.

Wed Sep  2 15:43:45 1998  Patrik Stridvall <ps@leissner.se>

	* [AUTHORS] [include/authors.h]
	Added myself as a Wine author.

	* [memory/virtual.c] [objects/dc.c]
	Fixed runtime errors for Solaris.

	* [misc/ddeml.c] [objects/gdiobj.c]
	Minor fixes.

	* [win32/device.c]
	Added stubs for IFSMgr VxDCall and
	a partial implementation of IFSMgr DeviceIo.

	* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/imm32.spec] 
	  [relay32/msnet32.spec] [relay32/oledlg.spec]
	Added new spec files for IMM32.DLL, MSNET32.DLL, OLEDLG.DLL.

	* [misc/Makefile.in] [misc/imm.c] [include/imm.h]
	Added news files for implementation of IMM32.DLL. 
	All functions return 0 as is correct for all Western Languages.

	* [ole/Makefile.in] [ole/oledlg.c] [include/oledlg.h]
	Added new files for implementation of OLEDLG.DLL.
	Added stubs with FIXME:s for all functions.

Wed Sep  2 10:50:00 1998  Juergen Schmied <juergen.schmied@metronet.de>

	* [dlls/shell32/contmenu.c][dlls/shell32/shellole.c]
	  [dlls/shell32/shlfolder.c][dlls/shell32/shlview.c]
	  [documentation/shell32][include/shell.h]
	Clean up, bugfixes.
	
	* [dlls/shell32/enumidlist.c]
	Fileattributes implemented.
	
	* [dlls/shell32/pidl.c]
	Class pidlmgr splited into functions, structures changed, 
	some functions rewritten.

	* [dlls/shell32/shell32_main.c]
	Small changes and bugfixes SHGetFileInfoA, SHGetSpecialFolderLocation.
	
	* [dlls/shell32/shellord.c][relay32/shell32.spec]
	Parameter documented, implemented SHCloneSpecialIDList.
	Stub improved ShellExecuteEx32A.
	New stubs SHFind_InitMenuPopup, FileMenu_InitMenuPopup, 
	FileMenu_Create, FileMenu_TrackPopupMenuEx, SHWinHelp,
	SHRunConrolPanel, DAD_ShowDragImage, FileMenu_Destroy,
	SHGetDataFromIDListA, SHFileOperationA.
	
	* [include/winnls.h][include/ole2nls.c]
	TIME_FORCE24HOURFORMAT, TIME_NOTIMEMARKER implemented
	in OLE_GetFormatA, GetTimeFormat32A.
	
	* [win32/code_page.c]
	WideCharToMultiByte: parameter checking and returning of strlen
	implemented.
	
	* [windows/keyboard.c][windows/defwnd.c]
	Debug messages added.
	
	* [windows/win.c]
	WIN_SetWindowLong GWL_STYLE and GWL_EXSTYLE implemented.

	* [controls/menu.c]
	Missing line added.

	* [include/winerror.h]
	Macros for SUCCEEDED and FAILED added.

Mon Aug 31 00:55:31 1998  Ulrich Weigand <weigand@informatik.uni-erlangen.de>

	* [loader/module.c]
	Bugfix: LoadModule16 should *not* call LoadModule32.

	* [files/dos_fs.c]
	Bugfix: don't crash if given directory doesn't exist.

Sat Aug 29 15:00:49 1998  Turchanov Sergey <turchanov@usa.net>

	* [include/mmsystem.h][multimedia/mmsystem.c][relay32/winmm.spec]
	Almost completed implementation of [snd]PlaySound (except
	flags SND_ALIAS_ID and SND_APPLICATION).

	* [if1632/user.spec][windows/winpos.c]
	Added SetWindowRgn16 stub.

Sat Aug 29 02:53:31 1998  Alexander Lukyanov <lav@long.yar.ru>

	* [files/drive.c]
	GetDriveType32A: return DRIVE_DOESNOTEXIST in case of non
	existent drive.

	* [msdos/int21.c]
	INT21_FindFirstFCB: check drive validity to prevent oops.

	* [win32/file.c]
	CreateFile32A: duplicate STD_{INPUT,OUTPUT}_HANDLE.

	* [files/dos_fs.c]
	Make DOSFS_OpenDir treat "" as "/".
	DOSFS_OpenDevice: duplicate STD_{INPUT,OUTPUT}_HANDLE.

	* [windows/dialog.c]
	GetNextDlgTabItem32: use last/first item instead of first/last
	when hwndCtrl==0. This fixes initial focus.

Sat Aug 29 02:46:32 1998  Adrian Harvey <adrian@select.com.au>

	* [include/process.h] [include/process.c]
	Renamed PROCESS_SELF to CURRENT_PROCESS_PSEUDOHANDLE in line
	with thread constant, and Win32 documentation (which calls it
	a pseudohandle.)  Made GetCurrentProcess actually use this
	constant instead of the value.

	* [include/process.h] [include/thread.h] [scheduler/thread.c]
	  [scheduler/process.c] [scheduler/handle.c]
	Modify HANDLE_GetObjPtr to understand about
	CURRENT_THREAD_PSEUDOHANDLE and CURRENT_PROCESS_PSEUDOHANDLE.
	This allows DuplicateHandle to do the correct thing with these
	handles.  Removed now duplicate functionality from THREAD_GetPtr
	and PROCESS_GetPtr.

	* [loader/ne/segment.c]
	Fixed two places where HFILE32s were being created and passed to
	16-bit code. This should unbreak NE self-loading code.
	Added two casts to remove compile time warnings.

Fri Aug 28 21:04:13 1998  Joseph Pranevich <knight@baltimore.wwaves.com>

	* [msdos/dosmem.c] [msdos/int2f.c]
	Added beginnings of DOS error table.

	* [msdos/int1a.c]
	Stub for subfunction 0xb0.

	* [msdos/int10.c] [loader/dos/dosvm.c]
	INT 10 support completely rewritten and lots of debugging
	added. Now, DOS apps that use INT 10 to write to the screen will
	work. (Beyond Zork does, at least. Somewhat.)

	* [include/miscemu.h] [msdos/dosmem.c] [msdos/int21.c]
	Another shot at getting MS's generic error message facility
	right.

	* [msdos/int21.c]
	Command.Com wanted to set its own PSP address. I let it.

Wed Aug 26 12:26:20 1998  Matthew Toseland <Matthew.Toseland@btinternet.com>

	* [include/file.h] [misc/lzexpand.c]
	Fixed LZCopy16 by fixing HFILE16/HFILE32 convertor macros so don't
	convert lzw handles.

Tue Aug 25 22:22:55 1998  Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>

	* [misc/registry.c]
	In RegEnumvalue, ivalue == 0 is a legal request and should
	return the first entry.

	* [msdos/int21.c]
	Add handling for Int21-48/49 in Win16. Makes blinker demo work.

	* [windows/winproc.c]
	Add Msg32A<->Msg32W translation for LB_ADDSTRING.

Tue Aug 25 21:03:31 1998  Kristian Nielsen  <kristian.nielsen@risoe.dk>

	* [windows/win.c]
	Fix for SetParent(): MS Windows 3.11 does not clear the WS_CHILD
	flag when a child window is reparented to the desktop window.

Mon Aug 24 20:55:22 1998  Berend Reitsma <berend at asset-control dot com>

	* [controls/menu.c]
	Menus created with SetMenuItemInfo and InsertMenuItem should
	work now.

Sun Aug 23 23:23:23 1998  Alex Korobka <korobka@ams.sunysb.edu>

	* [controls/combo.c]
	Added CB_GETITEMHEIGHT.

	* [windows/winpos.c] 
	WM_NCHITTEST, SWP_FRAMECHANGED bugfixes.

Sat Aug 22 21:15:29 1998 Alex Priem <alexp@sci.kun.nl>

	* [files/profile.c] [include/windows.h]
	Added GetPrivateProfileSectionNames[AW],GetPrivateProfileSectionW,
	GetPrivateProfileStructW, GetProfileSectionW,
	WriteProfileSection[AW], WritePrivateProfileStructW.
1998-09-13 16:32:00 +00:00

929 lines
34 KiB
C

#ifndef _WINE_SHLOBJ_H
#define _WINE_SHLOBJ_H
#include "shell.h"
#include "ole.h"
#include "ole2.h"
#include "compobj.h"
#include "storage.h"
#include "commctrl.h"
#include "interfaces.h"
#define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
#define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
#define PURE
#define FAR
#define THIS_ THIS,
/****************************************************************************
* DllGetClassObject
*/
DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*);
typedef LPVOID LPBC; /* *IBindCtx really */
/* foreward declaration of the objects*/
typedef struct tagCONTEXTMENU *LPCONTEXTMENU, IContextMenu;
typedef struct tagSHELLEXTINIT *LPSHELLEXTINIT,IShellExtInit;
typedef struct tagENUMIDLIST *LPENUMIDLIST, IEnumIDList;
typedef struct tagSHELLFOLDER *LPSHELLFOLDER, IShellFolder;
typedef struct tagSHELLVIEW *LPSHELLVIEW, IShellView;
typedef struct tagSHELLBROWSER *LPSHELLBROWSER,IShellBrowser;
typedef struct IDataObject IDataObject, *LPDATAOBJECT;
/****************************************************************************
* SHELL ID
*/
/* shell32 classids */
DEFINE_SHLGUID(CLSID_ShellDesktop, 0x00021400L, 0, 0);
DEFINE_SHLGUID(CLSID_ShellLink, 0x00021401L, 0, 0);
/* shell32 formatids */
DEFINE_SHLGUID(FMTID_Intshcut, 0x000214A0L, 0, 0);
DEFINE_SHLGUID(FMTID_InternetSite, 0x000214A1L, 0, 0);
/* command group ids */
DEFINE_SHLGUID(CGID_Explorer, 0x000214D0L, 0, 0);
DEFINE_SHLGUID(CGID_ShellDocView, 0x000214D1L, 0, 0);
/* shell32interface ids */
DEFINE_SHLGUID(IID_INewShortcutHookA, 0x000214E1L, 0, 0);
DEFINE_SHLGUID(IID_IShellBrowser, 0x000214E2L, 0, 0);
DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0);
DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0);
DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0);
DEFINE_SHLGUID(IID_IShellLink, 0x000214EEL, 0, 0);
DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0);
DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0);
DEFINE_SHLGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0);
DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
DEFINE_SHLGUID(IID_IContextMenu2, 0x000214F4L, 0, 0);
DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0);
DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0);
DEFINE_SHLGUID(IID_IShellLinkW, 0x000214F9L, 0, 0);
DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0);
DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0);
DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0);
/****************************************************************************
* STRRET
*/
#define STRRET_WSTR 0x0000
#define STRRET_OFFSET 0x0001
#define STRRET_CSTR 0x0002
typedef struct _STRRET
{ UINT32 uType; /* STRRET_xxx */
union
{ LPWSTR pOleStr; /* OLESTR that will be freed */
UINT32 uOffset; /* OffsetINT32o SHITEMID (ANSI) */
char cStr[MAX_PATH]; /* Buffer to fill in */
}u;
} STRRET,*LPSTRRET;
/*****************************************************************************
* IContextMenu interface
*/
#define THIS LPCONTEXTMENU this
/* QueryContextMenu uFlags */
#define CMF_NORMAL 0x00000000
#define CMF_DEFAULTONLY 0x00000001
#define CMF_VERBSONLY 0x00000002
#define CMF_EXPLORE 0x00000004
#define CMF_NOVERBS 0x00000008
#define CMF_CANRENAME 0x00000010
#define CMF_NODEFAULT 0x00000020
#define CMF_INCLUDESTATIC 0x00000040
#define CMF_RESERVED 0xffff0000 // View specific
/* GetCommandString uFlags */
#define GCS_VERBA 0x00000000 // canonical verb
#define GCS_HELPTEXTA 0x00000001 // help text (for status bar)
#define GCS_VALIDATEA 0x00000002 // validate command exists
#define GCS_VERBW 0x00000004 // canonical verb (unicode)
#define GCS_HELPTEXTW 0x00000005 // help text (unicode version)
#define GCS_VALIDATEW 0x00000006 // validate command exists (unicode)
#define GCS_UNICODE 0x00000004 // for bit testing - Unicode string
#define GCS_VERB GCS_VERBA
#define GCS_HELPTEXT GCS_HELPTEXTA
#define GCS_VALIDATE GCS_VALIDATEA
#define CMDSTR_NEWFOLDERA "NewFolder"
#define CMDSTR_VIEWLISTA "ViewList"
#define CMDSTR_VIEWDETAILSA "ViewDetails"
#define CMDSTR_NEWFOLDERW L"NewFolder"
#define CMDSTR_VIEWLISTW L"ViewList"
#define CMDSTR_VIEWDETAILSW L"ViewDetails"
#define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERA
#define CMDSTR_VIEWLIST CMDSTR_VIEWLISTA
#define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSA
#define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
#define CMIC_MASK_ICON SEE_MASK_ICON
#define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
#define CMIC_MASK_UNICODE SEE_MASK_UNICODE
#define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
#define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
#define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
#define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
#define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
#define CMIC_MASK_PTINVOKE 0x20000000
/*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
typedef struct tagCMINVOKECOMMANDINFO
{ DWORD cbSize; // sizeof(CMINVOKECOMMANDINFO)
DWORD fMask; // any combination of CMIC_MASK_*
HWND32 hwnd; // might be NULL (indicating no owner window)
LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
LPCSTR lpParameters; // might be NULL (indicating no parameter)
LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
INT32 nShow; // one of SW_ values for ShowWindow() API
DWORD dwHotKey;
HANDLE32 hIcon;
} CMINVOKECOMMANDINFO32, *LPCMINVOKECOMMANDINFO32;
typedef struct tagCMInvokeCommandInfoEx
{ DWORD cbSize; // must be sizeof(CMINVOKECOMMANDINFOEX)
DWORD fMask; // any combination of CMIC_MASK_*
HWND32 hwnd; // might be NULL (indicating no owner window)
LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
LPCSTR lpParameters; // might be NULL (indicating no parameter)
LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
INT32 nShow; // one of SW_ values for ShowWindow() API
DWORD dwHotKey;
HANDLE32 hIcon;
LPCSTR lpTitle; // For CreateProcess-StartupInfo.lpTitle
LPCWSTR lpVerbW; // Unicode verb (for those who can use it)
LPCWSTR lpParametersW; // Unicode parameters (for those who can use it)
LPCWSTR lpDirectoryW; // Unicode directory (for those who can use it)
LPCWSTR lpTitleW; // Unicode title (for those who can use it)
POINT32 ptInvoke; // Point where it's invoked
} CMINVOKECOMMANDINFOEX32, *LPCMINVOKECOMMANDINFOEX32;
typedef struct IContextMenu_VTable
{ // *** IUnknown methods ***
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
STDMETHOD(QueryContextMenu)(THIS_ HMENU32 hmenu,UINT32 indexMenu,UINT32 idCmdFirst, UINT32 idCmdLast,UINT32 uFlags) PURE;
STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO32 lpici) PURE;
STDMETHOD(GetCommandString)(THIS_ UINT32 idCmd,UINT32 uType,UINT32 * pwReserved,LPSTR pszName,UINT32 cchMax) PURE;
/* undocumented not only in ContextMenu2 */
STDMETHOD(HandleMenuMsg)(THIS_ UINT32 uMsg,WPARAM32 wParam,LPARAM lParam) PURE;
/* possibly another nasty entry from ContextMenu3 ?*/
void * guard;
} IContextMenu_VTable,*LPCONTEXTMENU_VTABLE;
struct tagCONTEXTMENU
{ LPCONTEXTMENU_VTABLE lpvtbl;
DWORD ref;
LPSHELLFOLDER pSFParent;
LPITEMIDLIST *aPidls;
BOOL32 bAllValues;
};
#undef THIS
/*****************************************************************************
* IShellExtInit interface
*/
#define THIS LPSHELLEXTINIT this
typedef struct IShellExtInit_VTable
{ // *** IUnknown methods ***
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// *** IShellExtInit methods ***
STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID) PURE;
} IShellExtInit_VTable,*LPSHELLEXTINIT_VTABLE;
struct tagSHELLEXTINIT
{ LPSHELLEXTINIT_VTABLE lpvtbl;
DWORD ref;
};
#undef THIS
/*****************************************************************************
* IEnumIDList interface
*/
#define THIS LPENUMIDLIST this
typedef struct tagENUMLIST
{ struct tagENUMLIST *pNext;
LPITEMIDLIST pidl;
} ENUMLIST, *LPENUMLIST;
typedef struct IEnumIDList_VTable
{ /* *** IUnknown methods *** */
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* *** IEnumIDList methods *** */
STDMETHOD(Next) (THIS_ ULONG celt,
LPITEMIDLIST *rgelt,
ULONG *pceltFetched) PURE;
STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
STDMETHOD(Reset) (THIS) PURE;
STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
/* *** private methods *** */
STDMETHOD_(BOOL32,CreateEnumList)(THIS_ LPCSTR, DWORD) PURE;
STDMETHOD_(BOOL32,AddToEnumList)(THIS_ LPITEMIDLIST) PURE;
STDMETHOD_(BOOL32,DeleteList)(THIS) PURE;
} IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
struct tagENUMIDLIST
{ LPENUMIDLIST_VTABLE lpvtbl;
DWORD ref;
LPENUMLIST mpFirst;
LPENUMLIST mpLast;
LPENUMLIST mpCurrent;
};
#undef THIS
//--------------------------------------------------------------------------
//
// FOLDERSETTINGS
//
// FOLDERSETTINGS is a data structure that explorer passes from one folder
// view to another, when the user is browsing. It calls ISV::GetCurrentInfo
// member to get the current settings and pass it to ISV::CreateViewWindow
// to allow the next folder view "inherit" it. These settings assumes a
// particular UI (which the shell's folder view has), and shell extensions
// may or may not use those settings.
//
//--------------------------------------------------------------------------
typedef LPBYTE LPVIEWSETTINGS;
// NB Bitfields.
// FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL
typedef enum
{ FWF_AUTOARRANGE = 0x0001,
FWF_ABBREVIATEDNAMES = 0x0002,
FWF_SNAPTOGRID = 0x0004,
FWF_OWNERDATA = 0x0008,
FWF_BESTFITWINDOW = 0x0010,
FWF_DESKTOP = 0x0020,
FWF_SINGLESEL = 0x0040,
FWF_NOSUBFOLDERS = 0x0080,
FWF_TRANSPARENT = 0x0100,
FWF_NOCLIENTEDGE = 0x0200,
FWF_NOSCROLL = 0x0400,
FWF_ALIGNLEFT = 0x0800,
FWF_SINGLECLICKACTIVATE=0x8000 // TEMPORARY -- NO UI FOR THIS
} FOLDERFLAGS;
typedef enum
{ FVM_ICON = 1,
FVM_SMALLICON = 2,
FVM_LIST = 3,
FVM_DETAILS = 4,
} FOLDERVIEWMODE;
typedef struct
{ UINT32 ViewMode; // View mode (FOLDERVIEWMODE values)
UINT32 fFlags; // View options (FOLDERFLAGS bits)
} FOLDERSETTINGS, *LPFOLDERSETTINGS;
typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
/* FIXME; the next two lines are propersheet related, move to prsht.h when created */
struct _PSP;
typedef struct _PSP FAR* HPROPSHEETPAGE;
typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE,LPARAM);
/************************************************************************
* IShellFolder interface
*/
#define THIS LPSHELLFOLDER this
/* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
typedef enum
{ SHGDN_NORMAL = 0, /* default (display purpose) */
SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
} SHGNO;
/* IShellFolder::EnumObjects */
typedef enum tagSHCONTF
{ SHCONTF_FOLDERS = 32, /* for shell browser */
SHCONTF_NONFOLDERS = 64, /* for default view */
SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
} SHCONTF;
/* from oleidl.h */
#define DROPEFFECT_NONE 0
#define DROPEFFECT_COPY 1
#define DROPEFFECT_MOVE 2
#define DROPEFFECT_LINK 4
#define DROPEFFECT_SCROLL 0x80000000
/* IShellFolder::GetAttributesOf flags */
#define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
#define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
#define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
#define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
#define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
#define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
#define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
#define SFGAO_CAPABILITYMASK 0x00000177L
#define SFGAO_LINK 0x00010000L /* Shortcut (link) */
#define SFGAO_SHARE 0x00020000L /* shared */
#define SFGAO_READONLY 0x00040000L /* read-only */
#define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
#define SFGAO_DISPLAYATTRMASK 0x000F0000L
#define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
#define SFGAO_FOLDER 0x20000000L /* It's a folder. */
#define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
#define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
#define SFGAO_CONTENTSMASK 0x80000000L
#define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
#define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
typedef struct IShellFolder_VTable {
/* *** IUnknown methods *** */
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* *** IShellFolder methods *** */
STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,LPBC pbcReserved, LPOLESTR32 lpszDisplayName,ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
STDMETHOD(EnumObjects)( THIS_ HWND32 hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList) PURE;
STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvOut) PURE;
STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD(CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
STDMETHOD(CreateViewObject)(THIS_ HWND32 hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
STDMETHOD(GetAttributesOf)(THIS_ UINT32 cidl, LPCITEMIDLIST * apidl,ULONG * rgfInOut) PURE;
STDMETHOD(GetUIObjectOf)(THIS_ HWND32 hwndOwner, UINT32 cidl, LPCITEMIDLIST * apidl,REFIID riid, UINT32 * prgfInOut, LPVOID * ppvOut) PURE;
STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
STDMETHOD(SetNameOf)(THIS_ HWND32 hwndOwner, LPCITEMIDLIST pidl,LPCOLESTR32 lpszName, DWORD uFlags,LPITEMIDLIST * ppidlOut) PURE;
/* utility functions */
STDMETHOD_(BOOL32,GetFolderPath)(THIS_ LPSTR, DWORD);
} *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
struct tagSHELLFOLDER {
LPSHELLFOLDER_VTABLE lpvtbl;
DWORD ref;
LPSTR mlpszFolder;
LPITEMIDLIST mpidl;
LPITEMIDLIST mpidlNSRoot;
LPSHELLFOLDER mpSFParent;
};
extern LPSHELLFOLDER pdesktopfolder;
#undef THIS
/************************************************************************
* IShellBrowser interface
*/
#define THIS LPSHELLBROWSER this
#define FCW_STATUS 0x0001
#define FCW_TOOLBAR 0x0002
#define FCW_TREE 0x0003
#define FCW_INTERNETBAR 0x0006
#define FCW_PROGRESS 0x0008
typedef struct IShellBrowser_VTable
{ // *** IUnknown methods ***
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// *** IOleWindow methods ***
STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
// *** IShellBrowser methods *** (same as IOleInPlaceFrame)
STDMETHOD(InsertMenusSB) (THIS_ HMENU32 hmenuShared, LPOLEMENUGROUPWIDTHS32 lpMenuWidths) PURE;
STDMETHOD(SetMenuSB) (THIS_ HMENU32 hmenuShared, HOLEMENU32 holemenuReserved, HWND32 hwndActiveObject) PURE;
STDMETHOD(RemoveMenusSB) (THIS_ HMENU32 hmenuShared) PURE;
STDMETHOD(SetStatusTextSB) (THIS_ LPCOLESTR32 lpszStatusText) PURE;
STDMETHOD(EnableModelessSB) (THIS_ BOOL32 fEnable) PURE;
STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG32 lpmsg, WORD wID) PURE;
// *** IShellBrowser methods ***
STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST pidl, UINT32 wFlags) PURE;
STDMETHOD(GetViewStateStream)(THIS_ DWORD grfMode, LPSTREAM32 *ppStrm) PURE;
STDMETHOD(GetControlWindow)(THIS_ UINT32 id, HWND32 * lphwnd) PURE;
STDMETHOD(SendControlMsg)(THIS_ UINT32 id, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, LRESULT * pret) PURE;
STDMETHOD(QueryActiveShellView)(THIS_ IShellView ** ppshv) PURE;
STDMETHOD(OnViewWindowActive)(THIS_ IShellView * ppshv) PURE;
STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON lpButtons, UINT32 nButtons, UINT32 uFlags) PURE;
} *LPSHELLBROWSER_VTABLE,IShellBrowser_VTable;;
struct tagSHELLBROWSER
{ LPSHELLBROWSER_VTABLE lpvtbl;
DWORD ref;
};
#undef THIS
/************************************************************************
* IShellView interface
*/
#define THIS LPSHELLVIEW this
/* shellview select item flags*/
#define SVSI_DESELECT 0x0000
#define SVSI_SELECT 0x0001
#define SVSI_EDIT 0x0003 // includes select
#define SVSI_DESELECTOTHERS 0x0004
#define SVSI_ENSUREVISIBLE 0x0008
#define SVSI_FOCUSED 0x0010
/* shellview get item object flags */
#define SVGIO_BACKGROUND 0x00000000
#define SVGIO_SELECTION 0x00000001
#define SVGIO_ALLVIEW 0x00000002
/* The explorer dispatches WM_COMMAND messages based on the range of
command/menuitem IDs. All the IDs of menuitems that the view (right
pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
won't dispatch them). The view should not deal with any menuitems
in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
version of the shell).
FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
FCIDM_GLOBAL/LAST for the explorer's submenu IDs
*/
#define FCIDM_SHVIEWFIRST 0x0000
#define FCIDM_SHVIEWLAST 0x7fff
#define FCIDM_BROWSERFIRST 0xa000
#define FCIDM_BROWSERLAST 0xbf00
#define FCIDM_GLOBALFIRST 0x8000
#define FCIDM_GLOBALLAST 0x9fff
/*
* Global submenu IDs and separator IDs
*/
#define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
#define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
#define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
#define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
#define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
#define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
#define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
#define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
#define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
#define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
/* control IDs known to the view */
#define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
#define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
/* uState values for IShellView::UIActivate */
typedef enum
{ SVUIA_DEACTIVATE = 0,
SVUIA_ACTIVATE_NOFOCUS = 1,
SVUIA_ACTIVATE_FOCUS = 2,
SVUIA_INPLACEACTIVATE = 3 // new flag for IShellView2
} SVUIA_STATUS;
typedef struct IShellView_VTable
{ // *** IUnknown methods ***
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// *** IOleWindow methods ***
STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
// *** IShellView methods ***
STDMETHOD(TranslateAccelerator) (THIS_ LPMSG32 lpmsg) PURE;
STDMETHOD(EnableModeless) (THIS_ BOOL32 fEnable) PURE;
STDMETHOD(UIActivate) (THIS_ UINT32 uState) PURE;
STDMETHOD(Refresh) (THIS) PURE;
STDMETHOD(CreateViewWindow)(THIS_ IShellView *lpPrevView,LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,RECT32 * prcView, HWND32 *phWnd) PURE;
STDMETHOD(DestroyViewWindow)(THIS) PURE;
STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS lpfs) PURE;
STDMETHOD(AddPropertySheetPages)(THIS_ DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) PURE;
STDMETHOD(SaveViewState)(THIS) PURE;
STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST pidlItem, UINT32 uFlags) PURE;
STDMETHOD(GetItemObject)(THIS_ UINT32 uItem, REFIID riid,LPVOID *ppv) PURE;
} IShellView_VTable,*LPSHELLVIEW_VTABLE;;
struct tagSHELLVIEW
{ LPSHELLVIEW_VTABLE lpvtbl;
DWORD ref;
LPITEMIDLIST mpidl;
LPSHELLFOLDER pSFParent;
LPSHELLBROWSER pShellBrowser;
HWND32 hWnd;
HWND32 hWndList;
FOLDERSETTINGS FolderSettings;
HWND32 hWndParent;
HMENU32 hMenu;
UINT32 uState;
};
typedef GUID SHELLVIEWID;
#define SV_CLASS_NAME ("ShellViewClass")
#undef THIS
/****************************************************************************
* IShellLink interface
*/
#define THIS LPSHELLLINK this
/* IShellLink::Resolve fFlags */
typedef enum {
SLR_NO_UI = 0x0001,
SLR_ANY_MATCH = 0x0002,
SLR_UPDATE = 0x0004
} SLR_FLAGS;
/* IShellLink::GetPath fFlags */
typedef enum {
SLGP_SHORTPATH = 0x0001,
SLGP_UNCPRIORITY = 0x0002
} SLGP_FLAGS;
typedef struct IShellLink IShellLink,*LPSHELLLINK;
typedef struct IShellLink_VTable
{
/* *** IUnknown methods *** */
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
STDMETHOD(GetPath)(THIS_ LPSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
STDMETHOD(GetDescription)(THIS_ LPSTR pszName,INT32 cchMaxName) PURE;
STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE;
STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir,INT32 cchMaxPath) PURE;
STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE;
STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs,INT32 cchMaxPath) PURE;
STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE;
STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath,INT32 iIcon) PURE;
STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
} IShellLink_VTable,*LPSHELLLINK_VTABLE;
struct IShellLink {
LPSHELLLINK_VTABLE lpvtbl;
DWORD ref;
};
#undef THIS
/****************************************************************************
* IExtractIconinterface
*
* FIXME
* Is the ExtractIconA interface
*/
#define THIS LPEXTRACTICON this
/* GetIconLocation() input flags*/
#define GIL_OPENICON 0x0001 // allows containers to specify an "open" look
#define GIL_FORSHELL 0x0002 // icon is to be displayed in a ShellFolder
#define GIL_ASYNC 0x0020 // this is an async extract, return E_ASYNC
/* GetIconLocation() return flags */
#define GIL_SIMULATEDOC 0x0001 // simulate this document icon for this
#define GIL_PERINSTANCE 0x0002 // icons from this class are per instance (each file has its own)
#define GIL_PERCLASS 0x0004 // icons from this class per class (shared for all files of this type)
#define GIL_NOTFILENAME 0x0008 // location is not a filename, must call ::ExtractIcon
#define GIL_DONTCACHE 0x0010 // this icon should not be cached
typedef struct IExtractIcon IExtractIcon,*LPEXTRACTICON;
typedef struct IExtractIcon_VTable
{ /*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IExtractIcon methods ***/
STDMETHOD(GetIconLocation)(THIS_ UINT32 uFlags, LPSTR szIconFile, UINT32 cchMax,INT32 * piIndex, UINT32 * pwFlags) PURE;
STDMETHOD(Extract)(THIS_ LPCSTR pszFile, UINT32 nIconIndex, HICON32 *phiconLarge, HICON32 *phiconSmall, UINT32 nIconSize) PURE;
}IExtractIccon_VTable,*LPEXTRACTICON_VTABLE;
struct IExtractIcon
{ LPEXTRACTICON_VTABLE lpvtbl;
DWORD ref;
LPITEMIDLIST pidl;
};
#undef THIS
/****************************************************************************
* IShellIcon interface
*/
#define THIS LPSHELLICON this
typedef struct IShellIcon IShellIcon,*LPSHELLICON;
typedef struct IShellIcon_VTable
{ /*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IShellIcon methods ***/
STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT32 flags, LPINT32 lpIconIndex) PURE;
} IShellIcon_VTable,*LPSHELLICON_VTABLE;
struct IShellIcon
{ LPSHELLICON_VTABLE lpvtbl;
DWORD ref;
};
#undef THIS
/****************************************************************************
* Class constructors
*/
#ifdef __WINE__
extern LPCLASSFACTORY IClassFactory_Constructor();
extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT32);
extern LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER,LPITEMIDLIST);
extern LPSHELLVIEW IShellView_Constructor();
extern LPSHELLLINK IShellLink_Constructor();
extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD,HRESULT*);
extern LPEXTRACTICON IExtractIcon_Constructor(LPITEMIDLIST);
#endif
/****************************************************************************
* Shell Execute API
*/
#define SE_ERR_FNF 2 // file not found
#define SE_ERR_PNF 3 // path not found
#define SE_ERR_ACCESSDENIED 5 // access denied
#define SE_ERR_OOM 8 // out of memory
#define SE_ERR_DLLNOTFOUND 32
#define SE_ERR_SHARE 26
#define SE_ERR_ASSOCINCOMPLETE 27
#define SE_ERR_DDETIMEOUT 28
#define SE_ERR_DDEFAIL 29
#define SE_ERR_DDEBUSY 30
#define SE_ERR_NOASSOC 31
#define SEE_MASK_CLASSNAME 0x00000001
#define SEE_MASK_CLASSKEY 0x00000003
#define SEE_MASK_IDLIST 0x00000004
#define SEE_MASK_INVOKEIDLIST 0x0000000c
#define SEE_MASK_ICON 0x00000010
#define SEE_MASK_HOTKEY 0x00000020
#define SEE_MASK_NOCLOSEPROCESS 0x00000040
#define SEE_MASK_CONNECTNETDRV 0x00000080
#define SEE_MASK_FLAG_DDEWAIT 0x00000100
#define SEE_MASK_DOENVSUBST 0x00000200
#define SEE_MASK_FLAG_NO_UI 0x00000400
#define SEE_MASK_UNICODE 0x00004000
#define SEE_MASK_NO_CONSOLE 0x00008000
#define SEE_MASK_ASYNCOK 0x00100000
#define SEE_MASK_HMONITOR 0x00200000
typedef struct _SHELLEXECUTEINFOA
{ DWORD cbSize;
ULONG fMask;
HWND32 hwnd;
LPCSTR lpVerb;
LPCSTR lpFile;
LPCSTR lpParameters;
LPCSTR lpDirectory;
INT32 nShow;
HINSTANCE32 hInstApp;
/* Optional fields */
LPVOID lpIDList;
LPCSTR lpClass;
HKEY hkeyClass;
DWORD dwHotKey;
union
{ HANDLE32 hIcon;
HANDLE32 hMonitor;
} u;
HANDLE32 hProcess;
} SHELLEXECUTEINFO32A, *LPSHELLEXECUTEINFO32A;
typedef struct _SHELLEXECUTEINFOW
{ DWORD cbSize;
ULONG fMask;
HWND32 hwnd;
LPCWSTR lpVerb;
LPCWSTR lpFile;
LPCWSTR lpParameters;
LPCWSTR lpDirectory;
INT32 nShow;
HINSTANCE32 hInstApp;
/* Optional fields*/
LPVOID lpIDList;
LPCWSTR lpClass;
HKEY hkeyClass;
DWORD dwHotKey;
union
{ HANDLE32 hIcon;
HANDLE32 hMonitor;
} u;
HANDLE32 hProcess;
} SHELLEXECUTEINFO32W, *LPSHELLEXECUTEINFO32W;
#define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
#define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
BOOL32 WINAPI ShellExecuteEx32A(LPSHELLEXECUTEINFO32A lpExecInfo);
BOOL32 WINAPI ShellExecuteEx32W(LPSHELLEXECUTEINFO32W lpExecInfo);
#define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
void WINAPI WinExecError32A(HWND32 hwnd,INT32 error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
void WINAPI WinExecError32W(HWND32 hwnd,INT32 error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
#define WinExecError WINELIB_NAME_AW(WinExecError)
/****************************************************************************
* SHBrowseForFolder API
*/
typedef INT32 (CALLBACK* BFFCALLBACK)(HWND32 hwnd, UINT32 uMsg, LPARAM lParam, LPARAM lpData);
typedef struct tagBROWSEINFO32A {
HWND32 hwndOwner;
LPCITEMIDLIST pidlRoot;
LPSTR pszDisplayName;
LPCSTR lpszTitle;
UINT32 ulFlags;
BFFCALLBACK lpfn;
LPARAM lParam;
INT32 iImage;
} BROWSEINFO32A, *PBROWSEINFO32A, *LPBROWSEINFO32A;
typedef struct tagBROWSEINFO32W {
HWND32 hwndOwner;
LPCITEMIDLIST pidlRoot;
LPWSTR pszDisplayName;
LPCWSTR lpszTitle;
UINT32 ulFlags;
BFFCALLBACK lpfn;
LPARAM lParam;
INT32 iImage;
} BROWSEINFO32W, *PBROWSEINFO32W, *LPBROWSEINFO32W;
#define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
#define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
#define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
// Browsing for directory.
#define BIF_RETURNONLYFSDIRS 0x0001
#define BIF_DONTGOBELOWDOMAIN 0x0002
#define BIF_STATUSTEXT 0x0004
#define BIF_RETURNFSANCESTORS 0x0008
#define BIF_EDITBOX 0x0010
#define BIF_VALIDATE 0x0020
#define BIF_BROWSEFORCOMPUTER 0x1000
#define BIF_BROWSEFORPRINTER 0x2000
#define BIF_BROWSEINCLUDEFILES 0x4000
// message from browser
#define BFFM_INITIALIZED 1
#define BFFM_SELCHANGED 2
#define BFFM_VALIDATEFAILEDA 3 // lParam:szPath ret:1(cont),0(EndDialog)
#define BFFM_VALIDATEFAILEDW 4 // lParam:wzPath ret:1(cont),0(EndDialog)
// messages to browser
#define BFFM_SETSTATUSTEXTA (WM_USER+100)
#define BFFM_ENABLEOK (WM_USER+101)
#define BFFM_SETSELECTIONA (WM_USER+102)
#define BFFM_SETSELECTIONW (WM_USER+103)
#define BFFM_SETSTATUSTEXTW (WM_USER+104)
/*
#ifdef UNICODE
#define SHBrowseForFolder SHBrowseForFolderW
#define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
#define BFFM_SETSELECTION BFFM_SETSELECTIONW
#define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
#else
#define SHBrowseForFolder SHBrowseForFolderA
#define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
#define BFFM_SETSELECTION BFFM_SETSELECTIONA
#define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
#endif
*/
LPITEMIDLIST WINAPI SHBrowseForFolder32A(LPBROWSEINFO32A lpbi);
/*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
#define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
/****************************************************************************
* shlview structures
*/
/*
* IShellFolderViewCallback Callback
* This "callback" is called by the shells default IShellView implementation (that
* we got using SHCreateShellViewEx()), to notify us of the various things that
* are happening to the shellview (and ask for things too).
*
* You don't have to support anything here - anything you don't want to
* handle, the shell will do itself if you just return E_NOTIMPL. This parameters
* that the shell passes to this function are entirely undocumented.
*
* HOWEVER, as the cabview sample as originally written used this callback, the
* writers implemented the callback mechanism on top of their own IShellView.
* Look there for some clues on what to do here.
*/
typedef HRESULT(CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
HWND32 hwnd,UINT32 uMsg,UINT32 wParam,LPARAM lParam);
/* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
#define NF_INHERITVIEW 0x0000
#define NF_LOCALVIEW 0x0001
typedef struct _SHELLVIEWDATA // idl
{ DWORD dwSize;
LPSHELLFOLDER pShellFolder;
DWORD dwUserParam;
LPCITEMIDLIST pidl;
DWORD v3; // always 0
SHELLVIEWPROC pCallBack;
DWORD viewmode; // NF_* enum
} SHELLVIEWDATA, * LPSHELLVIEWDATA;
/*
The shell keeps track of some per-user state to handle display
options that is of majorinterest to ISVs.
The key one requested right now is "DoubleClickInWebView".
*/
typedef struct
{ BOOL32 fShowAllObjects : 1;
BOOL32 fShowExtensions : 1;
BOOL32 fNoConfirmRecycle : 1;
BOOL32 fShowSysFiles : 1;
BOOL32 fShowCompColor : 1;
BOOL32 fDoubleClickInWebView : 1;
BOOL32 fDesktopHTML : 1;
BOOL32 fWin95Classic : 1;
BOOL32 fDontPrettyPath : 1;
BOOL32 fShowAttribCol : 1;
BOOL32 fMapNetDrvBtn : 1;
BOOL32 fShowInfoTip : 1;
BOOL32 fHideIcons : 1;
UINT32 fRestFlags : 3;
} SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
#undef PURE
#undef FAR
#undef THIS
#undef THIS_
#undef STDMETHOD
#undef STDMETHOD_
#endif /*_WINE_SHLOBJ_H*/