home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 April / PCWorld_2008-04_cd.bin / temacd / devc++ / devcpp-4.9.9.2_setup.exe / shlobj.h < prev    next >
C/C++ Source or Header  |  2005-01-29  |  53KB  |  1,484 lines

  1. #ifndef _SHLOBJ_H
  2. #define _SHLOBJ_H
  3. #if __GNUC__ >= 3
  4. #pragma GCC system_header
  5. #endif
  6.  
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10.  
  11. #include <ole2.h>
  12. #include <shlguid.h>
  13. #include <shellapi.h>
  14. #pragma pack(push,1)
  15. #include <commctrl.h>
  16.  
  17. #define BIF_RETURNONLYFSDIRS 1
  18. #define BIF_DONTGOBELOWDOMAIN 2
  19. #define BIF_STATUSTEXT 4
  20. #define BIF_RETURNFSANCESTORS 8
  21. #define BIF_EDITBOX 16
  22. #define BIF_VALIDATE 32
  23. #define BIF_NEWDIALOGSTYLE 64
  24. #define BIF_BROWSEINCLUDEURLS 128
  25. #define BIF_USENEWUI ( BIF_EDITBOX | BIF_NEWDIALOGSTYLE )
  26. #define BIF_BROWSEFORCOMPUTER 0x1000
  27. #define BIF_BROWSEFORPRINTER 0x2000
  28. #define BIF_BROWSEINCLUDEFILES 0x4000
  29. #define BIF_SHAREABLE 0x8000
  30. #define BFFM_INITIALIZED 1
  31. #define BFFM_SELCHANGED 2
  32. #define BFFM_VALIDATEFAILEDA 3
  33. #define BFFM_VALIDATEFAILEDW 4
  34. #define BFFM_SETSTATUSTEXTA (WM_USER + 100)
  35. #define BFFM_SETSTATUSTEXTW (WM_USER + 104)
  36. #define BFFM_ENABLEOK (WM_USER + 101)
  37. #define BFFM_SETSELECTIONA (WM_USER + 102)
  38. #define BFFM_SETSELECTIONW (WM_USER + 103)
  39. #define BFFM_SETOKTEXT (WM_USER + 105)
  40. #define BFFM_SETEXPANDED (WM_USER + 106)
  41. #ifdef UNICODE
  42. #define BFFM_SETSTATUSTEXT  BFFM_SETSTATUSTEXTW
  43. #define BFFM_SETSELECTION   BFFM_SETSELECTIONW
  44. #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
  45. #else
  46. #define BFFM_SETSTATUSTEXT  BFFM_SETSTATUSTEXTA
  47. #define BFFM_SETSELECTION   BFFM_SETSELECTIONA
  48. #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
  49. #endif
  50. #define DVASPECT_SHORTNAME 2
  51. #define SHARD_PIDL    1
  52. #define SHARD_PATH    2
  53. #define SHCNE_RENAMEITEM    1
  54. #define SHCNE_CREATE    2
  55. #define SHCNE_DELETE    4
  56. #define SHCNE_MKDIR    8
  57. #define SHCNE_RMDIR    16
  58. #define SHCNE_MEDIAINSERTED    32
  59. #define SHCNE_MEDIAREMOVED    64
  60. #define SHCNE_DRIVEREMOVED    128
  61. #define SHCNE_DRIVEADD    256
  62. #define SHCNE_NETSHARE    512
  63. #define SHCNE_NETUNSHARE    1024
  64. #define SHCNE_ATTRIBUTES    2048
  65. #define SHCNE_UPDATEDIR    4096
  66. #define SHCNE_UPDATEITEM    8192
  67. #define SHCNE_SERVERDISCONNECT    16384
  68. #define SHCNE_UPDATEIMAGE    32768
  69. #define SHCNE_DRIVEADDGUI    65536
  70. #define SHCNE_RENAMEFOLDER    0x20000
  71. #define SHCNE_FREESPACE    0x40000
  72. #define SHCNE_ASSOCCHANGED    0x8000000
  73. #define SHCNE_DISKEVENTS    0x2381F
  74. #define SHCNE_GLOBALEVENTS    0xC0581E0
  75. #define SHCNE_ALLEVENTS    0x7FFFFFFF
  76. #define SHCNE_INTERRUPT    0x80000000
  77. #define SHCNF_IDLIST    0
  78. #define SHCNF_PATHA    1
  79. #define SHCNF_PRINTERA    2
  80. #define SHCNF_DWORD    3
  81. #define SHCNF_PATHW    5
  82. #define SHCNF_PRINTERW    6
  83. #define SHCNF_TYPE    0xFF
  84. #define SHCNF_FLUSH    0x1000
  85. #define SHCNF_FLUSHNOWAIT    0x2000
  86. #ifdef UNICODE
  87. #define SHCNF_PATH      SHCNF_PATHW
  88. #define SHCNF_PRINTER   SHCNF_PRINTERW
  89. #else
  90. #define SHCNF_PATH      SHCNF_PATHA
  91. #define SHCNF_PRINTER   SHCNF_PRINTERA
  92. #endif
  93. #define SFGAO_CANCOPY    DROPEFFECT_COPY
  94. #define SFGAO_CANMOVE    DROPEFFECT_MOVE
  95. #define SFGAO_CANLINK    DROPEFFECT_LINK
  96. #define SFGAO_CANRENAME        0x00000010L
  97. #define SFGAO_CANDELETE        0x00000020L
  98. #define SFGAO_HASPROPSHEET    0x00000040L
  99. #define SFGAO_DROPTARGET    0x00000100L
  100. #define SFGAO_CAPABILITYMASK    0x00000177L
  101. #define SFGAO_GHOSTED        0x00008000L
  102. #define SFGAO_LINK        0x00010000L
  103. #define SFGAO_SHARE        0x00020000L
  104. #define SFGAO_READONLY        0x00040000L
  105. #define SFGAO_HIDDEN        0x00080000L
  106. #define SFGAO_DISPLAYATTRMASK    0x000F0000L
  107. #define SFGAO_FILESYSANCESTOR    0x10000000L
  108. #define SFGAO_FOLDER        0x20000000L
  109. #define SFGAO_FILESYSTEM    0x40000000L
  110. #define SFGAO_HASSUBFOLDER    0x80000000L
  111. #define SFGAO_CONTENTSMASK    0x80000000L
  112. #define SFGAO_VALIDATE        0x01000000L
  113. #define SFGAO_REMOVABLE        0x02000000L
  114. #define SFGAO_COMPRESSED    0x04000000L
  115. #define STRRET_WSTR    0
  116. #define STRRET_OFFSET    1
  117. #define STRRET_CSTR    2
  118. #define SHGDFIL_FINDDATA    1
  119. #define SHGDFIL_NETRESOURCE    2
  120. #define SHGDFIL_DESCRIPTIONID    3
  121. #define SHDID_ROOT_REGITEM    1
  122. #define SHDID_FS_FILE    2
  123. #define SHDID_FS_DIRECTORY    3
  124. #define SHDID_FS_OTHER    4
  125. #define SHDID_COMPUTER_DRIVE35    5
  126. #define SHDID_COMPUTER_DRIVE525    6
  127. #define SHDID_COMPUTER_REMOVABLE    7
  128. #define SHDID_COMPUTER_FIXED    8
  129. #define SHDID_COMPUTER_NETDRIVE    9
  130. #define SHDID_COMPUTER_CDROM    10
  131. #define SHDID_COMPUTER_RAMDISK    11
  132. #define SHDID_COMPUTER_OTHER    12
  133. #define SHDID_NET_DOMAIN    13
  134. #define SHDID_NET_SERVER    14
  135. #define SHDID_NET_SHARE    15
  136. #define SHDID_NET_RESTOFNET    16
  137. #define SHDID_NET_OTHER    17
  138. #ifndef REGSTR_PATH_EXPLORER
  139. #define REGSTR_PATH_EXPLORER    TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer")
  140. #endif
  141. #define REGSTR_PATH_SPECIAL_FOLDERS    REGSTR_PATH_EXPLORER TEXT("\\Shell Folders")
  142. #define CSIDL_DESKTOP    0
  143. #define CSIDL_INTERNET  1
  144. #define CSIDL_PROGRAMS    2
  145. #define CSIDL_CONTROLS    3
  146. #define CSIDL_PRINTERS    4
  147. #define CSIDL_PERSONAL    5
  148. #define CSIDL_FAVORITES    6
  149. #define CSIDL_STARTUP    7
  150. #define CSIDL_RECENT    8
  151. #define CSIDL_SENDTO    9
  152. #define CSIDL_BITBUCKET    10
  153. #define CSIDL_STARTMENU    11
  154. #define CSIDL_DESKTOPDIRECTORY    16
  155. #define CSIDL_DRIVES    17
  156. #define CSIDL_NETWORK    18
  157. #define CSIDL_NETHOOD    19
  158. #define CSIDL_FONTS    20
  159. #define CSIDL_TEMPLATES    21
  160. #define CSIDL_COMMON_STARTMENU    22
  161. #define CSIDL_COMMON_PROGRAMS    23
  162. #define CSIDL_COMMON_STARTUP    24
  163. #define CSIDL_COMMON_DESKTOPDIRECTORY    25
  164. #define CSIDL_APPDATA   26
  165. #define CSIDL_PRINTHOOD 27
  166. #define CSIDL_LOCAL_APPDATA 28
  167. #define CSIDL_ALTSTARTUP    29
  168. #define CSIDL_COMMON_ALTSTARTUP    30
  169. #define CSIDL_COMMON_FAVORITES    31
  170. #define CSIDL_INTERNET_CACHE   32
  171. #define CSIDL_COOKIES    33
  172. #define CSIDL_HISTORY    34
  173. #define CSIDL_COMMON_APPDATA    35
  174. #define CSIDL_WINDOWS    36
  175. #define CSIDL_SYSTEM    37
  176. #define CSIDL_PROGRAM_FILES    38
  177. #define CSIDL_MYPICTURES    39
  178. #define CSIDL_PROFILE    40
  179. #define CSIDL_SYSTEMX86    41
  180. #define CSIDL_PROGRAM_FILESX86    42
  181. #define CSIDL_PROGRAM_FILES_COMMON    43
  182. #define CSIDL_PROGRAM_FILES_COMMONX86    44
  183. #define CSIDL_COMMON_TEMPLATES    45
  184. #define CSIDL_COMMON_DOCUMENTS    46
  185. #define CSIDL_COMMON_ADMINTOOLS    47
  186. #define CSIDL_ADMINTOOLS    48
  187. #define CSIDL_CONNECTIONS    49
  188. #define CSIDL_COMMON_MUSIC    53
  189. #define CSIDL_COMMON_PICTURES    54
  190. #define CSIDL_COMMON_VIDEO    55
  191. #define CSIDL_RESOURCES    56
  192. #define CSIDL_RESOURCES_LOCALIZED    57
  193. #define CSIDL_COMMON_OEM_LINKS    58
  194. #define CSIDL_CDBURN_AREA    59
  195. #define CSIDL_COMPUTERSNEARME    61
  196. #define CSIDL_FLAG_DONT_VERIFY    0x4000
  197. #define CSIDL_FLAG_CREATE    0x8000
  198. #define CSIDL_FLAG_MASK    0xFF00
  199. #define CFSTR_SHELLIDLIST    TEXT("Shell IDList Array")
  200. #define CFSTR_SHELLIDLISTOFFSET    TEXT("Shell Object Offsets")
  201. #define CFSTR_NETRESOURCES    TEXT("Net Resource")
  202. #define CFSTR_FILECONTENTS    TEXT("FileContents")
  203. #define CFSTR_FILENAMEA        TEXT("FileName")
  204. #define CFSTR_FILENAMEMAPA    TEXT("FileNameMap")
  205. #define CFSTR_FILEDESCRIPTORA    TEXT("FileGroupDescriptor")
  206. #define CFSTR_INETURLA        TEXT("UniformResourceLocator")
  207. #define CFSTR_SHELLURL        CFSTR_INETURLA
  208. #define CFSTR_FILENAMEW        TEXT("FileNameW")
  209. #define CFSTR_FILENAMEMAPW    TEXT("FileNameMapW")
  210. #define CFSTR_FILEDESCRIPTORW    TEXT("FileGroupDescriptorW")
  211. #define CFSTR_INETURLW        TEXT("UniformResourceLocatorW")
  212. #ifdef UNICODE
  213. #define CFSTR_FILENAME        CFSTR_FILENAMEW
  214. #define CFSTR_FILENAMEMAP    CFSTR_FILENAMEMAPW
  215. #define CFSTR_FILEDESCRIPTOR    CFSTR_FILEDESCRIPTORW
  216. #define CFSTR_INETURL        CFSTR_INETURLW
  217. #else
  218. #define CFSTR_FILENAME        CFSTR_FILENAMEA
  219. #define CFSTR_FILENAMEMAP    CFSTR_FILENAMEMAPA
  220. #define CFSTR_FILEDESCRIPTOR    CFSTR_FILEDESCRIPTORA
  221. #define CFSTR_INETURL        CFSTR_INETURLA
  222. #endif
  223. #define CFSTR_PRINTERGROUP    TEXT("PrinterFriendlyName")
  224. #define CFSTR_INDRAGLOOP    TEXT("InShellDragLoop")
  225. #define CFSTR_PASTESUCCEEDED    TEXT("Paste Succeeded")
  226. #define CFSTR_PERFORMEDDROPEFFECT    TEXT("Performed DropEffect")
  227. #define CFSTR_PREFERREDDROPEFFECT    TEXT("Preferred DropEffect")
  228. #define CMF_NORMAL    0
  229. #define CMF_DEFAULTONLY    1
  230. #define CMF_VERBSONLY    2
  231. #define CMF_EXPLORE    4
  232. #define CMF_NOVERBS    8
  233. #define CMF_CANRENAME    16
  234. #define CMF_NODEFAULT    32
  235. #define CMF_INCLUDESTATIC    64
  236. #define CMF_RESERVED    0xffff0000
  237. #define GCS_VERBA        0
  238. #define GCS_HELPTEXTA    1
  239. #define GCS_VALIDATEA    2
  240. #define GCS_VERBW        4
  241. #define GCS_HELPTEXTW    5
  242. #define GCS_VALIDATEW    6
  243. #define GCS_UNICODE      4
  244. #ifdef UNICODE
  245. #define GCS_VERB        GCS_VERBW
  246. #define GCS_HELPTEXT    GCS_HELPTEXTW
  247. #define GCS_VALIDATE    GCS_VALIDATEW
  248. #else
  249. #define GCS_VERB        GCS_VERBA
  250. #define GCS_HELPTEXT    GCS_HELPTEXTA
  251. #define GCS_VALIDATE    GCS_VALIDATEA
  252. #endif
  253. #define CMDSTR_NEWFOLDERA    "NewFolder"
  254. #define CMDSTR_VIEWLISTA    "ViewList"
  255. #define CMDSTR_VIEWDETAILSA    "ViewDetails"
  256. #define CMDSTR_NEWFOLDERW    L"NewFolder"
  257. #define CMDSTR_VIEWLISTW    L"ViewList"
  258. #define CMDSTR_VIEWDETAILSW    L"ViewDetails"
  259. #ifdef UNICODE
  260. #define CMDSTR_NEWFOLDER    CMDSTR_NEWFOLDERW
  261. #define CMDSTR_VIEWLIST        CMDSTR_VIEWLISTW
  262. #define CMDSTR_VIEWDETAILS    CMDSTR_VIEWDETAILSW
  263. #else
  264. #define CMDSTR_NEWFOLDER    CMDSTR_NEWFOLDER
  265. #define CMDSTR_VIEWLIST        CMDSTR_VIEWLIST
  266. #define CMDSTR_VIEWDETAILS    CMDSTR_VIEWDETAILS
  267. #endif
  268. #define CMIC_MASK_HOTKEY    SEE_MASK_HOTKEY
  269. #define CMIC_MASK_ICON    SEE_MASK_ICON
  270. #define CMIC_MASK_FLAG_NO_UI    SEE_MASK_FLAG_NO_UI
  271. #define CMIC_MASK_MODAL    0x80000000
  272. #define CMIC_VALID_SEE_FLAGS    SEE_VALID_CMIC_FLAGS
  273. #define GIL_OPENICON    1
  274. #define GIL_FORSHELL    2
  275. #define GIL_SIMULATEDOC    1
  276. #define GIL_PERINSTANCE    2
  277. #define GIL_PERCLASS    4
  278. #define GIL_NOTFILENAME    8
  279. #define GIL_DONTCACHE    16
  280. #define FVSIF_RECT    1
  281. #define FVSIF_PINNED    2
  282. #define FVSIF_NEWFAILED 0x8000000
  283. #define FVSIF_NEWFILE    0x80000000
  284. #define FVSIF_CANVIEWIT 0x40000000
  285. #define CDBOSC_SETFOCUS    0
  286. #define CDBOSC_KILLFOCUS    1
  287. #define CDBOSC_SELCHANGE    2
  288. #define CDBOSC_RENAME    3
  289. #define FCIDM_SHVIEWFIRST    0
  290. #define FCIDM_SHVIEWLAST    0x7fff
  291. #define FCIDM_BROWSERFIRST    0xa000
  292. #define FCIDM_BROWSERLAST    0xbf00
  293. #define FCIDM_GLOBALFIRST    0x8000
  294. #define FCIDM_GLOBALLAST    0x9fff
  295. #define FCIDM_MENU_FILE    FCIDM_GLOBALFIRST
  296. #define FCIDM_MENU_EDIT    (FCIDM_GLOBALFIRST+0x0040)
  297. #define FCIDM_MENU_VIEW    (FCIDM_GLOBALFIRST+0x0080)
  298. #define FCIDM_MENU_VIEW_SEP_OPTIONS    (FCIDM_GLOBALFIRST+0x0081)
  299. #define FCIDM_MENU_TOOLS    (FCIDM_GLOBALFIRST+0x00c0)
  300. #define FCIDM_MENU_TOOLS_SEP_GOTO    (FCIDM_GLOBALFIRST+0x00c1)
  301. #define FCIDM_MENU_HELP    (FCIDM_GLOBALFIRST+0x0100)
  302. #define FCIDM_MENU_FIND    (FCIDM_GLOBALFIRST+0x0140)
  303. #define FCIDM_MENU_EXPLORE    (FCIDM_GLOBALFIRST+0x0150)
  304. #define FCIDM_MENU_FAVORITES    (FCIDM_GLOBALFIRST+0x0170)
  305. #define FCIDM_TOOLBAR    FCIDM_BROWSERFIRST
  306. #define FCIDM_STATUS    (FCIDM_BROWSERFIRST+1)
  307. #define SBSP_DEFBROWSER    0
  308. #define SBSP_SAMEBROWSER    1
  309. #define SBSP_NEWBROWSER    2
  310. #define SBSP_DEFMODE    0
  311. #define SBSP_OPENMODE    16
  312. #define SBSP_EXPLOREMODE    32
  313. #define SBSP_ABSOLUTE    0
  314. #define SBSP_RELATIVE    0x1000
  315. #define SBSP_PARENT    0x2000
  316. #define SBSP_INITIATEDBYHLINKFRAME    0x80000000
  317. #define SBSP_REDIRECT    0x40000000
  318. #define FCW_STATUS    1
  319. #define FCW_TOOLBAR    2
  320. #define FCW_TREE    3
  321. #define FCT_MERGE    1
  322. #define FCT_CONFIGABLE    2
  323. #define FCT_ADDTOEND    4
  324. #define SVSI_DESELECT    0
  325. #define SVSI_SELECT    1
  326. #define SVSI_EDIT    3
  327. #define SVSI_DESELECTOTHERS    4
  328. #define SVSI_ENSUREVISIBLE    8
  329. #define SVSI_FOCUSED    16
  330. #define SVGIO_BACKGROUND    0
  331. #define SVGIO_SELECTION    1
  332. #define SVGIO_ALLVIEW    2
  333. #define SV2GV_CURRENTVIEW ((UINT)-1)
  334. #define SV2GV_DEFAULTVIEW ((UINT)-2)
  335.  
  336. typedef ULONG SFGAOF;
  337. typedef DWORD SHGDNF;
  338.  
  339. typedef struct _IDA {
  340.     UINT cidl;
  341.     UINT aoffset[1];
  342. } CIDA,*LPIDA;
  343. typedef struct _SHITEMID {
  344.     USHORT    cb;
  345.     BYTE    abID[1];
  346. } SHITEMID, * LPSHITEMID;
  347. typedef const SHITEMID *LPCSHITEMID;
  348. typedef struct _ITEMIDLIST {
  349.     SHITEMID mkid;
  350. } ITEMIDLIST,*LPITEMIDLIST;
  351. typedef const ITEMIDLIST *LPCITEMIDLIST;
  352. typedef int (CALLBACK* BFFCALLBACK)(HWND,UINT,LPARAM,LPARAM);
  353. typedef struct _browseinfoA {
  354.     HWND    hwndOwner;
  355.     LPCITEMIDLIST    pidlRoot;
  356.     LPSTR    pszDisplayName;
  357.     LPCSTR    lpszTitle;
  358.     UINT    ulFlags;
  359.     BFFCALLBACK    lpfn;
  360.     LPARAM    lParam;
  361.     int    iImage;
  362. } BROWSEINFOA,*PBROWSEINFOA,*LPBROWSEINFOA;
  363. typedef struct _browseinfoW {
  364.     HWND    hwndOwner;
  365.     LPCITEMIDLIST    pidlRoot;
  366.     LPWSTR    pszDisplayName;
  367.     LPCWSTR    lpszTitle;
  368.     UINT    ulFlags;
  369.     BFFCALLBACK    lpfn;
  370.     LPARAM    lParam;
  371.     int    iImage;
  372. } BROWSEINFOW,*PBROWSEINFOW,*LPBROWSEINFOW;
  373. typedef struct _CMInvokeCommandInfo {
  374.     DWORD cbSize;
  375.     DWORD fMask;
  376.     HWND hwnd;
  377.     LPCSTR lpVerb;
  378.     LPCSTR lpParameters;
  379.     LPCSTR lpDirectory;
  380.     int nShow;
  381.     DWORD dwHotKey;
  382.     HANDLE hIcon;
  383. } CMINVOKECOMMANDINFO,*LPCMINVOKECOMMANDINFO;
  384. typedef struct _DROPFILES {
  385.     DWORD pFiles;
  386.     POINT pt;
  387.     BOOL fNC;
  388.     BOOL fWide;
  389. } DROPFILES,*LPDROPFILES;
  390. typedef enum tagSHGDN {
  391.     SHGDN_NORMAL=0,
  392.     SHGDN_INFOLDER,
  393.     SHGDN_FOREDITING=0x1000,
  394.     SHGDN_INCLUDE_NONFILESYS=0x2000,
  395.     SHGDN_FORADDRESSBAR=0x4000,
  396.     SHGDN_FORPARSING=0x8000
  397. } SHGNO;
  398. typedef enum tagSHCONTF {
  399.     SHCONTF_FOLDERS = 32,
  400.     SHCONTF_NONFOLDERS = 64,
  401.     SHCONTF_INCLUDEHIDDEN = 128,
  402.     SHCONTF_INIT_ON_FIRST_NEXT = 256,
  403.     SHCONTF_NETPRINTERSRCH = 512,
  404.     SHCONTF_SHAREABLE = 1024,
  405.     SHCONTF_STORAGE = 2048
  406. } SHCONTF;
  407. typedef struct _STRRET {
  408.     UINT uType;
  409.     _ANONYMOUS_UNION union {
  410.         LPWSTR pOleStr;
  411.         UINT uOffset;
  412.         char cStr[MAX_PATH];
  413.     } DUMMYUNIONNAME;
  414. } STRRET,*LPSTRRET;
  415. typedef enum {
  416.     FD_CLSID=1,FD_SIZEPOINT=2,FD_ATTRIBUTES=4,FD_CREATETIME=8,FD_ACCESSTIME=16,
  417.     FD_WRITESTIME=32,FD_FILESIZE=64,FD_LINKUI=0x8000
  418. } FD_FLAGS;
  419. typedef struct _FILEDESCRIPTORA {
  420.     DWORD dwFlags;
  421.     CLSID clsid;
  422.     SIZEL sizel;
  423.     POINTL pointl;
  424.     DWORD dwFileAttributes;
  425.     FILETIME ftCreationTime;
  426.     FILETIME ftLastAccessTime;
  427.     FILETIME ftLastWriteTime;
  428.     DWORD nFileSizeHigh;
  429.     DWORD nFileSizeLow;
  430.     CHAR cFileName[MAX_PATH];
  431. } FILEDESCRIPTORA,*LPFILEDESCRIPTORA;
  432. typedef struct _FILEDESCRIPTORW {
  433.     DWORD dwFlags;
  434.     CLSID clsid;
  435.     SIZEL sizel;
  436.     POINTL pointl;
  437.     DWORD dwFileAttributes;
  438.     FILETIME ftCreationTime;
  439.     FILETIME ftLastAccessTime;
  440.     FILETIME ftLastWriteTime;
  441.     DWORD nFileSizeHigh;
  442.     DWORD nFileSizeLow;
  443.     WCHAR cFileName[MAX_PATH];
  444. } FILEDESCRIPTORW,*LPFILEDESCRIPTORW;
  445. typedef struct _FILEGROUPDESCRIPTORA {
  446.     UINT cItems;
  447.     FILEDESCRIPTORA fgd[1];
  448. } FILEGROUPDESCRIPTORA,*LPFILEGROUPDESCRIPTORA;
  449. typedef struct _FILEGROUPDESCRIPTORW {
  450.     UINT cItems;
  451.     FILEDESCRIPTORW fgd[1];
  452. } FILEGROUPDESCRIPTORW,*LPFILEGROUPDESCRIPTORW;
  453. typedef enum {
  454.     SLR_NO_UI=1,
  455.     SLR_ANY_MATCH=2,
  456.     SLR_UPDATE=4,
  457.     SLR_NOUPDATE=8,
  458.     SLR_NOSEARCH=16,
  459.     SLR_NOTRACK=32,
  460.     SLR_NOLINKINFO=64,
  461.     SLR_INVOKE_MSI=128
  462. } SLR_FLAGS;
  463. typedef enum {
  464.     SLGP_SHORTPATH=1,
  465.     SLGP_UNCPRIORITY=2,
  466.     SLGP_RAWPATH=4
  467. } SLGP_FLAGS;
  468. typedef PBYTE LPVIEWSETTINGS;
  469. typedef enum {
  470.     FWF_AUTOARRANGE=1,FWF_ABBREVIATEDNAMES=2,FWF_SNAPTOGRID=4,FWF_OWNERDATA=8,
  471.     FWF_BESTFITWINDOW=16,FWF_DESKTOP=32,FWF_SINGLESEL=64,FWF_NOSUBFOLDERS=128,
  472.     FWF_TRANSPARENT=256,FWF_NOCLIENTEDGE=512,FWF_NOSCROLL=0x400,FWF_ALIGNLEFT=0x800,
  473.     FWF_SINGLECLICKACTIVATE=0x8000
  474. } FOLDERFLAGS;
  475. typedef enum {
  476.     FVM_ICON=1,
  477.     FVM_SMALLICON,
  478.     FVM_LIST,
  479.     FVM_DETAILS
  480. } FOLDERVIEWMODE;
  481. typedef struct {
  482.     UINT ViewMode;
  483.     UINT fFlags;
  484. } FOLDERSETTINGS,*LPFOLDERSETTINGS;
  485. typedef const FOLDERSETTINGS *LPCFOLDERSETTINGS;
  486. typedef struct {
  487.     DWORD cbSize;
  488.     HWND hwndOwner;
  489.     int iShow;
  490.     DWORD dwFlags;
  491.     RECT rect;
  492.     LPUNKNOWN punkRel;
  493.     OLECHAR strNewFile[MAX_PATH];
  494. } FVSHOWINFO,*LPFVSHOWINFO;
  495. typedef struct _NRESARRAY {
  496.     UINT cItems;
  497.     NETRESOURCE nr[1];
  498. } NRESARRAY, *LPNRESARRAY;
  499. enum { SBSC_HIDE,SBSC_SHOW,SBSC_TOGGLE,SBSC_QUERY };
  500. enum {
  501.     SBCMDID_ENABLESHOWTREE,SBCMDID_SHOWCONTROL,SBCMDID_CANCELNAVIGATION,
  502.     SBCMDID_MAYSAVECHANGES,SBCMDID_SETHLINKFRAME,SBCMDID_ENABLESTOP,SBCMDID_OPTIONS
  503. };
  504. typedef enum {
  505.     SVUIA_DEACTIVATE,SVUIA_ACTIVATE_NOFOCUS,SVUIA_ACTIVATE_FOCUS,
  506.     SVUIA_INPLACEACTIVATE
  507. } SVUIA_STATUS;
  508. #if (_WIN32_IE >= 0x0500)
  509. typedef struct tagEXTRASEARCH
  510. {
  511.     GUID guidSearch;
  512.     WCHAR wszFriendlyName[80];
  513.     WCHAR wszUrl[2084];
  514. } EXTRASEARCH, *LPEXTRASEARCH;
  515. typedef DWORD SHCOLSTATEF;
  516. typedef struct
  517. {
  518.     GUID fmtid;
  519.     DWORD pid;
  520. } SHCOLUMNID, *LPSHCOLUMNID;
  521. typedef const SHCOLUMNID *LPCSHCOLUMNID;
  522. typedef struct _SHELLDETAILS
  523. {
  524.     int fmt; 
  525.     int cxChar;
  526.     STRRET str;
  527. } SHELLDETAILS, *LPSHELLDETAILS;
  528. typedef struct
  529. {
  530.     LPITEMIDLIST pidlTargetFolder;
  531.     WCHAR szTargetParsingName[MAX_PATH];
  532.     WCHAR szNetworkProvider[MAX_PATH];
  533.     DWORD dwAttributes;
  534.     int csidl;
  535. } PERSIST_FOLDER_TARGET_INFO;
  536.  
  537. typedef enum {
  538.     SHGFP_TYPE_CURRENT = 0,
  539.     SHGFP_TYPE_DEFAULT = 1,
  540. } SHGFP_TYPE;
  541. #endif
  542.  
  543.  
  544. DECLARE_ENUMERATOR_(IEnumIDList,LPITEMIDLIST);
  545. typedef IEnumIDList *LPENUMIDLIST;
  546.  
  547. #ifdef COBJMACROS
  548. #define IEnumIDList_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  549. #define IEnumIDList_Release(T) (T)->lpVtbl->AddRef(T)
  550. #define IEnumIDList_AddRef(T) (T)->lpVtbl->Release(T)
  551. #define IEnumIDList_Next(T,a,b,c) (T)->lpVtbl->Next(T,a,b,c)
  552. #define IEnumIDList_Skip(T,a) (T)->lpVtbl->Skip(T,a)
  553. #define IEnumIDList_Reset(T) (T)->lpVtbl->Reset(T)
  554. #define IEnumIDList_Clone(T,a) (T)->lpVtbl->Clone(T,a)
  555. #endif
  556.  
  557. #undef INTERFACE
  558. #define INTERFACE IObjMgr
  559. DECLARE_INTERFACE_(IObjMgr, IUnknown)
  560. {
  561.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  562.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  563.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  564.     STDMETHOD(Append)(THIS_ IUnknown*) PURE;
  565.     STDMETHOD(Remove)(THIS_ IUnknown*) PURE;
  566. };
  567.  
  568. #undef INTERFACE
  569. #define INTERFACE IContextMenu
  570. DECLARE_INTERFACE_(IContextMenu,IUnknown)
  571. {
  572.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  573.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  574.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  575.     STDMETHOD(QueryContextMenu)(THIS_ HMENU,UINT,UINT,UINT,UINT) PURE;
  576.     STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO) PURE;
  577.     STDMETHOD(GetCommandString)(THIS_ UINT,UINT,PUINT,LPSTR,UINT) PURE;
  578. };
  579. typedef IContextMenu *LPCONTEXTMENU;
  580.  
  581. #ifdef COBJMACROS
  582. #define IContextMenu_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  583. #define IContextMenu_AddRef(T) (T)->lpVtbl->AddRef(T)
  584. #define IContextMenu_Release(T) (T)->lpVtbl->Release(T)
  585. #define IContextMenu_QueryContextMenu(T,a,b,c,d,e) (T)->lpVtbl->QueryContextMenu(T,a,b,c,d,e)
  586. #define IContextMenu_InvokeCommand(T,a) (T)->lpVtbl->InvokeCommand(T,a)
  587. #define IContextMenu_GetCommandString(T,a,b,c,d,e) (T)->lpVtbl->GetCommandString(T,a,b,c,d,e)
  588. #endif
  589.  
  590. #undef INTERFACE
  591. #define INTERFACE IContextMenu2
  592. DECLARE_INTERFACE_(IContextMenu2,IContextMenu)
  593. {
  594.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  595.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  596.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  597.     STDMETHOD(QueryContextMenu)(THIS_ HMENU,UINT,UINT,UINT,UINT) PURE;
  598.     STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO) PURE;
  599.     STDMETHOD(GetCommandString)(THIS_ UINT,UINT,PUINT,LPSTR,UINT) PURE;
  600.     STDMETHOD(HandleMenuMsg)(THIS_ UINT,WPARAM,LPARAM) PURE;
  601. };
  602. typedef IContextMenu2 *LPCONTEXTMENU2;
  603.  
  604. #if (_WIN32_IE >= 0x0500)
  605. #pragma pack(push,8)
  606. typedef struct {
  607.     ULONG dwFlags;
  608.     ULONG dwReserved;
  609.     WCHAR wszFolder[MAX_PATH];
  610. } SHCOLUMNINIT,*LPSHCOLUMNINIT;
  611. typedef const SHCOLUMNINIT* LPCSHCOLUMNINIT;
  612. typedef struct {
  613.     ULONG dwFlags;
  614.     DWORD dwFileAttributes;
  615.     ULONG dwReserved;
  616.     WCHAR *pwszExt;
  617.     WCHAR wszFile[MAX_PATH];
  618. } SHCOLUMNDATA,*LPSHCOLUMNDATA;
  619. typedef const SHCOLUMNDATA* LPCSHCOLUMNDATA;
  620. #pragma pack(pop)
  621.  
  622. #define MAX_COLUMN_NAME_LEN 80
  623. #define MAX_COLUMN_DESC_LEN 128
  624.  
  625. #pragma pack(push,1)
  626. typedef struct {
  627.     SHCOLUMNID scid;
  628.     VARTYPE vt;
  629.     DWORD fmt;
  630.     UINT cChars;
  631.     DWORD csFlags;
  632.     WCHAR wszTitle[MAX_COLUMN_NAME_LEN];
  633.     WCHAR wszDescription[MAX_COLUMN_DESC_LEN];
  634. } SHCOLUMNINFO,*LPSHCOLUMNINFO;
  635. typedef const SHCOLUMNINFO* LPCSHCOLUMNINFO;
  636. #pragma pack(pop)
  637.  
  638. typedef enum {
  639.     SHCOLSTATE_TYPE_STR = 0x00000001,
  640.     SHCOLSTATE_TYPE_INT = 0x00000002,
  641.     SHCOLSTATE_TYPE_DATE = 0x00000003,
  642.     SHCOLSTATE_TYPEMASK = 0x0000000f,
  643.     SHCOLSTATE_ONBYDEFAULT = 0x00000010,
  644.     SHCOLSTATE_SLOW = 0x00000020,
  645.     SHCOLSTATE_EXTENDED = 0x00000040,
  646.     SHCOLSTATE_SECONDARYUI = 0x00000080,
  647.     SHCOLSTATE_HIDDEN = 0x00000100,
  648.     SHCOLSTATE_PREFER_VARCMP = 0x00000200
  649. } SHCOLSTATE;
  650.  
  651. #ifdef COBJMACROS
  652. #define IContextMenu2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  653. #define IContextMenu2_AddRef(T) (T)->lpVtbl->AddRef(T)
  654. #define IContextMenu2_Release(T) (T)->lpVtbl->Release(T)
  655. #define IContextMenu2_QueryContextMenu(T,a,b,c,d,e) (T)->lpVtbl->QueryContextMenu(T,a,b,c,d,e)
  656. #define IContextMenu2_InvokeCommand(T,a) (T)->lpVtbl->InvokeCommand(T,a)
  657. #define IContextMenu2_GetCommandString(T,a,b,c,d,e) (T)->lpVtbl->GetCommandString(T,a,b,c,d,e)
  658. #define IContextMenu2_HandleMenuMsg(T,a,b,c) (T)->lpVtbl->HandleMenuMsg(T,a,b,c)
  659. #endif
  660.  
  661. #undef INTERFACE
  662. #define INTERFACE IColumnProvider
  663. DECLARE_INTERFACE_(IColumnProvider,IUnknown)
  664. {
  665.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  666.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  667.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  668.     STDMETHOD(Initialize)(THIS_ LPCSHCOLUMNINIT) PURE;
  669.     STDMETHOD(GetColumnInfo)(THIS_ DWORD,SHCOLUMNINFO*) PURE;
  670.     STDMETHOD(GetItemData)(THIS_ LPCSHCOLUMNID,LPCSHCOLUMNDATA,VARIANT*) PURE;
  671. };
  672. #endif  /* _WIN32_IE >= 0x0500 */
  673.  
  674. #undef INTERFACE
  675. #define INTERFACE IQueryInfo
  676. DECLARE_INTERFACE_(IQueryInfo,IUnknown)
  677. {
  678.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  679.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  680.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  681.     STDMETHOD(GetInfoTip)(THIS_ DWORD,WCHAR**) PURE;
  682.     STDMETHOD(GetInfoFlags)(THIS_ DWORD*) PURE;
  683. };
  684.  
  685. #undef INTERFACE
  686. #define INTERFACE IShellExtInit
  687. DECLARE_INTERFACE_(IShellExtInit, IUnknown)
  688. {
  689.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  690.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  691.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  692.     STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST,LPDATAOBJECT,HKEY) PURE;
  693. };
  694. typedef IShellExtInit *LPSHELLEXTINIT;
  695.  
  696. #undef INTERFACE
  697. #define INTERFACE IShellPropSheetExt
  698. DECLARE_INTERFACE_(IShellPropSheetExt, IUnknown)
  699. {
  700.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  701.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  702.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  703.     STDMETHOD(AddPages)(THIS_ LPFNADDPROPSHEETPAGE,LPARAM) PURE;
  704.     STDMETHOD(ReplacePage)(THIS_ UINT,LPFNADDPROPSHEETPAGE,LPARAM) PURE;
  705. };
  706. typedef IShellPropSheetExt *LPSHELLPROPSHEETEXT;
  707.  
  708. #undef INTERFACE
  709. #define INTERFACE IExtractIconA
  710. DECLARE_INTERFACE_(IExtractIconA, IUnknown)
  711. {
  712.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  713.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  714.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  715.     STDMETHOD(GetIconLocation)(THIS_ UINT,LPSTR,UINT,int*,PUINT) PURE;
  716.     STDMETHOD(Extract)(THIS_ LPCSTR,UINT,HICON*,HICON*,UINT) PURE;
  717. };
  718. typedef IExtractIconA *LPEXTRACTICONA;
  719.  
  720. #ifdef COBJMACROS
  721. #define IExtractIconA_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  722. #define IExtractIconA_AddRef(T) (T)->lpVtbl->AddRef(T)
  723. #define IExtractIconA_Release(T) (T)->lpVtbl->Release(T)
  724. #define IExtractIconA_GetIconLocation(T,a,b,c,d,e) (T)->lpVtbl->GetIconLocation(T,a,b,c,d,e)
  725. #define IExtractIconA_Extract(T,a,b,c,d,e) (T)->lpVtbl->Extract(T,a,b,c,d,e)
  726. #endif
  727.  
  728. #undef INTERFACE
  729. #define INTERFACE IExtractIconW
  730. DECLARE_INTERFACE_(IExtractIconW, IUnknown)
  731. {
  732.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  733.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  734.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  735.     STDMETHOD(GetIconLocation)(THIS_ UINT,LPWSTR,UINT,int*,PUINT) PURE;
  736.     STDMETHOD(Extract)(THIS_ LPCWSTR,UINT,HICON*,HICON*,UINT) PURE;
  737. };
  738. typedef IExtractIconW *LPEXTRACTICONW;
  739.  
  740. #ifdef COBJMACROS
  741. #define IExtractIconW_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  742. #define IExtractIconW_AddRef(T) (T)->lpVtbl->AddRef(T)
  743. #define IExtractIconW_Release(T) (T)->lpVtbl->Release(T)
  744. #define IExtractIconW_GetIconLocation(T,a,b,c,d,e) (T)->lpVtbl->GetIconLocation(T,a,b,c,d,e)
  745. #define IExtractIconW_Extract(T,a,b,c,d,e) (T)->lpVtbl->Extract(T,a,b,c,d,e)
  746. #endif
  747.  
  748. #ifdef UNICODE
  749. #define IExtractIcon IExtractIconW
  750. #define LPEXTRACTICON LPEXTRACTICONW
  751. #else
  752. #define IExtractIcon IExtractIconA
  753. #define LPEXTRACTICON LPEXTRACTICONA
  754. #endif
  755.  
  756. #undef INTERFACE
  757. #define INTERFACE IShellLinkA
  758. DECLARE_INTERFACE_(IShellLinkA, IUnknown)
  759. {
  760.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  761.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  762.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  763.     STDMETHOD(GetPath)(THIS_ LPSTR,int,WIN32_FIND_DATAA*,DWORD) PURE;
  764.     STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST*) PURE;
  765.     STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST) PURE;
  766.     STDMETHOD(GetDescription)(THIS_ LPSTR,int) PURE;
  767.     STDMETHOD(SetDescription)(THIS_ LPCSTR) PURE;
  768.     STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR,int) PURE;
  769.     STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR) PURE;
  770.     STDMETHOD(GetArguments)(THIS_ LPSTR,int) PURE;
  771.     STDMETHOD(SetArguments)(THIS_ LPCSTR) PURE;
  772.     STDMETHOD(GetHotkey)(THIS_ PWORD) PURE;
  773.     STDMETHOD(SetHotkey)(THIS_ WORD) PURE;
  774.     STDMETHOD(GetShowCmd)(THIS_ int*) PURE;
  775.     STDMETHOD(SetShowCmd)(THIS_ int) PURE;
  776.     STDMETHOD(GetIconLocation)(THIS_ LPSTR,int,int*) PURE;
  777.     STDMETHOD(SetIconLocation)(THIS_ LPCSTR,int) PURE;
  778.     STDMETHOD(SetRelativePath)(THIS_ LPCSTR ,DWORD) PURE;
  779.     STDMETHOD(Resolve)(THIS_ HWND,DWORD) PURE;
  780.     STDMETHOD(SetPath)(THIS_ LPCSTR) PURE;
  781. };
  782.  
  783. #ifdef COBJMACROS
  784. #define IShellLinkA_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  785. #define IShellLinkA_AddRef(T) (T)->lpVtbl->AddRef(T)
  786. #define IShellLinkA_Release(T) (T)->lpVtbl->Release(T)
  787. #define IShellLinkA_GetPath(T,a,b,c,d) (T)->lpVtbl->GetPath(T,a,b,c,d)
  788. #define IShellLinkA_GetIDList(T,a) (T)->lpVtbl->GetIDList(T,a)
  789. #define IShellLinkA_SetIDList(T,a) (T)->lpVtbl->SetIDList(T,a)
  790. #define IShellLinkA_GetDescription(T,a,b) (T)->lpVtbl->GetDescription(T,a,b)
  791. #define IShellLinkA_SetDescription(T,a) (T)->lpVtbl->SetDescription(T,a)
  792. #define IShellLinkA_GetWorkingDirectory(T,a,b) (T)->lpVtbl->GetWorkingDirectory(T,a,b)
  793. #define IShellLinkA_SetWorkingDirectory(T,a) (T)->lpVtbl->SetWorkingDirectory(T,a)
  794. #define IShellLinkA_GetArguments(T,a,b) (T)->lpVtbl->GetArguments(T,a,b)
  795. #define IShellLinkA_SetArguments(T,a) (T)->lpVtbl->SetArguments(T,a)
  796. #define IShellLinkA_GetHotkey(T,a) (T)->lpVtbl->GetHotkey(T,a)
  797. #define IShellLinkA_SetHotkey(T,a) (T)->lpVtbl->SetHotkey(T,a)
  798. #define IShellLinkA_GetShowCmd(T,a) (T)->lpVtbl->GetShowCmd(T,a)
  799. #define IShellLinkA_SetShowCmd(T,a) (T)->lpVtbl->SetShowCmd(T,a)
  800. #define IShellLinkA_GetIconLocation(T,a,b,c) (T)->lpVtbl->GetIconLocation(T,a,b,c)
  801. #define IShellLinkA_SetIconLocation(T,a,b) (T)->lpVtbl->SetIconLocation(T,a,b)
  802. #define IShellLinkA_SetRelativePath(T,a,b) (T)->lpVtbl->SetRelativePath(T,a,b)
  803. #define IShellLinkA_Resolve(T,a,b) (T)->lpVtbl->Resolve(T,a,b)
  804. #define IShellLinkA_SetPath(T,a) (T)->lpVtbl->SetPath(T,a)
  805. #endif
  806.  
  807. #undef INTERFACE
  808. #define INTERFACE IShellLinkW
  809. DECLARE_INTERFACE_(IShellLinkW, IUnknown)
  810. {
  811.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  812.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  813.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  814.     STDMETHOD(GetPath)(THIS_ LPWSTR,int,WIN32_FIND_DATAW*,DWORD) PURE;
  815.     STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST*) PURE;
  816.     STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST) PURE;
  817.     STDMETHOD(GetDescription)(THIS_ LPWSTR,int) PURE;
  818.     STDMETHOD(SetDescription)(THIS_ LPCWSTR) PURE;
  819.     STDMETHOD(GetWorkingDirectory)(THIS_ LPWSTR,int) PURE;
  820.     STDMETHOD(SetWorkingDirectory)(THIS_ LPCWSTR) PURE;
  821.     STDMETHOD(GetArguments)(THIS_ LPWSTR,int) PURE;
  822.     STDMETHOD(SetArguments)(THIS_ LPCWSTR) PURE;
  823.     STDMETHOD(GetHotkey)(THIS_ PWORD) PURE;
  824.     STDMETHOD(SetHotkey)(THIS_ WORD) PURE;
  825.     STDMETHOD(GetShowCmd)(THIS_ int*) PURE;
  826.     STDMETHOD(SetShowCmd)(THIS_ int) PURE;
  827.     STDMETHOD(GetIconLocation)(THIS_ LPWSTR,int,int*) PURE;
  828.     STDMETHOD(SetIconLocation)(THIS_ LPCWSTR,int) PURE;
  829.     STDMETHOD(SetRelativePath)(THIS_ LPCWSTR ,DWORD) PURE;
  830.     STDMETHOD(Resolve)(THIS_ HWND,DWORD) PURE;
  831.     STDMETHOD(SetPath)(THIS_ LPCWSTR) PURE;
  832. };
  833.  
  834. #ifdef COBJMACROS
  835. #define IShellLinkW_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  836. #define IShellLinkW_AddRef(T) (T)->lpVtbl->AddRef(T)
  837. #define IShellLinkW_Release(T) (T)->lpVtbl->Release(T)
  838. #define IShellLinkW_GetPath(T,a,b,c,d) (T)->lpVtbl->GetPath(T,a,b,c,d)
  839. #define IShellLinkW_GetIDList(T,a) (T)->lpVtbl->GetIDList(T,a)
  840. #define IShellLinkW_SetIDList(T,a) (T)->lpVtbl->SetIDList(T,a)
  841. #define IShellLinkW_GetDescription(T,a,b) (T)->lpVtbl->GetDescription(T,a,b)
  842. #define IShellLinkW_SetDescription(T,a) (T)->lpVtbl->SetDescription(T,a)
  843. #define IShellLinkW_GetWorkingDirectory(T,a,b) (T)->lpVtbl->GetWorkingDirectory(T,a,b)
  844. #define IShellLinkW_SetWorkingDirectory(T,a) (T)->lpVtbl->SetWorkingDirectory(T,a)
  845. #define IShellLinkW_GetArguments(T,a,b) (T)->lpVtbl->GetArguments(T,a,b)
  846. #define IShellLinkW_SetArguments(T,a) (T)->lpVtbl->SetArguments(T,a)
  847. #define IShellLinkW_GetHotkey(T,a) (T)->lpVtbl->GetHotkey(T,a)
  848. #define IShellLinkW_SetHotkey(T,a) (T)->lpVtbl->SetHotkey(T,a)
  849. #define IShellLinkW_GetShowCmd(T,a) (T)->lpVtbl->GetShowCmd(T,a)
  850. #define IShellLinkW_SetShowCmd(T,a) (T)->lpVtbl->SetShowCmd(T,a)
  851. #define IShellLinkW_GetIconLocation(T,a,b,c) (T)->lpVtbl->GetIconLocation(T,a,b,c)
  852. #define IShellLinkW_SetIconLocation(T,a,b) (T)->lpVtbl->SetIconLocation(T,a,b)
  853. #define IShellLinkW_SetRelativePath(T,a,b) (T)->lpVtbl->SetRelativePath(T,a,b)
  854. #define IShellLinkW_Resolve(T,a,b) (T)->lpVtbl->Resolve(T,a,b)
  855. #define IShellLinkW_SetPath(T,a) (T)->lpVtbl->SetPath(T,a)
  856. #endif
  857.  
  858. #undef INTERFACE
  859. #define INTERFACE IShellFolder
  860. DECLARE_INTERFACE_(IShellFolder, IUnknown)
  861. {
  862.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  863.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  864.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  865.     STDMETHOD(ParseDisplayName)(THIS_ HWND,LPBC,LPOLESTR,PULONG,LPITEMIDLIST*,PULONG) PURE;
  866.     STDMETHOD(EnumObjects)(THIS_ HWND,DWORD,LPENUMIDLIST*) PURE;
  867.     STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST,LPBC,REFIID,PVOID*) PURE;
  868.     STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST,LPBC,REFIID,PVOID*) PURE;
  869.     STDMETHOD(CompareIDs)(THIS_ LPARAM,LPCITEMIDLIST,LPCITEMIDLIST) PURE;
  870.     STDMETHOD(CreateViewObject)(THIS_ HWND,REFIID,PVOID*) PURE;
  871.     STDMETHOD(GetAttributesOf)(THIS_ UINT,LPCITEMIDLIST*,PULONG) PURE;
  872.     STDMETHOD(GetUIObjectOf)(THIS_ HWND,UINT,LPCITEMIDLIST*,REFIID,PUINT,PVOID*) PURE;
  873.     STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST,DWORD,LPSTRRET) PURE;
  874.     STDMETHOD(SetNameOf)(THIS_ HWND,LPCITEMIDLIST,LPCOLESTR,DWORD,LPITEMIDLIST*) PURE;
  875. };
  876. typedef IShellFolder *LPSHELLFOLDER;
  877.  
  878. #ifdef COBJMACROS
  879. #define IShellFolder_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  880. #define IShellFolder_AddRef(T) (T)->lpVtbl->AddRef(T)
  881. #define IShellFolder_Release(T) (T)->lpVtbl->Release(T)
  882. #define IShellFolder_ParseDisplayName(T,a,b,c,d,e,f) (T)->lpVtbl->ParseDisplayName(T,a,b,c,d,e,f)
  883. #define IShellFolder_EnumObjects(T,a,b,c) (T)->lpVtbl->EnumObjects(T,a,b,c)
  884. #define IShellFolder_BindToObject(T,a,b,c,d) (T)->lpVtbl->BindToObject(T,a,b,c,d)
  885. #define IShellFolder_BindToStorage(T,a,b,c,d) (T)->lpVtbl->BindToStorage(T,a,b,c,d)
  886. #define IShellFolder_CompareIDs(T,a,b,c) (T)->lpVtbl->CompareIDs(T,a,b,c)
  887. #define IShellFolder_CreateViewObject(T,a,b) (T)->lpVtbl->CreateViewObject(T,a,b)
  888. #define IShellFolder_GetAttributesOf(T,a,b,c) (T)->lpVtbl->GetAttributesOf(T,a,b,c)
  889. #define IShellFolder_GetUIObjectOf(T,a,b,c,d,e,f) (T)->lpVtbl->GetUIObjectOf(T,a,b,c,d,e,f)
  890. #define IShellFolder_GetDisplayNameOf(T,a,b,c) (T)->lpVtbl->GetDisplayNameOf(T,a,b,c)
  891. #define IShellFolder_SetNameOf(T,a,b,c,d,e) (T)->lpVtbl->SetNameOf(T,a,b,c,d,e)
  892. #endif
  893.  
  894. #if (_WIN32_IE >= 0x0500)
  895.  
  896. DECLARE_ENUMERATOR_(IEnumExtraSearch,LPEXTRASEARCH);
  897. typedef IEnumExtraSearch *LPENUMEXTRASEARCH;
  898.  
  899. #undef INTERFACE
  900. #define INTERFACE IShellFolder2
  901. DECLARE_INTERFACE_(IShellFolder2, IShellFolder)
  902. {
  903.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  904.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  905.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  906.     STDMETHOD(ParseDisplayName)(THIS_ HWND,LPBC,LPOLESTR,PULONG,LPITEMIDLIST*,PULONG) PURE;
  907.     STDMETHOD(EnumObjects)(THIS_ HWND,DWORD,LPENUMIDLIST*) PURE;
  908.     STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST,LPBC,REFIID,PVOID*) PURE;
  909.     STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST,LPBC,REFIID,PVOID*) PURE;
  910.     STDMETHOD(CompareIDs)(THIS_ LPARAM,LPCITEMIDLIST,LPCITEMIDLIST) PURE;
  911.     STDMETHOD(CreateViewObject)(THIS_ HWND,REFIID,PVOID*) PURE;
  912.     STDMETHOD(GetAttributesOf)(THIS_ UINT,LPCITEMIDLIST*,PULONG) PURE;
  913.     STDMETHOD(GetUIObjectOf)(THIS_ HWND,UINT,LPCITEMIDLIST*,REFIID,PUINT,PVOID*) PURE;
  914.     STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST,DWORD,LPSTRRET) PURE;
  915.     STDMETHOD(SetNameOf)(THIS_ HWND,LPCITEMIDLIST,LPCOLESTR,DWORD,LPITEMIDLIST*) PURE;
  916.     STDMETHOD(GetDefaultSearchGUID)(THIS_ GUID*) PURE;
  917.     STDMETHOD(EnumSearches)(THIS_ IEnumExtraSearch**) PURE;
  918.     STDMETHOD(GetDefaultColumn)(THIS_ DWORD,ULONG*,ULONG*) PURE;
  919.     STDMETHOD(GetDefaultColumnState)(THIS_ UINT,SHCOLSTATEF*) PURE;
  920.     STDMETHOD(GetDetailsEx)(THIS_ LPCITEMIDLIST,const SHCOLUMNID*,VARIANT*) PURE;
  921.     STDMETHOD(GetDetailsOf)(THIS_ LPCITEMIDLIST,UINT,SHELLDETAILS*) PURE;
  922.     STDMETHOD(MapColumnToSCID)(THIS_ UINT,SHCOLUMNID*) PURE;
  923. };
  924. typedef IShellFolder2 *LPSHELLFOLDER2;
  925.  
  926. #ifdef COBJMACROS
  927. #define IShellFolder2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  928. #define IShellFolder2_AddRef(T) (T)->lpVtbl->AddRef(T)
  929. #define IShellFolder2_Release(T) (T)->lpVtbl->Release(T)
  930. #define IShellFolder2_ParseDisplayName(T,a,b,c,d,e,f) (T)->lpVtbl->ParseDisplayName(T,a,b,c,d,e,f)
  931. #define IShellFolder2_EnumObjects(T,a,b,c) (T)->lpVtbl->EnumObjects(T,a,b,c)
  932. #define IShellFolder2_BindToObject(T,a,b,c,d) (T)->lpVtbl->BindToObject(T,a,b,c,d)
  933. #define IShellFolder2_BindToStorage(T,a,b,c,d) (T)->lpVtbl->BindToStorage(T,a,b,c,d)
  934. #define IShellFolder2_CompareIDs(T,a,b,c) (T)->lpVtbl->CompareIDs(T,a,b,c)
  935. #define IShellFolder2_CreateViewObject(T,a,b) (T)->lpVtbl->CreateViewObject(T,a,b)
  936. #define IShellFolder2_GetAttributesOf(T,a,b,c) (T)->lpVtbl->GetAttributesOf(T,a,b,c)
  937. #define IShellFolder2_GetUIObjectOf(T,a,b,c,d,e,f) (T)->lpVtbl->GetUIObjectOf(T,a,b,c,d,e,f)
  938. #define IShellFolder2_GetDisplayNameOf(T,a,b,c) (T)->lpVtbl->GetDisplayNameOf(T,a,b,c)
  939. #define IShellFolder2_SetNameOf(T,a,b,c,d,e) (T)->lpVtbl->SetNameOf(T,a,b,c,d,e)
  940. #define IShellFolder2_GetDefaultSearchGUID(T,a) (T)->lpVtbl->GetDefaultSearchGUID(T,a)
  941. #define IShellFolder2_EnumSearches(T,a) (T)->lpVtbl->EnumSearches(T,a)
  942. #define IShellFolder2_GetDefaultColumn(T,a,b,c) (T)->lpVtbl->GetDefaultColumn(T,a,b,c)
  943. #define IShellFolder2_GetDefaultColumnState(T,a,b) (T)->lpVtbl->GetDefaultColumnState(T,a,b)
  944. #define IShellFolder2_GetDetailsEx(T,a,b,c) (T)->lpVtbl->GetDetailsEx(T,a,b,c)
  945. #define IShellFolder2_GetDetailsOf(T,a,b,c) (T)->lpVtbl->GetDetailsOf(T,a,b,c)
  946. #define IShellFolder2_MapColumnToSCID(T,a,b) (T)->lpVtbl->MapColumnToSCID(T,a,b)
  947. #endif
  948.  
  949. #endif /* _WIN32_IE >= 0x0500 */
  950. #undef INTERFACE
  951. #define INTERFACE ICopyHook
  952. DECLARE_INTERFACE_(ICopyHook, IUnknown)
  953. {
  954.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  955.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  956.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  957.     STDMETHOD_(UINT,CopyCallback)(THIS_ HWND,UINT,UINT,LPCSTR,DWORD,LPCSTR,DWORD) PURE;
  958. };
  959. typedef ICopyHook *LPCOPYHOOK;
  960.  
  961. #undef INTERFACE
  962. #define INTERFACE IFileViewerSite
  963. DECLARE_INTERFACE(IFileViewerSite)
  964. {
  965.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  966.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  967.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  968.     STDMETHOD(SetPinnedWindow)(THIS_ HWND) PURE;
  969.     STDMETHOD(GetPinnedWindow)(THIS_ HWND*) PURE;
  970. };
  971. typedef IFileViewerSite *LPFILEVIEWERSITE;
  972.  
  973. #undef INTERFACE
  974. #define INTERFACE IFileViewer
  975. DECLARE_INTERFACE(IFileViewer)
  976. {
  977.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  978.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  979.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  980.     STDMETHOD(ShowInitialize)(THIS_ LPFILEVIEWERSITE) PURE;
  981.     STDMETHOD(Show)(THIS_ LPFVSHOWINFO) PURE;
  982.     STDMETHOD(PrintTo)(THIS_ LPSTR,BOOL) PURE;
  983. };
  984. typedef IFileViewer *LPFILEVIEWER;
  985.  
  986. #undef INTERFACE
  987. #define INTERFACE IFileSystemBindData
  988. DECLARE_INTERFACE_(IFileSystemBindData, IUnknown)
  989. {
  990.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  991.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  992.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  993.     STDMETHOD(SetFindData)(THIS_ const WIN32_FIND_DATAW*) PURE;
  994.     STDMETHOD(GetFindData)(THIS_ WIN32_FIND_DATAW*) PURE;
  995. };
  996.  
  997. #undef INTERFACE
  998. #define INTERFACE IPersistFolder
  999. DECLARE_INTERFACE_(IPersistFolder,IPersist)
  1000. {
  1001.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  1002.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1003.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1004.     STDMETHOD(GetClassID)(THIS_ CLSID*) PURE;
  1005.     STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST) PURE;
  1006. };
  1007. typedef IPersistFolder *LPPERSISTFOLDER;
  1008.  
  1009. #ifdef COBJMACROS
  1010. #define IPersistFolder_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  1011. #define IPersistFolder_AddRef(T) (T)->lpVtbl->AddRef(T)
  1012. #define IPersistFolder_Release(T) (T)->lpVtbl->Release(T)
  1013. #define IPersistFolder_GetClassID(T,a) (T)->lpVtbl->GetClassID(T,a)
  1014. #define IPersistFolder_Initialize(T,a) (T)->lpVtbl->Initialize(T,a)
  1015. #endif
  1016.  
  1017. #if (_WIN32_IE >= 0x0400 || _WIN32_WINNT >= 0x0500)
  1018.  
  1019. #undef INTERFACE
  1020. #define INTERFACE IPersistFolder2
  1021. DECLARE_INTERFACE_(IPersistFolder2,IPersistFolder)
  1022. {
  1023.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  1024.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1025.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1026.     STDMETHOD(GetClassID)(THIS_ CLSID*) PURE;
  1027.     STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST) PURE;
  1028.     STDMETHOD(GetCurFolder)(THIS_ LPITEMIDLIST*) PURE;
  1029. };
  1030. typedef IPersistFolder2 *LPPERSISTFOLDER2;
  1031.  
  1032. #ifdef COBJMACROS
  1033. #define IPersistFolder2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  1034. #define IPersistFolder2_AddRef(T) (T)->lpVtbl->AddRef(T)
  1035. #define IPersistFolder2_Release(T) (T)->lpVtbl->Release(T)
  1036. #define IPersistFolder2_GetClassID(T,a) (T)->lpVtbl->GetClassID(T,a)
  1037. #define IPersistFolder2_Initialize(T,a) (T)->lpVtbl->Initialize(T,a)
  1038. #define IPersistFolder2_GetCurFolder(T,a) (T)->lpVtbl->GetCurFolder(T,a)
  1039. #endif
  1040.  
  1041. #endif /* _WIN32_IE >= 0x0400 || _WIN32_WINNT >= 0x0500 */
  1042.  
  1043. #if (_WIN32_IE >= 0x0500)
  1044.  
  1045. #undef INTERFACE
  1046. #define INTERFACE IPersistFolder3
  1047. DECLARE_INTERFACE_(IPersistFolder3,IPersistFolder2)
  1048. {
  1049.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  1050.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1051.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1052.     STDMETHOD(GetClassID)(THIS_ CLSID*) PURE;
  1053.     STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST) PURE;
  1054.     STDMETHOD(GetCurFolder)(THIS_ LPITEMIDLIST*) PURE;
  1055.     STDMETHOD(InitializeEx)(THIS_ IBindCtx*,LPCITEMIDLIST,const PERSIST_FOLDER_TARGET_INFO*) PURE;
  1056.     STDMETHOD(GetFolderTargetInfo)(THIS_ PERSIST_FOLDER_TARGET_INFO*) PURE;
  1057. };
  1058. typedef IPersistFolder3 *LPPERSISTFOLDER3;
  1059.  
  1060. #ifdef COBJMACROS
  1061. #define IPersistFolder3_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  1062. #define IPersistFolder3_AddRef(T) (T)->lpVtbl->AddRef(T)
  1063. #define IPersistFolder3_Release(T) (T)->lpVtbl->Release(T)
  1064. #define IPersistFolder3_GetClassID(T,a) (T)->lpVtbl->GetClassID(T,a)
  1065. #define IPersistFolder3_Initialize(T,a) (T)->lpVtbl->Initialize(T,a)
  1066. #define IPersistFolder3_GetCurFolder(T,a) (T)->lpVtbl->GetCurFolder(T,a)
  1067. #define IPersistFolder3_InitializeEx(T,a,b,c) (T)->lpVtbl->InitializeEx(T,a,b,c)
  1068. #define IPersistFolder3_GetFolderTargetInfo(T,a) (T)->lpVtbl->GetFolderTargetInfo(T,a)
  1069. #endif
  1070.  
  1071. #endif /* _WIN32_IE >= 0x0500 */
  1072.  
  1073. typedef interface IShellBrowser *LPSHELLBROWSER;
  1074. typedef interface IShellView *LPSHELLVIEW;
  1075.  
  1076. #undef INTERFACE
  1077. #define INTERFACE IShellBrowser
  1078. DECLARE_INTERFACE_(IShellBrowser,IOleWindow)
  1079. {
  1080.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  1081.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1082.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1083.     STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
  1084.     STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
  1085.     STDMETHOD(InsertMenusSB)(THIS_ HMENU,LPOLEMENUGROUPWIDTHS) PURE;
  1086.     STDMETHOD(SetMenuSB)(THIS_ HMENU,HOLEMENU,HWND) PURE;
  1087.     STDMETHOD(RemoveMenusSB)(THIS_ HMENU) PURE;
  1088.     STDMETHOD(SetStatusTextSB)(THIS_ LPCOLESTR) PURE;
  1089.     STDMETHOD(EnableModelessSB)(THIS_ BOOL) PURE;
  1090.     STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG,WORD) PURE;
  1091.     STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST,UINT) PURE;
  1092.     STDMETHOD(GetViewStateStream)(THIS_ DWORD,LPSTREAM*) PURE;
  1093.     STDMETHOD(GetControlWindow)(THIS_ UINT,HWND*) PURE;
  1094.     STDMETHOD(SendControlMsg)(THIS_ UINT,UINT,WPARAM,LPARAM,LRESULT*) PURE;
  1095.     STDMETHOD(QueryActiveShellView)(THIS_ LPSHELLVIEW*) PURE;
  1096.     STDMETHOD(OnViewWindowActive)(THIS_ LPSHELLVIEW) PURE;
  1097.     STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON,UINT,UINT) PURE;
  1098. };
  1099.  
  1100. #ifdef COBJMACROS
  1101. #define IShellBrowser_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  1102. #define IShellBrowser_AddRef(T) (T)->lpVtbl->AddRef(T)
  1103. #define IShellBrowser_Release(T) (T)->lpVtbl->Release(T)
  1104. #define IShellBrowser_GetWindow(T,a) (T)->lpVtbl->GetWindow(T,a)
  1105. #define IShellBrowser_ContextSensitiveHelp(T,a) (T)->lpVtbl->ContextSensitiveHelp(T,a)
  1106. #define IShellBrowser_InsertMenusSB(T,a,b) (T)->lpVtbl->InsertMenusSB(T,a,b)
  1107. #define IShellBrowser_SetMenuSB(T,a,b,c) (T)->lpVtbl->SetMenuSB(T,a,b,c)
  1108. #define IShellBrowser_RemoveMenusSB(T,a) (T)->lpVtbl->RemoveMenusSB(T,a)
  1109. #define IShellBrowser_SetStatusTextSB(T,a) (T)->lpVtbl->SetStatusTextSB(T,a)
  1110. #define IShellBrowser_EnableModelessSB(T,a) (T)->lpVtbl->EnableModelessSB(T,a)
  1111. #define IShellBrowser_TranslateAcceleratorSB(T,a,b) (T)->lpVtbl->TranslateAcceleratorSB(T,a,b)
  1112. #define IShellBrowser_BrowseObject(T,a,b) (T)->lpVtbl->BrowseObject(T,a,b)
  1113. #define IShellBrowser_GetViewStateStream(T,a,b) (T)->lpVtbl->GetViewStateStream(T,a,b)
  1114. #define IShellBrowser_GetControlWindow(T,a,b) (T)->lpVtbl->GetControlWindow(T,a,b)
  1115. #define IShellBrowser_SendControlMsg(T,a,b,c,d,e) (T)->lpVtbl->SendControlMsg(T,a,b,c,d,e)
  1116. #define IShellBrowser_QueryActiveShellView(T,a) (T)->lpVtbl->QueryActiveShellView(T,a)
  1117. #define IShellBrowser_OnViewWindowActive(T,a) (T)->lpVtbl->OnViewWindowActive(T,a)
  1118. #define IShellBrowser_SetToolbarItems(T,a,b,c) (T)->lpVtbl->SetToolbarItems(T,a,b,c)
  1119. #endif
  1120.  
  1121. #undef INTERFACE
  1122. #define INTERFACE IShellView
  1123. DECLARE_INTERFACE_(IShellView,IOleWindow)
  1124. {
  1125.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  1126.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1127.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1128.     STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
  1129.     STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
  1130.     STDMETHOD(TranslateAccelerator) (THIS_ LPMSG) PURE;
  1131. #ifdef _FIX_ENABLEMODELESS_CONFLICT
  1132.     STDMETHOD(EnableModelessSV)(THIS_ BOOL) PURE;
  1133. #else
  1134.     STDMETHOD(EnableModeless)(THIS_ BOOL) PURE;
  1135. #endif
  1136.     STDMETHOD(UIActivate)(THIS_ UINT) PURE;
  1137.     STDMETHOD(Refresh) (THIS) PURE;
  1138.     STDMETHOD(CreateViewWindow)(THIS_ IShellView*,LPCFOLDERSETTINGS,LPSHELLBROWSER,RECT*,HWND*) PURE;
  1139.     STDMETHOD(DestroyViewWindow)(THIS) PURE;
  1140.     STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS) PURE;
  1141.     STDMETHOD(AddPropertySheetPages)(THIS_ DWORD,LPFNADDPROPSHEETPAGE,LPARAM) PURE;
  1142.     STDMETHOD(SaveViewState)(THIS) PURE;
  1143.     STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST,UINT) PURE;
  1144.     STDMETHOD(GetItemObject)(THIS_ UINT,REFIID,PVOID*) PURE;
  1145. };
  1146.  
  1147. #ifdef COBJMACROS
  1148. #define IShellView_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  1149. #define IShellView_AddRef(T) (T)->lpVtbl->AddRef(T)
  1150. #define IShellView_Release(T) (T)->lpVtbl->Release(T)
  1151. #define IShellView_GetWindow(T,a) (T)->lpVtbl->GetWindow(T,a)
  1152. #define IShellView_ContextSensitiveHelp(T,a) (T)->lpVtbl->ContextSensitiveHelp(T,a)
  1153. #define IShellView_TranslateAccelerator(T,a) (T)->lpVtbl->TranslateAccelerator(T,a)
  1154. #ifdef _FIX_ENABLEMODELESS_CONFLICT
  1155. #define IShellView_EnableModeless(T,a) (T)->lpVtbl->EnableModelessSV(T,a)
  1156. #else
  1157. #define IShellView_EnableModeless(T,a) (T)->lpVtbl->EnableModeless(T,a)
  1158. #endif
  1159. #define IShellView_UIActivate(T,a) (T)->lpVtbl->UIActivate(T,a)
  1160. #define IShellView_Refresh(T) (T)->lpVtbl->Refresh(T)
  1161. #define IShellView_CreateViewWindow(T,a,b,c,d,e) (T)->lpVtbl->CreateViewWindow(T,a,b,c,d,e)
  1162. #define IShellView_DestroyViewWindow(T) (T)->lpVtbl->DestroyViewWindow(T)
  1163. #define IShellView_GetCurrentInfo(T,a) (T)->lpVtbl->GetCurrentInfo(T,a)
  1164. #define IShellView_AddPropertySheetPages(T,a,b,c) (T)->lpVtbl->AddPropertySheetPages(T,a,b,c)
  1165. #define IShellView_SaveViewState(T) (T)->lpVtbl->SaveViewState(T)
  1166. #define IShellView_SelectItem(T,a,b) (T)->lpVtbl->SelectItem(T,a,b)
  1167. #define IShellView_GetItemObject(T,a,b,c) (T)->lpVtbl->GetItemObject(T,a,b,c)
  1168. #endif
  1169.  
  1170. #undef INTERFACE
  1171. #define INTERFACE ICommDlgBrowser
  1172. DECLARE_INTERFACE_(ICommDlgBrowser,IUnknown)
  1173. {
  1174.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  1175.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1176.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1177.     STDMETHOD(OnDefaultCommand)(THIS_ IShellView*) PURE;
  1178.     STDMETHOD(OnStateChange)(THIS_ IShellView*,ULONG) PURE;
  1179.     STDMETHOD(IncludeObject)(THIS_ IShellView*,LPCITEMIDLIST) PURE;
  1180. };
  1181. typedef ICommDlgBrowser *LPCOMMDLGBROWSER;
  1182.  
  1183. #ifdef COBJMACROS
  1184. #define ICommDlgBrowser_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
  1185. #define ICommDlgBrowser_AddRef(T) (T)->lpVtbl->AddRef(T)
  1186. #define ICommDlgBrowser_Release(T) (T)->lpVtbl->Release(T)
  1187. #define ICommDlgBrowser_OnDefaultCommand(T,a) (T)->lpVtbl->OnDefaultCommand(T,a)
  1188. #define ICommDlgBrowser_OnStateChange(T,a,b) (T)->lpVtbl->OnStateChange(T,a,b)
  1189. #define ICommDlgBrowser_IncludeObject(T,a,b) (T)->lpVtbl->IncludeObject(T,a,b)
  1190. #endif
  1191.  
  1192. typedef GUID SHELLVIEWID;
  1193. typedef struct _SV2CVW2_PARAMS {
  1194.     DWORD cbSize;
  1195.     IShellView *psvPrev;
  1196.     FOLDERSETTINGS const *pfs;
  1197.     IShellBrowser *psbOwner;
  1198.     RECT *prcView;
  1199.     SHELLVIEWID const *pvid;
  1200.     HWND hwndView;
  1201. } SV2CVW2_PARAMS,*LPSV2CVW2_PARAMS;
  1202. #undef INTERFACE
  1203. #define INTERFACE IShellView2
  1204. DECLARE_INTERFACE_(IShellView2,IShellView)
  1205. {
  1206.  
  1207.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  1208.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1209.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1210.     STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
  1211.     STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
  1212.     STDMETHOD(TranslateAccelerator) (THIS_ LPMSG) PURE;
  1213. #ifdef _FIX_ENABLEMODELESS_CONFLICT
  1214.     STDMETHOD(EnableModelessSV)(THIS_ BOOL) PURE;
  1215. #else
  1216.     STDMETHOD(EnableModeless)(THIS_ BOOL) PURE;
  1217. #endif
  1218.     STDMETHOD(UIActivate)(THIS_ UINT) PURE;
  1219.     STDMETHOD(Refresh) (THIS) PURE;
  1220.     STDMETHOD(CreateViewWindow)(THIS_ IShellView*,LPCFOLDERSETTINGS,LPSHELLBROWSER,RECT*,HWND*) PURE;
  1221.     STDMETHOD(DestroyViewWindow)(THIS) PURE;
  1222.     STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS) PURE;
  1223.     STDMETHOD(AddPropertySheetPages)(THIS_ DWORD,LPFNADDPROPSHEETPAGE,LPARAM) PURE;
  1224.     STDMETHOD(SaveViewState)(THIS) PURE;
  1225.     STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST,UINT) PURE;
  1226.     STDMETHOD(GetItemObject)(THIS_ UINT,REFIID,PVOID*) PURE;
  1227.     STDMETHOD(GetView)(THIS_ SHELLVIEWID*,ULONG) PURE;
  1228.     STDMETHOD(CreateViewWindow2)(THIS_ LPSV2CVW2_PARAMS) PURE;
  1229. };
  1230.  
  1231. #undef INTERFACE
  1232. #define INTERFACE IShellExecuteHookA
  1233. DECLARE_INTERFACE_(IShellExecuteHookA,IUnknown)
  1234. {
  1235.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  1236.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1237.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1238.     STDMETHOD(Execute)(THIS_ LPSHELLEXECUTEINFOA) PURE;
  1239. };
  1240. #undef INTERFACE
  1241. #define INTERFACE IShellExecuteHookW
  1242. DECLARE_INTERFACE_(IShellExecuteHookW,IUnknown)
  1243. {
  1244.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  1245.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1246.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1247.     STDMETHOD(Execute)(THIS_ LPSHELLEXECUTEINFOW) PURE;
  1248. };
  1249.  
  1250. #undef INTERFACE
  1251. #define INTERFACE IShellIcon
  1252. DECLARE_INTERFACE_(IShellIcon,IUnknown)
  1253. {
  1254.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  1255.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1256.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1257.     STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST,UINT,PINT) PURE;
  1258. };
  1259. typedef IShellIcon *LPSHELLICON;
  1260.  
  1261. typedef struct {
  1262.     BOOL fShowAllObjects : 1;
  1263.     BOOL fShowExtensions : 1;
  1264.     BOOL fNoConfirmRecycle : 1;
  1265.     BOOL fShowSysFiles : 1;
  1266.     BOOL fShowCompColor : 1;
  1267.     BOOL fDoubleClickInWebView : 1;
  1268.     BOOL fDesktopHTML : 1;
  1269.     BOOL fWin95Classic : 1;
  1270.     BOOL fDontPrettyPath : 1;
  1271.     BOOL fShowAttribCol : 1;
  1272.     BOOL fMapNetDrvBtn : 1;
  1273.     BOOL fShowInfoTip : 1;
  1274.     BOOL fHideIcons : 1;
  1275.     UINT fRestFlags : 3;
  1276. } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
  1277.  
  1278. #define SSF_SHOWALLOBJECTS 0x1
  1279. #define SSF_SHOWEXTENSIONS 0x2
  1280. #define SSF_SHOWCOMPCOLOR 0x8
  1281. #define SSF_SHOWSYSFILES 0x20
  1282. #define SSF_DOUBLECLICKINWEBVIEW 0x80
  1283. #define SSF_SHOWATTRIBCOL 0x100
  1284. #define SSF_DESKTOPHTML 0x200
  1285. #define SSF_WIN95CLASSIC 0x400
  1286. #define SSF_DONTPRETTYPATH 0x800
  1287. #define SSF_MAPNETDRVBUTTON 0x1000
  1288. #define SSF_SHOWINFOTIP 0x2000
  1289. #define SSF_HIDEICONS 0x4000
  1290. #define SSF_NOCONFIRMRECYCLE 0x8000
  1291.  
  1292. #undef  INTERFACE
  1293. #define INTERFACE IShellIconOverlayIdentifier
  1294. DECLARE_INTERFACE_(IShellIconOverlayIdentifier,IUnknown)
  1295. {
  1296.     STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
  1297.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  1298.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  1299.     STDMETHOD(IsMemberOf)(THIS_ LPCWSTR,DWORD) PURE;
  1300.     STDMETHOD(GetOverlayInfo)(THIS_ LPWSTR,int,int*,DWORD*) PURE;
  1301.     STDMETHOD(GetPriority)(THIS_ int*) PURE;
  1302. };
  1303.  
  1304. #define ISIOI_ICONFILE 0x00000001
  1305. #define ISIOI_ICONINDEX 0x00000002
  1306.  
  1307. #if (_WIN32_WINNT >= 0x0500) /* W2K */
  1308. typedef struct {
  1309.     BOOL fShowAllObjects : 1;
  1310.     BOOL fShowExtensions : 1;
  1311.     BOOL fNoConfirmRecycle : 1;
  1312.     BOOL fShowSysFiles : 1;
  1313.     BOOL fShowCompColor : 1;
  1314.     BOOL fDoubleClickInWebView : 1;
  1315.     BOOL fDesktopHTML : 1;
  1316.     BOOL fWin95Classic : 1;
  1317.     BOOL fDontPrettyPath : 1;
  1318.     BOOL fShowAttribCol : 1;
  1319.     BOOL fMapNetDrvBtn : 1;
  1320.     BOOL fShowInfoTip : 1;
  1321.     BOOL fHideIcons : 1;
  1322.     BOOL fWebView : 1;
  1323.     BOOL fFilter : 1;
  1324.     BOOL fShowSuperHidden : 1;
  1325.     BOOL fNoNetCrawling : 1;
  1326.     DWORD dwWin95Unused;
  1327.     UINT uWin95Unused;
  1328.     LONG lParamSort;
  1329.     int iSortDirection;
  1330.     UINT version;
  1331.     UINT uNotUsed;
  1332.     BOOL fSepProcess : 1;
  1333.     BOOL fStartPanelOn : 1;
  1334.     BOOL fShowStartPage : 1;
  1335.     UINT fSpareFlags : 13;
  1336. } SHELLSTATE, *LPSHELLSTATE;
  1337. #endif /* _WIN32_WINNT >= 0x0500 */
  1338.  
  1339. #if (_WIN32_IE >= 0x0500)
  1340. #pragma pack(push,8)
  1341. typedef struct
  1342. {
  1343.     SIZE sizeDragImage;
  1344.     POINT ptOffset;
  1345.     HBITMAP hbmpDragImage;
  1346.     COLORREF crColorKey;
  1347. } SHDRAGIMAGE, *LPSHDRAGIMAGE;
  1348. #pragma pack(pop)
  1349.  
  1350. #undef INTERFACE
  1351. #define INTERFACE IDragSourceHelper
  1352. DECLARE_INTERFACE_(IDragSourceHelper, IUnknown)
  1353. {
  1354.     STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  1355.     STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  1356.     STDMETHOD_(ULONG, Release) (THIS) PURE;
  1357.     STDMETHOD (InitializeFromBitmap)(THIS_ LPSHDRAGIMAGE pshdi, IDataObject* pDataObject) PURE;
  1358.     STDMETHOD (InitializeFromWindow)(THIS_ HWND hwnd, POINT* ppt, IDataObject* pDataObject) PURE;
  1359. };
  1360.  
  1361. #undef INTERFACE
  1362. #define INTERFACE IDropTargetHelper
  1363. DECLARE_INTERFACE_(IDropTargetHelper, IUnknown)
  1364. {
  1365.     STDMETHOD (QueryInterface)(THIS_ REFIID riid, void** ppv) PURE;
  1366.     STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  1367.     STDMETHOD_(ULONG, Release) (THIS) PURE;
  1368.     STDMETHOD (DragEnter)(THIS_ HWND hwndTarget, IDataObject* pDataObject, POINT* ppt, DWORD dwEffect) PURE;
  1369.     STDMETHOD (DragLeave)(THIS) PURE;
  1370.     STDMETHOD (DragOver)(THIS_ POINT* ppt, DWORD dwEffect) PURE;
  1371.     STDMETHOD (Drop)(THIS_ IDataObject* pDataObject, POINT* ppt, DWORD dwEffect) PURE;
  1372.     STDMETHOD (Show)(THIS_ BOOL fShow) PURE;
  1373. };
  1374. #endif /* _WIN32_IE >= 0x0500 */
  1375.  
  1376. void WINAPI SHAddToRecentDocs(UINT,PCVOID);
  1377. LPITEMIDLIST WINAPI SHBrowseForFolderA(PBROWSEINFOA);
  1378. LPITEMIDLIST WINAPI SHBrowseForFolderW(PBROWSEINFOW);
  1379. void WINAPI SHChangeNotify(LONG,UINT,PCVOID,PCVOID);
  1380. HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER,LPCITEMIDLIST,int,PVOID,int);
  1381. HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER,LPCITEMIDLIST,int,PVOID,int);
  1382. HRESULT WINAPI SHGetDesktopFolder(LPSHELLFOLDER*);
  1383. HRESULT WINAPI SHGetInstanceExplorer(IUnknown **);
  1384. HRESULT WINAPI SHGetMalloc(LPMALLOC*);
  1385. BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST,LPSTR);
  1386. BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST,LPWSTR);
  1387. HRESULT WINAPI SHGetSpecialFolderLocation(HWND,int,LPITEMIDLIST*);
  1388. HRESULT WINAPI SHLoadInProc(REFCLSID);
  1389. #if (_WIN32_IE >= 0x0400)
  1390. BOOL WINAPI SHGetSpecialFolderPathA(HWND,LPSTR,int,BOOL);
  1391. BOOL WINAPI SHGetSpecialFolderPathW(HWND,LPWSTR,int,BOOL);
  1392. #endif 
  1393. /* SHGetFolderPath in shfolder.dll on W9x, NT4, also in shell32.dll on W2K */
  1394. HRESULT WINAPI SHGetFolderPathA(HWND,int,HANDLE,DWORD,LPSTR);
  1395. HRESULT WINAPI SHGetFolderPathW(HWND,int,HANDLE,DWORD,LPWSTR);
  1396. #if (_WIN32_WINDOWS >= 0x0490) || (_WIN32_WINNT >= 0x0500) /* ME or W2K */
  1397. HRESULT WINAPI SHGetFolderLocation(HWND,int,HANDLE,DWORD,LPITEMIDLIST*);
  1398. #endif
  1399. #if (_WIN32_WINNT >= 0x0500)
  1400. INT WINAPI SHCreateDirectoryExA(HWND,LPCSTR,LPSECURITY_ATTRIBUTES);
  1401. INT WINAPI SHCreateDirectoryExW(HWND,LPCWSTR,LPSECURITY_ATTRIBUTES);
  1402. HRESULT WINAPI SHBindToParent(LPCITEMIDLIST,REFIID,VOID**,LPCITEMIDLIST*);
  1403. #endif
  1404. #if (_WIN32_WINNT >= 0x0501) /* XP */
  1405. HRESULT WINAPI SHGetFolderPathAndSubDirA(HWND,int,HANDLE,DWORD,LPCSTR,LPSTR);
  1406. HRESULT WINAPI SHGetFolderPathAndSubDirW(HWND,int,HANDLE,DWORD,LPCWSTR,LPWSTR);
  1407. #endif
  1408. void WINAPI SHGetSettings(LPSHELLFLAGSTATE,DWORD);
  1409. #if (_WIN32_WINNT >= 0x0500) /* W2K */
  1410. void WINAPI SHGetSetSettings(LPSHELLSTATE,DWORD,BOOL);
  1411. #endif
  1412.  
  1413. #if (_WIN32_WINNT >= 0x0500) /* W2K */
  1414. BOOL WINAPI ILIsEqual(LPCITEMIDLIST, LPCITEMIDLIST);
  1415. BOOL WINAPI ILIsParent(LPCITEMIDLIST, LPCITEMIDLIST, BOOL);
  1416. BOOL WINAPI ILRemoveLastID(LPITEMIDLIST);
  1417. HRESULT WINAPI ILLoadFromStream(IStream*, LPITEMIDLIST*);
  1418. HRESULT WINAPI ILSaveToStream(IStream*, LPCITEMIDLIST);
  1419. LPITEMIDLIST WINAPI ILAppendID(LPITEMIDLIST, LPCSHITEMID, BOOL);
  1420. LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST);
  1421. LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST);
  1422. LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST, LPCITEMIDLIST);
  1423. LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST, LPCITEMIDLIST);
  1424. LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST);
  1425. LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST);
  1426. UINT WINAPI ILGetSize(LPCITEMIDLIST);
  1427. void WINAPI ILFree(LPITEMIDLIST);
  1428.  
  1429. HRESULT WINAPI SHCoCreateInstance(LPCWSTR,REFCLSID,IUnknown*,REFIID,void**);
  1430. #endif
  1431.  
  1432. #ifdef UNICODE
  1433. typedef IShellExecuteHookW IShellExecuteHook;
  1434. typedef IShellLinkW IShellLink;
  1435. typedef BROWSEINFOW BROWSEINFO,*PBROWSEINFO,*LPBROWSEINFO;
  1436. #define SHBrowseForFolder SHBrowseForFolderW
  1437. #define SHGetDataFromIDList SHGetDataFromIDListW
  1438. #define SHGetPathFromIDList SHGetPathFromIDListW
  1439. #if (_WIN32_IE >= 0x0400)
  1440. #define SHGetSpecialFolderPath SHGetSpecialFolderPathW
  1441. #endif
  1442. #define SHGetFolderPath SHGetFolderPathW 
  1443. #if (_WIN32_WINNT >= 0x0500)
  1444. #define SHCreateDirectoryEx SHCreateDirectoryExW
  1445. #endif
  1446. #if (_WIN32_WINNT >= 0x0501)
  1447. #define SHGetFolderPathAndSubDir SHGetFolderPathAndSubDirW
  1448. #endif
  1449. #define FILEDESCRIPTOR FILEDESCRIPTORW
  1450. #define LPFILEDESCRIPTOR LPFILEDESCRIPTORW
  1451. #define FILEGROUPDESCRIPTOR FILEGROUPDESCRIPTORW
  1452. #define LPFILEGROUPDESCRIPTOR LPFILEGROUPDESCRIPTORW
  1453.  
  1454. #else
  1455. typedef IShellExecuteHookA IShellExecuteHook;
  1456. typedef IShellLinkA IShellLink;
  1457. typedef BROWSEINFOA BROWSEINFO,*PBROWSEINFO,*LPBROWSEINFO;
  1458. #define SHBrowseForFolder SHBrowseForFolderA
  1459. #define SHGetDataFromIDList SHGetDataFromIDListA
  1460. #define SHGetPathFromIDList SHGetPathFromIDListA
  1461. #if (_WIN32_IE >= 0x0400)
  1462. #define SHGetSpecialFolderPath SHGetSpecialFolderPathA
  1463. #endif
  1464. #define SHGetFolderPath SHGetFolderPathA
  1465. #if (_WIN32_WINNT >= 0x0500)
  1466. #define SHCreateDirectoryEx SHCreateDirectoryExA
  1467. #endif
  1468. #if (_WIN32_WINNT >= 0x0501)
  1469. #define SHGetFolderPathAndSubDir SHGetFolderPathAndSubDirA
  1470. #endif
  1471. #define FILEDESCRIPTOR FILEDESCRIPTORA
  1472. #define LPFILEDESCRIPTOR LPFILEDESCRIPTORA
  1473. #define FILEGROUPDESCRIPTOR FILEGROUPDESCRIPTORA
  1474. #define LPFILEGROUPDESCRIPTOR LPFILEGROUPDESCRIPTORA
  1475. #endif /* UNICODE */
  1476.  
  1477. #pragma pack(pop)
  1478. #ifdef __cplusplus
  1479. }
  1480. #endif
  1481.  
  1482.  
  1483. #endif /* _SHLOBJ_H */
  1484.