home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
SHLOBJ.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-28
|
17KB
|
534 lines
//----------------------------------------------------------------------------
// ShlObj.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: ShlObj.pas
//----------------------------------------------------------------------------
#ifndef ShlObjHPP
#define ShlObjHPP
//----------------------------------------------------------------------------
#include <Messages.hpp>
#include <RegStr.hpp>
#include <ShellAPI.hpp>
#include <CommCtrl.hpp>
#include <OLE2.hpp>
#include <Windows.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Shlobj
{
//-- type declarations -------------------------------------------------------
struct TSHItemID;
typedef TSHItemID *PSHItemID;
#pragma pack(push, 1)
struct TSHItemID
{
Word cb;
Byte abID[1];
} ;
#pragma pack(pop)
#pragma pack(push, 1)
struct TItemIDList
{
TSHItemID mkid;
} ;
#pragma pack(pop)
typedef TItemIDList *PItemIDList;
struct TCMInvokeCommandInfo;
typedef TCMInvokeCommandInfo *PCMInvokeCommandInfo;
#pragma pack(push, 1)
struct TCMInvokeCommandInfo
{
int cbSize;
int fMask;
HWND hwnd;
char *lpVerb;
char *lpParameters;
char *lpDirectory;
int nShow;
int dwHotKey;
int hIcon;
} ;
#pragma pack(pop)
class __declspec(delphiclass) IContextMenu;
class __declspec(pascalimplementation) IContextMenu : public Ole2::IUnknown
{
typedef Ole2::IUnknown inherited;
public:
virtual long __stdcall QueryContextMenu(HMENU Menu, int indexMenu, int idCmdFirst, int idCmdLast, int
uFlags) = 0;
virtual long __stdcall InvokeCommand(TCMInvokeCommandInfo &lpici) = 0;
virtual long __stdcall GetCommandString(int idCmd, int uType, PUINT pwReserved, char * pszName, int
cchMax) = 0;
public:
/* TObject.Create */ __fastcall IContextMenu(void) : Ole2::IUnknown() { }
/* TObject.Destroy */ __fastcall virtual ~IContextMenu(void) { }
};
class __declspec(delphiclass) IShellExtInit;
class __declspec(pascalimplementation) IShellExtInit : public Ole2::IUnknown
{
typedef Ole2::IUnknown inherited;
public:
virtual long __stdcall Initialize(PItemIDList pidlFolder, Ole2::IDataObject* lpdobj, HKEY hKeyProgID
) = 0;
public:
/* TObject.Create */ __fastcall IShellExtInit(void) : Ole2::IUnknown() { }
/* TObject.Destroy */ __fastcall virtual ~IShellExtInit(void) { }
};
class __declspec(delphiclass) IShellPropSheetExt;
class __declspec(pascalimplementation) IShellPropSheetExt : public Ole2::IUnknown
{
typedef Ole2::IUnknown inherited;
public:
virtual long __stdcall AddPages(Commctrl::TFNAddPropSheetPage lpfnAddPage, long lParam) = 0;
virtual long __stdcall ReplacePage(int uPageID, Commctrl::TFNAddPropSheetPage lpfnReplaceWith, long
lParam) = 0;
public:
/* TObject.Create */ __fastcall IShellPropSheetExt(void) : Ole2::IUnknown() { }
/* TObject.Destroy */ __fastcall virtual ~IShellPropSheetExt(void) { }
};
class __declspec(delphiclass) IExtractIcon;
class __declspec(pascalimplementation) IExtractIcon : public Ole2::IUnknown
{
typedef Ole2::IUnknown inherited;
public:
virtual long __stdcall GetIconLocation(int uFlags, char * szIconFile, int cchMax, int &piIndex, int
&pwFlags) = 0;
virtual long __stdcall Extract(char * pszFile, int nIconIndex, HICON &phiconLarge, HICON &phiconSmall
, int nIconSize) = 0;
public:
/* TObject.Create */ __fastcall IExtractIcon(void) : Ole2::IUnknown() { }
/* TObject.Destroy */ __fastcall virtual ~IExtractIcon(void) { }
};
class __declspec(delphiclass) IShellLink;
class __declspec(pascalimplementation) IShellLink : public Ole2::IUnknown
{
typedef Ole2::IUnknown inherited;
public:
virtual long __stdcall GetPath(char * pszFile, int cchMaxPath, WIN32_FIND_DATAA &pfd, int fFlags) = 0
;
virtual long __stdcall GetIDList(PItemIDList &ppidl) = 0;
virtual long __stdcall SetIDList(PItemIDList pidl) = 0;
virtual long __stdcall GetDescription(char * pszName, int cchMaxName) = 0;
virtual long __stdcall SetDescription(char * pszName) = 0;
virtual long __stdcall GetWorkingDirectory(char * pszDir, int cchMaxPath) = 0;
virtual long __stdcall SetWorkingDirectory(char * pszDir) = 0;
virtual long __stdcall GetArguments(char * pszArgs, int cchMaxPath) = 0;
virtual long __stdcall SetArguments(char * pszArgs) = 0;
virtual long __stdcall GetHotkey(Word &pwHotkey) = 0;
virtual long __stdcall SetHotkey(Word wHotkey) = 0;
virtual long __stdcall GetShowCmd(int &piShowCmd) = 0;
virtual long __stdcall SetShowCmd(int iShowCmd) = 0;
virtual long __stdcall GetIconLocation(char * pszIconPath, int cchIconPath, int &piIcon) = 0;
virtual long __stdcall SetIconLocation(char * pszIconPath, int iIcon) = 0;
virtual long __stdcall SetRelativePath(char * pszPathRel, int dwReserved) = 0;
virtual long __stdcall Resolve(HWND Wnd, int fFlags) = 0;
virtual long __stdcall SetPath(char * pszFile) = 0;
public:
/* TObject.Create */ __fastcall IShellLink(void) : Ole2::IUnknown() { }
/* TObject.Destroy */ __fastcall virtual ~IShellLink(void) { }
};
class __declspec(delphiclass) ICopyHook;
class __declspec(pascalimplementation) ICopyHook : public Ole2::IUnknown
{
typedef Ole2::IUnknown inherited;
public:
virtual int __stdcall CopyCallback(HWND Wnd, int wFunc, int wFlags, char * pszSrcFile, int dwSrcAttribs
, char * pszDestFile, int dwDestAttribs) = 0;
public:
/* TObject.Create */ __fastcall ICopyHook(void) : Ole2::IUnknown() { }
/* TObject.Destroy */ __fastcall virtual ~ICopyHook(void) { }
};
class __declspec(delphiclass) IFileViewerSite;
class __declspec(pascalimplementation) IFileViewerSite : public Ole2::IUnknown
{
typedef Ole2::IUnknown inherited;
public:
virtual long __stdcall SetPinnedWindow(HWND Wnd) = 0;
virtual long __stdcall GetPinnedWindow(HWND &Wnd) = 0;
public:
/* TObject.Create */ __fastcall IFileViewerSite(void) : Ole2::IUnknown() { }
/* TObject.Destroy */ __fastcall virtual ~IFileViewerSite(void) { }
};
struct TFVShowInfo;
typedef TFVShowInfo *PFVShowInfo;
#pragma pack(push, 1)
struct TFVShowInfo
{
int cbSize;
HWND hwndOwner;
int iShow;
int dwFlags;
Windows::TRect rect;
Ole2::IUnknown* punkRel;
wchar_t strNewFile[260];
} ;
#pragma pack(pop)
class __declspec(delphiclass) IFileViewer;
class __declspec(pascalimplementation) IFileViewer : public Ole2::IUnknown
{
typedef Ole2::IUnknown inherited;
public:
virtual long __stdcall ShowInitialize(IFileViewerSite* fsi) = 0;
virtual long __stdcall Show(TFVShowInfo &pvsi) = 0;
virtual long __stdcall PrintTo(char * pszDriver, DWord fSuppressUI) = 0;
public:
/* TObject.Create */ __fastcall IFileViewer(void) : Ole2::IUnknown() { }
/* TObject.Destroy */ __fastcall virtual ~IFileViewer(void) { }
};
struct TStrRet;
typedef TStrRet *PSTRRet;
#pragma pack(push, 1)
struct TStrRet
{
int uType;
union
{
char cStr[260];
int uOffset;
wchar_t *pOleStr;
};
} ;
#pragma pack(pop)
typedef int __stdcall (*TFNBFFCallBack)(HWND Wnd, int uMsg, long lParam, long lpData);
struct TBrowseInfo;
typedef TBrowseInfo *PBrowseInfo;
#pragma pack(push, 1)
struct TBrowseInfo
{
HWND hwndOwner;
TItemIDList *pidlRoot;
char *pszDisplayName;
char *lpszTitle;
int ulFlags;
TFNBFFCallBack lpfn;
long lParam;
int iImage;
} ;
#pragma pack(pop)
class __declspec(delphiclass) IEnumIDList;
class __declspec(pascalimplementation) IEnumIDList : public Ole2::IUnknown
{
typedef Ole2::IUnknown inherited;
public:
virtual long __stdcall Next(Cardinal celt, PItemIDList &rgelt, Cardinal &pceltFetched) = 0;
virtual long __stdcall Skip(Cardinal celt) = 0;
virtual long __stdcall Reset(void) = 0;
virtual long __stdcall Clone(IEnumIDList* &ppenum) = 0;
public:
/* TObject.Create */ __fastcall IEnumIDList(void) : Ole2::IUnknown() { }
/* TObject.Destroy */ __fastcall virtual ~IEnumIDList(void) { }
};
class __declspec(delphiclass) IShellFolder;
class __declspec(pascalimplementation) IShellFolder : public Ole2::IUnknown
{
typedef Ole2::IUnknown inherited;
public:
virtual long __stdcall ParseDisplayName(HWND hwndOwner, void * pbcReserved, wchar_t * lpszDisplayName
, Cardinal &pchEaten, PItemIDList &ppidl, Cardinal &dwAttributes) = 0;
virtual long __stdcall EnumObjects(HWND hwndOwner, int grfFlags, IEnumIDList* &EnumIDList) = 0;
virtual long __stdcall BindToObject(PItemIDList pidl, void * pbcReserved, const GUID &riid, void *
&ppvOut) = 0;
virtual long __stdcall BindToStorage(PItemIDList pidl, void * pbcReserved, const GUID &riid, void *
&ppvObj) = 0;
virtual long __stdcall CompareIDs(long lParam, PItemIDList pidl1, PItemIDList pidl2) = 0;
virtual long __stdcall CreateViewObject(HWND hwndOwner, const GUID &riid, void * &ppvOut) = 0;
virtual long __stdcall GetAttributesOf(int cidl, PItemIDList &apidl, int &rgfInOut) = 0;
virtual long __stdcall GetUIObjectOf(HWND hwndOwner, int cidl, PItemIDList &apidl, const GUID &riid
, int &prgfInOut, void * &ppvOut) = 0;
virtual long __stdcall GetDisplayNameOf(PItemIDList pidl, int uFlags, TStrRet &lpName) = 0;
virtual long __stdcall SetNameOf(HWND hwndOwner, PItemIDList pidl, wchar_t * lpszName, int uFlags,
PItemIDList &ppidlOut) = 0;
public:
/* TObject.Create */ __fastcall IShellFolder(void) : Ole2::IUnknown() { }
/* TObject.Destroy */ __fastcall virtual ~IShellFolder(void) { }
};
struct TNResArray;
typedef TNResArray *PNResArray;
#pragma pack(push, 1)
struct TNResArray
{
int cItems;
NETRESOURCEA nr[1];
} ;
#pragma pack(pop)
struct TIDA;
typedef TIDA *PIDA;
#pragma pack(push, 1)
struct TIDA
{
int cidl;
int aoffset[1];
} ;
#pragma pack(pop)
struct TFileDescriptor;
typedef TFileDescriptor *PFileDescriptor;
#pragma pack(push, 1)
struct TFileDescriptor
{
int dwFlags;
GUID clsid;
SIZE sizel;
POINT pointl;
int dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
int nFileSizeHigh;
int nFileSizeLow;
char cFileName[260];
} ;
#pragma pack(pop)
struct TFileGroupDescriptor;
typedef TFileGroupDescriptor *PFileGroupDescriptor;
#pragma pack(push, 1)
struct TFileGroupDescriptor
{
int cItems;
TFileDescriptor fgd[1];
} ;
#pragma pack(pop)
struct TDropFiles;
typedef TDropFiles *PDropFiles;
#pragma pack(push, 1)
struct TDropFiles
{
int pFiles;
POINT pt;
DWord fNC;
DWord fWide;
} ;
#pragma pack(pop)
//-- var, const, procedure ---------------------------------------------------
extern GUID CLSID_ShellDesktop;
extern GUID CLSID_ShellLink;
extern GUID IID_IContextMenu;
extern GUID IID_IShellFolder;
extern GUID IID_IShellExtInit;
extern GUID IID_IShellPropSheetExt;
extern GUID IID_IExtractIcon;
extern GUID IID_IShellLink;
extern GUID IID_IShellCopyHook;
extern GUID IID_IFileViewer;
extern GUID IID_IEnumIDList;
extern GUID IID_IFileViewerSite;
#define CMF_NORMAL (Byte)(0)
#define CMF_DEFAULTONLY (Byte)(1)
#define CMF_VERBSONLY (Byte)(2)
#define CMF_EXPLORE (Byte)(4)
#define CMF_RESERVED (int)(-65536)
#define GCS_VERB (Byte)(0)
#define GCS_HELPTEXT (Byte)(1)
#define GCS_VALIDATE (Byte)(2)
#define CMDSTR_NEWFOLDER "NewFolder"
#define CMDSTR_VIEWLIST "ViewList"
#define CMDSTR_VIEWDETAILS "ViewDetails"
#define CMIC_MASK_HOTKEY (Byte)(32)
#define CMIC_MASK_ICON (Byte)(16)
#define CMIC_MASK_FLAG_NO_UI (Word)(1024)
#define CMIC_MASK_MODAL (int)(-2147483648)
#define GIL_OPENICON (Byte)(1)
#define GIL_FORSHELL (Byte)(2)
#define GIL_SIMULATEDOC (Byte)(1)
#define GIL_PERINSTANCE (Byte)(2)
#define GIL_PERCLASS (Byte)(4)
#define GIL_NOTFILENAME (Byte)(8)
#define GIL_DONTCACHE (Byte)(16)
#define SLR_NO_UI (Byte)(1)
#define SLR_ANY_MATCH (Byte)(2)
#define SLR_UPDATE (Byte)(4)
#define SLGP_SHORTPATH (Byte)(1)
#define SLGP_UNCPRIORITY (Byte)(2)
#define FVSIF_RECT (Byte)(1)
#define FVSIF_PINNED (Byte)(2)
#define FVSIF_NEWFAILED (int)(134217728)
#define FVSIF_NEWFILE (int)(-2147483648)
#define FVSIF_CANVIEWIT (int)(1073741824)
#define STRRET_WSTR (Byte)(0)
#define STRRET_OFFSET (Byte)(1)
#define STRRET_CSTR (Byte)(2)
#define REGSTR_PATH_SPECIAL_FOLDERS "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\She"\
"ll Folders"
#define CSIDL_DESKTOP (Byte)(0)
#define CSIDL_PROGRAMS (Byte)(2)
#define CSIDL_CONTROLS (Byte)(3)
#define CSIDL_PRINTERS (Byte)(4)
#define CSIDL_PERSONAL (Byte)(5)
#define CSIDL_FAVORITES (Byte)(6)
#define CSIDL_STARTUP (Byte)(7)
#define CSIDL_RECENT (Byte)(8)
#define CSIDL_SENDTO (Byte)(9)
#define CSIDL_BITBUCKET (Byte)(10)
#define CSIDL_STARTMENU (Byte)(11)
#define CSIDL_DESKTOPDIRECTORY (Byte)(16)
#define CSIDL_DRIVES (Byte)(17)
#define CSIDL_NETWORK (Byte)(18)
#define CSIDL_NETHOOD (Byte)(19)
#define CSIDL_FONTS (Byte)(20)
#define CSIDL_TEMPLATES (Byte)(21)
#define BIF_RETURNONLYFSDIRS (Byte)(1)
#define BIF_DONTGOBELOWDOMAIN (Byte)(2)
#define BIF_STATUSTEXT (Byte)(4)
#define BIF_RETURNFSANCESTORS (Byte)(8)
#define BIF_BROWSEFORCOMPUTER (Word)(4096)
#define BIF_BROWSEFORPRINTER (Word)(8192)
#define BFFM_INITIALIZED (Byte)(1)
#define BFFM_SELCHANGED (Byte)(2)
#define BFFM_SETSTATUSTEXT (Word)(1124)
#define BFFM_ENABLEOK (Word)(1125)
#define BFFM_SETSELECTION (Word)(1126)
#define SHGDN_NORMAL (Byte)(0)
#define SHGDN_INFOLDER (Byte)(1)
#define SHGDN_FORPARSING (int)(32768)
#define SHCONTF_FOLDERS (Byte)(32)
#define SHCONTF_NONFOLDERS (Byte)(64)
#define SHCONTF_INCLUDEHIDDEN (Byte)(128)
#define SFGAO_CANCOPY (Byte)(1)
#define SFGAO_CANMOVE (Byte)(2)
#define SFGAO_CANLINK (Byte)(4)
#define SFGAO_CANRENAME (Byte)(16)
#define SFGAO_CANDELETE (Byte)(32)
#define SFGAO_HASPROPSHEET (Byte)(64)
#define SFGAO_DROPTARGET (Word)(256)
#define SFGAO_CAPABILITYMASK (Word)(375)
#define SFGAO_LINK (int)(65536)
#define SFGAO_SHARE (int)(131072)
#define SFGAO_READONLY (int)(262144)
#define SFGAO_GHOSTED (int)(524288)
#define SFGAO_DISPLAYATTRMASK (int)(983040)
#define SFGAO_FILESYSANCESTOR (int)(268435456)
#define SFGAO_FOLDER (int)(536870912)
#define SFGAO_FILESYSTEM (int)(1073741824)
#define SFGAO_HASSUBFOLDER (int)(-2147483648)
#define SFGAO_CONTENTSMASK (int)(-2147483648)
#define SFGAO_VALIDATE (int)(16777216)
#define SFGAO_REMOVABLE (int)(33554432)
#define CFSTR_SHELLIDLIST "Shell IDList Array"
#define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets"
#define CFSTR_NETRESOURCES "Net Resource"
#define CFSTR_FILEDESCRIPTOR "FileGroupDescriptor"
#define CFSTR_FILECONTENTS "FileContents"
#define CFSTR_FILENAME "FileName"
#define CFSTR_PRINTERGROUP "PrinterFriendlyName"
#define CFSTR_FILENAMEMAP "FileNameMap"
#define DVASPECT_SHORTNAME (Byte)(2)
#define FD_CLSID (Byte)(1)
#define FD_SIZEPOINT (Byte)(2)
#define FD_ATTRIBUTES (Byte)(4)
#define FD_CREATETIME (Byte)(8)
#define FD_ACCESSTIME (Byte)(16)
#define FD_WRITESTIME (Byte)(32)
#define FD_FILESIZE (Byte)(64)
#define FD_LINKUI (int)(32768)
#define SHCNE_RENAMEITEM (Byte)(1)
#define SHCNE_CREATE (Byte)(2)
#define SHCNE_DELETE (Byte)(4)
#define SHCNE_MKDIR (Byte)(8)
#define SHCNE_RMDIR (Byte)(16)
#define SHCNE_MEDIAINSERTED (Byte)(32)
#define SHCNE_MEDIAREMOVED (Byte)(64)
#define SHCNE_DRIVEREMOVED (Byte)(128)
#define SHCNE_DRIVEADD (Word)(256)
#define SHCNE_NETSHARE (Word)(512)
#define SHCNE_NETUNSHARE (Word)(1024)
#define SHCNE_ATTRIBUTES (Word)(2048)
#define SHCNE_UPDATEDIR (Word)(4096)
#define SHCNE_UPDATEITEM (Word)(8192)
#define SHCNE_SERVERDISCONNECT (Word)(16384)
#define SHCNE_UPDATEIMAGE (int)(32768)
#define SHCNE_DRIVEADDGUI (int)(65536)
#define SHCNE_RENAMEFOLDER (int)(131072)
#define SHCNE_FREESPACE (int)(262144)
#define SHCNE_ASSOCCHANGED (int)(134217728)
#define SHCNE_DISKEVENTS (int)(145439)
#define SHCNE_GLOBALEVENTS (int)(201687520)
#define SHCNE_ALLEVENTS (int)(2147483647)
#define SHCNE_INTERRUPT (int)(-2147483648)
#define SHCNF_IDLIST (Byte)(0)
#define SHCNF_PATH (Byte)(1)
#define SHCNF_PRINTER (Byte)(2)
#define SHCNF_DWORD (Byte)(3)
#define SHCNF_TYPE (Byte)(255)
#define SHCNF_FLUSH (Word)(4096)
#define SHCNF_FLUSHNOWAIT (Word)(8192)
#define SHARD_PIDL (Byte)(1)
#define SHARD_PATH (Byte)(2)
extern "C" long __stdcall SHGetMalloc(Ole2::IMalloc* &ppMalloc);
extern "C" DWord __stdcall SHGetPathFromIDList(PItemIDList pidl, char * pszPath);
extern "C" long __stdcall SHGetSpecialFolderLocation(HWND hwndOwner, int nFolder, PItemIDList &ppidl
);
extern "C" PItemIDList __stdcall SHBrowseForFolder(TBrowseInfo &lpbi);
extern "C" long __stdcall SHLoadInProc(const GUID &rclsid);
extern "C" long __stdcall SHGetDesktopFolder(IShellFolder* &ppshf);
extern "C" void __stdcall SHChangeNotify(long wEventId, int uFlags, void * dwItem1, void * dwItem2);
extern "C" void __stdcall SHAddToRecentDocs(int uFlags, void * pv);
extern "C" long __stdcall SHGetInstanceExplorer(Ole2::IUnknown* &ppUnk);
} /* namespace Shlobj */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Shlobj;
#endif
//-- end unit ----------------------------------------------------------------
#endif // ShlObj