home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 November / PCWorld_2000-11_cd.bin / Software / Topware / devc40 / _SETUP.5 / Group3 / shlobj.h < prev    next >
C/C++ Source or Header  |  1999-11-07  |  23KB  |  696 lines

  1. #ifndef _SHLOBJ_H
  2. #define _SHLOBJ_H
  3.  
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7.  
  8. #include <ole2.h>
  9. #include <shlguid.h>
  10. #include <shellapi.h>
  11. #pragma pack(push,1)
  12. #include <commctrl.h>
  13.  
  14. #define BIF_RETURNONLYFSDIRS 1
  15. #define BIF_DONTGOBELOWDOMAIN 2
  16. #define BIF_STATUSTEXT 4
  17. #define BIF_RETURNFSANCESTORS 8
  18. #define BIF_BROWSEFORCOMPUTER 0x1000
  19. #define BIF_BROWSEFORPRINTER 0x2000
  20. #define BFFM_INITIALIZED 1
  21. #define BFFM_SELCHANGED 2
  22. #define BFFM_SETSTATUSTEXT (WM_USER + 100)
  23. #define BFFM_ENABLEOK (WM_USER + 101)
  24. #define BFFM_SETSELECTION (WM_USER + 102)
  25. #define CMIC_MASK_HOTKEY    SEE_MASK_HOTKEY
  26. #define CMIC_MASK_ICON    SEE_MASK_ICON
  27. #define CMIC_MASK_FLAG_NO_UI    SEE_MASK_FLAG_NO_UI
  28. #define CMDSTR_NEWFOLDER    "NewFolder"
  29. #define CMDSTR_VIEWLIST    "ViewList"
  30. #define CMDSTR_VIEWDETAILS    "ViewDetails"
  31. #define DVASPECT_SHORTNAME 2
  32. #define SHARD_PIDL    1
  33. #define SHARD_PATH    2
  34. #define SHCNE_RENAMEITEM    1
  35. #define SHCNE_CREATE    2
  36. #define SHCNE_DELETE    4
  37. #define SHCNE_MKDIR    8
  38. #define SHCNE_RMDIR    16
  39. #define SHCNE_MEDIAINSERTED    32
  40. #define SHCNE_MEDIAREMOVED    64
  41. #define SHCNE_DRIVEREMOVED    128
  42. #define SHCNE_DRIVEADD    256
  43. #define SHCNE_NETSHARE    512
  44. #define SHCNE_NETUNSHARE    1024
  45. #define SHCNE_ATTRIBUTES    2048
  46. #define SHCNE_UPDATEDIR    4096
  47. #define SHCNE_UPDATEITEM    8192
  48. #define SHCNE_SERVERDISCONNECT    16384
  49. #define SHCNE_UPDATEIMAGE    32768
  50. #define SHCNE_DRIVEADDGUI    65536
  51. #define SHCNE_RENAMEFOLDER    0x20000
  52. #define SHCNE_FREESPACE    0x40000
  53. #define SHCNE_ASSOCCHANGED    0x8000000
  54. #define SHCNE_DISKEVENTS    0x2381F
  55. #define SHCNE_GLOBALEVENTS    0xC0581E0
  56. #define SHCNE_ALLEVENTS    0x7FFFFFFF
  57. #define SHCNE_INTERRUPT    0x80000000
  58. #define SHCNF_IDLIST    0
  59. #define SHCNF_PATH    1
  60. #define SHCNF_PRINTER    2
  61. #define SHCNF_DWORD    3
  62. #define SHCNF_TYPE    0xFF
  63. #define SHCNF_FLUSH    0x1000
  64. #define SHCNF_FLUSHNOWAIT    0x2000
  65. #define SFGAO_CANCOPY    DROPEFFECT_COPY
  66. #define SFGAO_CANMOVE    DROPEFFECT_MOVE
  67. #define SFGAO_CANLINK    DROPEFFECT_LINK
  68. #define SFGAO_CANRENAME    0x00000010L
  69. #define SFGAO_CANDELETE    0x00000020L
  70. #define SFGAO_HASPROPSHEET    0x00000040L
  71. #define SFGAO_DROPTARGET    0x00000100L
  72. #define SFGAO_CAPABILITYMASK    0x00000177L
  73. #define SFGAO_LINK    0x00010000L
  74. #define SFGAO_SHARE    0x00020000L
  75. #define SFGAO_READONLY    0x00040000L
  76. #define SFGAO_GHOSTED    0x00080000L
  77. #define SFGAO_DISPLAYATTRMASK    0x000F0000L
  78. #define SFGAO_FILESYSANCESTOR    0x10000000L
  79. #define SFGAO_FOLDER    0x20000000L
  80. #define SFGAO_FILESYSTEM    0x40000000L
  81. #define SFGAO_HASSUBFOLDER    0x80000000L
  82. #define SFGAO_CONTENTSMASK    0x80000000L
  83. #define SFGAO_VALIDATE    0x01000000L
  84. #define SFGAO_REMOVABLE    0x02000000L
  85. #define STRRET_WSTR    0
  86. #define STRRET_OFFSET    1
  87. #define STRRET_CSTR    2
  88. #define SHGDFIL_FINDDATA    1
  89. #define SHGDFIL_NETRESOURCE    2
  90. #define SHGDFIL_DESCRIPTIONID    3
  91. #define SHDID_ROOT_REGITEM    1
  92. #define SHDID_FS_FILE    2
  93. #define SHDID_FS_DIRECTORY    3
  94. #define SHDID_FS_OTHER    4
  95. #define SHDID_COMPUTER_DRIVE35    5
  96. #define SHDID_COMPUTER_DRIVE525    6
  97. #define SHDID_COMPUTER_REMOVABLE    7
  98. #define SHDID_COMPUTER_FIXED    8
  99. #define SHDID_COMPUTER_NETDRIVE    9
  100. #define SHDID_COMPUTER_CDROM    10
  101. #define SHDID_COMPUTER_RAMDISK    11
  102. #define SHDID_COMPUTER_OTHER    12
  103. #define SHDID_NET_DOMAIN    13
  104. #define SHDID_NET_SERVER    14
  105. #define SHDID_NET_SHARE    15
  106. #define SHDID_NET_RESTOFNET    16
  107. #define SHDID_NET_OTHER    17
  108. #ifndef REGSTR_PATH_EXPLORER
  109. #define REGSTR_PATH_EXPLORER    "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"
  110. #endif
  111. #define REGSTR_PATH_SPECIAL_FOLDERS    REGSTR_PATH_EXPLORER "\\Shell Folders"
  112. #define CSIDL_DESKTOP    0
  113. #define CSIDL_PROGRAMS    2
  114. #define CSIDL_CONTROLS    3
  115. #define CSIDL_PRINTERS    4
  116. #define CSIDL_PERSONAL    5
  117. #define CSIDL_FAVORITES    6
  118. #define CSIDL_STARTUP    7
  119. #define CSIDL_RECENT    8
  120. #define CSIDL_SENDTO    9
  121. #define CSIDL_BITBUCKET    10
  122. #define CSIDL_STARTMENU    11
  123. #define CSIDL_DESKTOPDIRECTORY    16
  124. #define CSIDL_DRIVES    17
  125. #define CSIDL_NETWORK    18
  126. #define CSIDL_NETHOOD    19
  127. #define CSIDL_FONTS    20
  128. #define CSIDL_TEMPLATES    21
  129. #define CFSTR_SHELLIDLIST    "Shell IDList Array"
  130. #define CFSTR_SHELLIDLISTOFFSET    "Shell Object Offsets"
  131. #define CFSTR_NETRESOURCES    "Net Resource"
  132. #define CFSTR_FILEDESCRIPTOR    "FileGroupDescriptor"
  133. #define CFSTR_FILECONTENTS    "FileContents"
  134. #define CFSTR_FILENAME    "FileName"
  135. #define CFSTR_PRINTERGROUP    "PrinterFriendlyName"
  136. #define CFSTR_FILENAMEMAP    "FileNameMap"
  137. #define CMF_NORMAL    0
  138. #define CMF_DEFAULTONLY    1
  139. #define CMF_VERBSONLY    2
  140. #define CMF_EXPLORE    4
  141. #define CMF_RESERVED    0xffff0000
  142. #define GCS_VERB    0
  143. #define GCS_HELPTEXT    1
  144. #define GCS_VALIDATE    2
  145. #define CMDSTR_NEWFOLDER    "NewFolder"
  146. #define CMDSTR_VIEWLIST    "ViewList"
  147. #define CMDSTR_VIEWDETAILS    "ViewDetails"
  148. #define CMIC_MASK_HOTKEY    SEE_MASK_HOTKEY
  149. #define CMIC_MASK_ICON    SEE_MASK_ICON
  150. #define CMIC_MASK_FLAG_NO_UI    SEE_MASK_FLAG_NO_UI
  151. #define CMIC_MASK_MODAL    0x80000000
  152. #define CMIC_VALID_SEE_FLAGS    SEE_VALID_CMIC_FLAGS
  153. #define GIL_OPENICON    1
  154. #define GIL_FORSHELL    2
  155. #define GIL_SIMULATEDOC    1
  156. #define GIL_PERINSTANCE    2
  157. #define GIL_PERCLASS    4
  158. #define GIL_NOTFILENAME    8
  159. #define GIL_DONTCACHE    16
  160. #define FVSIF_RECT    1
  161. #define FVSIF_PINNED    2
  162. #define FVSIF_NEWFAILED 0x8000000
  163. #define FVSIF_NEWFILE    0x80000000
  164. #define FVSIF_CANVIEWIT 0x40000000
  165. #define CDBOSC_SETFOCUS    0
  166. #define CDBOSC_KILLFOCUS    1
  167. #define CDBOSC_SELCHANGE    2
  168. #define CDBOSC_RENAME    3
  169. #define FCIDM_SHVIEWFIRST    0
  170. #define FCIDM_SHVIEWLAST    0x7fff
  171. #define FCIDM_BROWSERFIRST    0xa000
  172. #define FCIDM_BROWSERLAST    0xbf00
  173. #define FCIDM_GLOBALFIRST    0x8000
  174. #define FCIDM_GLOBALLAST    0x9fff
  175. #define FCIDM_MENU_FILE    FCIDM_GLOBALFIRST
  176. #define FCIDM_MENU_EDIT    (FCIDM_GLOBALFIRST+0x0040)
  177. #define FCIDM_MENU_VIEW    (FCIDM_GLOBALFIRST+0x0080)
  178. #define FCIDM_MENU_VIEW_SEP_OPTIONS    (FCIDM_GLOBALFIRST+0x0081)
  179. #define FCIDM_MENU_TOOLS    (FCIDM_GLOBALFIRST+0x00c0)
  180. #define FCIDM_MENU_TOOLS_SEP_GOTO    (FCIDM_GLOBALFIRST+0x00c1)
  181. #define FCIDM_MENU_HELP    (FCIDM_GLOBALFIRST+0x0100)
  182. #define FCIDM_MENU_FIND    (FCIDM_GLOBALFIRST+0x0140)
  183. #define FCIDM_MENU_EXPLORE    (FCIDM_GLOBALFIRST+0x0150)
  184. #define FCIDM_MENU_FAVORITES    (FCIDM_GLOBALFIRST+0x0170)á
  185. #define FCIDM_TOOLBAR    FCIDM_BROWSERFIRST
  186. #define FCIDM_STATUS    (FCIDM_BROWSERFIRST+1)
  187. #define SBSP_DEFBROWSER    0
  188. #define SBSP_SAMEBROWSER    1
  189. #define SBSP_NEWBROWSER    2
  190. #define SBSP_DEFMODE    0
  191. #define SBSP_OPENMODE    16
  192. #define SBSP_EXPLOREMODE    32
  193. #define SBSP_ABSOLUTE    0
  194. #define SBSP_RELATIVE    0x1000
  195. #define SBSP_PARENT    0x2000
  196. #define SBSP_INITIATEDBYHLINKFRAME    0x80000000
  197. #define SBSP_REDIRECT    0x40000000
  198. #define FCW_STATUS    1
  199. #define FCW_TOOLBAR    2
  200. #define FCW_TREE    3
  201. #define FCT_MERGE    1
  202. #define FCT_CONFIGABLE    2
  203. #define FCT_ADDTOEND    4
  204. #define SVSI_DESELECT    0
  205. #define SVSI_SELECT    1
  206. #define SVSI_EDIT    3
  207. #define SVSI_DESELECTOTHERS    4
  208. #define SVSI_ENSUREVISIBLE    8
  209. #define SVSI_FOCUSED    16
  210. #define SVGIO_BACKGROUND    0
  211. #define SVGIO_SELECTION    1
  212. #define SVGIO_ALLVIEW    2
  213. #define SV2GV_CURRENTVIEW ((UINT)-1)
  214. #define SV2GV_DEFAULTVIEW ((UINT)-2)
  215.  
  216. typedef struct _IDA {
  217.     UINT cidl;
  218.     UINT aoffset[1];
  219. } CIDA,*LPIDA;
  220. typedef struct _SHITEMID {
  221.     USHORT    cb;
  222.     BYTE    abID[1];
  223. } SHITEMID, * LPSHITEMID;
  224. typedef const SHITEMID *LPCSHITEMID;
  225. typedef struct _ITEMIDLIST {
  226.     SHITEMID mkid;
  227. } ITEMIDLIST,*LPITEMIDLIST;
  228. typedef const ITEMIDLIST *LPCITEMIDLIST;
  229. typedef int (CALLBACK* BFFCALLBACK)(HWND,UINT,LPARAM,LPARAM);
  230. typedef struct _browseinfo {
  231.     HWND    hwndOwner;
  232.     LPCITEMIDLIST    pidlRoot;
  233.     LPSTR    pszDisplayName;
  234.     LPCSTR    lpszTitle;
  235.     UINT    ulFlags;
  236.     BFFCALLBACK    lpfn;
  237.     LPARAM    lParam;
  238.     int    iImage;
  239. } BROWSEINFO,*PBROWSEINFO,*LPBROWSEINFO;
  240. typedef struct _CMInvokeCommandInfo {
  241.     DWORD cbSize;
  242.     DWORD fMask;
  243.     HWND hwnd;
  244.     LPCSTR lpVerb;
  245.     LPCSTR lpParameters;
  246.     LPCSTR lpDirectory;
  247.     int nShow;
  248.     DWORD dwHotKey;
  249.     HANDLE hIcon;
  250. } CMINVOKECOMMANDINFO,*LPCMINVOKECOMMANDINFO;
  251. typedef struct _DROPFILES {
  252.     DWORD pFiles;
  253.     POINT pt;
  254.     BOOL fNC;
  255.     BOOL fWide;
  256. } DROPFILES,*LPDROPFILES;
  257. typedef enum tagSHGDN {
  258.     SHGDN_NORMAL=0,
  259.     SHGDN_INFOLDER,
  260.     SHGDN_FORPARSING=0x8000
  261. } SHGNO;
  262. typedef enum tagSHCONTF {
  263.     SHCONTF_FOLDERS=32,
  264.     SHCONTF_NONFOLDERS=64,
  265.     SHCONTF_INCLUDEHIDDEN=128
  266. } SHCONTF;
  267. typedef struct _STRRET {
  268.     UINT uType;
  269.     union {
  270.         LPWSTR pOleStr;
  271.         UINT uOffset;
  272.         char cStr[MAX_PATH];
  273.     } DUMMYUNIONNAME;
  274. } STRRET,*LPSTRRET;
  275. typedef enum {
  276.     FD_CLSID=1,FD_SIZEPOINT=2,FD_ATTRIBUTES=4,FD_CREATETIME=8,FD_ACCESSTIME=16,
  277.     FD_WRITESTIME=32,FD_FILESIZE=64,FD_LINKUI=0x8000
  278. } FD_FLAGS;
  279. typedef struct _FILEDESCRIPTOR {
  280.     DWORD dwFlags;
  281.     CLSID clsid;
  282.     SIZEL sizel;
  283.     POINTL pointl;
  284.     DWORD dwFileAttributes;
  285.     FILETIME ftCreationTime;
  286.     FILETIME ftLastAccessTime;
  287.     FILETIME ftLastWriteTime;
  288.     DWORD nFileSizeHigh;
  289.     DWORD nFileSizeLow;
  290.     CHAR cFileName[MAX_PATH];
  291. } FILEDESCRIPTOR,*LPFILEDESCRIPTOR;
  292. typedef struct _FILEGROUPDESCRIPTOR {
  293.     UINT cItems;
  294.     FILEDESCRIPTOR fgd[1];
  295. } FILEGROUPDESCRIPTOR,*LPFILEGROUPDESCRIPTOR;
  296. typedef enum {
  297.     SLR_NO_UI=1,
  298.     SLR_ANY_MATCH=2,
  299.     SLR_UPDATE=4
  300. } SLR_FLAGS;
  301. typedef enum {
  302.     SLGP_SHORTPATH=1,
  303.     SLGP_UNCPRIORITY
  304. } SLGP_FLAGS;
  305. typedef PBYTE LPVIEWSETTINGS;
  306. typedef enum {
  307.     FWF_AUTOARRANGE=1,FWF_ABBREVIATEDNAMES=2,FWF_SNAPTOGRID=4,FWF_OWNERDATA=8,
  308.     FWF_BESTFITWINDOW=16,FWF_DESKTOP=32,FWF_SINGLESEL=64,FWF_NOSUBFOLDERS=128,
  309.     FWF_TRANSPARENT=256,FWF_NOCLIENTEDGE=512,FWF_NOSCROLL=0x400,FWF_ALIGNLEFT=0x800,
  310.     FWF_SINGLECLICKACTIVATE=0x8000
  311. } FOLDERFLAGS;
  312. typedef enum {
  313.     FVM_ICON=1,
  314.     FVM_SMALLICON,
  315.     FVM_LIST,
  316.     FVM_DETAILS
  317. } FOLDERVIEWMODE;
  318. typedef struct {
  319.     UINT ViewMode;
  320.     UINT fFlags;
  321. } FOLDERSETTINGS,*LPFOLDERSETTINGS;
  322. typedef const FOLDERSETTINGS *LPCFOLDERSETTINGS;
  323. typedef struct {
  324.     DWORD cbSize;
  325.     HWND hwndOwner;
  326.     int iShow;
  327.     DWORD dwFlags;
  328.     RECT rect;
  329.     LPUNKNOWN punkRel;
  330.     OLECHAR strNewFile[MAX_PATH];
  331. } FVSHOWINFO,*LPFVSHOWINFO;
  332. typedef struct _NRESARRAY {
  333.     UINT cItems;
  334.     NETRESOURCE nr[1];
  335. } NRESARRAY, *LPNRESARRAY;
  336. enum { SBSC_HIDE,SBSC_SHOW,SBSC_TOGGLE,SBSC_QUERY };
  337. enum {
  338.     SBCMDID_ENABLESHOWTREE,SBCMDID_SHOWCONTROL,SBCMDID_CANCELNAVIGATION,
  339.     SBCMDID_MAYSAVECHANGES,SBCMDID_SETHLINKFRAME,SBCMDID_ENABLESTOP,SBCMDID_OPTIONS
  340. };
  341. typedef enum {
  342.     SVUIA_DEACTIVATE,SVUIA_ACTIVATE_NOFOCUS,SVUIA_ACTIVATE_FOCUS,
  343.     SVUIA_INPLACEACTIVATE
  344. } SVUIA_STATUS;
  345.  
  346. DECLARE_ENUMERATOR_(IEnumIDList,LPITEMIDLIST);
  347. typedef IEnumIDList *LPENUMIDLIST;
  348.  
  349. #undef INTERFACE
  350. #define INTERFACE IContextMenu
  351. DECLARE_INTERFACE_(IContextMenu,IUnknown)
  352. {
  353.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  354.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  355.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  356.     STDMETHOD(QueryContextMenu)(THIS_ HMENU,UINT,UINT,UINT,UINT) PURE;
  357.     STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO) PURE;
  358.     STDMETHOD(GetCommandString)(THIS_ UINT,UINT,PUINT,LPSTR,UINT) PURE;
  359. };
  360. typedef IContextMenu *LPCONTEXTMENU;
  361.  
  362. #undef INTERFACE
  363. #define INTERFACE IContextMenu2
  364. DECLARE_INTERFACE_(IContextMenu2,IUnknown)
  365. {
  366.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  367.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  368.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  369.     STDMETHOD(QueryContextMenu)(THIS_ HMENU,UINT,UINT,UINT,UINT) PURE;
  370.     STDMETHOD(HandleMenuMsg)(THIS_ UINT,WPARAM,LPARAM) PURE;
  371.     STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO) PURE;
  372.     STDMETHOD(GetCommandString)(THIS_ UINT,UINT,PUINT,LPSTR,UINT) PURE;
  373. };
  374. typedef IContextMenu2 *LPCONTEXTMENU2;
  375.  
  376. #undef INTERFACE
  377. #define INTERFACE IShellExtInit
  378. DECLARE_INTERFACE_(IShellExtInit, IUnknown)
  379. {
  380.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  381.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  382.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  383.     STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST,LPDATAOBJECT,HKEY) PURE;
  384. };
  385. typedef IShellExtInit *LPSHELLEXTINIT;
  386.  
  387. #undef INTERFACE
  388. #define INTERFACE IShellPropSheetExt
  389. DECLARE_INTERFACE_(IShellPropSheetExt, IUnknown)
  390. {
  391.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  392.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  393.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  394.     STDMETHOD(AddPages)(THIS_ LPFNADDPROPSHEETPAGE,LPARAM) PURE;
  395.     STDMETHOD(ReplacePage)(THIS_ UINT,LPFNADDPROPSHEETPAGE,LPARAM) PURE;
  396. };
  397. typedef IShellPropSheetExt *LPSHELLPROPSHEETEXT;
  398.  
  399. #undef INTERFACE
  400. #define INTERFACE IExtractIcon
  401. DECLARE_INTERFACE_(IExtractIcon, IUnknown)  // exic
  402. {
  403.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  404.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  405.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  406.     STDMETHOD(GetIconLocation)(THIS_ UINT,LPSTR,UINT,int*,PUINT) PURE;
  407.     STDMETHOD(Extract)(THIS_ LPCSTR,UINT,HICON*,HICON*,UINT) PURE;
  408. };
  409. typedef IExtractIcon *LPEXTRACTICON;
  410.  
  411. #undef INTERFACE
  412. #define INTERFACE IShellLinkA
  413. DECLARE_INTERFACE_(IShellLinkA, IUnknown)
  414. {
  415.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  416.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  417.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  418.     STDMETHOD(GetPath)(THIS_ LPSTR,int,LPWIN32_FIND_DATAA*,DWORD) PURE;
  419.     STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST*) PURE;
  420.     STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST) PURE;
  421.     STDMETHOD(GetDescription)(THIS_ LPSTR,int) PURE;
  422.     STDMETHOD(SetDescription)(THIS_ LPCSTR) PURE;
  423.     STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR,int) PURE;
  424.     STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR) PURE;
  425.     STDMETHOD(GetArguments)(THIS_ LPSTR,int) PURE;
  426.     STDMETHOD(SetArguments)(THIS_ LPCSTR) PURE;
  427.     STDMETHOD(GetHotkey)(THIS_ PWORD) PURE;
  428.     STDMETHOD(SetHotkey)(THIS_ WORD) PURE;
  429.     STDMETHOD(GetShowCmd)(THIS_ int*) PURE;
  430.     STDMETHOD(SetShowCmd)(THIS_ int) PURE;
  431.     STDMETHOD(GetIconLocation)(THIS_ LPSTR,int,int*) PURE;
  432.     STDMETHOD(SetIconLocation)(THIS_ LPCSTR,int) PURE;
  433.     STDMETHOD(SetRelativePath)(THIS_ LPCSTR ,DWORD) PURE;
  434.     STDMETHOD(Resolve)(THIS_ HWND,DWORD) PURE;
  435.     STDMETHOD(SetPath)(THIS_ LPCSTR) PURE;
  436. };
  437. #undef INTERFACE
  438. #define INTERFACE IShellLinkW
  439. DECLARE_INTERFACE_(IShellLinkW, IUnknown)
  440. {
  441.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  442.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  443.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  444.     STDMETHOD(GetPath)(THIS_ LPSTR,int,LPWIN32_FIND_DATAW*,DWORD) PURE;
  445.     STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST*) PURE;
  446.     STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST) PURE;
  447.     STDMETHOD(GetDescription)(THIS_ LPWSTR,int) PURE;
  448.     STDMETHOD(SetDescription)(THIS_ LPCWSTR) PURE;
  449.     STDMETHOD(GetWorkingDirectory)(THIS_ LPWSTR,int) PURE;
  450.     STDMETHOD(SetWorkingDirectory)(THIS_ LPCWSTR) PURE;
  451.     STDMETHOD(GetArguments)(THIS_ LPWSTR,int) PURE;
  452.     STDMETHOD(SetArguments)(THIS_ LPCWSTR) PURE;
  453.     STDMETHOD(GetHotkey)(THIS_ PWORD) PURE;
  454.     STDMETHOD(SetHotkey)(THIS_ WORD) PURE;
  455.     STDMETHOD(GetShowCmd)(THIS_ int*) PURE;
  456.     STDMETHOD(SetShowCmd)(THIS_ int) PURE;
  457.     STDMETHOD(GetIconLocation)(THIS_ LPWSTR,int,int*) PURE;
  458.     STDMETHOD(SetIconLocation)(THIS_ LPCWSTR,int) PURE;
  459.     STDMETHOD(SetRelativePath)(THIS_ LPCWSTR ,DWORD) PURE;
  460.     STDMETHOD(Resolve)(THIS_ HWND,DWORD) PURE;
  461.     STDMETHOD(SetPath)(THIS_ LPCWSTR) PURE;
  462. };
  463.  
  464. #undef INTERFACE
  465. #define INTERFACE IShellFolder
  466. DECLARE_INTERFACE_(IShellFolder, IUnknown)
  467. {
  468.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  469.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  470.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  471.     STDMETHOD(ParseDisplayName)(THIS_ HWND,LPBC,LPOLESTR,PULONG,LPITEMIDLIST*,PULONG) PURE;
  472.     STDMETHOD(EnumObjects)(THIS_ HWND,DWORD,LPENUMIDLIST*) PURE;
  473.     STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST,LPBC,REFIID,PVOID*) PURE;
  474.     STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST,LPBC,REFIID,PVOID*) PURE;
  475.     STDMETHOD(CompareIDs)(THIS_ LPARAM,LPCITEMIDLIST,LPCITEMIDLIST) PURE;
  476.     STDMETHOD(CreateViewObject)(THIS_ HWND,REFIID,PVOID*) PURE;
  477.     STDMETHOD(GetAttributesOf)(THIS_ UINT,LPCITEMIDLIST*,PULONG) PURE;
  478.     STDMETHOD(GetUIObjectOf)(THIS_ HWND,UINT,LPCITEMIDLIST*,REFIID,PUINT,PVOID*) PURE;
  479.     STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST,DWORD,LPSTRRET) PURE;
  480.     STDMETHOD(SetNameOf)(THIS_ HWND,LPCITEMIDLIST,LPCOLESTR,DWORD,LPITEMIDLIST*) PURE;
  481. };
  482. typedef IShellFolder *LPSHELLFOLDER;
  483.  
  484. #undef INTERFACE
  485. #define INTERFACE ICopyHook
  486. DECLARE_INTERFACE_(ICopyHook, IUnknown)
  487. {
  488.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  489.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  490.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  491.     STDMETHOD_(UINT,CopyCallback)(THIS_ HWND,UINT,UINT,LPCSTR,DWORD,LPCSTR,DWORD) PURE;
  492. };
  493. typedef ICopyHook *LPCOPYHOOK;
  494.  
  495. #undef INTERFACE
  496. #define INTERFACE IFileViewerSite
  497. DECLARE_INTERFACE(IFileViewerSite)
  498. {
  499.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  500.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  501.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  502.     STDMETHOD(SetPinnedWindow)(THIS_ HWND) PURE;
  503.     STDMETHOD(GetPinnedWindow)(THIS_ HWND*) PURE;
  504. };
  505. typedef IFileViewerSite *LPFILEVIEWERSITE;
  506.  
  507. #undef INTERFACE
  508. #define INTERFACE IFileViewer
  509. DECLARE_INTERFACE(IFileViewer)
  510. {
  511.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  512.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  513.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  514.     STDMETHOD(ShowInitialize)(THIS_ LPFILEVIEWERSITE) PURE;
  515.     STDMETHOD(Show)(THIS_ LPFVSHOWINFO) PURE;
  516.     STDMETHOD(PrintTo)(THIS_ LPSTR,BOOL) PURE;
  517. };
  518. typedef IFileViewer *LPFILEVIEWER;
  519.  
  520. #undef INTERFACE
  521. #define INTERFACE ICommDlgBrowser
  522. DECLARE_INTERFACE_(ICommDlgBrowser,IUnknown)
  523. {
  524.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  525.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  526.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  527.     STDMETHOD(OnDefaultCommand)(THIS) PURE;
  528.     STDMETHOD(OnStateChange)(THIS_ ULONG) PURE;
  529.     STDMETHOD(IncludeObject)(THIS_ LPCITEMIDLIST) PURE;
  530. };
  531. typedef ICommDlgBrowser *LPCOMMDLGBROWSER;
  532.  
  533. #undef INTERFACE
  534. #define INTERFACE IPersistFolder
  535. DECLARE_INTERFACE_(IPersistFolder,IPersist)
  536. {
  537.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  538.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  539.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  540.     STDMETHOD(GetClassID)(THIS_ CLSID) PURE;
  541.     STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST) PURE;
  542. };
  543. typedef IPersistFolder *LPPERSISTFOLDER;
  544.  
  545. typedef interface IShellBrowser *LPSHELLBROWSER;
  546. typedef interface IShellView *LPSHELLVIEW;
  547.  
  548. #undef INTERFACE
  549. #define INTERFACE IShellBrowser
  550. DECLARE_INTERFACE_(IShellBrowser,IOleWindow)
  551. {
  552.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  553.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  554.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  555.     STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
  556.     STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
  557.     STDMETHOD(InsertMenusSB)(THIS_ HMENU,LPOLEMENUGROUPWIDTHS) PURE;
  558.     STDMETHOD(SetMenuSB)(THIS_ HMENU,HOLEMENU,HWND) PURE;
  559.     STDMETHOD(RemoveMenusSB)(THIS_ HMENU) PURE;
  560.     STDMETHOD(SetStatusTextSB) (THIS_ LPCOLESTR) PURE;
  561.     STDMETHOD(EnableModelessSB) (THIS_ BOOL    ) PURE;
  562.     STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG,WORD) PURE;
  563.     STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST,UINT) PURE;
  564.     STDMETHOD(GetViewStateStream)(THIS_ DWORD,LPSTREAM*) PURE;
  565.     STDMETHOD(GetControlWindow)(THIS_ UINT,HWND*) PURE;
  566.     STDMETHOD(SendControlMsg)(THIS_ UINT,UINT,WPARAM,LPARAM,LRESULT*) PURE;
  567.     STDMETHOD(QueryActiveShellView)(THIS_ LPSHELLVIEW*) PURE;
  568.     STDMETHOD(OnViewWindowActive)(THIS_ LPSHELLVIEW) PURE;
  569.     STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON,UINT,UINT) PURE;
  570. };
  571.  
  572. #undef INTERFACE
  573. #define INTERFACE IShellView
  574. DECLARE_INTERFACE_(IShellView,IOleWindow)
  575. {
  576.  
  577.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  578.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  579.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  580.     STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
  581.     STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
  582.     STDMETHOD(TranslateAccelerator) (THIS_ LPMSG) PURE;
  583. #ifdef _FIX_ENABLEMODELESS_CONFLICT
  584.     STDMETHOD(EnableModelessSV)(THIS_ BOOL) PURE;
  585. #else
  586.     STDMETHOD(EnableModeless)(THIS_ BOOL) PURE;
  587. #endif
  588.     STDMETHOD(UIActivate)(THIS_ UINT) PURE;
  589.     STDMETHOD(Refresh) (THIS) PURE;
  590.     STDMETHOD(CreateViewWindow)(THIS_ IShellView*,LPCFOLDERSETTINGS,LPSHELLBROWSER,RECT*,HWND*) PURE;
  591.     STDMETHOD(DestroyViewWindow)(THIS) PURE;
  592.     STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS) PURE;
  593.     STDMETHOD(AddPropertySheetPages)(THIS_ DWORD,LPFNADDPROPSHEETPAGE,LPARAM) PURE;
  594.     STDMETHOD(SaveViewState)(THIS) PURE;
  595.     STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST,UINT) PURE;
  596.     STDMETHOD(GetItemObject)(THIS_ UINT,REFIID,PVOID*) PURE;
  597. };
  598. typedef GUID SHELLVIEWID;
  599. typedef struct _SV2CVW2_PARAMS {
  600.     DWORD cbSize;
  601.     IShellView *psvPrev;
  602.     FOLDERSETTINGS const *pfs;
  603.     IShellBrowser *psbOwner;
  604.     RECT *prcView;
  605.     SHELLVIEWID const *pvid;
  606.     HWND hwndView;
  607. } SV2CVW2_PARAMS,*LPSV2CVW2_PARAMS;
  608. #undef INTERFACE
  609. #define INTERFACE IShellView2
  610. DECLARE_INTERFACE_(IShellView2,IShellView)
  611. {
  612.  
  613.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  614.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  615.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  616.     STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
  617.     STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
  618.     STDMETHOD(TranslateAccelerator) (THIS_ LPMSG) PURE;
  619. #ifdef _FIX_ENABLEMODELESS_CONFLICT
  620.     STDMETHOD(EnableModelessSV)(THIS_ BOOL) PURE;
  621. #else
  622.     STDMETHOD(EnableModeless)(THIS_ BOOL) PURE;
  623. #endif
  624.     STDMETHOD(UIActivate)(THIS_ UINT) PURE;
  625.     STDMETHOD(Refresh) (THIS) PURE;
  626.     STDMETHOD(CreateViewWindow)(THIS_ IShellView*,LPCFOLDERSETTINGS,LPSHELLBROWSER,RECT*,HWND*) PURE;
  627.     STDMETHOD(DestroyViewWindow)(THIS) PURE;
  628.     STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS) PURE;
  629.     STDMETHOD(AddPropertySheetPages)(THIS_ DWORD,LPFNADDPROPSHEETPAGE,LPARAM) PURE;
  630.     STDMETHOD(SaveViewState)(THIS) PURE;
  631.     STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST,UINT) PURE;
  632.     STDMETHOD(GetItemObject)(THIS_ UINT,REFIID,PVOID*) PURE;
  633.     STDMETHOD(GetView)(THIS_ SHELLVIEWID*,ULONG) PURE;
  634.     STDMETHOD(CreateViewWindow2)(THIS_ LPSV2CVW2_PARAMS) PURE;
  635. };
  636.  
  637. #undef INTERFACE
  638. #define INTERFACE IShellExecuteHookA
  639. DECLARE_INTERFACE_(IShellExecuteHookA,IUnknown)
  640. {
  641.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  642.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  643.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  644.     STDMETHOD(Execute)(THIS_ LPSHELLEXECUTEINFOA) PURE;
  645. };
  646. #undef INTERFACE
  647. #define INTERFACE IShellExecuteHookW
  648. DECLARE_INTERFACE_(IShellExecuteHookW,IUnknown)
  649. {
  650.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  651.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  652.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  653.     STDMETHOD(Execute)(THIS_ LPSHELLEXECUTEINFOW) PURE;
  654. };
  655.  
  656. #undef INTERFACE
  657. #define INTERFACE IShellIcon
  658. DECLARE_INTERFACE_(IShellIcon,IUnknown)
  659. {
  660.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  661.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  662.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  663.     STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST,UINT,PINT) PURE;
  664. };
  665. typedef IShellIcon *LPSHELLICON;
  666.  
  667. void WINAPI SHAddToRecentDocs(UINT,PCVOID);
  668. LPITEMIDLIST WINAPI SHBrowseForFolder(PBROWSEINFO);
  669. void WINAPI SHChangeNotify(LONG,UINT,PCVOID,PCVOID);
  670. HRESULT WINAPI ShGetDataFromIDListA(LPSHELLFOLDER,LPCITEMIDLIST,int,PVOID,int);
  671. HRESULT WINAPI ShGetDataFromIDListW(LPSHELLFOLDER,LPCITEMIDLIST,int,PVOID,int);
  672. HRESULT WINAPI SHGetDesktopFolder(LPSHELLFOLDER*);
  673. HRESULT WINAPI SHGetInstanceExplorer(LPUNKNOWN);
  674. HRESULT WINAPI SHGetMalloc(LPMALLOC*);
  675. BOOL WINAPI SHGetPathFromIDList(LPCITEMIDLIST,LPSTR);
  676. HRESULT WINAPI SHGetSpecialFolderLocation(HWND,int,LPITEMIDLIST*);
  677. HRESULT WINAPI SHLoadInProc(REFCLSID);
  678.  
  679. #ifdef UNICODE
  680. typedef IShellExecuteHookW IShellExecuteHook;
  681. typedef IShellLinkW IShellLink;
  682. #define ShGetDataFromIDList ShGetDataFromIDListW
  683. #else
  684. typedef IShellExecuteHookA IShellExecuteHook;
  685. typedef IShellLinkA IShellLink;
  686. #define ShGetDataFromIDList ShGetDataFromIDListA
  687. #endif
  688.  
  689. #pragma pack(pop)
  690. #ifdef __cplusplus
  691. }
  692. #endif
  693.  
  694.  
  695. #endif /* _SHLOBJ_H */
  696.