You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
611 lines
15 KiB
611 lines
15 KiB
//+---------------------------------------------------------------------------
|
|
//
|
|
// Microsoft Windows
|
|
// Copyright (C) Microsoft Corporation, 1992-1997.
|
|
//
|
|
// File: shlobj.idl
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
cpp_quote("//+-------------------------------------------------------------------------")
|
|
cpp_quote("//")
|
|
cpp_quote("// Microsoft Windows")
|
|
cpp_quote("// Copyright (C) Microsoft Corporation, 1992-1997.")
|
|
cpp_quote("//")
|
|
cpp_quote("//--------------------------------------------------------------------------")
|
|
|
|
cpp_quote("#if ( _MSC_VER >= 800 )")
|
|
cpp_quote("#pragma warning(disable:4201)")
|
|
cpp_quote("#endif")
|
|
|
|
#ifndef DO_NO_IMPORTS
|
|
import "objidl.idl";
|
|
import "oleidl.idl";
|
|
import "commctrl.idl";
|
|
import "prsht.idl";
|
|
#endif
|
|
|
|
interface IContextMenu;
|
|
interface IEnumIDList;
|
|
interface IPersistFolder;
|
|
interface IPersistFolder2;
|
|
interface IShellBrowser;
|
|
interface IShellExtInit;
|
|
interface IShellFolder;
|
|
interface IShellView;
|
|
interface IExtractIconA;
|
|
interface IExtractIconW;
|
|
interface IQueryInfo;
|
|
interface IExplorerToolbar;
|
|
interface IShellDetails;
|
|
|
|
typedef struct _CMINVOKECOMMANDINFO {
|
|
DWORD cbSize; // sizeof(CMINVOKECOMMANDINFO)
|
|
DWORD fMask; // any combination of CMIC_MASK_*
|
|
HWND 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)
|
|
int nShow; // one of SW_ values for ShowWindow() API
|
|
|
|
DWORD dwHotKey;
|
|
HANDLE hIcon;
|
|
} CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
|
|
|
|
//
|
|
// SHITEMID -- Item ID
|
|
//
|
|
typedef struct _SHITEMID // mkid
|
|
{
|
|
USHORT cb; // Size of the ID (including cb itself)
|
|
BYTE abID[1]; // The item ID (variable length)
|
|
} SHITEMID;
|
|
typedef SHITEMID *LPSHITEMID;
|
|
typedef const SHITEMID *LPCSHITEMID;
|
|
|
|
//
|
|
// ITEMIDLIST -- List if item IDs (combined with 0-terminator)
|
|
//
|
|
typedef struct _ITEMIDLIST // idl
|
|
{
|
|
SHITEMID mkid;
|
|
} ITEMIDLIST;
|
|
typedef ITEMIDLIST * LPITEMIDLIST;
|
|
typedef const ITEMIDLIST * LPCITEMIDLIST;
|
|
|
|
#define MAX_PATH 260
|
|
|
|
typedef struct _STRRET
|
|
{
|
|
UINT uType; // One of the STRRET_* values
|
|
union
|
|
{
|
|
LPWSTR pOleStr; // must be freed by caller of GetDisplayNameOf
|
|
LPSTR pStr; // NOT USED
|
|
UINT uOffset; // Offset into SHITEMID
|
|
char cStr[MAX_PATH]; // Buffer to fill in (ANSI)
|
|
} DUMMYUNIONNAME;
|
|
} STRRET, *LPSTRRET;
|
|
|
|
typedef struct
|
|
{
|
|
UINT ViewMode; // View mode (FOLDERVIEWMODE values)
|
|
UINT fFlags; // View options (FOLDERFLAGS bits)
|
|
} FOLDERSETTINGS, *LPFOLDERSETTINGS;
|
|
|
|
typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
|
|
|
|
typedef struct _TBBUTTON {
|
|
int iBitmap;
|
|
int idCommand;
|
|
BYTE fsState;
|
|
BYTE fsStyle;
|
|
#ifdef _WIN32
|
|
BYTE bReserved[2];
|
|
#endif
|
|
DWORD dwData;
|
|
int iString;
|
|
} TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
|
|
typedef const TBBUTTON* LPCTBBUTTON;
|
|
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IContextMenu -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(000214E4-0000-0000-0000-C00000000046),
|
|
pointer_default(unique)
|
|
]
|
|
interface IContextMenu : IUnknown
|
|
{
|
|
HRESULT QueryContextMenu(
|
|
HMENU hmenu,
|
|
UINT indexMenu,
|
|
UINT idCmdFirst,
|
|
UINT idCmdLast,
|
|
UINT uFlags);
|
|
|
|
HRESULT InvokeCommand(
|
|
LPCMINVOKECOMMANDINFO lpici);
|
|
|
|
HRESULT GetCommandString(
|
|
UINT idCmd,
|
|
UINT uType,
|
|
UINT* pwReserved,
|
|
LPSTR pszName,
|
|
UINT cchMax);
|
|
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IEnumIDList -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(000214F2-0000-0000-0000-C00000000046),
|
|
pointer_default(unique)
|
|
]
|
|
interface IEnumIDList : IUnknown
|
|
{
|
|
HRESULT Next(
|
|
[in] ULONG celt,
|
|
[out, size_is(celt), length_is(*pceltFetched)]
|
|
LPITEMIDLIST* rgelt,
|
|
[out] ULONG* pceltFetched);
|
|
|
|
HRESULT Skip(
|
|
[in] ULONG celt);
|
|
|
|
HRESULT Reset();
|
|
|
|
HRESULT Clone(
|
|
[out] IEnumIDList** ppenum);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IPersistFolder -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(000214EA-0000-0000-0000-C00000000046),
|
|
pointer_default(unique)
|
|
]
|
|
interface IPersistFolder : IPersist
|
|
{
|
|
HRESULT Initialize(
|
|
[in] LPCITEMIDLIST pidl);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IPersistFolder2 -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(1AC3D9F0-175C-11d1-95BE-00609797EA4F),
|
|
pointer_default(unique)
|
|
]
|
|
interface IPersistFolder2 : IPersistFolder
|
|
{
|
|
HRESULT GetCurFolder(
|
|
[out] LPITEMIDLIST *ppidl);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IShellExtInit -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(000214E8-0000-0000-0000-C00000000046),
|
|
pointer_default(unique)
|
|
]
|
|
interface IShellExtInit : IUnknown
|
|
{
|
|
HRESULT Initialize(
|
|
[in] LPCITEMIDLIST pidl,
|
|
[in] LPDATAOBJECT pdobj,
|
|
[in] HKEY hkeyProgID);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IShellBrowser -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(000214E2-0000-0000-0000-C00000000046),
|
|
pointer_default(unique)
|
|
]
|
|
interface IShellBrowser : IOleWindow
|
|
{
|
|
HRESULT InsertMenusSB(
|
|
HMENU hmenuShared,
|
|
LPOLEMENUGROUPWIDTHS lpMenuWidths);
|
|
|
|
HRESULT SetMenuSB(
|
|
HMENU hmenuShared,
|
|
HOLEMENU holemenuReserved,
|
|
HWND hwndActiveObject);
|
|
|
|
HRESULT RemoveMenusSB(
|
|
HMENU hmenuShared);
|
|
|
|
HRESULT SetStatusTextSB(
|
|
LPCOLESTR lpszStatusText);
|
|
|
|
HRESULT EnableModelessSB(
|
|
BOOL fEnable);
|
|
|
|
HRESULT TranslateAcceleratorSB(
|
|
LPMSG lpmsg,
|
|
WORD wID);
|
|
|
|
HRESULT BrowseObject (
|
|
LPCITEMIDLIST pidl,
|
|
UINT wFlags);
|
|
|
|
HRESULT GetViewStateStream(
|
|
DWORD grfMode,
|
|
LPSTREAM* ppStrm);
|
|
|
|
HRESULT GetControlWindow(
|
|
UINT id,
|
|
HWND* lphwnd);
|
|
|
|
HRESULT SendControlMsg(
|
|
UINT id,
|
|
UINT uMsg,
|
|
WPARAM wParam,
|
|
LPARAM lParam,
|
|
LRESULT* pret);
|
|
|
|
HRESULT QueryActiveShellView(
|
|
IShellView** ppshv);
|
|
|
|
HRESULT OnViewWindowActive(
|
|
IShellView* ppshv);
|
|
|
|
HRESULT SetToolbarItems(
|
|
LPTBBUTTON lpButtons,
|
|
UINT nButtons,
|
|
UINT uFlags);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IShellFolder -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(000214E6-0000-0000-0000-C00000000046),
|
|
pointer_default(unique)
|
|
]
|
|
interface IShellFolder : IUnknown
|
|
{
|
|
HRESULT ParseDisplayName(
|
|
HWND hwndOwner,
|
|
LPBC pbcReserved,
|
|
LPOLESTR lpszDisplayName,
|
|
ULONG* pchEaten,
|
|
LPITEMIDLIST* ppidl,
|
|
ULONG* pdwAttributes);
|
|
|
|
HRESULT EnumObjects(
|
|
HWND hwndOwner,
|
|
DWORD grfFlags,
|
|
IEnumIDList** ppenumIDList);
|
|
|
|
HRESULT BindToObject(
|
|
LPCITEMIDLIST pidl,
|
|
LPBC pbcReserved,
|
|
REFIID riid,
|
|
LPVOID* ppvOut);
|
|
|
|
HRESULT BindToStorage(
|
|
LPCITEMIDLIST pidl,
|
|
LPBC pbcReserved,
|
|
REFIID riid,
|
|
LPVOID* ppvObj);
|
|
|
|
HRESULT CompareIDs(
|
|
LPARAM lParam,
|
|
LPCITEMIDLIST pidl1,
|
|
LPCITEMIDLIST pidl2);
|
|
|
|
HRESULT CreateViewObject(
|
|
HWND hwndOwner,
|
|
REFIID riid,
|
|
LPVOID* ppvOut);
|
|
|
|
HRESULT GetAttributesOf(
|
|
UINT cidl,
|
|
LPCITEMIDLIST* apidl,
|
|
ULONG* rgfInOut);
|
|
|
|
HRESULT GetUIObjectOf(
|
|
HWND hwndOwner,
|
|
UINT cidl,
|
|
LPCITEMIDLIST* apidl,
|
|
REFIID riid,
|
|
UINT* prgfInOut,
|
|
LPVOID* ppvOut);
|
|
|
|
HRESULT GetDisplayNameOf(
|
|
LPCITEMIDLIST pidl,
|
|
DWORD uFlags,
|
|
LPSTRRET lpName);
|
|
|
|
HRESULT SetNameOf(
|
|
HWND hwndOwner,
|
|
LPCITEMIDLIST pidl,
|
|
LPCOLESTR lpszName,
|
|
DWORD uFlags,
|
|
LPITEMIDLIST* ppidlOut);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IShellView -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(000214E3-0000-0000-0000-C00000000046),
|
|
pointer_default(unique)
|
|
]
|
|
interface IShellView : IOleWindow
|
|
{
|
|
HRESULT TranslateAccelerator(
|
|
LPMSG lpmsg);
|
|
|
|
HRESULT EnableModeless(
|
|
BOOL fEnable);
|
|
|
|
HRESULT UIActivate(
|
|
UINT uState);
|
|
|
|
HRESULT Refresh();
|
|
|
|
HRESULT CreateViewWindow(
|
|
IShellView* lpPrevView,
|
|
LPCFOLDERSETTINGS lpfs,
|
|
IShellBrowser* psb,
|
|
RECT* prcView,
|
|
HWND* phWnd);
|
|
|
|
HRESULT DestroyViewWindow();
|
|
|
|
HRESULT GetCurrentInfo(
|
|
LPFOLDERSETTINGS lpfs);
|
|
|
|
HRESULT AddPropertySheetPages(
|
|
DWORD dwReserved,
|
|
LPFNADDPROPSHEETPAGE lpfn,
|
|
LPARAM lparam);
|
|
|
|
HRESULT SaveViewState();
|
|
|
|
HRESULT SelectItem(
|
|
LPCITEMIDLIST pidlItem,
|
|
UINT uFlags);
|
|
|
|
HRESULT GetItemObject(
|
|
UINT uItem,
|
|
REFIID riid,
|
|
LPVOID* ppv);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IExtractIconW -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(000214FA-0000-0000-0000-C00000000046),
|
|
pointer_default(unique)
|
|
]
|
|
interface IExtractIconW : IUnknown
|
|
{
|
|
HRESULT GetIconLocation(
|
|
UINT uFlags,
|
|
LPWSTR szIconFile,
|
|
UINT cchMax,
|
|
int * piIndex,
|
|
UINT * pwFlags);
|
|
|
|
HRESULT Extract(
|
|
LPCWSTR pszFile,
|
|
UINT nIconIndex,
|
|
HICON * phiconLarge,
|
|
HICON * phiconSmall,
|
|
UINT nIconSize);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IExtractIconA -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(000214EB-0000-0000-0000-C00000000046),
|
|
pointer_default(unique)
|
|
]
|
|
interface IExtractIconA : IUnknown
|
|
{
|
|
HRESULT GetIconLocation(
|
|
UINT uFlags,
|
|
LPWSTR szIconFile,
|
|
UINT cchMax,
|
|
int * piIndex,
|
|
UINT * pwFlags);
|
|
|
|
HRESULT Extract(
|
|
LPCWSTR pszFile,
|
|
UINT nIconIndex,
|
|
HICON * phiconLarge,
|
|
HICON * phiconSmall,
|
|
UINT nIconSize);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IQueryInfo -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(00021500-0000-0000-0000-C00000000046),
|
|
pointer_default(unique)
|
|
]
|
|
interface IQueryInfo : IUnknown
|
|
{
|
|
HRESULT GetInfoTip(
|
|
DWORD dwFlags,
|
|
WCHAR ** ppwszTip);
|
|
|
|
HRESULT GetInfoFlags(
|
|
DWORD * pdwFlags);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IOleCommandTarget -
|
|
//
|
|
// [
|
|
// local,
|
|
// object,
|
|
// uuid(b722bccb-4e68-101b-a2bc-00aa00404770),
|
|
// pointer_default(unique)
|
|
// ]
|
|
// interface IOleCommandTarget : IUnknown
|
|
// {
|
|
// HRESULT QueryStatus(
|
|
// const GUID * pguidCmdGroup,
|
|
// ULONG cCmds,
|
|
// OLECMD prgCmds[],
|
|
// OLECMDTEXT * pCmdText);
|
|
//
|
|
// HRESULT Exec(
|
|
// const GUID * pguidCmdGroup,
|
|
// DWORD nCmdID,
|
|
// DWORD nCmdexecopt,
|
|
// VARIANTARG * pvaIn,
|
|
// VARIANTARG * pvaOut);
|
|
// };
|
|
|
|
typedef struct tagTBADDBITMAP {
|
|
HINSTANCE hInst;
|
|
UINT nID;
|
|
} TBADDBITMAP, *LPTBADDBITMAP;
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IExplorerToolbar -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(8455F0C1-158F-11D0-89AE-00A0C90A90AC),
|
|
pointer_default(unique)
|
|
]
|
|
interface IExplorerToolbar : IUnknown
|
|
{
|
|
// *** IExplorerToolbar methods ***
|
|
HRESULT SetCommandTarget(
|
|
IUnknown * punkCmdTarget,
|
|
const GUID * pguidCmdGrp,
|
|
DWORD dwFlags);
|
|
|
|
HRESULT AddStdBrowserButtons();
|
|
|
|
HRESULT AddButtons(
|
|
const GUID * pguidButtonGroup,
|
|
UINT nButtons,
|
|
const TBBUTTON * lpButtons);
|
|
|
|
HRESULT AddString(
|
|
const GUID * pguidButtonGroup,
|
|
HINSTANCE hInst,
|
|
UINT uiResID,
|
|
LRESULT * pOffset);
|
|
|
|
HRESULT GetButton(
|
|
const GUID * pguidButtonGroup,
|
|
UINT uiCommand,
|
|
LPTBBUTTON lpButton);
|
|
|
|
HRESULT GetState(
|
|
const GUID * pguidButtonGroup,
|
|
UINT uiCommand,
|
|
UINT * pfState);
|
|
|
|
HRESULT SetState(
|
|
const GUID * pguidButtonGroup,
|
|
UINT uiCommand,
|
|
UINT fState);
|
|
|
|
HRESULT AddBitmap(
|
|
const GUID * pguidButtonGroup,
|
|
UINT uiBMPType,
|
|
UINT uiCount,
|
|
TBADDBITMAP * ptb,
|
|
LRESULT * pOffset,
|
|
COLORREF rgbMask);
|
|
|
|
HRESULT GetBitmapSize(
|
|
UINT * uiID);
|
|
|
|
HRESULT SendToolbarMsg(
|
|
const GUID * pguidButtonGroup,
|
|
UINT uMsg,
|
|
WPARAM wParam,
|
|
LPARAM lParam,
|
|
LRESULT * plRes);
|
|
|
|
HRESULT SetImageList(
|
|
const GUID* pguidCmdGroup,
|
|
HIMAGELIST himlNormal,
|
|
HIMAGELIST himlHot,
|
|
HIMAGELIST himlDisabled);
|
|
|
|
HRESULT ModifyButton(
|
|
const GUID * pguidButtonGroup,
|
|
UINT uiCommand,
|
|
LPTBBUTTON lpButton);
|
|
};
|
|
|
|
//===========================================================================
|
|
// Defview related API and interface
|
|
//
|
|
// Notes: At this point, we have no plan to publish this mechanism.
|
|
//===========================================================================
|
|
|
|
typedef struct _SHELLDETAILS
|
|
{
|
|
int fmt; // LVCFMT_* value (header only)
|
|
int cxChar; // Number of "average" characters (header only)
|
|
STRRET str; // String information
|
|
} SHELLDETAILS, *LPSHELLDETAILS;
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IShellDetails
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(000214EC-0000-0000-0000-C00000000046),
|
|
pointer_default(unique)
|
|
]
|
|
interface IShellDetails : IUnknown
|
|
{
|
|
// *** IShellDetails methods ***
|
|
HRESULT GetDetailsOf(
|
|
LPCITEMIDLIST pidl,
|
|
UINT iColumn,
|
|
LPSHELLDETAILS pDetails);
|
|
|
|
HRESULT ColumnClick(
|
|
UINT iColumn);
|
|
};
|
|
|