Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _SHLOBJ_H_
      7 #define _SHLOBJ_H_
      8 
      9 #include <winapifamily.h>
     10 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
     11 
     12 #include <_mingw_unicode.h>
     13 
     14 #ifndef _WINRESRC_
     15 #ifndef _WIN32_IE
     16 #define _WIN32_IE 0x0501
     17 #endif
     18 #endif
     19 
     20 #ifndef SNDMSG
     21 #ifdef __cplusplus
     22 #define SNDMSG ::SendMessage
     23 #else
     24 #define SNDMSG SendMessage
     25 #endif
     26 #endif
     27 
     28 #ifndef WINSHELLAPI
     29 #if defined(_SHELL32_)
     30 #define WINSHELLAPI
     31 #else
     32 #define WINSHELLAPI DECLSPEC_IMPORT
     33 #endif
     34 #endif
     35 
     36 #ifndef SHSTDAPI
     37 #if defined(_SHELL32_)
     38 #define SHSTDAPI STDAPI
     39 #define SHSTDAPI_(type) STDAPI_(type)
     40 #else
     41 #define SHSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT WINAPI
     42 #define SHSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type WINAPI
     43 #endif
     44 #endif
     45 
     46 #ifndef SHDOCAPI
     47 #if defined(_SHDOCVW_)
     48 #define SHDOCAPI STDAPI
     49 #define SHDOCAPI_(type) STDAPI_(type)
     50 #else
     51 #define SHDOCAPI EXTERN_C DECLSPEC_IMPORT HRESULT WINAPI
     52 #define SHDOCAPI_(type) EXTERN_C DECLSPEC_IMPORT type WINAPI
     53 #endif
     54 #endif
     55 
     56 #ifndef SHSTDDOCAPI
     57 #if defined(_SHDOCVW_) || defined(_SHELL32_)
     58 #define SHSTDDOCAPI STDAPI
     59 #define SHSTDDOCAPI_(type) STDAPI_(type)
     60 #else
     61 #define SHSTDDOCAPI EXTERN_C DECLSPEC_IMPORT HRESULT WINAPI
     62 #define SHSTDDOCAPI_(type) EXTERN_C DECLSPEC_IMPORT type WINAPI
     63 #endif
     64 #endif
     65 
     66 #ifndef BROWSEUIAPI
     67 #if defined(_BROWSEUI_)
     68 #define BROWSEUIAPI STDAPI
     69 #define BROWSEUIAPI_(type) STDAPI_(type)
     70 #else
     71 #define BROWSEUIAPI EXTERN_C DECLSPEC_IMPORT HRESULT WINAPI
     72 #define BROWSEUIAPI_(type) EXTERN_C DECLSPEC_IMPORT type WINAPI
     73 #endif
     74 #endif
     75 
     76 #ifndef SHFOLDERAPI
     77 #if defined(_SHFOLDER_) || defined(_SHELL32_)
     78 #define SHFOLDERAPI STDAPI
     79 #else
     80 #define SHFOLDERAPI EXTERN_C DECLSPEC_IMPORT HRESULT WINAPI
     81 #endif
     82 #endif
     83 
     84 #include <ole2.h>
     85 #include <prsht.h>
     86 #include <commctrl.h>
     87 
     88 #ifndef INITGUID
     89 #include <shlguid.h>
     90 #endif
     91 
     92 #include <pshpack1.h>
     93 
     94 #ifdef __cplusplus
     95 extern "C" {
     96 #endif
     97 
     98 #include <shtypes.h>
     99 #include <shobjidl.h>
    100 
    101   SHSTDAPI SHGetMalloc(LPMALLOC *ppMalloc);
    102   SHSTDAPI_(void *) SHAlloc(SIZE_T cb);
    103   SHSTDAPI_(void) SHFree(void *pv);
    104 
    105 #define CMF_NORMAL 0x00000000
    106 #define CMF_DEFAULTONLY 0x00000001
    107 #define CMF_VERBSONLY 0x00000002
    108 #define CMF_EXPLORE 0x00000004
    109 #define CMF_NOVERBS 0x00000008
    110 #define CMF_CANRENAME 0x00000010
    111 #define CMF_NODEFAULT 0x00000020
    112 #define CMF_INCLUDESTATIC 0x00000040
    113 #define CMF_EXTENDEDVERBS 0x00000100
    114 #define CMF_RESERVED 0xffff0000
    115 
    116 #define GCS_VERBA 0x00000000
    117 #define GCS_HELPTEXTA 0x00000001
    118 #define GCS_VALIDATEA 0x00000002
    119 #define GCS_VERBW 0x00000004
    120 #define GCS_HELPTEXTW 0x00000005
    121 #define GCS_VALIDATEW 0x00000006
    122 #define GCS_UNICODE 0x00000004
    123 
    124 #define GCS_VERB __MINGW_NAME_AW(GCS_VERB)
    125 #define GCS_HELPTEXT __MINGW_NAME_AW(GCS_HELPTEXT)
    126 #define GCS_VALIDATE __MINGW_NAME_AW(GCS_VALIDATE)
    127 
    128 #define CMDSTR_NEWFOLDERA "NewFolder"
    129 #define CMDSTR_VIEWLISTA "ViewList"
    130 #define CMDSTR_VIEWDETAILSA "ViewDetails"
    131 #define CMDSTR_NEWFOLDERW L"NewFolder"
    132 #define CMDSTR_VIEWLISTW L"ViewList"
    133 #define CMDSTR_VIEWDETAILSW L"ViewDetails"
    134 
    135 #define CMDSTR_NEWFOLDER __MINGW_NAME_AW(CMDSTR_NEWFOLDER)
    136 #define CMDSTR_VIEWLIST __MINGW_NAME_AW(CMDSTR_VIEWLIST)
    137 #define CMDSTR_VIEWDETAILS __MINGW_NAME_AW(CMDSTR_VIEWDETAILS)
    138 
    139 #define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
    140 #define CMIC_MASK_ICON SEE_MASK_ICON
    141 #define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
    142 #define CMIC_MASK_UNICODE SEE_MASK_UNICODE
    143 #define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
    144 #define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
    145 #define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
    146 #define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
    147 #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
    148 #if (_WIN32_IE >= 0x0603)
    149 #define CMIC_MASK_NOZONECHECKS SEE_MASK_NOZONECHECKS
    150 #endif
    151 
    152 #define CMIC_MASK_SHIFT_DOWN 0x10000000
    153 #define CMIC_MASK_CONTROL_DOWN 0x40000000
    154 #if (_WIN32_IE >= 0x0560)
    155 #define CMIC_MASK_FLAG_LOG_USAGE SEE_MASK_FLAG_LOG_USAGE
    156 #define CMIC_MASK_NOZONECHECKS SEE_MASK_NOZONECHECKS
    157 #endif
    158 #define CMIC_MASK_PTINVOKE 0x20000000
    159 
    160 #include <pshpack8.h>
    161 
    162   typedef struct _CMINVOKECOMMANDINFO {
    163     DWORD cbSize;
    164     DWORD fMask;
    165     HWND hwnd;
    166     LPCSTR lpVerb;
    167     LPCSTR lpParameters;
    168     LPCSTR lpDirectory;
    169     int nShow;
    170 
    171     DWORD dwHotKey;
    172     HANDLE hIcon;
    173   } CMINVOKECOMMANDINFO,*LPCMINVOKECOMMANDINFO;
    174 
    175   typedef struct _CMInvokeCommandInfoEx {
    176     DWORD cbSize;
    177     DWORD fMask;
    178     HWND hwnd;
    179     LPCSTR lpVerb;
    180     LPCSTR lpParameters;
    181     LPCSTR lpDirectory;
    182     int nShow;
    183     DWORD dwHotKey;
    184     HANDLE hIcon;
    185     LPCSTR lpTitle;
    186     LPCWSTR lpVerbW;
    187     LPCWSTR lpParametersW;
    188     LPCWSTR lpDirectoryW;
    189     LPCWSTR lpTitleW;
    190     POINT ptInvoke;
    191   } CMINVOKECOMMANDINFOEX,*LPCMINVOKECOMMANDINFOEX;
    192 
    193 #include <poppack.h>
    194 
    195 #undef INTERFACE
    196 #define INTERFACE IContextMenu
    197 
    198   DECLARE_INTERFACE_(IContextMenu,IUnknown) {
    199     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    200     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    201     STDMETHOD_(ULONG,Release) (THIS) PURE;
    202     STDMETHOD(QueryContextMenu)(THIS_ HMENU hmenu,UINT indexMenu,UINT idCmdFirst,UINT idCmdLast,UINT uFlags) PURE;
    203     STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO lpici) PURE;
    204     STDMETHOD(GetCommandString)(THIS_ UINT_PTR idCmd,UINT uType,UINT *pwReserved,LPSTR pszName,UINT cchMax) PURE;
    205   };
    206 
    207   typedef IContextMenu *LPCONTEXTMENU;
    208 
    209 #undef INTERFACE
    210 #define INTERFACE IContextMenu2
    211   DECLARE_INTERFACE_(IContextMenu2,IContextMenu) {
    212     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    213     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    214     STDMETHOD_(ULONG,Release) (THIS) PURE;
    215     STDMETHOD(QueryContextMenu)(THIS_ HMENU hmenu,UINT indexMenu,UINT idCmdFirst,UINT idCmdLast,UINT uFlags) PURE;
    216     STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO lpici) PURE;
    217     STDMETHOD(GetCommandString)(THIS_ UINT_PTR idCmd,UINT uType,UINT *pwReserved,LPSTR pszName,UINT cchMax) PURE;
    218     STDMETHOD(HandleMenuMsg)(THIS_ UINT uMsg,WPARAM wParam,LPARAM lParam) PURE;
    219   };
    220 
    221   typedef IContextMenu2 *LPCONTEXTMENU2;
    222 
    223 #undef INTERFACE
    224 #define INTERFACE IContextMenu3
    225   DECLARE_INTERFACE_(IContextMenu3,IContextMenu2) {
    226     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    227     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    228     STDMETHOD_(ULONG,Release) (THIS) PURE;
    229     STDMETHOD(QueryContextMenu)(THIS_ HMENU hmenu,UINT indexMenu,UINT idCmdFirst,UINT idCmdLast,UINT uFlags) PURE;
    230     STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO lpici) PURE;
    231     STDMETHOD(GetCommandString)(THIS_ UINT_PTR idCmd,UINT uType,UINT *pwReserved,LPSTR pszName,UINT cchMax) PURE;
    232     STDMETHOD(HandleMenuMsg)(THIS_ UINT uMsg,WPARAM wParam,LPARAM lParam) PURE;
    233     STDMETHOD(HandleMenuMsg2)(THIS_ UINT uMsg,WPARAM wParam,LPARAM lParam,LRESULT *plResult) PURE;
    234   };
    235 
    236   typedef IContextMenu3 *LPCONTEXTMENU3;
    237 
    238 #undef INTERFACE
    239 #define INTERFACE IPersistFolder3
    240 #define CSIDL_FLAG_PFTI_TRACKTARGET CSIDL_FLAG_DONT_VERIFY
    241 
    242 #include <pshpack8.h>
    243 
    244   typedef struct {
    245     LPITEMIDLIST pidlTargetFolder;
    246     WCHAR szTargetParsingName[MAX_PATH];
    247     WCHAR szNetworkProvider[MAX_PATH];
    248     DWORD dwAttributes;
    249     int csidl;
    250   } PERSIST_FOLDER_TARGET_INFO;
    251 
    252 #include <poppack.h>
    253 
    254   DECLARE_INTERFACE_(IPersistFolder3,IPersistFolder2) {
    255     STDMETHOD(QueryInterface)(THIS_ REFIID riid,void **ppv) PURE;
    256     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
    257     STDMETHOD_(ULONG,Release)(THIS) PURE;
    258     STDMETHOD(GetClassID)(THIS_ LPCLSID lpClassID) PURE;
    259     STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidl) PURE;
    260     STDMETHOD(GetCurFolder)(THIS_ LPITEMIDLIST *ppidl) PURE;
    261     STDMETHOD(InitializeEx)(THIS_ IBindCtx *pbc,LPCITEMIDLIST pidlRoot,const PERSIST_FOLDER_TARGET_INFO *ppfti) PURE;
    262     STDMETHOD(GetFolderTargetInfo)(THIS_ PERSIST_FOLDER_TARGET_INFO *ppfti) PURE;
    263   };
    264 
    265 #define GIL_OPENICON 0x0001
    266 #define GIL_FORSHELL 0x0002
    267 #define GIL_ASYNC 0x0020
    268 #define GIL_DEFAULTICON 0x0040
    269 #define GIL_FORSHORTCUT 0x0080
    270 
    271 #define GIL_SIMULATEDOC 0x0001
    272 #define GIL_PERINSTANCE 0x0002
    273 #define GIL_PERCLASS 0x0004
    274 #define GIL_NOTFILENAME 0x0008
    275 #define GIL_DONTCACHE 0x0010
    276 
    277 #undef INTERFACE
    278 #define INTERFACE IExtractIconA
    279   DECLARE_INTERFACE_(IExtractIconA,IUnknown) {
    280     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    281     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    282     STDMETHOD_(ULONG,Release) (THIS) PURE;
    283     STDMETHOD(GetIconLocation)(THIS_ UINT uFlags,LPSTR szIconFile,UINT cchMax,int *piIndex,UINT *pwFlags) PURE;
    284     STDMETHOD(Extract)(THIS_ LPCSTR pszFile,UINT nIconIndex,HICON *phiconLarge,HICON *phiconSmall,UINT nIconSize) PURE;
    285   };
    286 
    287   typedef IExtractIconA *LPEXTRACTICONA;
    288 
    289 #undef INTERFACE
    290 #define INTERFACE IExtractIconW
    291   DECLARE_INTERFACE_(IExtractIconW,IUnknown) {
    292     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    293     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    294     STDMETHOD_(ULONG,Release) (THIS) PURE;
    295     STDMETHOD(GetIconLocation)(THIS_ UINT uFlags,LPWSTR szIconFile,UINT cchMax,int *piIndex,UINT *pwFlags) PURE;
    296     STDMETHOD(Extract)(THIS_ LPCWSTR pszFile,UINT nIconIndex,HICON *phiconLarge,HICON *phiconSmall,UINT nIconSize) PURE;
    297   };
    298 
    299   typedef IExtractIconW *LPEXTRACTICONW;
    300 
    301 #define IExtractIcon __MINGW_NAME_AW(IExtractIcon)
    302 #define LPEXTRACTICON __MINGW_NAME_AW(LPEXTRACTICON)
    303 
    304 #define IExtractIconVtbl __MINGW_NAME_AW_EXT(IExtractIcon,Vtbl)
    305 
    306 #undef INTERFACE
    307 #define INTERFACE IShellIcon
    308   DECLARE_INTERFACE_(IShellIcon,IUnknown) {
    309     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    310     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    311     STDMETHOD_(ULONG,Release) (THIS) PURE;
    312     STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl,UINT flags,LPINT lpIconIndex) PURE;
    313   };
    314 
    315   typedef IShellIcon *LPSHELLICON;
    316 
    317 #undef INTERFACE
    318 #define INTERFACE IShellIconOverlayIdentifier
    319   DECLARE_INTERFACE_(IShellIconOverlayIdentifier,IUnknown) {
    320     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    321     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    322     STDMETHOD_(ULONG,Release) (THIS) PURE;
    323     STDMETHOD (IsMemberOf)(THIS_ LPCWSTR pwszPath,DWORD dwAttrib) PURE;
    324     STDMETHOD (GetOverlayInfo)(THIS_ LPWSTR pwszIconFile,int cchMax,int *pIndex,DWORD *pdwFlags) PURE;
    325     STDMETHOD (GetPriority)(THIS_ int *pIPriority) PURE;
    326   };
    327 
    328 #define ISIOI_ICONFILE 0x00000001
    329 #define ISIOI_ICONINDEX 0x00000002
    330 #if (_WIN32_IE >= 0x0601)
    331 #undef INTERFACE
    332 #define INTERFACE IShellIconOverlayManager
    333   DECLARE_INTERFACE_(IShellIconOverlayManager,IUnknown) {
    334     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    335     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    336     STDMETHOD_(ULONG,Release) (THIS) PURE;
    337     STDMETHOD(GetFileOverlayInfo)(THIS_ LPCWSTR pwszPath,DWORD dwAttrib,int *pIndex,DWORD dwflags) PURE;
    338     STDMETHOD(GetReservedOverlayInfo)(THIS_ LPCWSTR pwszPath,DWORD dwAttrib,int *pIndex,DWORD dwflags,int iReservedID) PURE;
    339     STDMETHOD(RefreshOverlayImages)(THIS_ DWORD dwFlags) PURE;
    340     STDMETHOD(LoadNonloadedOverlayIdentifiers)(THIS) PURE;
    341     STDMETHOD(OverlayIndexFromImageIndex)(THIS_ int iImage,int *piIndex,WINBOOL fAdd) PURE;
    342   };
    343 #define SIOM_OVERLAYINDEX 1
    344 #define SIOM_ICONINDEX 2
    345 
    346 #define SIOM_RESERVED_SHARED 0
    347 #define SIOM_RESERVED_LINK 1
    348 #define SIOM_RESERVED_SLOWFILE 2
    349 #endif
    350 
    351 #undef INTERFACE
    352 #define INTERFACE IShellIconOverlay
    353   DECLARE_INTERFACE_(IShellIconOverlay,IUnknown) {
    354     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    355     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    356     STDMETHOD_(ULONG,Release) (THIS) PURE;
    357     STDMETHOD(GetOverlayIndex)(THIS_ LPCITEMIDLIST pidl,int *pIndex) PURE;
    358     STDMETHOD(GetOverlayIconIndex)(THIS_ LPCITEMIDLIST pidl,int *pIconIndex) PURE;
    359   };
    360 
    361 #define OI_ASYNC 0xFFFFEEEE
    362 
    363 #define IDO_SHGIOI_SHARE 0x0FFFFFFF
    364 #define IDO_SHGIOI_LINK 0x0FFFFFFE
    365 #define IDO_SHGIOI_SLOWFILE 0x0FFFFFFFD
    366 #define IDO_SHGIOI_DEFAULT 0x0FFFFFFC
    367   SHSTDAPI_(int) SHGetIconOverlayIndexA(LPCSTR pszIconPath,int iIconIndex);
    368   SHSTDAPI_(int) SHGetIconOverlayIndexW(LPCWSTR pszIconPath,int iIconIndex);
    369 
    370 #define SHGetIconOverlayIndex __MINGW_NAME_AW(SHGetIconOverlayIndex)
    371 
    372   typedef enum {
    373     SLDF_HAS_ID_LIST = 0x00000001,SLDF_HAS_LINK_INFO = 0x00000002,SLDF_HAS_NAME = 0x00000004,SLDF_HAS_RELPATH = 0x00000008,
    374     SLDF_HAS_WORKINGDIR = 0x00000010,SLDF_HAS_ARGS = 0x00000020,SLDF_HAS_ICONLOCATION = 0x00000040,SLDF_UNICODE = 0x00000080,
    375     SLDF_FORCE_NO_LINKINFO = 0x00000100,SLDF_HAS_EXP_SZ = 0x00000200,SLDF_RUN_IN_SEPARATE = 0x00000400,SLDF_HAS_LOGO3ID = 0x00000800,
    376     SLDF_HAS_DARWINID = 0x00001000,SLDF_RUNAS_USER = 0x00002000,SLDF_HAS_EXP_ICON_SZ = 0x00004000,SLDF_NO_PIDL_ALIAS = 0x00008000,
    377     SLDF_FORCE_UNCNAME = 0x00010000,SLDF_RUN_WITH_SHIMLAYER = 0x00020000,SLDF_RESERVED = 0x80000000
    378   } SHELL_LINK_DATA_FLAGS;
    379 
    380   typedef struct tagDATABLOCKHEADER {
    381     DWORD cbSize;
    382     DWORD dwSignature;
    383   } DATABLOCK_HEADER,*LPDATABLOCK_HEADER,*LPDBLIST;
    384 
    385   typedef struct {
    386 #ifdef __cplusplus
    387     DATABLOCK_HEADER dbh;
    388 #else
    389 /*  DATABLOCK_HEADER; */
    390     __C89_NAMELESS struct {
    391       DWORD cbSize;
    392       DWORD dwSignature;
    393     };
    394 #endif
    395     WORD wFillAttribute;
    396     WORD wPopupFillAttribute;
    397     COORD dwScreenBufferSize;
    398     COORD dwWindowSize;
    399     COORD dwWindowOrigin;
    400     DWORD nFont;
    401     DWORD nInputBufferSize;
    402     COORD dwFontSize;
    403     UINT uFontFamily;
    404     UINT uFontWeight;
    405     WCHAR FaceName[LF_FACESIZE];
    406     UINT uCursorSize;
    407     WINBOOL bFullScreen;
    408     WINBOOL bQuickEdit;
    409     WINBOOL bInsertMode;
    410     WINBOOL bAutoPosition;
    411     UINT uHistoryBufferSize;
    412     UINT uNumberOfHistoryBuffers;
    413     WINBOOL bHistoryNoDup;
    414     COLORREF ColorTable[16 ];
    415   } NT_CONSOLE_PROPS,*LPNT_CONSOLE_PROPS;
    416 #define NT_CONSOLE_PROPS_SIG 0xA0000002
    417 
    418   typedef struct {
    419 #ifdef __cplusplus
    420     DATABLOCK_HEADER dbh;
    421 #else
    422 /*  DATABLOCK_HEADER; */
    423     __C89_NAMELESS struct {
    424       DWORD cbSize;
    425       DWORD dwSignature;
    426     };
    427 #endif
    428     UINT uCodePage;
    429   } NT_FE_CONSOLE_PROPS,*LPNT_FE_CONSOLE_PROPS;
    430 #define NT_FE_CONSOLE_PROPS_SIG 0xA0000004
    431 
    432   typedef struct {
    433 #ifdef __cplusplus
    434     DATABLOCK_HEADER dbh;
    435 #else
    436 /*  DATABLOCK_HEADER; */
    437     __C89_NAMELESS struct {
    438       DWORD cbSize;
    439       DWORD dwSignature;
    440     };
    441 #endif
    442     CHAR szDarwinID[MAX_PATH];
    443     WCHAR szwDarwinID[MAX_PATH];
    444   } EXP_DARWIN_LINK,*LPEXP_DARWIN_LINK;
    445 #define EXP_DARWIN_ID_SIG 0xA0000006
    446 #define EXP_LOGO3_ID_SIG 0xA0000007
    447 
    448 #define EXP_SPECIAL_FOLDER_SIG 0xA0000005
    449 
    450   typedef struct {
    451     DWORD cbSize;
    452     DWORD dwSignature;
    453     DWORD idSpecialFolder;
    454     DWORD cbOffset;
    455   } EXP_SPECIAL_FOLDER,*LPEXP_SPECIAL_FOLDER;
    456 
    457   typedef struct {
    458     DWORD cbSize;
    459     DWORD dwSignature;
    460     CHAR szTarget[MAX_PATH ];
    461     WCHAR swzTarget[MAX_PATH ];
    462   } EXP_SZ_LINK,*LPEXP_SZ_LINK;
    463 #define EXP_SZ_LINK_SIG 0xA0000001
    464 #define EXP_SZ_ICON_SIG 0xA0000007
    465 
    466 #undef INTERFACE
    467 #define INTERFACE IShellLinkDataList
    468   DECLARE_INTERFACE_(IShellLinkDataList,IUnknown) {
    469     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    470     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    471     STDMETHOD_(ULONG,Release) (THIS) PURE;
    472     STDMETHOD(AddDataBlock)(THIS_ void *pDataBlock) PURE;
    473     STDMETHOD(CopyDataBlock)(THIS_ DWORD dwSig,void **ppDataBlock) PURE;
    474     STDMETHOD(RemoveDataBlock)(THIS_ DWORD dwSig) PURE;
    475     STDMETHOD(GetFlags)(THIS_ DWORD *pdwFlags) PURE;
    476     STDMETHOD(SetFlags)(THIS_ DWORD dwFlags) PURE;
    477   };
    478 
    479 #undef INTERFACE
    480 #define INTERFACE IResolveShellLink
    481   DECLARE_INTERFACE_(IResolveShellLink,IUnknown) {
    482     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    483     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    484     STDMETHOD_(ULONG,Release) (THIS) PURE;
    485     STDMETHOD(ResolveShellLink)(THIS_ IUnknown *punk,HWND hwnd,DWORD fFlags) PURE;
    486   };
    487 
    488 #ifdef _INC_SHELLAPI
    489 
    490 #undef INTERFACE
    491 #define INTERFACE IShellExecuteHookA
    492   DECLARE_INTERFACE_(IShellExecuteHookA,IUnknown) {
    493     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    494     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    495     STDMETHOD_(ULONG,Release) (THIS) PURE;
    496     STDMETHOD(Execute)(THIS_ LPSHELLEXECUTEINFOA pei) PURE;
    497   };
    498 
    499 #undef INTERFACE
    500 #define INTERFACE IShellExecuteHookW
    501   DECLARE_INTERFACE_(IShellExecuteHookW,IUnknown) {
    502     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    503     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    504     STDMETHOD_(ULONG,Release) (THIS) PURE;
    505     STDMETHOD(Execute)(THIS_ LPSHELLEXECUTEINFOW pei) PURE;
    506   };
    507 
    508 #define IShellExecuteHook __MINGW_NAME_AW(IShellExecuteHook)
    509 
    510 #define IShellExecuteHookVtbl __MINGW_NAME_AW_EXT(IShellExecuteHook,Vtbl)
    511 
    512 #endif
    513 
    514 #undef INTERFACE
    515 #define INTERFACE IURLSearchHook
    516   DECLARE_INTERFACE_(IURLSearchHook,IUnknown) {
    517     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    518     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    519     STDMETHOD_(ULONG,Release) (THIS) PURE;
    520     STDMETHOD(Translate)(THIS_ LPWSTR lpwszSearchURL,DWORD cchBufferSize) PURE;
    521   };
    522 
    523 #undef INTERFACE
    524 #define INTERFACE ISearchContext
    525   DECLARE_INTERFACE_(ISearchContext,IUnknown) {
    526     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    527     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    528     STDMETHOD_(ULONG,Release) (THIS) PURE;
    529     STDMETHOD(GetSearchUrl)(THIS_ BSTR *pbstrSearchUrl) PURE;
    530     STDMETHOD(GetSearchText)(THIS_ BSTR *pbstrSearchText) PURE;
    531     STDMETHOD(GetSearchStyle)(THIS_ DWORD *pdwSearchStyle) PURE;
    532   };
    533 
    534 #undef INTERFACE
    535 #define INTERFACE IURLSearchHook2
    536   DECLARE_INTERFACE_(IURLSearchHook2,IURLSearchHook) {
    537     STDMETHOD(TranslateWithSearchContext)(THIS_ LPWSTR lpwszSearchURL,DWORD cchBufferSize,ISearchContext *pSearchContext) PURE;
    538   };
    539 
    540 #undef INTERFACE
    541 #define INTERFACE INewShortcutHookA
    542 
    543   DECLARE_INTERFACE_(INewShortcutHookA,IUnknown) {
    544     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    545     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    546     STDMETHOD_(ULONG,Release) (THIS) PURE;
    547     STDMETHOD(SetReferent)(THIS_ LPCSTR pcszReferent,HWND hwnd) PURE;
    548     STDMETHOD(GetReferent)(THIS_ LPSTR pszReferent,int cchReferent) PURE;
    549     STDMETHOD(SetFolder)(THIS_ LPCSTR pcszFolder) PURE;
    550     STDMETHOD(GetFolder)(THIS_ LPSTR pszFolder,int cchFolder) PURE;
    551     STDMETHOD(GetName)(THIS_ LPSTR pszName,int cchName) PURE;
    552     STDMETHOD(GetExtension)(THIS_ LPSTR pszExtension,int cchExtension) PURE;
    553   };
    554 
    555 #undef INTERFACE
    556 #define INTERFACE INewShortcutHookW
    557   DECLARE_INTERFACE_(INewShortcutHookW,IUnknown) {
    558     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    559     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    560     STDMETHOD_(ULONG,Release) (THIS) PURE;
    561     STDMETHOD(SetReferent)(THIS_ LPCWSTR pcszReferent,HWND hwnd) PURE;
    562     STDMETHOD(GetReferent)(THIS_ LPWSTR pszReferent,int cchReferent) PURE;
    563     STDMETHOD(SetFolder)(THIS_ LPCWSTR pcszFolder) PURE;
    564     STDMETHOD(GetFolder)(THIS_ LPWSTR pszFolder,int cchFolder) PURE;
    565     STDMETHOD(GetName)(THIS_ LPWSTR pszName,int cchName) PURE;
    566     STDMETHOD(GetExtension)(THIS_ LPWSTR pszExtension,int cchExtension) PURE;
    567   };
    568 
    569 #define INewShortcutHook __MINGW_NAME_AW(INewShortcutHook)
    570 
    571 #define INewShortcutHookVtbl __MINGW_NAME_AW_EXT(INewShortcutHook,Vtbl)
    572 
    573 #ifndef FO_MOVE
    574 
    575 #define FO_MOVE 0x0001
    576 #define FO_COPY 0x0002
    577 #define FO_DELETE 0x0003
    578 #define FO_RENAME 0x0004
    579 
    580 #define FOF_MULTIDESTFILES 0x0001
    581 #define FOF_CONFIRMMOUSE 0x0002
    582 #define FOF_SILENT 0x0004
    583 #define FOF_RENAMEONCOLLISION 0x0008
    584 #define FOF_NOCONFIRMATION 0x0010
    585 #define FOF_WANTMAPPINGHANDLE 0x0020
    586 
    587 #define FOF_ALLOWUNDO 0x0040
    588 #define FOF_FILESONLY 0x0080
    589 #define FOF_SIMPLEPROGRESS 0x0100
    590 #define FOF_NOCONFIRMMKDIR 0x0200
    591 #define FOF_NOERRORUI 0x0400
    592 #define FOF_NOCOPYSECURITYATTRIBS 0x0800
    593 #define FOF_NORECURSION 0x1000
    594 #define FOF_NO_CONNECTED_ELEMENTS 0x2000
    595 #define FOF_WANTNUKEWARNING 0x4000
    596 #define FOF_NORECURSEREPARSE 0x8000
    597 
    598   typedef WORD FILEOP_FLAGS;
    599 
    600 #define PO_DELETE 0x0013
    601 #define PO_RENAME 0x0014
    602 #define PO_PORTCHANGE 0x0020
    603 
    604 #define PO_REN_PORT 0x0034
    605 
    606   typedef UINT PRINTEROP_FLAGS;
    607 #endif
    608 
    609 #undef INTERFACE
    610 #define INTERFACE ICopyHookA
    611   DECLARE_INTERFACE_(ICopyHookA,IUnknown) {
    612     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    613     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    614     STDMETHOD_(ULONG,Release) (THIS) PURE;
    615     STDMETHOD_(UINT,CopyCallback) (THIS_ HWND hwnd,UINT wFunc,UINT wFlags,LPCSTR pszSrcFile,DWORD dwSrcAttribs,LPCSTR pszDestFile,DWORD dwDestAttribs) PURE;
    616   };
    617 
    618   typedef ICopyHookA *LPCOPYHOOKA;
    619 
    620 #undef INTERFACE
    621 #define INTERFACE ICopyHookW
    622   DECLARE_INTERFACE_(ICopyHookW,IUnknown) {
    623     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    624     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    625     STDMETHOD_(ULONG,Release) (THIS) PURE;
    626     STDMETHOD_(UINT,CopyCallback) (THIS_ HWND hwnd,UINT wFunc,UINT wFlags,LPCWSTR pszSrcFile,DWORD dwSrcAttribs,LPCWSTR pszDestFile,DWORD dwDestAttribs) PURE;
    627   };
    628 
    629   typedef ICopyHookW *LPCOPYHOOKW;
    630 
    631 #define ICopyHook __MINGW_NAME_AW(ICopyHook)
    632 #define LPCOPYHOOK __MINGW_NAME_AW(LPCOPYHOOK)
    633 
    634 #define ICopyHookVtbl __MINGW_NAME_AW_EXT(ICopyHook,Vtbl)
    635 
    636 #undef INTERFACE
    637 #define INTERFACE IFileViewerSite
    638   DECLARE_INTERFACE_(IFileViewerSite,IUnknown) {
    639     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    640     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    641     STDMETHOD_(ULONG,Release) (THIS) PURE;
    642     STDMETHOD(SetPinnedWindow) (THIS_ HWND hwnd) PURE;
    643     STDMETHOD(GetPinnedWindow) (THIS_ HWND *phwnd) PURE;
    644   };
    645 
    646   typedef IFileViewerSite *LPFILEVIEWERSITE;
    647 
    648 #include <pshpack8.h>
    649 
    650   typedef struct {
    651     DWORD cbSize;
    652     HWND hwndOwner;
    653     int iShow;
    654     DWORD dwFlags;
    655     RECT rect;
    656     IUnknown *punkRel;
    657     OLECHAR strNewFile[MAX_PATH];
    658   } FVSHOWINFO,*LPFVSHOWINFO;
    659 
    660 #include <poppack.h>
    661 
    662 #define FVSIF_RECT 0x00000001
    663 #define FVSIF_PINNED 0x00000002
    664 
    665 #define FVSIF_NEWFAILED 0x08000000
    666 
    667 #define FVSIF_NEWFILE 0x80000000
    668 #define FVSIF_CANVIEWIT 0x40000000
    669 
    670 #undef INTERFACE
    671 #define INTERFACE IFileViewerA
    672   DECLARE_INTERFACE(IFileViewerA) {
    673     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    674     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    675     STDMETHOD_(ULONG,Release) (THIS) PURE;
    676     STDMETHOD(ShowInitialize) (THIS_ LPFILEVIEWERSITE lpfsi) PURE;
    677     STDMETHOD(Show) (THIS_ LPFVSHOWINFO pvsi) PURE;
    678     STDMETHOD(PrintTo) (THIS_ LPSTR pszDriver,WINBOOL fSuppressUI) PURE;
    679   };
    680 
    681   typedef IFileViewerA *LPFILEVIEWERA;
    682 
    683 #undef INTERFACE
    684 #define INTERFACE IFileViewerW
    685   DECLARE_INTERFACE(IFileViewerW) {
    686     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    687     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    688     STDMETHOD_(ULONG,Release) (THIS) PURE;
    689     STDMETHOD(ShowInitialize) (THIS_ LPFILEVIEWERSITE lpfsi) PURE;
    690     STDMETHOD(Show) (THIS_ LPFVSHOWINFO pvsi) PURE;
    691     STDMETHOD(PrintTo) (THIS_ LPWSTR pszDriver,WINBOOL fSuppressUI) PURE;
    692   };
    693 
    694   typedef IFileViewerW *LPFILEVIEWERW;
    695 
    696 #define IFileViewer __MINGW_NAME_AW(IFileViewer)
    697 #define LPFILEVIEWER __MINGW_NAME_AW(LPFILEVIEWER)
    698 
    699 #define FCIDM_SHVIEWFIRST 0x0000
    700 #define FCIDM_SHVIEWLAST 0x7fff
    701 #define FCIDM_BROWSERFIRST 0xa000
    702 #define FCIDM_BROWSERLAST 0xbf00
    703 #define FCIDM_GLOBALFIRST 0x8000
    704 #define FCIDM_GLOBALLAST 0x9fff
    705 
    706 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
    707 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
    708 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
    709 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
    710 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
    711 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
    712 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
    713 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
    714 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
    715 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
    716 
    717 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
    718 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
    719 
    720 #define IDC_OFFLINE_HAND 103
    721 
    722 #define PANE_NONE -1
    723 #define PANE_ZONE 1
    724 #define PANE_OFFLINE 2
    725 #define PANE_PRINTER 3
    726 #define PANE_SSL 4
    727 #define PANE_NAVIGATION 5
    728 #define PANE_PROGRESS 6
    729 #define PANE_PRIVACY 7
    730 
    731 #define CDBOSC_SETFOCUS 0x00000000
    732 #define CDBOSC_KILLFOCUS 0x00000001
    733 #define CDBOSC_SELCHANGE 0x00000002
    734 #define CDBOSC_RENAME 0x00000003
    735 #define CDBOSC_STATECHANGE 0x00000004
    736 
    737 #undef INTERFACE
    738 #define INTERFACE ICommDlgBrowser
    739   DECLARE_INTERFACE_(ICommDlgBrowser,IUnknown) {
    740     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    741     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    742     STDMETHOD_(ULONG,Release) (THIS) PURE;
    743     STDMETHOD(OnDefaultCommand) (THIS_ struct IShellView *ppshv) PURE;
    744     STDMETHOD(OnStateChange) (THIS_ struct IShellView *ppshv,ULONG uChange) PURE;
    745     STDMETHOD(IncludeObject) (THIS_ struct IShellView *ppshv,LPCITEMIDLIST pidl) PURE;
    746   };
    747 
    748   typedef ICommDlgBrowser *LPCOMMDLGBROWSER;
    749 
    750 #define CDB2N_CONTEXTMENU_DONE 0x00000001
    751 #define CDB2N_CONTEXTMENU_START 0x00000002
    752 
    753 #define CDB2GVF_SHOWALLFILES 0x00000001
    754 
    755 #undef INTERFACE
    756 #define INTERFACE ICommDlgBrowser2
    757   DECLARE_INTERFACE_(ICommDlgBrowser2,IUnknown) {
    758     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
    759     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    760     STDMETHOD_(ULONG,Release) (THIS) PURE;
    761     STDMETHOD(OnDefaultCommand) (THIS_ struct IShellView *ppshv) PURE;
    762     STDMETHOD(OnStateChange) (THIS_ struct IShellView *ppshv,ULONG uChange) PURE;
    763     STDMETHOD(IncludeObject) (THIS_ struct IShellView *ppshv,LPCITEMIDLIST pidl) PURE;
    764     STDMETHOD(Notify) (THIS_ struct IShellView *ppshv,DWORD dwNotifyType) PURE;
    765     STDMETHOD(GetDefaultMenuText) (THIS_ struct IShellView *ppshv,WCHAR *pszText,INT cchMax) PURE;
    766     STDMETHOD(GetViewFlags)(THIS_ DWORD *pdwFlags) PURE;
    767   };
    768 
    769   typedef ICommDlgBrowser2 *LPCOMMDLGBROWSER2;
    770 
    771 #define SHGetPathFromIDList __MINGW_NAME_AW(SHGetPathFromIDList)
    772 #define SHCreateDirectoryEx __MINGW_NAME_AW(SHCreateDirectoryEx)
    773 
    774   SHSTDAPI_(WINBOOL) SHGetPathFromIDListA(LPCITEMIDLIST pidl,LPSTR pszPath);
    775   SHSTDAPI_(WINBOOL) SHGetPathFromIDListW(LPCITEMIDLIST pidl,LPWSTR pszPath);
    776   SHSTDAPI_(int) SHCreateDirectory(HWND hwnd,LPCWSTR pszPath);
    777   SHSTDAPI_(int) SHCreateDirectoryExA(HWND hwnd,LPCSTR pszPath,SECURITY_ATTRIBUTES *psa);
    778   SHSTDAPI_(int) SHCreateDirectoryExW(HWND hwnd,LPCWSTR pszPath,SECURITY_ATTRIBUTES *psa);
    779   SHSTDAPI SHOpenFolderAndSelectItems(LPCITEMIDLIST pidlFolder,UINT cidl,LPCITEMIDLIST *apidl,DWORD dwFlags);
    780   SHSTDAPI SHCreateShellItem(LPCITEMIDLIST pidlParent,IShellFolder *psfParent,LPCITEMIDLIST pidl,IShellItem **ppsi);
    781 
    782 #define REGSTR_PATH_SPECIAL_FOLDERS REGSTR_PATH_EXPLORER TEXT("\\Shell Folders")
    783 
    784 #define CSIDL_DESKTOP 0x0000
    785 #define CSIDL_INTERNET 0x0001
    786 #define CSIDL_PROGRAMS 0x0002
    787 #define CSIDL_CONTROLS 0x0003
    788 #define CSIDL_PRINTERS 0x0004
    789 #define CSIDL_PERSONAL 0x0005
    790 #define CSIDL_FAVORITES 0x0006
    791 #define CSIDL_STARTUP 0x0007
    792 #define CSIDL_RECENT 0x0008
    793 #define CSIDL_SENDTO 0x0009
    794 #define CSIDL_BITBUCKET 0x000a
    795 #define CSIDL_STARTMENU 0x000b
    796 #define CSIDL_MYDOCUMENTS 0x000c
    797 #define CSIDL_MYMUSIC 0x000d
    798 #define CSIDL_MYVIDEO 0x000e
    799 #define CSIDL_DESKTOPDIRECTORY 0x0010
    800 #define CSIDL_DRIVES 0x0011
    801 #define CSIDL_NETWORK 0x0012
    802 #define CSIDL_NETHOOD 0x0013
    803 #define CSIDL_FONTS 0x0014
    804 #define CSIDL_TEMPLATES 0x0015
    805 #define CSIDL_COMMON_STARTMENU 0x0016
    806 #define CSIDL_COMMON_PROGRAMS 0X0017
    807 #define CSIDL_COMMON_STARTUP 0x0018
    808 #define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019
    809 #define CSIDL_APPDATA 0x001a
    810 #define CSIDL_PRINTHOOD 0x001b
    811 
    812 #ifndef CSIDL_LOCAL_APPDATA
    813 #define CSIDL_LOCAL_APPDATA 0x001c
    814 #endif
    815 
    816 #define CSIDL_ALTSTARTUP 0x001d
    817 #define CSIDL_COMMON_ALTSTARTUP 0x001e
    818 #define CSIDL_COMMON_FAVORITES 0x001f
    819 
    820 #ifndef _SHFOLDER_H_
    821 #define CSIDL_INTERNET_CACHE 0x0020
    822 #define CSIDL_COOKIES 0x0021
    823 #define CSIDL_HISTORY 0x0022
    824 #define CSIDL_COMMON_APPDATA 0x0023
    825 #define CSIDL_WINDOWS 0x0024
    826 #define CSIDL_SYSTEM 0x0025
    827 #define CSIDL_PROGRAM_FILES 0x0026
    828 #define CSIDL_MYPICTURES 0x0027
    829 #endif
    830 
    831 #define CSIDL_PROFILE 0x0028
    832 #define CSIDL_SYSTEMX86 0x0029
    833 #define CSIDL_PROGRAM_FILESX86 0x002a
    834 
    835 #ifndef _SHFOLDER_H_
    836 #define CSIDL_PROGRAM_FILES_COMMON 0x002b
    837 #endif
    838 
    839 #define CSIDL_PROGRAM_FILES_COMMONX86 0x002c
    840 #define CSIDL_COMMON_TEMPLATES 0x002d
    841 
    842 #ifndef _SHFOLDER_H_
    843 #define CSIDL_COMMON_DOCUMENTS 0x002e
    844 #define CSIDL_COMMON_ADMINTOOLS 0x002f
    845 #define CSIDL_ADMINTOOLS 0x0030
    846 #endif
    847 
    848 #define CSIDL_CONNECTIONS 0x0031
    849 #define CSIDL_COMMON_MUSIC 0x0035
    850 #define CSIDL_COMMON_PICTURES 0x0036
    851 #define CSIDL_COMMON_VIDEO 0x0037
    852 #define CSIDL_RESOURCES 0x0038
    853 
    854 #ifndef _SHFOLDER_H_
    855 #define CSIDL_RESOURCES_LOCALIZED 0x0039
    856 #endif
    857 
    858 #define CSIDL_COMMON_OEM_LINKS 0x003a
    859 #define CSIDL_CDBURN_AREA 0x003b
    860 
    861 #define CSIDL_COMPUTERSNEARME 0x003d
    862 
    863 #ifndef _SHFOLDER_H_
    864 #define CSIDL_FLAG_CREATE 0x8000
    865 #endif
    866 
    867 #define CSIDL_FLAG_DONT_VERIFY 0x4000
    868 #define CSIDL_FLAG_NO_ALIAS 0x1000
    869 #define CSIDL_FLAG_PER_USER_INIT 0x0800
    870 #define CSIDL_FLAG_MASK 0xFF00
    871 
    872 #define SHGetSpecialFolderPath __MINGW_NAME_AW(SHGetSpecialFolderPath)
    873 #define SHGetFolderPath __MINGW_NAME_AW(SHGetFolderPath)
    874 #define SHGetFolderPathAndSubDir __MINGW_NAME_AW(SHGetFolderPathAndSubDir)
    875 
    876   SHSTDAPI SHGetSpecialFolderLocation(HWND hwnd,int csidl,LPITEMIDLIST *ppidl);
    877   SHSTDAPI_(void) SHFlushSFCache(void);
    878   SHSTDAPI_(LPITEMIDLIST) SHCloneSpecialIDList(HWND hwnd,int csidl,WINBOOL fCreate);
    879   SHSTDAPI_(WINBOOL) SHGetSpecialFolderPathA(HWND hwnd,LPSTR pszPath,int csidl,WINBOOL fCreate);
    880   SHSTDAPI_(WINBOOL) SHGetSpecialFolderPathW(HWND hwnd,LPWSTR pszPath,int csidl,WINBOOL fCreate);
    881 
    882   typedef enum {
    883     SHGFP_TYPE_CURRENT = 0,SHGFP_TYPE_DEFAULT = 1
    884   } SHGFP_TYPE;
    885 
    886   SHFOLDERAPI SHGetFolderPathA(HWND hwnd,int csidl,HANDLE hToken,DWORD dwFlags,LPSTR pszPath);
    887   SHFOLDERAPI SHGetFolderPathW(HWND hwnd,int csidl,HANDLE hToken,DWORD dwFlags,LPWSTR pszPath);
    888   SHSTDAPI SHGetFolderLocation(HWND hwnd,int csidl,HANDLE hToken,DWORD dwFlags,LPITEMIDLIST *ppidl);
    889   SHFOLDERAPI SHGetFolderPathAndSubDirA(HWND hwnd,int csidl,HANDLE hToken,DWORD dwFlags,LPCSTR pszSubDir,LPSTR pszPath);
    890   SHFOLDERAPI SHGetFolderPathAndSubDirW(HWND hwnd,int csidl,HANDLE hToken,DWORD dwFlags,LPCWSTR pszSubDir,LPWSTR pszPath);
    891 
    892 #define FCS_READ 0x00000001
    893 #define FCS_FORCEWRITE 0x00000002
    894 #define FCS_WRITE (FCS_READ | FCS_FORCEWRITE)
    895 #define FCS_FLAG_DRAGDROP 2
    896 
    897 #define FCSM_VIEWID 0x00000001
    898 #define FCSM_WEBVIEWTEMPLATE 0x00000002
    899 #define FCSM_INFOTIP 0x00000004
    900 #define FCSM_CLSID 0x00000008
    901 #define FCSM_ICONFILE 0x00000010
    902 #define FCSM_LOGO 0x00000020
    903 #define FCSM_FLAGS 0x00000040
    904 
    905 #include <pshpack8.h>
    906 
    907   typedef struct {
    908     DWORD dwSize;
    909     DWORD dwMask;
    910     SHELLVIEWID *pvid;
    911     LPSTR pszWebViewTemplate;
    912     DWORD cchWebViewTemplate;
    913     LPSTR pszWebViewTemplateVersion;
    914     LPSTR pszInfoTip;
    915     DWORD cchInfoTip;
    916     CLSID *pclsid;
    917     DWORD dwFlags;
    918     LPSTR pszIconFile;
    919     DWORD cchIconFile;
    920     int iIconIndex;
    921     LPSTR pszLogo;
    922     DWORD cchLogo;
    923   } SHFOLDERCUSTOMSETTINGSA,*LPSHFOLDERCUSTOMSETTINGSA;
    924 
    925   typedef struct {
    926     DWORD dwSize;
    927     DWORD dwMask;
    928     SHELLVIEWID *pvid;
    929     LPWSTR pszWebViewTemplate;
    930     DWORD cchWebViewTemplate;
    931     LPWSTR pszWebViewTemplateVersion;
    932     LPWSTR pszInfoTip;
    933     DWORD cchInfoTip;
    934     CLSID *pclsid;
    935     DWORD dwFlags;
    936     LPWSTR pszIconFile;
    937     DWORD cchIconFile;
    938     int iIconIndex;
    939     LPWSTR pszLogo;
    940     DWORD cchLogo;
    941   } SHFOLDERCUSTOMSETTINGSW,*LPSHFOLDERCUSTOMSETTINGSW;
    942 
    943 #include <poppack.h>
    944 
    945 #define SHFOLDERCUSTOMSETTINGS __MINGW_NAME_AW(SHFOLDERCUSTOMSETTINGS)
    946 #define SHGetSetFolderCustomSettings __MINGW_NAME_AW(SHGetSetFolderCustomSettings)
    947 #define LPSHFOLDERCUSTOMSETTINGS __MINGW_NAME_AW(LPSHFOLDERCUSTOMSETTINGS)
    948 
    949   SHSTDAPI SHGetSetFolderCustomSettingsA(LPSHFOLDERCUSTOMSETTINGSA pfcs,LPCSTR pszPath,DWORD dwReadWrite);
    950   SHSTDAPI SHGetSetFolderCustomSettingsW(LPSHFOLDERCUSTOMSETTINGSW pfcs,LPCWSTR pszPath,DWORD dwReadWrite);
    951 
    952   typedef int (CALLBACK *BFFCALLBACK)(HWND hwnd,UINT uMsg,LPARAM lParam,LPARAM lpData);
    953 
    954 #include <pshpack8.h>
    955 
    956   typedef struct _browseinfoA {
    957     HWND hwndOwner;
    958     LPCITEMIDLIST pidlRoot;
    959     LPSTR pszDisplayName;
    960     LPCSTR lpszTitle;
    961     UINT ulFlags;
    962     BFFCALLBACK lpfn;
    963     LPARAM lParam;
    964     int iImage;
    965   } BROWSEINFOA,*PBROWSEINFOA,*LPBROWSEINFOA;
    966 
    967   typedef struct _browseinfoW {
    968     HWND hwndOwner;
    969     LPCITEMIDLIST pidlRoot;
    970     LPWSTR pszDisplayName;
    971     LPCWSTR lpszTitle;
    972     UINT ulFlags;
    973     BFFCALLBACK lpfn;
    974     LPARAM lParam;
    975     int iImage;
    976   } BROWSEINFOW,*PBROWSEINFOW,*LPBROWSEINFOW;
    977 
    978 #include <poppack.h>
    979 
    980 #define BROWSEINFO __MINGW_NAME_AW(BROWSEINFO)
    981 #define PBROWSEINFO __MINGW_NAME_AW(PBROWSEINFO)
    982 #define LPBROWSEINFO __MINGW_NAME_AW(LPBROWSEINFO)
    983 
    984 #define BIF_RETURNONLYFSDIRS 0x0001
    985 #define BIF_DONTGOBELOWDOMAIN 0x0002
    986 #define BIF_STATUSTEXT 0x0004
    987 
    988 #define BIF_RETURNFSANCESTORS 0x0008
    989 #define BIF_EDITBOX 0x0010
    990 #define BIF_VALIDATE 0x0020
    991 
    992 #define BIF_NEWDIALOGSTYLE 0x0040
    993 
    994 #define BIF_USENEWUI (BIF_NEWDIALOGSTYLE | BIF_EDITBOX)
    995 
    996 #define BIF_BROWSEINCLUDEURLS 0x0080
    997 #define BIF_UAHINT 0x0100
    998 #define BIF_NONEWFOLDERBUTTON 0x0200
    999 #define BIF_NOTRANSLATETARGETS 0x0400
   1000 
   1001 #define BIF_BROWSEFORCOMPUTER 0x1000
   1002 #define BIF_BROWSEFORPRINTER 0x2000
   1003 #define BIF_BROWSEINCLUDEFILES 0x4000
   1004 #define BIF_SHAREABLE 0x8000
   1005 
   1006 #define BFFM_INITIALIZED 1
   1007 #define BFFM_SELCHANGED 2
   1008 #define BFFM_VALIDATEFAILEDA 3
   1009 #define BFFM_VALIDATEFAILEDW 4
   1010 #define BFFM_IUNKNOWN 5
   1011 
   1012 #define BFFM_SETSTATUSTEXTA (WM_USER + 100)
   1013 #define BFFM_ENABLEOK (WM_USER + 101)
   1014 #define BFFM_SETSELECTIONA (WM_USER + 102)
   1015 #define BFFM_SETSELECTIONW (WM_USER + 103)
   1016 #define BFFM_SETSTATUSTEXTW (WM_USER + 104)
   1017 #define BFFM_SETOKTEXT (WM_USER + 105)
   1018 #define BFFM_SETEXPANDED (WM_USER + 106)
   1019 
   1020   SHSTDAPI_(LPITEMIDLIST) SHBrowseForFolderA(LPBROWSEINFOA lpbi);
   1021   SHSTDAPI_(LPITEMIDLIST) SHBrowseForFolderW(LPBROWSEINFOW lpbi);
   1022 
   1023 #define SHBrowseForFolder __MINGW_NAME_AW(SHBrowseForFolder)
   1024 #define BFFM_SETSTATUSTEXT __MINGW_NAME_AW(BFFM_SETSTATUSTEXT)
   1025 #define BFFM_SETSELECTION __MINGW_NAME_AW(BFFM_SETSELECTION)
   1026 #define BFFM_VALIDATEFAILED __MINGW_NAME_AW(BFFM_VALIDATEFAILED)
   1027 
   1028   SHSTDAPI SHLoadInProc(REFCLSID rclsid);
   1029 
   1030   SHSTDAPI SHEnableServiceObject(REFCLSID rclsid,WINBOOL fEnable);
   1031 
   1032   enum {
   1033     ISHCUTCMDID_DOWNLOADICON = 0,ISHCUTCMDID_INTSHORTCUTCREATE = 1
   1034   };
   1035 #define CMDID_INTSHORTCUTCREATE ISHCUTCMDID_INTSHORTCUTCREATE
   1036 
   1037   SHSTDAPI SHGetDesktopFolder(IShellFolder **ppshf);
   1038 
   1039 #define STR_FILE_SYS_BIND_DATA L"File System Bind Data"
   1040 
   1041 #undef INTERFACE
   1042 #define INTERFACE IFileSystemBindData
   1043   DECLARE_INTERFACE_(IFileSystemBindData,IUnknown) {
   1044     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1045     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1046     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1047     STDMETHOD(SetFindData)(THIS_ const WIN32_FIND_DATAW *pfd) PURE;
   1048     STDMETHOD(GetFindData)(THIS_ WIN32_FIND_DATAW *pfd) PURE;
   1049   };
   1050 
   1051 #undef INTERFACE
   1052 #define INTERFACE IShellDetails
   1053   DECLARE_INTERFACE_(IShellDetails,IUnknown) {
   1054     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1055     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1056     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1057     STDMETHOD(GetDetailsOf)(THIS_ LPCITEMIDLIST pidl,UINT iColumn,SHELLDETAILS *pDetails) PURE;
   1058     STDMETHOD(ColumnClick)(THIS_ UINT iColumn) PURE;
   1059   };
   1060 
   1061 #undef INTERFACE
   1062 #define INTERFACE IObjMgr
   1063 
   1064   DECLARE_INTERFACE_(IObjMgr,IUnknown) {
   1065     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1066     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1067     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1068     STDMETHOD(Append) (THIS_ IUnknown *punk) PURE;
   1069     STDMETHOD(Remove) (THIS_ IUnknown *punk) PURE;
   1070   };
   1071 
   1072 #undef INTERFACE
   1073 #define INTERFACE ICurrentWorkingDirectory
   1074   DECLARE_INTERFACE_(ICurrentWorkingDirectory,IUnknown) {
   1075     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1076     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1077     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1078     STDMETHOD(GetDirectory) (THIS_ LPWSTR pwzPath,DWORD cchSize) PURE;
   1079     STDMETHOD(SetDirectory) (THIS_ LPCWSTR pwzPath) PURE;
   1080   };
   1081 
   1082 #undef INTERFACE
   1083 #define INTERFACE IACList
   1084   DECLARE_INTERFACE_(IACList,IUnknown) {
   1085     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1086     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1087     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1088     STDMETHOD(Expand) (THIS_ LPCOLESTR pszExpand) PURE;
   1089   };
   1090 
   1091 #undef INTERFACE
   1092 #define INTERFACE IACList2
   1093   typedef enum _tagAUTOCOMPLETELISTOPTIONS {
   1094     ACLO_NONE = 0,ACLO_CURRENTDIR = 1,ACLO_MYCOMPUTER = 2,ACLO_DESKTOP = 4,ACLO_FAVORITES = 8,ACLO_FILESYSONLY = 16,ACLO_FILESYSDIRS = 32
   1095   } AUTOCOMPLETELISTOPTIONS;
   1096 
   1097   DECLARE_INTERFACE_(IACList2,IACList) {
   1098     STDMETHOD(SetOptions)(THIS_ DWORD dwFlag) PURE;
   1099     STDMETHOD(GetOptions)(THIS_ DWORD *pdwFlag) PURE;
   1100   };
   1101 
   1102 #define PROGDLG_NORMAL 0x00000000
   1103 #define PROGDLG_MODAL 0x00000001
   1104 #define PROGDLG_AUTOTIME 0x00000002
   1105 #define PROGDLG_NOTIME 0x00000004
   1106 #define PROGDLG_NOMINIMIZE 0x00000008
   1107 #define PROGDLG_NOPROGRESSBAR 0x00000010
   1108 
   1109 #define PDTIMER_RESET 0x00000001
   1110 
   1111 #undef INTERFACE
   1112 #define INTERFACE IProgressDialog
   1113   DECLARE_INTERFACE_(IProgressDialog,IUnknown) {
   1114     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1115     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1116     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1117     STDMETHOD(StartProgressDialog)(THIS_ HWND hwndParent,IUnknown *punkEnableModless,DWORD dwFlags,LPCVOID pvResevered) PURE;
   1118     STDMETHOD(StopProgressDialog)(THIS) PURE;
   1119     STDMETHOD(SetTitle)(THIS_ LPCWSTR pwzTitle) PURE;
   1120     STDMETHOD(SetAnimation)(THIS_ HINSTANCE hInstAnimation,UINT idAnimation) PURE;
   1121     STDMETHOD_(WINBOOL,HasUserCancelled) (THIS) PURE;
   1122     STDMETHOD(SetProgress)(THIS_ DWORD dwCompleted,DWORD dwTotal) PURE;
   1123     STDMETHOD(SetProgress64)(THIS_ ULONGLONG ullCompleted,ULONGLONG ullTotal) PURE;
   1124     STDMETHOD(SetLine)(THIS_ DWORD dwLineNum,LPCWSTR pwzString,WINBOOL fCompactPath,LPCVOID pvResevered) PURE;
   1125     STDMETHOD(SetCancelMsg)(THIS_ LPCWSTR pwzCancelMsg,LPCVOID pvResevered) PURE;
   1126     STDMETHOD(Timer)(THIS_ DWORD dwTimerAction,LPCVOID pvResevered) PURE;
   1127   };
   1128 
   1129 #undef INTERFACE
   1130 #define INTERFACE IInputObjectSite
   1131   DECLARE_INTERFACE_(IInputObjectSite,IUnknown) {
   1132     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1133     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1134     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1135     STDMETHOD(OnFocusChangeIS)(THIS_ IUnknown *punkObj,WINBOOL fSetFocus) PURE;
   1136   };
   1137 
   1138 #undef INTERFACE
   1139 #define INTERFACE IInputObject
   1140   DECLARE_INTERFACE_(IInputObject,IUnknown) {
   1141     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1142     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1143     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1144     STDMETHOD(UIActivateIO)(THIS_ WINBOOL fActivate,LPMSG lpMsg) PURE;
   1145     STDMETHOD(HasFocusIO)(THIS) PURE;
   1146     STDMETHOD(TranslateAcceleratorIO)(THIS_ LPMSG lpMsg) PURE;
   1147   };
   1148 
   1149 #undef INTERFACE
   1150 #define INTERFACE IDockingWindowSite
   1151   DECLARE_INTERFACE_(IDockingWindowSite,IOleWindow) {
   1152     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1153     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1154     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1155     STDMETHOD(GetWindow) (THIS_ HWND *lphwnd) PURE;
   1156     STDMETHOD(ContextSensitiveHelp) (THIS_ WINBOOL fEnterMode) PURE;
   1157     STDMETHOD(GetBorderDW) (THIS_ IUnknown *punkObj,LPRECT prcBorder) PURE;
   1158     STDMETHOD(RequestBorderSpaceDW) (THIS_ IUnknown *punkObj,LPCBORDERWIDTHS pbw) PURE;
   1159     STDMETHOD(SetBorderSpaceDW) (THIS_ IUnknown *punkObj,LPCBORDERWIDTHS pbw) PURE;
   1160   };
   1161 
   1162 #define DWFRF_NORMAL 0x0000
   1163 #define DWFRF_DELETECONFIGDATA 0x0001
   1164 
   1165 #define DWFAF_HIDDEN 0x0001
   1166 
   1167 #undef INTERFACE
   1168 #define INTERFACE IDockingWindowFrame
   1169   DECLARE_INTERFACE_(IDockingWindowFrame,IOleWindow) {
   1170     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1171     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1172     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1173     STDMETHOD(GetWindow) (THIS_ HWND *lphwnd) PURE;
   1174     STDMETHOD(ContextSensitiveHelp) (THIS_ WINBOOL fEnterMode) PURE;
   1175     STDMETHOD(AddToolbar) (THIS_ IUnknown *punkSrc,LPCWSTR pwszItem,DWORD dwAddFlags) PURE;
   1176     STDMETHOD(RemoveToolbar) (THIS_ IUnknown *punkSrc,DWORD dwRemoveFlags) PURE;
   1177     STDMETHOD(FindToolbar) (THIS_ LPCWSTR pwszItem,REFIID riid,void **ppv) PURE;
   1178   };
   1179 
   1180 #define IRTIR_TASK_NOT_RUNNING 0
   1181 #define IRTIR_TASK_RUNNING 1
   1182 #define IRTIR_TASK_SUSPENDED 2
   1183 #define IRTIR_TASK_PENDING 3
   1184 #define IRTIR_TASK_FINISHED 4
   1185 
   1186 #undef INTERFACE
   1187 #define INTERFACE IRunnableTask
   1188 
   1189   DECLARE_INTERFACE_(IRunnableTask,IUnknown) {
   1190     STDMETHOD (QueryInterface)(THIS_ REFIID riid,void **ppv) PURE;
   1191     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1192     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1193     STDMETHOD (Run)(THIS) PURE;
   1194     STDMETHOD (Kill)(THIS_ WINBOOL fWait) PURE;
   1195     STDMETHOD (Suspend)(THIS) PURE;
   1196     STDMETHOD (Resume)(THIS) PURE;
   1197     STDMETHOD_(ULONG,IsRunning)(THIS) PURE;
   1198   };
   1199 
   1200   typedef IRunnableTask *LPRUNNABLETASK;
   1201 
   1202 #define TASKOWNERID GUID
   1203 #define REFTASKOWNERID REFGUID
   1204 
   1205 #define ITSSFLAG_COMPLETE_ON_DESTROY 0x0000
   1206 #define ITSSFLAG_KILL_ON_DESTROY 0x0001
   1207 #define ITSSFLAG_SUPPORTS_TERMINATE 0x0002
   1208 #define ITSSFLAG_FLAGS_MASK 0x0003
   1209 #define ITSSFLAG_THREAD_TERMINATE_TIMEOUT 0x0010
   1210 #define ITSSFLAG_THREAD_POOL_TIMEOUT 0x0020
   1211 #define ITSS_THREAD_DESTROY_DEFAULT_TIMEOUT (60*1000)
   1212 #define ITSS_THREAD_TERMINATE_TIMEOUT (INFINITE)
   1213 #define ITSS_THREAD_TIMEOUT_NO_CHANGE (INFINITE - 1)
   1214 
   1215 #define ITSAT_DEFAULT_LPARAM 0xffffffff
   1216 #define ITSAT_DEFAULT_PRIORITY 0x10000000
   1217 #define ITSAT_MAX_PRIORITY 0x7fffffff
   1218 #define ITSAT_MIN_PRIORITY 0x00000000
   1219 
   1220 #define TOID_NULL CLSID_NULL
   1221 
   1222 #undef INTERFACE
   1223 #define INTERFACE IShellTaskScheduler
   1224   DECLARE_INTERFACE_(IShellTaskScheduler,IUnknown) {
   1225     STDMETHOD (QueryInterface)(THIS_ REFIID riid,void **ppv) PURE;
   1226     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1227     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1228     STDMETHOD (AddTask)(THIS_ IRunnableTask *pTask,REFTASKOWNERID rtoid,DWORD_PTR lParam,DWORD dwPriority) PURE;
   1229     STDMETHOD (RemoveTasks)(THIS_ REFTASKOWNERID rtoid,DWORD_PTR lParam,WINBOOL fWaitIfRunning) PURE;
   1230     STDMETHOD_(UINT,CountTasks)(THIS_ REFTASKOWNERID rtoid) PURE;
   1231     STDMETHOD (Status)(THIS_ DWORD dwReleaseStatus,DWORD dwThreadTimeout) PURE;
   1232   };
   1233 
   1234   typedef IShellTaskScheduler *LPSHELLTASKSCHEDULER;
   1235 
   1236 #define ITSSFLAG_TASK_PLACEINFRONT 0x00000001
   1237 #define ITSSFLAG_TASK_PLACEINBACK 0x00000002
   1238 
   1239 #undef INTERFACE
   1240 #define INTERFACE IShellTaskScheduler2
   1241   DECLARE_INTERFACE_(IShellTaskScheduler2,IShellTaskScheduler) {
   1242     STDMETHOD (QueryInterface)(THIS_ REFIID riid,void **ppv) PURE;
   1243     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1244     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1245     STDMETHOD (AddTask)(THIS_ IRunnableTask *pTask,REFTASKOWNERID rtoid,DWORD_PTR lParam,DWORD dwPriority) PURE;
   1246     STDMETHOD (RemoveTasks)(THIS_ REFTASKOWNERID rtoid,DWORD_PTR lParam,WINBOOL fWaitIfRunning) PURE;
   1247     STDMETHOD_(UINT,CountTasks)(THIS_ REFTASKOWNERID rtoid) PURE;
   1248     STDMETHOD (Status)(THIS_ DWORD dwReleaseStatus,DWORD dwThreadTimeout) PURE;
   1249     STDMETHOD (AddTask2)(THIS_ IRunnableTask *pTask,REFTASKOWNERID rtoid,DWORD_PTR lParam,DWORD dwPriority,DWORD grfFlags) PURE;
   1250     STDMETHOD (MoveTask)(THIS_ REFTASKOWNERID rtoid,DWORD_PTR lParam,DWORD dwPriority,DWORD grfFlags) PURE;
   1251   };
   1252 
   1253 #undef INTERFACE
   1254 #define INTERFACE IThumbnailCapture
   1255   DECLARE_INTERFACE_ (IThumbnailCapture,IUnknown) {
   1256     STDMETHOD (CaptureThumbnail) (THIS_ const SIZE *pMaxSize,IUnknown *pHTMLDoc2,HBITMAP *phbmThumbnail) PURE;
   1257   };
   1258   typedef IThumbnailCapture *LPTHUMBNAILCAPTURE;
   1259 
   1260 #include <pshpack8.h>
   1261   typedef struct _EnumImageStoreDATAtag {
   1262     WCHAR szPath[MAX_PATH];
   1263     FILETIME ftTimeStamp;
   1264   } ENUMSHELLIMAGESTOREDATA,*PENUMSHELLIMAGESTOREDATA;
   1265 
   1266 #include <poppack.h>
   1267 
   1268 #undef INTERFACE
   1269 #define INTERFACE IEnumShellImageStore
   1270   DECLARE_INTERFACE_(IEnumShellImageStore,IUnknown) {
   1271     STDMETHOD (QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1272     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1273     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1274     STDMETHOD (Reset) (THIS) PURE;
   1275     STDMETHOD (Next) (THIS_ ULONG celt,PENUMSHELLIMAGESTOREDATA *prgElt,ULONG *pceltFetched) PURE;
   1276     STDMETHOD (Skip) (THIS_ ULONG celt) PURE;
   1277     STDMETHOD (Clone) (THIS_ IEnumShellImageStore **ppEnum) PURE;
   1278   };
   1279 
   1280   typedef IEnumShellImageStore *LPENUMSHELLIMAGESTORE;
   1281 
   1282 #define SHIMSTCAPFLAG_LOCKABLE 0x0001
   1283 #define SHIMSTCAPFLAG_PURGEABLE 0x0002
   1284 
   1285 #undef INTERFACE
   1286 #define INTERFACE IShellImageStore
   1287   DECLARE_INTERFACE_(IShellImageStore,IUnknown) {
   1288     STDMETHOD (QueryInterface)(THIS_ REFIID riid,void **ppv) PURE;
   1289     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1290     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1291     STDMETHOD (Open) (THIS_ DWORD dwMode,DWORD *pdwLock) PURE;
   1292     STDMETHOD (Create) (THIS_ DWORD dwMode,DWORD *pdwLock) PURE;
   1293     STDMETHOD (ReleaseLock) (THIS_ DWORD const *pdwLock) PURE;
   1294     STDMETHOD (Close) (THIS_ DWORD const *pdwLock) PURE;
   1295     STDMETHOD (Commit) (THIS_ DWORD const *pdwLock) PURE;
   1296     STDMETHOD (IsLocked) (THIS) PURE;
   1297     STDMETHOD (GetMode) (THIS_ DWORD *pdwMode) PURE;
   1298     STDMETHOD (GetCapabilities) (THIS_ DWORD *pdwCapMask) PURE;
   1299     STDMETHOD (AddEntry) (THIS_ LPCWSTR pszName,const FILETIME *pftTimeStamp,DWORD dwMode,HBITMAP hImage) PURE;
   1300     STDMETHOD (GetEntry) (THIS_ LPCWSTR pszName,DWORD dwMode,HBITMAP *phImage) PURE;
   1301     STDMETHOD (DeleteEntry) (THIS_ LPCWSTR pszName) PURE;
   1302     STDMETHOD (IsEntryInStore) (THIS_ LPCWSTR pszName,FILETIME *pftTimeStamp) PURE;
   1303     STDMETHOD (Enum) (THIS_ LPENUMSHELLIMAGESTORE *ppEnum) PURE;
   1304   };
   1305 
   1306   typedef IShellImageStore *LPSHELLIMAGESTORE;
   1307 
   1308 #define ISFB_MASK_STATE 0x00000001
   1309 #define ISFB_MASK_BKCOLOR 0x00000002
   1310 #define ISFB_MASK_VIEWMODE 0x00000004
   1311 #define ISFB_MASK_SHELLFOLDER 0x00000008
   1312 #define ISFB_MASK_IDLIST 0x00000010
   1313 #define ISFB_MASK_COLORS 0x00000020
   1314 
   1315 #define ISFB_STATE_DEFAULT 0x00000000
   1316 #define ISFB_STATE_DEBOSSED 0x00000001
   1317 #define ISFB_STATE_ALLOWRENAME 0x00000002
   1318 #define ISFB_STATE_NOSHOWTEXT 0x00000004
   1319 #define ISFB_STATE_CHANNELBAR 0x00000010
   1320 #define ISFB_STATE_QLINKSMODE 0x00000020
   1321 #define ISFB_STATE_FULLOPEN 0x00000040
   1322 #define ISFB_STATE_NONAMESORT 0x00000080
   1323 #define ISFB_STATE_BTNMINSIZE 0x00000100
   1324 
   1325 #define ISFBVIEWMODE_SMALLICONS 0x0001
   1326 #define ISFBVIEWMODE_LARGEICONS 0x0002
   1327 #define ISFBVIEWMODE_LOGOS 0x0003
   1328 
   1329 #include <pshpack8.h>
   1330 
   1331   typedef struct {
   1332     DWORD dwMask;
   1333     DWORD dwStateMask;
   1334     DWORD dwState;
   1335     COLORREF crBkgnd;
   1336     COLORREF crBtnLt;
   1337     COLORREF crBtnDk;
   1338     WORD wViewMode;
   1339     WORD wAlign;
   1340     IShellFolder *psf;
   1341     LPITEMIDLIST pidl;
   1342   } BANDINFOSFB,*PBANDINFOSFB;
   1343 
   1344 #include <poppack.h>
   1345 
   1346 #undef INTERFACE
   1347 #define INTERFACE IShellFolderBand
   1348   DECLARE_INTERFACE_(IShellFolderBand,IUnknown) {
   1349     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1350     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1351     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1352     STDMETHOD(InitializeSFB)(THIS_ IShellFolder *psf,LPCITEMIDLIST pidl) PURE;
   1353     STDMETHOD(SetBandInfoSFB)(THIS_ PBANDINFOSFB pbi) PURE;
   1354     STDMETHOD(GetBandInfoSFB)(THIS_ PBANDINFOSFB pbi) PURE;
   1355   };
   1356 
   1357   enum {
   1358     SFBID_PIDLCHANGED,
   1359   };
   1360 
   1361 #undef INTERFACE
   1362 #define INTERFACE IDeskBarClient
   1363   DECLARE_INTERFACE_(IDeskBarClient,IOleWindow) {
   1364     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1365     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1366     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1367     STDMETHOD(GetWindow) (THIS_ HWND *lphwnd) PURE;
   1368     STDMETHOD(ContextSensitiveHelp) (THIS_ WINBOOL fEnterMode) PURE;
   1369     STDMETHOD(SetDeskBarSite) (THIS_ IUnknown *punkSite) PURE;
   1370     STDMETHOD(SetModeDBC) (THIS_ DWORD dwMode) PURE;
   1371     STDMETHOD(UIActivateDBC) (THIS_ DWORD dwState) PURE;
   1372     STDMETHOD(GetSize) (THIS_ DWORD dwWhich,LPRECT prc) PURE;
   1373   };
   1374 
   1375 #define DBC_GS_IDEAL 0
   1376 #define DBC_GS_SIZEDOWN 1
   1377 
   1378 #define DBC_HIDE 0
   1379 #define DBC_SHOW 1
   1380 #define DBC_SHOWOBSCURE 2
   1381 
   1382   enum {
   1383     DBCID_EMPTY = 0,DBCID_ONDRAG = 1,DBCID_CLSIDOFBAR = 2,DBCID_RESIZE = 3,DBCID_GETBAR = 4
   1384   };
   1385 
   1386 #ifdef _WININET_
   1387   typedef struct _tagWALLPAPEROPT {
   1388     DWORD dwSize;
   1389     DWORD dwStyle;
   1390   } WALLPAPEROPT;
   1391 
   1392   typedef WALLPAPEROPT *LPWALLPAPEROPT;
   1393   typedef const WALLPAPEROPT *LPCWALLPAPEROPT;
   1394 
   1395   typedef struct _tagCOMPONENTSOPT {
   1396     DWORD dwSize;
   1397     WINBOOL fEnableComponents;
   1398     WINBOOL fActiveDesktop;
   1399   } COMPONENTSOPT;
   1400 
   1401   typedef COMPONENTSOPT *LPCOMPONENTSOPT;
   1402   typedef const COMPONENTSOPT *LPCCOMPONENTSOPT;
   1403 
   1404   typedef struct _tagCOMPPOS {
   1405     DWORD dwSize;
   1406     int iLeft;
   1407     int iTop;
   1408     DWORD dwWidth;
   1409     DWORD dwHeight;
   1410     int izIndex;
   1411     WINBOOL fCanResize;
   1412     WINBOOL fCanResizeX;
   1413     WINBOOL fCanResizeY;
   1414     int iPreferredLeftPercent;
   1415     int iPreferredTopPercent;
   1416   } COMPPOS;
   1417 
   1418   typedef COMPPOS *LPCOMPPOS;
   1419   typedef const COMPPOS *LPCCOMPPOS;
   1420 
   1421   typedef struct _tagCOMPSTATEINFO {
   1422     DWORD dwSize;
   1423     int iLeft;
   1424     int iTop;
   1425     DWORD dwWidth;
   1426     DWORD dwHeight;
   1427     DWORD dwItemState;
   1428   } COMPSTATEINFO;
   1429 
   1430   typedef COMPSTATEINFO *LPCOMPSTATEINFO;
   1431   typedef const COMPSTATEINFO *LPCCOMPSTATEINFO;
   1432 
   1433 #define COMPONENT_TOP (0x3fffffff)
   1434 
   1435 #define COMP_TYPE_HTMLDOC 0
   1436 #define COMP_TYPE_PICTURE 1
   1437 #define COMP_TYPE_WEBSITE 2
   1438 #define COMP_TYPE_CONTROL 3
   1439 #define COMP_TYPE_CFHTML 4
   1440 #define COMP_TYPE_MAX 4
   1441 
   1442   typedef struct _tagIE4COMPONENT {
   1443     DWORD dwSize;
   1444     DWORD dwID;
   1445     int iComponentType;
   1446     WINBOOL fChecked;
   1447     WINBOOL fDirty;
   1448     WINBOOL fNoScroll;
   1449     COMPPOS cpPos;
   1450     WCHAR wszFriendlyName[MAX_PATH];
   1451     WCHAR wszSource[INTERNET_MAX_URL_LENGTH];
   1452     WCHAR wszSubscribedURL[INTERNET_MAX_URL_LENGTH];
   1453   } IE4COMPONENT;
   1454 
   1455   typedef IE4COMPONENT *LPIE4COMPONENT;
   1456   typedef const IE4COMPONENT *LPCIE4COMPONENT;
   1457 
   1458   typedef struct _tagCOMPONENT {
   1459     DWORD dwSize;
   1460     DWORD dwID;
   1461     int iComponentType;
   1462     WINBOOL fChecked;
   1463     WINBOOL fDirty;
   1464     WINBOOL fNoScroll;
   1465     COMPPOS cpPos;
   1466     WCHAR wszFriendlyName[MAX_PATH];
   1467     WCHAR wszSource[INTERNET_MAX_URL_LENGTH];
   1468     WCHAR wszSubscribedURL[INTERNET_MAX_URL_LENGTH];
   1469     DWORD dwCurItemState;
   1470     COMPSTATEINFO csiOriginal;
   1471     COMPSTATEINFO csiRestored;
   1472   } COMPONENT;
   1473 
   1474   typedef COMPONENT *LPCOMPONENT;
   1475   typedef const COMPONENT *LPCCOMPONENT;
   1476 
   1477 #define IS_NORMAL 0x00000001
   1478 #define IS_FULLSCREEN 0x00000002
   1479 #define IS_SPLIT 0x00000004
   1480 #define IS_VALIDSIZESTATEBITS (IS_NORMAL | IS_SPLIT | IS_FULLSCREEN)
   1481 #define IS_VALIDSTATEBITS (IS_NORMAL | IS_SPLIT | IS_FULLSCREEN | 0x80000000 | 0x40000000)
   1482 
   1483 #define AD_APPLY_SAVE 0x00000001
   1484 #define AD_APPLY_HTMLGEN 0x00000002
   1485 #define AD_APPLY_REFRESH 0x00000004
   1486 #define AD_APPLY_ALL (AD_APPLY_SAVE | AD_APPLY_HTMLGEN | AD_APPLY_REFRESH)
   1487 #define AD_APPLY_FORCE 0x00000008
   1488 #define AD_APPLY_BUFFERED_REFRESH 0x00000010
   1489 #define AD_APPLY_DYNAMICREFRESH 0x00000020
   1490 
   1491 #define WPSTYLE_CENTER 0
   1492 #define WPSTYLE_TILE 1
   1493 #define WPSTYLE_STRETCH 2
   1494 #define WPSTYLE_MAX 3
   1495 
   1496 #define COMP_ELEM_TYPE 0x00000001
   1497 #define COMP_ELEM_CHECKED 0x00000002
   1498 #define COMP_ELEM_DIRTY 0x00000004
   1499 #define COMP_ELEM_NOSCROLL 0x00000008
   1500 #define COMP_ELEM_POS_LEFT 0x00000010
   1501 #define COMP_ELEM_POS_TOP 0x00000020
   1502 #define COMP_ELEM_SIZE_WIDTH 0x00000040
   1503 #define COMP_ELEM_SIZE_HEIGHT 0x00000080
   1504 #define COMP_ELEM_POS_ZINDEX 0x00000100
   1505 #define COMP_ELEM_SOURCE 0x00000200
   1506 #define COMP_ELEM_FRIENDLYNAME 0x00000400
   1507 #define COMP_ELEM_SUBSCRIBEDURL 0x00000800
   1508 #define COMP_ELEM_ORIGINAL_CSI 0x00001000
   1509 #define COMP_ELEM_RESTORED_CSI 0x00002000
   1510 #define COMP_ELEM_CURITEMSTATE 0x00004000
   1511 
   1512 #define COMP_ELEM_ALL (COMP_ELEM_TYPE | COMP_ELEM_CHECKED | COMP_ELEM_DIRTY | COMP_ELEM_NOSCROLL | COMP_ELEM_POS_LEFT | COMP_ELEM_SIZE_WIDTH | COMP_ELEM_SIZE_HEIGHT | COMP_ELEM_POS_ZINDEX | COMP_ELEM_SOURCE | COMP_ELEM_FRIENDLYNAME | COMP_ELEM_POS_TOP | COMP_ELEM_SUBSCRIBEDURL | COMP_ELEM_ORIGINAL_CSI | COMP_ELEM_RESTORED_CSI | COMP_ELEM_CURITEMSTATE)
   1513 
   1514   typedef enum tagDTI_ADTIWUI {
   1515     DTI_ADDUI_DEFAULT = 0x00000000,DTI_ADDUI_DISPSUBWIZARD = 0x00000001,DTI_ADDUI_POSITIONITEM = 0x00000002
   1516   };
   1517 
   1518 #define ADDURL_SILENT 0X0001
   1519 
   1520 #define COMPONENT_DEFAULT_LEFT (0xFFFF)
   1521 #define COMPONENT_DEFAULT_TOP (0xFFFF)
   1522 
   1523 #undef INTERFACE
   1524 #define INTERFACE IActiveDesktop
   1525   DECLARE_INTERFACE_(IActiveDesktop,IUnknown) {
   1526     STDMETHOD (QueryInterface)(THIS_ REFIID riid,void **ppv) PURE;
   1527     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1528     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1529     STDMETHOD (ApplyChanges)(THIS_ DWORD dwFlags) PURE;
   1530     STDMETHOD (GetWallpaper)(THIS_ LPWSTR pwszWallpaper,UINT cchWallpaper,DWORD dwReserved) PURE;
   1531     STDMETHOD (SetWallpaper)(THIS_ LPCWSTR pwszWallpaper,DWORD dwReserved) PURE;
   1532     STDMETHOD (GetWallpaperOptions)(THIS_ LPWALLPAPEROPT pwpo,DWORD dwReserved) PURE;
   1533     STDMETHOD (SetWallpaperOptions)(THIS_ LPCWALLPAPEROPT pwpo,DWORD dwReserved) PURE;
   1534     STDMETHOD (GetPattern)(THIS_ LPWSTR pwszPattern,UINT cchPattern,DWORD dwReserved) PURE;
   1535     STDMETHOD (SetPattern)(THIS_ LPCWSTR pwszPattern,DWORD dwReserved) PURE;
   1536     STDMETHOD (GetDesktopItemOptions)(THIS_ LPCOMPONENTSOPT pco,DWORD dwReserved) PURE;
   1537     STDMETHOD (SetDesktopItemOptions)(THIS_ LPCCOMPONENTSOPT pco,DWORD dwReserved) PURE;
   1538     STDMETHOD (AddDesktopItem)(THIS_ LPCCOMPONENT pcomp,DWORD dwReserved) PURE;
   1539     STDMETHOD (AddDesktopItemWithUI)(THIS_ HWND hwnd,LPCOMPONENT pcomp,DWORD dwReserved) PURE;
   1540     STDMETHOD (ModifyDesktopItem)(THIS_ LPCCOMPONENT pcomp,DWORD dwFlags) PURE;
   1541     STDMETHOD (RemoveDesktopItem)(THIS_ LPCCOMPONENT pcomp,DWORD dwReserved) PURE;
   1542     STDMETHOD (GetDesktopItemCount)(THIS_ LPINT lpiCount,DWORD dwReserved) PURE;
   1543     STDMETHOD (GetDesktopItem)(THIS_ int nComponent,LPCOMPONENT pcomp,DWORD dwReserved) PURE;
   1544     STDMETHOD (GetDesktopItemByID)(THIS_ ULONG_PTR dwID,LPCOMPONENT pcomp,DWORD dwReserved) PURE;
   1545     STDMETHOD (GenerateDesktopItemHtml)(THIS_ LPCWSTR pwszFileName,LPCOMPONENT pcomp,DWORD dwReserved) PURE;
   1546     STDMETHOD (AddUrl)(THIS_ HWND hwnd,LPCWSTR pszSource,LPCOMPONENT pcomp,DWORD dwFlags) PURE;
   1547     STDMETHOD (GetDesktopItemBySource)(THIS_ LPCWSTR pwszSource,LPCOMPONENT pcomp,DWORD dwReserved) PURE;
   1548   };
   1549 
   1550   typedef IActiveDesktop *LPACTIVEDESKTOP;
   1551 
   1552 #define SSM_CLEAR 0x0000
   1553 #define SSM_SET 0x0001
   1554 #define SSM_REFRESH 0x0002
   1555 #define SSM_UPDATE 0x0004
   1556 
   1557 #define SCHEME_DISPLAY 0x0001
   1558 #define SCHEME_EDIT 0x0002
   1559 #define SCHEME_LOCAL 0x0004
   1560 #define SCHEME_GLOBAL 0x0008
   1561 #define SCHEME_REFRESH 0x0010
   1562 #define SCHEME_UPDATE 0x0020
   1563 #define SCHEME_DONOTUSE 0x0040
   1564 #define SCHEME_CREATE 0x0080
   1565 
   1566 #undef INTERFACE
   1567 #define INTERFACE IActiveDesktopP
   1568 
   1569   DECLARE_INTERFACE_(IActiveDesktopP,IUnknown) {
   1570     STDMETHOD (QueryInterface)(THIS_ REFIID riid,void **ppv) PURE;
   1571     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1572     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1573     STDMETHOD (SetSafeMode)(THIS_ DWORD dwFlags) PURE;
   1574     STDMETHOD (EnsureUpdateHTML)(THIS) PURE;
   1575     STDMETHOD (SetScheme)(THIS_ LPCWSTR pwszSchemeName,DWORD dwFlags) PURE;
   1576     STDMETHOD (GetScheme)(THIS_ LPWSTR pwszSchemeName,DWORD *lpdwcchBuffer,DWORD dwFlags) PURE;
   1577   };
   1578 
   1579   typedef IActiveDesktopP *LPACTIVEDESKTOPP;
   1580 
   1581 #define GADOF_DIRTY 0x00000001
   1582 
   1583 #undef INTERFACE
   1584 #define INTERFACE IADesktopP2
   1585 
   1586   DECLARE_INTERFACE_(IADesktopP2,IUnknown) {
   1587     STDMETHOD (QueryInterface)(THIS_ REFIID riid,void **ppv) PURE;
   1588     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1589     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1590     STDMETHOD (ReReadWallpaper)(THIS) PURE;
   1591     STDMETHOD (GetADObjectFlags)(THIS_ DWORD *lpdwFlags,DWORD dwMask) PURE;
   1592     STDMETHOD (UpdateAllDesktopSubscriptions)(THIS) PURE;
   1593     STDMETHOD (MakeDynamicChanges)(THIS_ IOleObject *pOleObj) PURE;
   1594   };
   1595 
   1596   typedef IADesktopP2 *LPADESKTOPP2;
   1597 #endif
   1598 
   1599 #define MAX_COLUMN_NAME_LEN 80
   1600 #define MAX_COLUMN_DESC_LEN 128
   1601 
   1602 #include <pshpack1.h>
   1603 
   1604   typedef struct {
   1605     SHCOLUMNID scid;
   1606     VARTYPE vt;
   1607     DWORD fmt;
   1608     UINT cChars;
   1609     DWORD csFlags;
   1610     WCHAR wszTitle[MAX_COLUMN_NAME_LEN];
   1611     WCHAR wszDescription[MAX_COLUMN_DESC_LEN];
   1612   } SHCOLUMNINFO,*LPSHCOLUMNINFO;
   1613   typedef const SHCOLUMNINFO *LPCSHCOLUMNINFO;
   1614 
   1615 #include <poppack.h>
   1616 
   1617 #include <pshpack8.h>
   1618 
   1619   typedef struct {
   1620     ULONG dwFlags;
   1621     ULONG dwReserved;
   1622     WCHAR wszFolder[MAX_PATH];
   1623   } SHCOLUMNINIT,*LPSHCOLUMNINIT;
   1624   typedef const SHCOLUMNINIT *LPCSHCOLUMNINIT;
   1625 
   1626 #define SHCDF_UPDATEITEM 0x00000001
   1627 
   1628   typedef struct {
   1629     ULONG dwFlags;
   1630     DWORD dwFileAttributes;
   1631     ULONG dwReserved;
   1632     WCHAR *pwszExt;
   1633     WCHAR wszFile[MAX_PATH];
   1634   } SHCOLUMNDATA,*LPSHCOLUMNDATA;
   1635   typedef const SHCOLUMNDATA *LPCSHCOLUMNDATA;
   1636 
   1637 #include <poppack.h>
   1638 
   1639 #undef INTERFACE
   1640 #define INTERFACE IColumnProvider
   1641 
   1642   DECLARE_INTERFACE_(IColumnProvider,IUnknown) {
   1643     STDMETHOD (QueryInterface)(THIS_ REFIID riid,void **ppv) PURE;
   1644     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   1645     STDMETHOD_(ULONG,Release)(THIS) PURE;
   1646     STDMETHOD (Initialize)(THIS_ LPCSHCOLUMNINIT psci) PURE;
   1647     STDMETHOD (GetColumnInfo)(THIS_ DWORD dwIndex,SHCOLUMNINFO *psci) PURE;
   1648     STDMETHOD (GetItemData)(THIS_ LPCSHCOLUMNID pscid,LPCSHCOLUMNDATA pscd,VARIANT *pvarData) PURE;
   1649   };
   1650 
   1651 #include <pshpack8.h>
   1652 
   1653   typedef struct {
   1654     SIZE sizeDragImage;
   1655     POINT ptOffset;
   1656     HBITMAP hbmpDragImage;
   1657     COLORREF crColorKey;
   1658   } SHDRAGIMAGE,*LPSHDRAGIMAGE;
   1659 
   1660 #include <poppack.h>
   1661 
   1662 #define DI_GETDRAGIMAGE TEXT("ShellGetDragImage")
   1663 
   1664 #undef INTERFACE
   1665 #define INTERFACE IDropTargetHelper
   1666   DECLARE_INTERFACE_(IDropTargetHelper,IUnknown) {
   1667     STDMETHOD (QueryInterface)(THIS_ REFIID riid,void **ppv) PURE;
   1668     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1669     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1670     STDMETHOD (DragEnter)(THIS_ HWND hwndTarget,IDataObject *pDataObject,POINT *ppt,DWORD dwEffect) PURE;
   1671     STDMETHOD (DragLeave)(THIS) PURE;
   1672     STDMETHOD (DragOver)(THIS_ POINT *ppt,DWORD dwEffect) PURE;
   1673     STDMETHOD (Drop)(THIS_ IDataObject *pDataObject,POINT *ppt,DWORD dwEffect) PURE;
   1674     STDMETHOD (Show)(THIS_ WINBOOL fShow) PURE;
   1675   };
   1676 
   1677 #undef INTERFACE
   1678 #define INTERFACE IDragSourceHelper
   1679   DECLARE_INTERFACE_(IDragSourceHelper,IUnknown) {
   1680     STDMETHOD (QueryInterface)(THIS_ REFIID riid,void **ppv) PURE;
   1681     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1682     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1683     STDMETHOD (InitializeFromBitmap)(THIS_ LPSHDRAGIMAGE pshdi,IDataObject *pDataObject) PURE;
   1684     STDMETHOD (InitializeFromWindow)(THIS_ HWND hwnd,POINT *ppt,IDataObject *pDataObject) PURE;
   1685   };
   1686 
   1687 #define CFSTR_SHELLIDLIST TEXT("Shell IDList Array")
   1688 #define CFSTR_SHELLIDLISTOFFSET TEXT("Shell Object Offsets")
   1689 #define CFSTR_NETRESOURCES TEXT("Net Resource")
   1690 #define CFSTR_FILEDESCRIPTORA TEXT("FileGroupDescriptor")
   1691 #define CFSTR_FILEDESCRIPTORW TEXT("FileGroupDescriptorW")
   1692 #define CFSTR_FILECONTENTS TEXT("FileContents")
   1693 #define CFSTR_FILENAMEA TEXT("FileName")
   1694 #define CFSTR_FILENAMEW TEXT("FileNameW")
   1695 #define CFSTR_PRINTERGROUP TEXT("PrinterFriendlyName")
   1696 #define CFSTR_FILENAMEMAPA TEXT("FileNameMap")
   1697 #define CFSTR_FILENAMEMAPW TEXT("FileNameMapW")
   1698 #define CFSTR_SHELLURL TEXT("UniformResourceLocator")
   1699 #define CFSTR_INETURLA CFSTR_SHELLURL
   1700 #define CFSTR_INETURLW TEXT("UniformResourceLocatorW")
   1701 #define CFSTR_PREFERREDDROPEFFECT TEXT("Preferred DropEffect")
   1702 #define CFSTR_PERFORMEDDROPEFFECT TEXT("Performed DropEffect")
   1703 #define CFSTR_PASTESUCCEEDED TEXT("Paste Succeeded")
   1704 #define CFSTR_INDRAGLOOP TEXT("InShellDragLoop")
   1705 #define CFSTR_DRAGCONTEXT TEXT("DragContext")
   1706 #define CFSTR_MOUNTEDVOLUME TEXT("MountedVolume")
   1707 #define CFSTR_PERSISTEDDATAOBJECT TEXT("PersistedDataObject")
   1708 #define CFSTR_TARGETCLSID TEXT("TargetCLSID")
   1709 #define CFSTR_LOGICALPERFORMEDDROPEFFECT TEXT("Logical Performed DropEffect")
   1710 #define CFSTR_AUTOPLAY_SHELLIDLISTS TEXT("Autoplay Enumerated IDList Array")
   1711 #define CFSTR_UNTRUSTEDDRAGDROP TEXT("UntrustedDragDrop")
   1712 
   1713 #define CFSTR_FILEDESCRIPTOR __MINGW_NAME_AW(CFSTR_FILEDESCRIPTOR)
   1714 #define CFSTR_FILENAME __MINGW_NAME_AW(CFSTR_FILENAME)
   1715 #define CFSTR_FILENAMEMAP __MINGW_NAME_AW(CFSTR_FILENAMEMAP)
   1716 #define CFSTR_INETURL __MINGW_NAME_AW(CFSTR_INETURL)
   1717 
   1718 #define DVASPECT_SHORTNAME 2
   1719 #define DVASPECT_COPY 3
   1720 #define DVASPECT_LINK 4
   1721 
   1722 #include <pshpack8.h>
   1723 
   1724   typedef struct _NRESARRAY {
   1725     UINT cItems;
   1726     NETRESOURCE nr[1];
   1727   } NRESARRAY,*LPNRESARRAY;
   1728 #include <poppack.h>
   1729 
   1730   typedef struct _IDA {
   1731     UINT cidl;
   1732     UINT aoffset[1];
   1733   } CIDA,*LPIDA;
   1734 
   1735   typedef enum {
   1736     FD_CLSID = 0x0001,FD_SIZEPOINT = 0x0002,FD_ATTRIBUTES = 0x0004,FD_CREATETIME = 0x0008,FD_ACCESSTIME = 0x0010,FD_WRITESTIME = 0x0020,
   1737     FD_FILESIZE = 0x0040,FD_PROGRESSUI = 0x4000,FD_LINKUI = 0x8000
   1738   } FD_FLAGS;
   1739 
   1740   typedef struct _FILEDESCRIPTORA {
   1741     DWORD dwFlags;
   1742 
   1743     CLSID clsid;
   1744     SIZEL sizel;
   1745     POINTL pointl;
   1746     DWORD dwFileAttributes;
   1747     FILETIME ftCreationTime;
   1748     FILETIME ftLastAccessTime;
   1749     FILETIME ftLastWriteTime;
   1750     DWORD nFileSizeHigh;
   1751     DWORD nFileSizeLow;
   1752     CHAR cFileName[MAX_PATH ];
   1753   } FILEDESCRIPTORA,*LPFILEDESCRIPTORA;
   1754 
   1755   typedef struct _FILEDESCRIPTORW {
   1756     DWORD dwFlags;
   1757     CLSID clsid;
   1758     SIZEL sizel;
   1759     POINTL pointl;
   1760     DWORD dwFileAttributes;
   1761     FILETIME ftCreationTime;
   1762     FILETIME ftLastAccessTime;
   1763     FILETIME ftLastWriteTime;
   1764     DWORD nFileSizeHigh;
   1765     DWORD nFileSizeLow;
   1766     WCHAR cFileName[MAX_PATH ];
   1767   } FILEDESCRIPTORW,*LPFILEDESCRIPTORW;
   1768 
   1769 #define FILEDESCRIPTOR __MINGW_NAME_AW(FILEDESCRIPTOR)
   1770 #define LPFILEDESCRIPTOR __MINGW_NAME_AW(LPFILEDESCRIPTOR)
   1771 
   1772   typedef struct _FILEGROUPDESCRIPTORA {
   1773     UINT cItems;
   1774     FILEDESCRIPTORA fgd[1];
   1775   } FILEGROUPDESCRIPTORA,*LPFILEGROUPDESCRIPTORA;
   1776 
   1777   typedef struct _FILEGROUPDESCRIPTORW {
   1778     UINT cItems;
   1779     FILEDESCRIPTORW fgd[1];
   1780   } FILEGROUPDESCRIPTORW,*LPFILEGROUPDESCRIPTORW;
   1781 
   1782 #define FILEGROUPDESCRIPTOR __MINGW_NAME_AW(FILEGROUPDESCRIPTOR)
   1783 #define LPFILEGROUPDESCRIPTOR __MINGW_NAME_AW(LPFILEGROUPDESCRIPTOR)
   1784 
   1785   typedef struct _DROPFILES {
   1786     DWORD pFiles;
   1787     POINT pt;
   1788     WINBOOL fNC;
   1789     WINBOOL fWide;
   1790   } DROPFILES,*LPDROPFILES;
   1791 
   1792   typedef struct _SHChangeNotifyEntry {
   1793     LPCITEMIDLIST pidl;
   1794     WINBOOL fRecursive;
   1795   } SHChangeNotifyEntry;
   1796 
   1797 #define SHCNE_RENAMEITEM __MSABI_LONG(0x00000001)
   1798 #define SHCNE_CREATE __MSABI_LONG(0x00000002)
   1799 #define SHCNE_DELETE __MSABI_LONG(0x00000004)
   1800 #define SHCNE_MKDIR __MSABI_LONG(0x00000008)
   1801 #define SHCNE_RMDIR __MSABI_LONG(0x00000010)
   1802 #define SHCNE_MEDIAINSERTED __MSABI_LONG(0x00000020)
   1803 #define SHCNE_MEDIAREMOVED __MSABI_LONG(0x00000040)
   1804 #define SHCNE_DRIVEREMOVED __MSABI_LONG(0x00000080)
   1805 #define SHCNE_DRIVEADD __MSABI_LONG(0x00000100)
   1806 #define SHCNE_NETSHARE __MSABI_LONG(0x00000200)
   1807 #define SHCNE_NETUNSHARE __MSABI_LONG(0x00000400)
   1808 #define SHCNE_ATTRIBUTES __MSABI_LONG(0x00000800)
   1809 #define SHCNE_UPDATEDIR __MSABI_LONG(0x00001000)
   1810 #define SHCNE_UPDATEITEM __MSABI_LONG(0x00002000)
   1811 #define SHCNE_SERVERDISCONNECT __MSABI_LONG(0x00004000)
   1812 #define SHCNE_UPDATEIMAGE __MSABI_LONG(0x00008000)
   1813 #define SHCNE_DRIVEADDGUI __MSABI_LONG(0x00010000)
   1814 #define SHCNE_RENAMEFOLDER __MSABI_LONG(0x00020000)
   1815 #define SHCNE_FREESPACE __MSABI_LONG(0x00040000)
   1816 #define SHCNE_EXTENDED_EVENT __MSABI_LONG(0x04000000)
   1817 
   1818 #define SHCNE_ASSOCCHANGED __MSABI_LONG(0x08000000)
   1819 
   1820 #define SHCNE_DISKEVENTS __MSABI_LONG(0x0002381F)
   1821 #define SHCNE_GLOBALEVENTS __MSABI_LONG(0x0C0581E0)
   1822 #define SHCNE_ALLEVENTS __MSABI_LONG(0x7FFFFFFF)
   1823 #define SHCNE_INTERRUPT __MSABI_LONG(0x80000000)
   1824 
   1825 #define SHCNEE_ORDERCHANGED __MSABI_LONG(2)
   1826 #define SHCNEE_MSI_CHANGE __MSABI_LONG(4)
   1827 #define SHCNEE_MSI_UNINSTALL __MSABI_LONG(5)
   1828 
   1829 #define SHCNF_IDLIST 0x0000
   1830 #define SHCNF_PATHA 0x0001
   1831 #define SHCNF_PRINTERA 0x0002
   1832 #define SHCNF_DWORD 0x0003
   1833 #define SHCNF_PATHW 0x0005
   1834 #define SHCNF_PRINTERW 0x0006
   1835 #define SHCNF_TYPE 0x00FF
   1836 #define SHCNF_FLUSH 0x1000
   1837 #define SHCNF_FLUSHNOWAIT 0x2000
   1838 
   1839 #define SHCNF_PATH __MINGW_NAME_AW(SHCNF_PATH)
   1840 #define SHCNF_PRINTER __MINGW_NAME_AW(SHCNF_PRINTER)
   1841 
   1842   SHSTDAPI_(void) SHChangeNotify(LONG wEventId,UINT uFlags,LPCVOID dwItem1,LPCVOID dwItem2);
   1843 
   1844 #undef INTERFACE
   1845 #define INTERFACE IShellChangeNotify
   1846   DECLARE_INTERFACE_(IShellChangeNotify,IUnknown) {
   1847     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1848     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1849     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1850     STDMETHOD(OnChange) (THIS_ LONG lEvent,LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2) PURE;
   1851   };
   1852 
   1853 #undef INTERFACE
   1854 #define INTERFACE IQueryInfo
   1855   DECLARE_INTERFACE_(IQueryInfo,IUnknown) {
   1856     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   1857     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   1858     STDMETHOD_(ULONG,Release) (THIS) PURE;
   1859     STDMETHOD(GetInfoTip)(THIS_ DWORD dwFlags,WCHAR **ppwszTip) PURE;
   1860     STDMETHOD(GetInfoFlags)(THIS_ DWORD *pdwFlags) PURE;
   1861   };
   1862 
   1863 #define QITIPF_DEFAULT 0x00000000
   1864 #define QITIPF_USENAME 0x00000001
   1865 #define QITIPF_LINKNOTARGET 0x00000002
   1866 #define QITIPF_LINKUSETARGET 0x00000004
   1867 #define QITIPF_USESLOWTIP 0x00000008
   1868 
   1869 #define QIF_CACHED 0x00000001
   1870 #define QIF_DONTEXPANDFOLDER 0x00000002
   1871 
   1872   typedef enum enum_SHARD{
   1873     SHARD_PIDL = 0x00000001,
   1874     SHARD_PATHA = 0x00000002,
   1875     SHARD_PATHW = 0x00000003,
   1876     SHARD_APPIDINFO = 0x00000004,
   1877     SHARD_APPIDINFOIDLIST = 0x00000005,
   1878     SHARD_LINK = 0x00000006,
   1879     SHARD_APPIDINFOLINK = 0x00000007,
   1880     SHARD_SHELLITEM = 0x00000008
   1881   } SHARD;
   1882 
   1883 #define SHARD_PATH __MINGW_NAME_AW(SHARD_PATH)
   1884 
   1885   SHSTDAPI_(void) SHAddToRecentDocs(UINT uFlags,LPCVOID pv);
   1886 
   1887   typedef struct _SHChangeDWORDAsIDList {
   1888     USHORT cb;
   1889     DWORD dwItem1;
   1890     DWORD dwItem2;
   1891     USHORT cbZero;
   1892   } SHChangeDWORDAsIDList,*LPSHChangeDWORDAsIDList;
   1893 
   1894   typedef struct _SHChangeUpdateImageIDList {
   1895     USHORT cb;
   1896     int iIconIndex;
   1897     int iCurIndex;
   1898     UINT uFlags;
   1899     DWORD dwProcessID;
   1900     WCHAR szName[MAX_PATH];
   1901     USHORT cbZero;
   1902   } SHChangeUpdateImageIDList,*LPSHChangeUpdateImageIDList;
   1903 
   1904   SHSTDAPI_(int) SHHandleUpdateImage(LPCITEMIDLIST pidlExtra);
   1905 
   1906   typedef struct _SHChangeProductKeyAsIDList {
   1907     USHORT cb;
   1908     WCHAR wszProductKey[39];
   1909     USHORT cbZero;
   1910   } SHChangeProductKeyAsIDList,*LPSHChangeProductKeyAsIDList;
   1911 
   1912 #define SHUpdateImage __MINGW_NAME_AW(SHUpdateImage)
   1913 
   1914   SHSTDAPI_(void) SHUpdateImageA(LPCSTR pszHashItem,int iIndex,UINT uFlags,int iImageIndex);
   1915   SHSTDAPI_(void) SHUpdateImageW(LPCWSTR pszHashItem,int iIndex,UINT uFlags,int iImageIndex);
   1916   SHSTDAPI_(ULONG) SHChangeNotifyRegister(HWND hwnd,int fSources,LONG fEvents,UINT wMsg,int cEntries,SHChangeNotifyEntry *pshcne);
   1917   SHSTDAPI_(WINBOOL) SHChangeNotifyDeregister(unsigned __LONG32 ulID);
   1918   SHSTDAPI_(HANDLE) SHChangeNotification_Lock(HANDLE hChangeNotification,DWORD dwProcessId,LPITEMIDLIST **pppidl,LONG *plEvent);
   1919   SHSTDAPI_(WINBOOL) SHChangeNotification_Unlock(HANDLE hLock);
   1920   SHSTDAPI SHGetRealIDL(IShellFolder *psf,LPCITEMIDLIST pidlSimple,LPITEMIDLIST *ppidlReal);
   1921   SHSTDAPI SHGetInstanceExplorer(IUnknown **ppunk);
   1922 
   1923 #define SHGDFIL_FINDDATA 1
   1924 #define SHGDFIL_NETRESOURCE 2
   1925 #define SHGDFIL_DESCRIPTIONID 3
   1926 
   1927 #define SHDID_ROOT_REGITEM 1
   1928 #define SHDID_FS_FILE 2
   1929 #define SHDID_FS_DIRECTORY 3
   1930 #define SHDID_FS_OTHER 4
   1931 #define SHDID_COMPUTER_DRIVE35 5
   1932 #define SHDID_COMPUTER_DRIVE525 6
   1933 #define SHDID_COMPUTER_REMOVABLE 7
   1934 #define SHDID_COMPUTER_FIXED 8
   1935 #define SHDID_COMPUTER_NETDRIVE 9
   1936 #define SHDID_COMPUTER_CDROM 10
   1937 #define SHDID_COMPUTER_RAMDISK 11
   1938 #define SHDID_COMPUTER_OTHER 12
   1939 #define SHDID_NET_DOMAIN 13
   1940 #define SHDID_NET_SERVER 14
   1941 #define SHDID_NET_SHARE 15
   1942 #define SHDID_NET_RESTOFNET 16
   1943 #define SHDID_NET_OTHER 17
   1944 #define SHDID_COMPUTER_IMAGING 18
   1945 #define SHDID_COMPUTER_AUDIO 19
   1946 #define SHDID_COMPUTER_SHAREDDOCS 20
   1947 
   1948 #include <pshpack8.h>
   1949 
   1950   typedef struct _SHDESCRIPTIONID {
   1951     DWORD dwDescriptionId;
   1952     CLSID clsid;
   1953   } SHDESCRIPTIONID,*LPSHDESCRIPTIONID;
   1954 
   1955 #include <poppack.h>
   1956 
   1957 #define SHGetDataFromIDList __MINGW_NAME_AW(SHGetDataFromIDList)
   1958 
   1959   SHSTDAPI SHGetDataFromIDListA(IShellFolder *psf,LPCITEMIDLIST pidl,int nFormat,void *pv,int cb);
   1960   SHSTDAPI SHGetDataFromIDListW(IShellFolder *psf,LPCITEMIDLIST pidl,int nFormat,void *pv,int cb);
   1961 
   1962 #define PRF_VERIFYEXISTS 0x0001
   1963 #define PRF_TRYPROGRAMEXTENSIONS (0x0002 | PRF_VERIFYEXISTS)
   1964 #define PRF_FIRSTDIRDEF 0x0004
   1965 #define PRF_DONTFINDLNK 0x0008
   1966   SHSTDAPI_(int) RestartDialog(HWND hwnd,LPCWSTR lpPrompt,DWORD dwReturn);
   1967   SHSTDAPI_(int) RestartDialogEx(HWND hwnd,LPCWSTR lpPrompt,DWORD dwReturn,DWORD dwReasonCode);
   1968   SHSTDAPI SHCoCreateInstance(LPCWSTR pszCLSID,const CLSID *pclsid,IUnknown *pUnkOuter,REFIID riid,void **ppv);
   1969   DECLARE_HANDLE(FARPROC16);
   1970   SHSTDAPI_(LRESULT) CallCPLEntry16(HINSTANCE hinst,FARPROC16 lpfnEntry,HWND hwndCPL,UINT msg,LPARAM lParam1,LPARAM lParam2);
   1971   SHSTDAPI SHCreateStdEnumFmtEtc(UINT cfmt,const FORMATETC afmt[],IEnumFORMATETC **ppenumFormatEtc);
   1972   SHSTDAPI SHDoDragDrop(HWND hwnd,IDataObject *pdata,IDropSource *pdsrc,DWORD dwEffect,DWORD *pdwEffect);
   1973 
   1974 #define NUM_POINTS 3
   1975   typedef struct {
   1976     int iNextSample;
   1977     DWORD dwLastScroll;
   1978     WINBOOL bFull;
   1979     POINT pts[NUM_POINTS];
   1980     DWORD dwTimes[NUM_POINTS];
   1981   } AUTO_SCROLL_DATA;
   1982 
   1983   SHSTDAPI_(WINBOOL) DAD_SetDragImage(HIMAGELIST him,POINT *pptOffset);
   1984   SHSTDAPI_(WINBOOL) DAD_DragEnterEx(HWND hwndTarget,const POINT ptStart);
   1985   SHSTDAPI_(WINBOOL) DAD_DragEnterEx2(HWND hwndTarget,const POINT ptStart,IDataObject *pdtObject);
   1986   SHSTDAPI_(WINBOOL) DAD_ShowDragImage(WINBOOL fShow);
   1987   SHSTDAPI_(WINBOOL) DAD_DragMove(POINT pt);
   1988   SHSTDAPI_(WINBOOL) DAD_DragLeave(void);
   1989   SHSTDAPI_(WINBOOL) DAD_AutoScroll(HWND hwnd,AUTO_SCROLL_DATA *pad,const POINT *pptNow);
   1990 
   1991   typedef struct {
   1992     WORD cLength;
   1993     WORD nVersion;
   1994     WINBOOL fFullPathTitle : 1;
   1995     WINBOOL fSaveLocalView : 1;
   1996     WINBOOL fNotShell : 1;
   1997     WINBOOL fSimpleDefault : 1;
   1998     WINBOOL fDontShowDescBar : 1;
   1999     WINBOOL fNewWindowMode : 1;
   2000     WINBOOL fShowCompColor : 1;
   2001     WINBOOL fDontPrettyNames : 1;
   2002     WINBOOL fAdminsCreateCommonGroups : 1;
   2003     UINT fUnusedFlags : 7;
   2004     UINT fMenuEnumFilter;
   2005   } CABINETSTATE,*LPCABINETSTATE;
   2006 
   2007 #define CABINETSTATE_VERSION 2
   2008 
   2009 #define PathIsSlow __MINGW_NAME_AW(PathIsSlow)
   2010 
   2011   SHSTDAPI_(WINBOOL) ReadCabinetState(LPCABINETSTATE lpState,int iSize);
   2012   SHSTDAPI_(WINBOOL) WriteCabinetState(LPCABINETSTATE lpState);
   2013   SHSTDAPI_(WINBOOL) PathMakeUniqueName(LPWSTR pszUniqueName,UINT cchMax,LPCWSTR pszTemplate,LPCWSTR pszLongPlate,LPCWSTR pszDir);
   2014   SHSTDAPI_(void) PathQualify(LPWSTR psz);
   2015   SHSTDAPI_(WINBOOL) PathIsExe(LPCWSTR pszPath);
   2016   SHSTDAPI_(WINBOOL) PathIsSlowA(LPCSTR pszFile,DWORD dwAttr);
   2017   SHSTDAPI_(WINBOOL) PathIsSlowW(LPCWSTR pszFile,DWORD dwAttr);
   2018 
   2019 #define PCS_FATAL 0x80000000
   2020 #define PCS_REPLACEDCHAR 0x00000001
   2021 #define PCS_REMOVEDCHAR 0x00000002
   2022 #define PCS_TRUNCATED 0x00000004
   2023 #define PCS_PATHTOOLONG 0x00000008
   2024 
   2025   SHSTDAPI_(int) PathCleanupSpec(LPCWSTR pszDir,LPWSTR pszSpec);
   2026   SHSTDAPI_(int) PathResolve(LPWSTR pszPath,LPCWSTR dirs[],UINT fFlags);
   2027   SHSTDAPI_(WINBOOL) GetFileNameFromBrowse(HWND hwnd,LPWSTR pszFilePath,UINT cbFilePath,LPCWSTR pszWorkingDir,LPCWSTR pszDefExt,LPCWSTR pszFilters,LPCWSTR pszTitle);
   2028   SHSTDAPI_(int) DriveType(int iDrive);
   2029   SHSTDAPI_(int) RealDriveType(int iDrive,WINBOOL fOKToHitNet);
   2030   SHSTDAPI_(int) IsNetDrive(int iDrive);
   2031 
   2032 #define MM_ADDSEPARATOR __MSABI_LONG(0x00000001)
   2033 #define MM_SUBMENUSHAVEIDS __MSABI_LONG(0x00000002)
   2034 #define MM_DONTREMOVESEPS __MSABI_LONG(0x00000004)
   2035 
   2036   SHSTDAPI_(UINT) Shell_MergeMenus(HMENU hmDst,HMENU hmSrc,UINT uInsert,UINT uIDAdjust,UINT uIDAdjustMax,ULONG uFlags);
   2037   SHSTDAPI_(WINBOOL) SHObjectProperties(HWND hwnd,DWORD dwType,LPCWSTR lpObject,LPCWSTR lpPage);
   2038 
   2039 #define SHOP_PRINTERNAME 0x00000001
   2040 #define SHOP_FILEPATH 0x00000002
   2041 #define SHOP_VOLUMEGUID 0x00000004
   2042 
   2043   SHSTDAPI_(DWORD) SHFormatDrive(HWND hwnd,UINT drive,UINT fmtID,UINT options);
   2044 
   2045 #define SHFMT_ID_DEFAULT 0xFFFF
   2046 
   2047 #define SHFMT_OPT_FULL 0x0001
   2048 #define SHFMT_OPT_SYSONLY 0x0002
   2049 
   2050 #define SHFMT_ERROR __MSABI_LONG(0xFFFFFFFF)
   2051 #define SHFMT_CANCEL __MSABI_LONG(0xFFFFFFFE)
   2052 #define SHFMT_NOFORMAT __MSABI_LONG(0xFFFFFFFD)
   2053 
   2054 #ifndef HPSXA_DEFINED
   2055 #define HPSXA_DEFINED
   2056   DECLARE_HANDLE(HPSXA);
   2057 #endif
   2058   WINSHELLAPI HPSXA WINAPI SHCreatePropSheetExtArray(HKEY hKey,LPCWSTR pszSubKey,UINT max_iface);
   2059   WINSHELLAPI void WINAPI SHDestroyPropSheetExtArray(HPSXA hpsxa);
   2060   WINSHELLAPI UINT WINAPI SHAddFromPropSheetExtArray(HPSXA hpsxa,LPFNADDPROPSHEETPAGE lpfnAddPage,LPARAM lParam);
   2061   WINSHELLAPI UINT WINAPI SHReplaceFromPropSheetExtArray(HPSXA hpsxa,UINT uPageID,LPFNADDPROPSHEETPAGE lpfnReplaceWith,LPARAM lParam);
   2062   SHSTDAPI_(LPITEMIDLIST) ILClone(LPCITEMIDLIST pidl);
   2063   SHSTDAPI_(LPITEMIDLIST) ILGetNext(LPCITEMIDLIST pidl);
   2064   SHSTDAPI_(UINT) ILGetSize(LPCITEMIDLIST pidl);
   2065   SHSTDAPI_(LPITEMIDLIST) ILFindLastID(LPCITEMIDLIST pidl);
   2066   SHSTDAPI_(WINBOOL) ILRemoveLastID(LPITEMIDLIST pidl);
   2067   SHSTDAPI_(LPITEMIDLIST) ILAppendID(LPITEMIDLIST pidl,LPCSHITEMID pmkid,WINBOOL fAppend);
   2068   SHSTDAPI_(void) ILFree(LPITEMIDLIST pidl);
   2069   SHSTDAPI_(LPITEMIDLIST) ILCloneFirst(LPCITEMIDLIST pidl);
   2070   SHSTDAPI_(WINBOOL) ILIsEqual(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2);
   2071   SHSTDAPI_(WINBOOL) ILIsParent(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2,WINBOOL fImmediate);
   2072   SHSTDAPI_(LPITEMIDLIST) ILFindChild(LPCITEMIDLIST pidlParent,LPCITEMIDLIST pidlChild);
   2073   SHSTDAPI_(LPITEMIDLIST) ILCombine(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2);
   2074   SHSTDAPI ILLoadFromStream(IStream *pstm,LPITEMIDLIST *pidl);
   2075   SHSTDAPI ILSaveToStream(IStream *pstm,LPCITEMIDLIST pidl);
   2076   SHSTDAPI_(LPITEMIDLIST) ILCreateFromPathA(LPCSTR pszPath);
   2077   SHSTDAPI_(LPITEMIDLIST) ILCreateFromPathW(LPCWSTR pszPath);
   2078 
   2079 #ifdef NO_WRAPPERS_FOR_ILCREATEFROMPATH
   2080   SHSTDAPI_(LPITEMIDLIST) ILCreateFromPath(LPCTSTR pszPath);
   2081 #else
   2082 #define ILCreateFromPath __MINGW_NAME_AW(ILCreateFromPath)
   2083 #endif
   2084   SHSTDAPI SHILCreateFromPath(LPCWSTR szPath,LPITEMIDLIST *ppidl,DWORD *rgfInOut);
   2085 
   2086 #undef INTERFACE
   2087 #define INTERFACE IDefViewFrame
   2088   DECLARE_INTERFACE_(IDefViewFrame,IUnknown) {
   2089     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   2090     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   2091     STDMETHOD_(ULONG,Release) (THIS) PURE;
   2092     STDMETHOD(GetWindowLV) (THIS_ HWND *phwnd) PURE;
   2093     STDMETHOD(ReleaseWindowLV) (THIS) PURE;
   2094     STDMETHOD(GetShellFolder)(THIS_ IShellFolder **ppsf) PURE;
   2095   };
   2096 
   2097   typedef enum RESTRICTIONS {
   2098     REST_NONE = 0x00000000,REST_NORUN = 0x00000001,REST_NOCLOSE = 0x00000002,REST_NOSAVESET = 0x00000004,REST_NOFILEMENU = 0x00000008,
   2099     REST_NOSETFOLDERS = 0x00000010,REST_NOSETTASKBAR = 0x00000020,REST_NODESKTOP = 0x00000040,REST_NOFIND = 0x00000080,
   2100     REST_NODRIVES = 0x00000100,REST_NODRIVEAUTORUN = 0x00000200,REST_NODRIVETYPEAUTORUN = 0x00000400,REST_NONETHOOD = 0x00000800,
   2101     REST_STARTBANNER = 0x00001000,REST_RESTRICTRUN = 0x00002000,REST_NOPRINTERTABS = 0x00004000,REST_NOPRINTERDELETE = 0x00008000,
   2102     REST_NOPRINTERADD = 0x00010000,REST_NOSTARTMENUSUBFOLDERS = 0x00020000,REST_MYDOCSONNET = 0x00040000,REST_NOEXITTODOS = 0x00080000,
   2103     REST_ENFORCESHELLEXTSECURITY = 0x00100000,REST_LINKRESOLVEIGNORELINKINFO = 0x00200000,REST_NOCOMMONGROUPS = 0x00400000,
   2104     REST_SEPARATEDESKTOPPROCESS = 0x00800000,REST_NOWEB = 0x01000000,REST_NOTRAYCONTEXTMENU = 0x02000000,REST_NOVIEWCONTEXTMENU = 0x04000000,
   2105     REST_NONETCONNECTDISCONNECT = 0x08000000,REST_STARTMENULOGOFF = 0x10000000,REST_NOSETTINGSASSIST = 0x20000000,REST_NOINTERNETICON = 0x40000001,
   2106     REST_NORECENTDOCSHISTORY = 0x40000002,REST_NORECENTDOCSMENU = 0x40000003,REST_NOACTIVEDESKTOP = 0x40000004,REST_NOACTIVEDESKTOPCHANGES = 0x40000005,
   2107     REST_NOFAVORITESMENU = 0x40000006,REST_CLEARRECENTDOCSONEXIT = 0x40000007,REST_CLASSICSHELL = 0x40000008,REST_NOCUSTOMIZEWEBVIEW = 0x40000009,
   2108     REST_NOHTMLWALLPAPER = 0x40000010,REST_NOCHANGINGWALLPAPER = 0x40000011,REST_NODESKCOMP = 0x40000012,REST_NOADDDESKCOMP = 0x40000013,
   2109     REST_NODELDESKCOMP = 0x40000014,REST_NOCLOSEDESKCOMP = 0x40000015,REST_NOCLOSE_DRAGDROPBAND = 0x40000016,REST_NOMOVINGBAND = 0x40000017,
   2110     REST_NOEDITDESKCOMP = 0x40000018,REST_NORESOLVESEARCH = 0x40000019,REST_NORESOLVETRACK = 0x4000001A,REST_FORCECOPYACLWITHFILE = 0X4000001B,
   2111     REST_NOLOGO3CHANNELNOTIFY = 0x4000001C,REST_NOFORGETSOFTWAREUPDATE = 0x4000001D,REST_NOSETACTIVEDESKTOP = 0x4000001E,
   2112     REST_NOUPDATEWINDOWS = 0x4000001F,REST_NOCHANGESTARMENU = 0x40000020,REST_NOFOLDEROPTIONS = 0x40000021,REST_HASFINDCOMPUTERS = 0x40000022,
   2113     REST_INTELLIMENUS = 0x40000023,REST_RUNDLGMEMCHECKBOX = 0x40000024,REST_ARP_ShowPostSetup = 0x40000025,REST_NOCSC = 0x40000026,
   2114     REST_NOCONTROLPANEL = 0x40000027,REST_ENUMWORKGROUP = 0x40000028,REST_ARP_NOARP = 0x40000029,REST_ARP_NOREMOVEPAGE = 0x4000002A,
   2115     REST_ARP_NOADDPAGE = 0x4000002B,REST_ARP_NOWINSETUPPAGE = 0x4000002C,REST_GREYMSIADS = 0x4000002D,REST_NOCHANGEMAPPEDDRIVELABEL = 0x4000002E,
   2116     REST_NOCHANGEMAPPEDDRIVECOMMENT = 0x4000002F,REST_MaxRecentDocs = 0x40000030,REST_NONETWORKCONNECTIONS = 0x40000031,
   2117     REST_FORCESTARTMENULOGOFF = 0x40000032,REST_NOWEBVIEW = 0x40000033,REST_NOCUSTOMIZETHISFOLDER = 0x40000034,REST_NOENCRYPTION = 0x40000035,
   2118     REST_DONTSHOWSUPERHIDDEN = 0x40000037,REST_NOSHELLSEARCHBUTTON = 0x40000038,REST_NOHARDWARETAB = 0x40000039,REST_NORUNASINSTALLPROMPT = 0x4000003A,
   2119     REST_PROMPTRUNASINSTALLNETPATH = 0x4000003B,REST_NOMANAGEMYCOMPUTERVERB = 0x4000003C,REST_NORECENTDOCSNETHOOD = 0x4000003D,
   2120     REST_DISALLOWRUN = 0x4000003E,REST_NOWELCOMESCREEN = 0x4000003F,REST_RESTRICTCPL = 0x40000040,REST_DISALLOWCPL = 0x40000041,
   2121     REST_NOSMBALLOONTIP = 0x40000042,REST_NOSMHELP = 0x40000043,REST_NOWINKEYS = 0x40000044,REST_NOENCRYPTONMOVE = 0x40000045,
   2122     REST_NOLOCALMACHINERUN = 0x40000046,REST_NOCURRENTUSERRUN = 0x40000047,REST_NOLOCALMACHINERUNONCE = 0x40000048,
   2123     REST_NOCURRENTUSERRUNONCE = 0x40000049,REST_FORCEACTIVEDESKTOPON = 0x4000004A,REST_NOCOMPUTERSNEARME = 0x4000004B,REST_NOVIEWONDRIVE = 0x4000004C,
   2124     REST_NONETCRAWL = 0x4000004D,REST_NOSHAREDDOCUMENTS = 0x4000004E,REST_NOSMMYDOCS = 0x4000004F,REST_NOSMMYPICS = 0x40000050,
   2125     REST_ALLOWBITBUCKDRIVES = 0x40000051,REST_NONLEGACYSHELLMODE = 0x40000052,REST_NOCONTROLPANELBARRICADE = 0x40000053,REST_NOSTARTPAGE = 0x40000054,
   2126     REST_NOAUTOTRAYNOTIFY = 0x40000055,REST_NOTASKGROUPING = 0x40000056,REST_NOCDBURNING = 0x40000057,REST_MYCOMPNOPROP = 0x40000058,
   2127     REST_MYDOCSNOPROP = 0x40000059,REST_NOSTARTPANEL = 0x4000005A,REST_NODISPLAYAPPEARANCEPAGE = 0x4000005B,REST_NOTHEMESTAB = 0x4000005C,
   2128     REST_NOVISUALSTYLECHOICE = 0x4000005D,REST_NOSIZECHOICE = 0x4000005E,REST_NOCOLORCHOICE = 0x4000005F,REST_SETVISUALSTYLE = 0x40000060,
   2129     REST_STARTRUNNOHOMEPATH = 0x40000061,REST_NOUSERNAMEINSTARTPANEL = 0x40000062,REST_NOMYCOMPUTERICON = 0x40000063,REST_NOSMNETWORKPLACES = 0x40000064,
   2130     REST_NOSMPINNEDLIST = 0x40000065,REST_NOSMMYMUSIC = 0x40000066,REST_NOSMEJECTPC = 0x40000067,REST_NOSMMOREPROGRAMS = 0x40000068,
   2131     REST_NOSMMFUPROGRAMS = 0x40000069,REST_NOTRAYITEMSDISPLAY = 0x4000006A,REST_NOTOOLBARSONTASKBAR = 0x4000006B,REST_NOSMCONFIGUREPROGRAMS = 0x4000006F,
   2132     REST_HIDECLOCK = 0x40000070,REST_NOLOWDISKSPACECHECKS = 0x40000071,REST_NOENTIRENETWORK = 0x40000072,REST_NODESKTOPCLEANUP = 0x40000073,
   2133     REST_BITBUCKNUKEONDELETE = 0x40000074,REST_BITBUCKCONFIRMDELETE = 0x40000075,REST_BITBUCKNOPROP = 0x40000076,REST_NODISPBACKGROUND = 0x40000077,
   2134     REST_NODISPSCREENSAVEPG = 0x40000078,REST_NODISPSETTINGSPG = 0x40000079,REST_NODISPSCREENSAVEPREVIEW = 0x4000007A,REST_NODISPLAYCPL = 0x4000007B,
   2135     REST_HIDERUNASVERB = 0x4000007C,REST_NOTHUMBNAILCACHE = 0x4000007D,REST_NOSTRCMPLOGICAL = 0x4000007E,REST_NOPUBLISHWIZARD = 0x4000007F,
   2136     REST_NOONLINEPRINTSWIZARD = 0x40000080,REST_NOWEBSERVICES = 0x40000081,REST_ALLOWUNHASHEDWEBVIEW = 0x40000082,REST_ALLOWLEGACYWEBVIEW = 0x40000083,
   2137     REST_REVERTWEBVIEWSECURITY = 0x40000084,REST_INHERITCONSOLEHANDLES = 0x40000086,REST_SORTMAXITEMCOUNT = 0x40000087,
   2138     REST_NOREMOTERECURSIVEEVENTS = 0x40000089,REST_NOREMOTECHANGENOTIFY = 0x40000091,REST_NOSIMPLENETIDLIST = 0x40000092,
   2139     REST_NOENUMENTIRENETWORK = 0x40000093,REST_NODETAILSTHUMBNAILONNETWORK= 0x40000094,REST_NOINTERNETOPENWITH = 0x40000095,
   2140     REST_ALLOWLEGACYLMZBEHAVIOR = 0x4000009A,REST_DONTRETRYBADNETNAME = 0x4000009B,REST_ALLOWFILECLSIDJUNCTIONS = 0x4000009C,
   2141     REST_NOUPNPINSTALL = 0x4000009D,REST_NODISCONNECT = 0x41000001,REST_NOSECURITY = 0x41000002,REST_NOFILEASSOCIATE = 0x41000003,
   2142     REST_ALLOWCOMMENTTOGGLE = 0x41000004,REST_USEDESKTOPINICACHE = 0x41000005
   2143   } RESTRICTIONS;
   2144 
   2145   SHSTDAPI_(IStream *) OpenRegStream(HKEY hkey,LPCWSTR pszSubkey,LPCWSTR pszValue,DWORD grfMode);
   2146   SHSTDAPI_(WINBOOL) SHFindFiles(LPCITEMIDLIST pidlFolder,LPCITEMIDLIST pidlSaveFile);
   2147   SHSTDAPI_(void) PathGetShortPath(LPWSTR pszLongPath);
   2148   SHSTDAPI_(WINBOOL) PathYetAnotherMakeUniqueName(LPWSTR pszUniqueName,LPCWSTR pszPath,LPCWSTR pszShort,LPCWSTR pszFileSpec);
   2149   SHSTDAPI_(WINBOOL) Win32DeleteFile(LPCWSTR pszPath);
   2150 
   2151 #define PPCF_ADDQUOTES 0x00000001
   2152 #define PPCF_ADDARGUMENTS 0x00000003
   2153 #define PPCF_NODIRECTORIES 0x00000010
   2154 #define PPCF_FORCEQUALIFY 0x00000040
   2155 #define PPCF_LONGESTPOSSIBLE 0x00000080
   2156 
   2157 #define SHStartNetConnectionDialog __MINGW_NAME_AW(SHStartNetConnectionDialog)
   2158 #define SHDefExtractIcon __MINGW_NAME_AW(SHDefExtractIcon)
   2159 
   2160   SHSTDAPI_(LONG) PathProcessCommand(LPCWSTR lpSrc,LPWSTR lpDest,int iMax,DWORD dwFlags);
   2161   SHSTDAPI_(DWORD) SHRestricted(RESTRICTIONS rest);
   2162   SHSTDAPI_(WINBOOL) SignalFileOpen(LPCITEMIDLIST pidl);
   2163   SHSTDAPI_(LPITEMIDLIST) SHSimpleIDListFromPath(LPCWSTR pszPath);
   2164   SHSTDAPI SHLoadOLE(LPARAM lParam);
   2165   SHSTDAPI SHStartNetConnectionDialogA(HWND hwnd,LPCSTR pszRemoteName,DWORD dwType);
   2166   SHSTDAPI SHStartNetConnectionDialogW(HWND hwnd,LPCWSTR pszRemoteName,DWORD dwType);
   2167   SHSTDAPI SHDefExtractIconA(LPCSTR pszIconFile,int iIndex,UINT uFlags,HICON *phiconLarge,HICON *phiconSmall,UINT nIconSize);
   2168   SHSTDAPI SHDefExtractIconW(LPCWSTR pszIconFile,int iIndex,UINT uFlags,HICON *phiconLarge,HICON *phiconSmall,UINT nIconSize);
   2169   SHSTDAPI_(WINBOOL) Shell_GetImageLists(HIMAGELIST *phiml,HIMAGELIST *phimlSmall);
   2170   SHSTDAPI_(int) Shell_GetCachedImageIndex(LPCWSTR pszIconPath,int iIconIndex,UINT uIconFlags);
   2171 
   2172     enum tagOPEN_AS_INFO_FLAGS {
   2173         OAIF_ALLOW_REGISTRATION = 0x0001,
   2174         OAIF_REGISTER_EXT       = 0x0002,
   2175         OAIF_EXEC               = 0x0004,
   2176         OAIF_FORCE_REGISTRATION = 0x0008,
   2177         OAIF_HIDE_REGISTRATION  = 0x0020,
   2178         OAIF_URL_PROTOCOL       = 0x0040
   2179     };
   2180     typedef int OPEN_AS_INFO_FLAGS;
   2181 
   2182 #include <pshpack8.h>
   2183     typedef struct _openasinfo {
   2184         LPCWSTR pcszFile;
   2185         LPCWSTR pcszClass;
   2186         OPEN_AS_INFO_FLAGS oaifInFlags;
   2187     } OPENASINFO, *POPENASINFO;
   2188 #include <poppack.h>
   2189 
   2190 #undef INTERFACE
   2191 #define INTERFACE IDocViewSite
   2192   DECLARE_INTERFACE_(IDocViewSite,IUnknown) {
   2193     STDMETHOD(QueryInterface)(THIS_ REFIID riid,void **ppv) PURE;
   2194     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
   2195     STDMETHOD_(ULONG,Release)(THIS) PURE;
   2196     STDMETHOD(OnSetTitle) (THIS_ VARIANTARG *pvTitle) PURE;
   2197   };
   2198 #define VALIDATEUNC_NOUI 0x0002
   2199 #define VALIDATEUNC_CONNECT 0x0001
   2200 #define VALIDATEUNC_PRINT 0x0004
   2201 #define VALIDATEUNC_VALID 0x0007
   2202 
   2203   SHSTDAPI_(WINBOOL) SHValidateUNC(HWND hwndOwner,LPWSTR pszFile,UINT fConnect);
   2204 #define OPENPROPS_NONE 0x0000
   2205 #define OPENPROPS_INHIBITPIF 0x8000
   2206 #define GETPROPS_NONE 0x0000
   2207 #define SETPROPS_NONE 0x0000
   2208 #define CLOSEPROPS_NONE 0x0000
   2209 #define CLOSEPROPS_DISCARD 0x0001
   2210 
   2211 #define PIFNAMESIZE 30
   2212 #define PIFSTARTLOCSIZE 63
   2213 #define PIFDEFPATHSIZE 64
   2214 #define PIFPARAMSSIZE 64
   2215 #define PIFSHPROGSIZE 64
   2216 #define PIFSHDATASIZE 64
   2217 #define PIFDEFFILESIZE 80
   2218 #define PIFMAXFILEPATH 260
   2219 
   2220   typedef struct PROPPRG {
   2221     WORD flPrg;
   2222     WORD flPrgInit;
   2223     CHAR achTitle[PIFNAMESIZE];
   2224     CHAR achCmdLine[PIFSTARTLOCSIZE+PIFPARAMSSIZE+1];
   2225     CHAR achWorkDir[PIFDEFPATHSIZE];
   2226     WORD wHotKey;
   2227     CHAR achIconFile[PIFDEFFILESIZE];
   2228     WORD wIconIndex;
   2229     DWORD dwEnhModeFlags;
   2230     DWORD dwRealModeFlags;
   2231     CHAR achOtherFile[PIFDEFFILESIZE];
   2232     CHAR achPIFFile[PIFMAXFILEPATH];
   2233   } PROPPRG;
   2234   typedef UNALIGNED PROPPRG *PPROPPRG;
   2235   typedef UNALIGNED PROPPRG *LPPROPPRG;
   2236   typedef const UNALIGNED PROPPRG *LPCPROPPRG;
   2237 
   2238   SHSTDAPI_(HANDLE) PifMgr_OpenProperties(LPCWSTR pszApp,LPCWSTR pszPIF,UINT hInf,UINT flOpt);
   2239   SHSTDAPI_(int) PifMgr_GetProperties(HANDLE hProps,LPCSTR pszGroup,void *lpProps,int cbProps,UINT flOpt);
   2240   SHSTDAPI_(int) PifMgr_SetProperties(HANDLE hProps,LPCSTR pszGroup,const VOID *lpProps,int cbProps,UINT flOpt);
   2241   SHSTDAPI_(HANDLE) PifMgr_CloseProperties(HANDLE hProps,UINT flOpt);
   2242   SHSTDAPI_(void) SHSetInstanceExplorer(IUnknown *punk);
   2243   SHSTDAPI_(WINBOOL) IsUserAnAdmin(void);
   2244 
   2245 #undef INTERFACE
   2246 #define INTERFACE IInitializeObject
   2247   DECLARE_INTERFACE_(IInitializeObject,IUnknown) {
   2248     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   2249     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   2250     STDMETHOD_(ULONG,Release) (THIS) PURE;
   2251     STDMETHOD(Initialize)(THIS) PURE;
   2252   };
   2253 
   2254   enum {
   2255     BMICON_LARGE = 0,BMICON_SMALL
   2256   };
   2257 
   2258 #undef INTERFACE
   2259 #define INTERFACE IBanneredBar
   2260   DECLARE_INTERFACE_(IBanneredBar,IUnknown) {
   2261     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   2262     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   2263     STDMETHOD_(ULONG,Release) (THIS) PURE;
   2264     STDMETHOD(SetIconSize)(THIS_ DWORD iIcon) PURE;
   2265     STDMETHOD(GetIconSize)(THIS_ DWORD *piIcon) PURE;
   2266     STDMETHOD(SetBitmap)(THIS_ HBITMAP hBitmap) PURE;
   2267     STDMETHOD(GetBitmap)(THIS_ HBITMAP *phBitmap) PURE;
   2268   };
   2269 
   2270   SHSTDAPI_(LRESULT) SHShellFolderView_Message(HWND hwndMain,UINT uMsg,LPARAM lParam);
   2271 
   2272 #undef INTERFACE
   2273 #define INTERFACE IShellFolderViewCB
   2274   DECLARE_INTERFACE_(IShellFolderViewCB,IUnknown) {
   2275     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   2276     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   2277     STDMETHOD_(ULONG,Release) (THIS) PURE;
   2278     STDMETHOD(MessageSFVCB)(THIS_ UINT uMsg,WPARAM wParam,LPARAM lParam) PURE;
   2279   };
   2280 
   2281 #include <pshpack8.h>
   2282 
   2283 #undef UNSIZED_ARRAY2
   2284 #undef EMPTY_SIZE2
   2285 #define UNSIZED_ARRAY2
   2286 #define EMPTY_SIZE2 UNSIZED_ARRAY2
   2287 
   2288 #define QCMINFO_PLACE_BEFORE 0
   2289 #define QCMINFO_PLACE_AFTER 1
   2290   typedef struct _QCMINFO_IDMAP_PLACEMENT {
   2291     UINT id;
   2292     UINT fFlags;
   2293   } QCMINFO_IDMAP_PLACEMENT;
   2294 
   2295   typedef struct _QCMINFO_IDMAP {
   2296     UINT nMaxIds;
   2297     QCMINFO_IDMAP_PLACEMENT pIdList[1];
   2298   } QCMINFO_IDMAP;
   2299 
   2300   typedef struct _QCMINFO {
   2301     HMENU hmenu;
   2302     UINT indexMenu;
   2303     UINT idCmdFirst;
   2304     UINT idCmdLast;
   2305     QCMINFO_IDMAP const *pIdMap;
   2306   } QCMINFO;
   2307 
   2308   typedef QCMINFO *LPQCMINFO;
   2309 
   2310 #define TBIF_APPEND 0
   2311 #define TBIF_PREPEND 1
   2312 #define TBIF_REPLACE 2
   2313 #define TBIF_DEFAULT 0x00000000
   2314 #define TBIF_INTERNETBAR 0x00010000
   2315 #define TBIF_STANDARDTOOLBAR 0x00020000
   2316 #define TBIF_NOTOOLBAR 0x00030000
   2317 
   2318   typedef struct _TBINFO {
   2319     UINT cbuttons;
   2320     UINT uFlags;
   2321   } TBINFO;
   2322 
   2323   typedef struct _DETAILSINFO {
   2324     LPCITEMIDLIST pidl;
   2325     int fmt;
   2326     int cxChar;
   2327     STRRET str;
   2328     int iImage;
   2329   } DETAILSINFO;
   2330 
   2331   typedef struct _SFVM_PROPPAGE_DATA {
   2332     DWORD dwReserved;
   2333     LPFNADDPROPSHEETPAGE pfn;
   2334     LPARAM lParam;
   2335   } SFVM_PROPPAGE_DATA;
   2336 
   2337   typedef struct _SFVM_HELPTOPIC_DATA {
   2338     WCHAR wszHelpFile[MAX_PATH];
   2339     WCHAR wszHelpTopic[MAX_PATH];
   2340   } SFVM_HELPTOPIC_DATA;
   2341 
   2342 #define SFVM_MERGEMENU 1
   2343 #define SFVM_INVOKECOMMAND 2
   2344 #define SFVM_GETHELPTEXT 3
   2345 #define SFVM_GETTOOLTIPTEXT 4
   2346 #define SFVM_GETBUTTONINFO 5
   2347 #define SFVM_GETBUTTONS 6
   2348 #define SFVM_INITMENUPOPUP 7
   2349 #define SFVM_FSNOTIFY 14
   2350 #define SFVM_WINDOWCREATED 15
   2351 #define SFVM_GETDETAILSOF 23
   2352 #define SFVM_COLUMNCLICK 24
   2353 #define SFVM_QUERYFSNOTIFY 25
   2354 #define SFVM_DEFITEMCOUNT 26
   2355 #define SFVM_DEFVIEWMODE 27
   2356 #define SFVM_UNMERGEMENU 28
   2357 #define SFVM_UPDATESTATUSBAR 31
   2358 #define SFVM_BACKGROUNDENUM 32
   2359 #define SFVM_DIDDRAGDROP 36
   2360 #define SFVM_SETISFV 39
   2361 #define SFVM_THISIDLIST 41
   2362 #define SFVM_ADDPROPERTYPAGES 47
   2363 #define SFVM_BACKGROUNDENUMDONE 48
   2364 #define SFVM_GETNOTIFY 49
   2365 #define SFVM_GETSORTDEFAULTS 53
   2366 #define SFVM_SIZE 57
   2367 #define SFVM_GETZONE 58
   2368 #define SFVM_GETPANE 59
   2369 #define SFVM_GETHELPTOPIC 63
   2370 #define SFVM_GETANIMATION 68
   2371 
   2372   typedef struct _SFV_CREATE {
   2373     UINT cbSize;
   2374     IShellFolder *pshf;
   2375     IShellView *psvOuter;
   2376     IShellFolderViewCB *psfvcb;
   2377   } SFV_CREATE;
   2378 
   2379   SHSTDAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv,IShellView **ppsv);
   2380 
   2381   typedef HRESULT (CALLBACK *LPFNDFMCALLBACK)(IShellFolder *psf,HWND hwnd,IDataObject *pdtobj,UINT uMsg,WPARAM wParam,LPARAM lParam);
   2382 
   2383 #define SHOpenPropSheet __MINGW_NAME_AW(SHOpenPropSheet)
   2384 
   2385   SHSTDAPI CDefFolderMenu_Create2(LPCITEMIDLIST pidlFolder,HWND hwnd,UINT cidl,LPCITEMIDLIST *apidl,IShellFolder *psf,LPFNDFMCALLBACK lpfn,UINT nKeys,const HKEY *ahkeyClsKeys,IContextMenu **ppcm);
   2386   SHSTDAPI_(WINBOOL) SHOpenPropSheetA(LPCSTR pszCaption,HKEY ahkeys[],UINT cikeys,const CLSID *pclsidDefault,IDataObject *pdtobj,IShellBrowser *psb,LPCSTR pStartPage);
   2387   SHSTDAPI_(WINBOOL) SHOpenPropSheetW(LPCWSTR pszCaption,HKEY ahkeys[],UINT cikeys,const CLSID *pclsidDefault,IDataObject *pdtobj,IShellBrowser *psb,LPCWSTR pStartPage);
   2388 
   2389 #define DFM_MERGECONTEXTMENU 1
   2390 #define DFM_INVOKECOMMAND 2
   2391 #define DFM_GETDEFSTATICID 14
   2392 
   2393 #define DFM_CMD_PROPERTIES ((UINT)-5)
   2394   typedef TBINFO *LPTBINFO;
   2395   typedef DETAILSINFO *PDETAILSINFO;
   2396   typedef HRESULT (CALLBACK *LPFNVIEWCALLBACK)(IShellView *psvOuter,IShellFolder *psf,HWND hwndMain,UINT uMsg,WPARAM wParam,LPARAM lParam);
   2397 
   2398   typedef struct _CSFV {
   2399     UINT cbSize;
   2400     IShellFolder *pshf;
   2401     IShellView *psvOuter;
   2402     LPCITEMIDLIST pidl;
   2403     LONG lEvents;
   2404     LPFNVIEWCALLBACK pfnCallback;
   2405     FOLDERVIEWMODE fvm;
   2406   } CSFV,*LPCSFV;
   2407 
   2408 #define SFVM_REARRANGE 0x00000001
   2409 #define ShellFolderView_ReArrange(_hwnd,_lparam) (WINBOOL)SHShellFolderView_Message(_hwnd,SFVM_REARRANGE,_lparam)
   2410 
   2411 #define SFVM_ADDOBJECT 0x00000003
   2412 #define ShellFolderView_AddObject(_hwnd,_pidl) (LPARAM)SHShellFolderView_Message(_hwnd,SFVM_ADDOBJECT,(LPARAM)_pidl)
   2413 
   2414 #define SFVM_REMOVEOBJECT 0x00000006
   2415 #define ShellFolderView_RemoveObject(_hwnd,_pidl) (LPARAM)SHShellFolderView_Message(_hwnd,SFVM_REMOVEOBJECT,(LPARAM)_pidl)
   2416 
   2417 #define SFVM_UPDATEOBJECT 0x00000007
   2418 #define ShellFolderView_UpdateObject(_hwnd,_ppidl) (LPARAM)SHShellFolderView_Message(_hwnd,SFVM_UPDATEOBJECT,(LPARAM)_ppidl)
   2419 
   2420 #define SFVM_GETSELECTEDOBJECTS 0x00000009
   2421 #define ShellFolderView_GetSelectedObjects(_hwnd,ppidl) (LPARAM)SHShellFolderView_Message(_hwnd,SFVM_GETSELECTEDOBJECTS,(LPARAM)ppidl)
   2422   typedef struct _SFV_SETITEMPOS {
   2423     LPCITEMIDLIST pidl;
   2424     POINT pt;
   2425   } SFV_SETITEMPOS,*LPSFV_SETITEMPOS;
   2426 
   2427 #define SFVM_SETITEMPOS 0x0000000e
   2428 #define ShellFolderView_SetItemPos(_hwnd,_pidl,_x,_y) { SFV_SETITEMPOS _sip = {_pidl,{_x,_y}}; SHShellFolderView_Message(_hwnd,SFVM_SETITEMPOS,(LPARAM)(LPSFV_SETITEMPOS)&_sip);}
   2429 
   2430 #define SFVM_SETCLIPBOARD 0x00000010
   2431 #define ShellFolderView_SetClipboard(_hwnd,_dwEffect) (void)SHShellFolderView_Message(_hwnd,SFVM_SETCLIPBOARD,(LPARAM)(DWORD)(_dwEffect))
   2432 #define SFVM_SETPOINTS 0x00000017
   2433 #define ShellFolderView_SetPoints(_hwnd,_pdtobj) (void)SHShellFolderView_Message(_hwnd,SFVM_SETPOINTS,(LPARAM)_pdtobj)
   2434 #include <poppack.h>
   2435   SHSTDAPI_(IContextMenu *) SHFind_InitMenuPopup(HMENU hmenu,HWND hwndOwner,UINT idCmdFirst,UINT idCmdLast);
   2436   SHSTDAPI SHCreateShellFolderViewEx(LPCSFV pcsfv,IShellView **ppsv);
   2437 
   2438 #define PID_IS_URL 2
   2439 #define PID_IS_NAME 4
   2440 #define PID_IS_WORKINGDIR 5
   2441 #define PID_IS_HOTKEY 6
   2442 #define PID_IS_SHOWCMD 7
   2443 #define PID_IS_ICONINDEX 8
   2444 #define PID_IS_ICONFILE 9
   2445 #define PID_IS_WHATSNEW 10
   2446 #define PID_IS_AUTHOR 11
   2447 #define PID_IS_DESCRIPTION 12
   2448 #define PID_IS_COMMENT 13
   2449 
   2450 #define PID_INTSITE_WHATSNEW 2
   2451 #define PID_INTSITE_AUTHOR 3
   2452 #define PID_INTSITE_LASTVISIT 4
   2453 #define PID_INTSITE_LASTMOD 5
   2454 #define PID_INTSITE_VISITCOUNT 6
   2455 #define PID_INTSITE_DESCRIPTION 7
   2456 #define PID_INTSITE_COMMENT 8
   2457 #define PID_INTSITE_FLAGS 9
   2458 #define PID_INTSITE_CONTENTLEN 10
   2459 #define PID_INTSITE_CONTENTCODE 11
   2460 #define PID_INTSITE_RECURSE 12
   2461 #define PID_INTSITE_WATCH 13
   2462 #define PID_INTSITE_SUBSCRIPTION 14
   2463 #define PID_INTSITE_URL 15
   2464 #define PID_INTSITE_TITLE 16
   2465 #define PID_INTSITE_CODEPAGE 18
   2466 #define PID_INTSITE_TRACKING 19
   2467 #define PID_INTSITE_ICONINDEX 20
   2468 #define PID_INTSITE_ICONFILE 21
   2469 
   2470 #define PIDISF_RECENTLYCHANGED 0x00000001
   2471 #define PIDISF_CACHEDSTICKY 0x00000002
   2472 #define PIDISF_CACHEIMAGES 0x00000010
   2473 #define PIDISF_FOLLOWALLLINKS 0x00000020
   2474 
   2475 #define PIDISM_GLOBAL 0
   2476 #define PIDISM_WATCH 1
   2477 #define PIDISM_DONTWATCH 2
   2478 
   2479   typedef struct {
   2480     WINBOOL fShowAllObjects : 1;
   2481     WINBOOL fShowExtensions : 1;
   2482     WINBOOL fNoConfirmRecycle : 1;
   2483     WINBOOL fShowSysFiles : 1;
   2484     WINBOOL fShowCompColor : 1;
   2485     WINBOOL fDoubleClickInWebView : 1;
   2486     WINBOOL fDesktopHTML : 1;
   2487     WINBOOL fWin95Classic : 1;
   2488     WINBOOL fDontPrettyPath : 1;
   2489     WINBOOL fShowAttribCol : 1;
   2490     WINBOOL fMapNetDrvBtn : 1;
   2491     WINBOOL fShowInfoTip : 1;
   2492     WINBOOL fHideIcons : 1;
   2493     WINBOOL fWebView : 1;
   2494     WINBOOL fFilter : 1;
   2495     WINBOOL fShowSuperHidden : 1;
   2496     WINBOOL fNoNetCrawling : 1;
   2497     DWORD dwWin95Unused;
   2498     UINT uWin95Unused;
   2499     LONG lParamSort;
   2500     int iSortDirection;
   2501     UINT version;
   2502     UINT uNotUsed;
   2503     WINBOOL fSepProcess: 1;
   2504     WINBOOL fStartPanelOn: 1;
   2505     WINBOOL fShowStartPage: 1;
   2506     UINT fSpareFlags : 13;
   2507   } SHELLSTATEA,*LPSHELLSTATEA;
   2508 
   2509   typedef struct {
   2510     WINBOOL fShowAllObjects : 1;
   2511     WINBOOL fShowExtensions : 1;
   2512     WINBOOL fNoConfirmRecycle : 1;
   2513     WINBOOL fShowSysFiles : 1;
   2514     WINBOOL fShowCompColor : 1;
   2515     WINBOOL fDoubleClickInWebView : 1;
   2516     WINBOOL fDesktopHTML : 1;
   2517     WINBOOL fWin95Classic : 1;
   2518     WINBOOL fDontPrettyPath : 1;
   2519     WINBOOL fShowAttribCol : 1;
   2520     WINBOOL fMapNetDrvBtn : 1;
   2521     WINBOOL fShowInfoTip : 1;
   2522     WINBOOL fHideIcons : 1;
   2523     WINBOOL fWebView : 1;
   2524     WINBOOL fFilter : 1;
   2525     WINBOOL fShowSuperHidden : 1;
   2526     WINBOOL fNoNetCrawling : 1;
   2527     DWORD dwWin95Unused;
   2528     UINT uWin95Unused;
   2529     LONG lParamSort;
   2530     int iSortDirection;
   2531     UINT version;
   2532     UINT uNotUsed;
   2533     WINBOOL fSepProcess: 1;
   2534     WINBOOL fStartPanelOn: 1;
   2535     WINBOOL fShowStartPage: 1;
   2536     UINT fSpareFlags : 13;
   2537   } SHELLSTATEW,*LPSHELLSTATEW;
   2538 
   2539 #define SHELLSTATEVERSION_IE4 9
   2540 #define SHELLSTATEVERSION_WIN2K 10
   2541 
   2542 #define SHELLSTATE __MINGW_NAME_AW(SHELLSTATE)
   2543 #define LPSHELLSTATE __MINGW_NAME_AW(LPSHELLSTATE)
   2544 
   2545 #define SHELLSTATE_SIZE_WIN95 FIELD_OFFSET(SHELLSTATE,lParamSort)
   2546 #define SHELLSTATE_SIZE_NT4 FIELD_OFFSET(SHELLSTATE,version)
   2547 #define SHELLSTATE_SIZE_IE4 FIELD_OFFSET(SHELLSTATE,uNotUsed)
   2548 #define SHELLSTATE_SIZE_WIN2K sizeof(SHELLSTATE)
   2549 
   2550   SHSTDAPI_(void) SHGetSetSettings(LPSHELLSTATE lpss,DWORD dwMask,WINBOOL bSet);
   2551 
   2552   typedef struct {
   2553     WINBOOL fShowAllObjects : 1;
   2554     WINBOOL fShowExtensions : 1;
   2555     WINBOOL fNoConfirmRecycle : 1;
   2556     WINBOOL fShowSysFiles : 1;
   2557     WINBOOL fShowCompColor : 1;
   2558     WINBOOL fDoubleClickInWebView : 1;
   2559     WINBOOL fDesktopHTML : 1;
   2560     WINBOOL fWin95Classic : 1;
   2561     WINBOOL fDontPrettyPath : 1;
   2562     WINBOOL fShowAttribCol : 1;
   2563     WINBOOL fMapNetDrvBtn : 1;
   2564     WINBOOL fShowInfoTip : 1;
   2565     WINBOOL fHideIcons : 1;
   2566     UINT fRestFlags : 3;
   2567   } SHELLFLAGSTATE,*LPSHELLFLAGSTATE;
   2568 
   2569 #define SSF_SHOWALLOBJECTS 0x00000001
   2570 #define SSF_SHOWEXTENSIONS 0x00000002
   2571 #define SSF_HIDDENFILEEXTS 0x00000004
   2572 #define SSF_SERVERADMINUI 0x00000004
   2573 #define SSF_SHOWCOMPCOLOR 0x00000008
   2574 #define SSF_SORTCOLUMNS 0x00000010
   2575 #define SSF_SHOWSYSFILES 0x00000020
   2576 #define SSF_DOUBLECLICKINWEBVIEW 0x00000080
   2577 #define SSF_SHOWATTRIBCOL 0x00000100
   2578 #define SSF_DESKTOPHTML 0x00000200
   2579 #define SSF_WIN95CLASSIC 0x00000400
   2580 #define SSF_DONTPRETTYPATH 0x00000800
   2581 #define SSF_SHOWINFOTIP 0x00002000
   2582 #define SSF_MAPNETDRVBUTTON 0x00001000
   2583 #define SSF_NOCONFIRMRECYCLE 0x00008000
   2584 #define SSF_HIDEICONS 0x00004000
   2585 #define SSF_FILTER 0x00010000
   2586 #define SSF_WEBVIEW 0x00020000
   2587 #define SSF_SHOWSUPERHIDDEN 0x00040000
   2588 #define SSF_SEPPROCESS 0x00080000
   2589 #define SSF_NONETCRAWLING 0x00100000
   2590 #define SSF_STARTPANELON 0x00200000
   2591 #define SSF_SHOWSTARTPAGE 0x00400000
   2592 
   2593   SHSTDAPI_(void) SHGetSettings(LPSHELLFLAGSTATE lpsfs,DWORD dwMask);
   2594   SHSTDAPI SHBindToParent(LPCITEMIDLIST pidl,REFIID riid,void **ppv,LPCITEMIDLIST *ppidlLast);
   2595   SHSTDAPI SHParseDisplayName(LPCWSTR pszName,IBindCtx *pbc,LPITEMIDLIST *ppidl,SFGAOF sfgaoIn,SFGAOF *psfgaoOut);
   2596 
   2597 #define SHPPFW_NONE 0x00000000
   2598 #define SHPPFW_DEFAULT SHPPFW_DIRCREATE
   2599 #define SHPPFW_DIRCREATE 0x00000001
   2600 #define SHPPFW_ASKDIRCREATE 0x00000002
   2601 #define SHPPFW_IGNOREFILENAME 0x00000004
   2602 #define SHPPFW_NOWRITECHECK 0x00000008
   2603 #define SHPPFW_MEDIACHECKONLY 0x00000010
   2604 
   2605 #define SHPathPrepareForWrite __MINGW_NAME_AW(SHPathPrepareForWrite)
   2606 
   2607   SHSTDAPI SHPathPrepareForWriteA(HWND hwnd,IUnknown *punkEnableModless,LPCSTR pszPath,DWORD dwFlags);
   2608   SHSTDAPI SHPathPrepareForWriteW(HWND hwnd,IUnknown *punkEnableModless,LPCWSTR pszPath,DWORD dwFlags);
   2609 
   2610 
   2611 #undef INTERFACE
   2612 #define INTERFACE INamedPropertyBag
   2613   DECLARE_INTERFACE_(INamedPropertyBag,IUnknown) {
   2614     STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppv) PURE;
   2615     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   2616     STDMETHOD_(ULONG,Release) (THIS) PURE;
   2617     STDMETHOD(ReadPropertyNPB) (THIS_ LPCOLESTR pszBagname,LPCOLESTR pszPropName,PROPVARIANT *pVar) PURE;
   2618     STDMETHOD(WritePropertyNPB)(THIS_ LPCOLESTR pszBagname,LPCOLESTR pszPropName,PROPVARIANT *pVar) PURE;
   2619     STDMETHOD(RemovePropertyNPB)(THIS_ LPCOLESTR pszBagname,LPCOLESTR pszPropName) PURE;
   2620   };
   2621 
   2622 #ifdef __urlmon_h__
   2623   SHDOCAPI_(DWORD) SoftwareUpdateMessageBox(HWND hWnd,LPCWSTR szDistUnit,DWORD dwFlags,LPSOFTDISTINFO psdi);
   2624 #endif
   2625 
   2626 #define SHCreateFileExtractIcon __MINGW_NAME_AW(SHCreateFileExtractIcon)
   2627 
   2628   SHSTDAPI SHPropStgCreate(IPropertySetStorage *psstg,REFFMTID fmtid,CLSID *pclsid,DWORD grfFlags,DWORD grfMode,DWORD dwDisposition,IPropertyStorage**ppstg,UINT *puCodePage);
   2629   SHSTDAPI SHPropStgReadMultiple(IPropertyStorage *pps,UINT uCodePage,ULONG cpspec,PROPSPEC const rgpspec[],PROPVARIANT rgvar[]);
   2630   SHSTDAPI SHPropStgWriteMultiple(IPropertyStorage *pps,UINT *puCodePage,ULONG cpspec,PROPSPEC const rgpspec[],PROPVARIANT rgvar[],PROPID propidNameFirst);
   2631   SHSTDAPI SHCreateFileExtractIconA(LPCSTR pszFile,DWORD dwFileAttributes,REFIID riid,void **ppv);
   2632   SHSTDAPI SHCreateFileExtractIconW(LPCWSTR pszFile,DWORD dwFileAttributes,REFIID riid,void **ppv);
   2633 
   2634 #include <pshpack8.h>
   2635   SHSTDAPI SHLimitInputEdit(HWND hwndEdit,IShellFolder *psf);
   2636   SHSTDAPI SHMultiFileProperties(IDataObject *pdtobj,DWORD dwFlags);
   2637 
   2638 #if (_WIN32_IE >= 0x0600)
   2639   typedef void (CALLBACK *PFNASYNCICONTASKBALLBACK)(LPCITEMIDLIST pidl,LPVOID pvData,LPVOID pvHint,INT iIconIndex,INT iOpenIconIndex);
   2640   SHSTDAPI SHMapIDListToImageListIndexAsync(IShellTaskScheduler *pts,IShellFolder *psf,LPCITEMIDLIST pidl,UINT flags,PFNASYNCICONTASKBALLBACK pfn,LPVOID pvData,LPVOID pvHint,int *piIndex,int *piIndexSel);
   2641 #endif
   2642 
   2643   SHSTDAPI_(int) SHMapPIDLToSystemImageListIndex(IShellFolder *pshf,LPCITEMIDLIST pidl,int *piIndexSel);
   2644   STDAPI SHCLSIDFromString(PCWSTR lpsz,CLSID *pclsid);
   2645   STDAPI SHFlushClipboard(void);
   2646   STDAPI SHCreateQueryCancelAutoPlayMoniker(IMoniker**ppmoniker);
   2647   HINSTANCE WINAPI SHGetShellStyleHInstance(void);
   2648   STDAPI_(void) PerUserInit(void);
   2649   WINSHELLAPI WINBOOL WINAPI SHRunControlPanel(LPCWSTR lpcszCmdLine,HWND hwndMsgParent);
   2650   WINSHELLAPI int WINAPI PickIconDlg(HWND hwnd,LPWSTR pszIconPath,UINT cbIconPath,int *piIconIndex);
   2651 
   2652   typedef struct tagAAMENUFILENAME {
   2653     SHORT cbTotal;
   2654     BYTE rgbReserved[12];
   2655     WCHAR szFileName[1];
   2656   } AASHELLMENUFILENAME,*LPAASHELLMENUFILENAME;
   2657 
   2658   typedef struct tagAASHELLMENUITEM {
   2659     void *lpReserved1;
   2660     int iReserved;
   2661     UINT uiReserved;
   2662     LPAASHELLMENUFILENAME lpName;
   2663     LPWSTR psz;
   2664   } AASHELLMENUITEM,*LPAASHELLMENUITEM;
   2665 
   2666   STDAPI SHGetAttributesFromDataObject(IDataObject *pdo,DWORD dwAttributeMask,DWORD *pdwAttributes,UINT *pcItems);
   2667 
   2668 #include <poppack.h>
   2669 
   2670 #ifdef __cplusplus
   2671 }
   2672 #endif
   2673 
   2674 #include <poppack.h>
   2675 
   2676 SHDOCAPI_(WINBOOL) ImportPrivacySettings(LPCWSTR szFilename,WINBOOL *pfParsePrivacyPreferences,WINBOOL *pfParsePerSiteRules);
   2677 #ifndef IEnumPrivacyRecords
   2678 typedef struct IEnumPrivacyRecords IEnumPrivacyRecords;
   2679 #endif
   2680 SHDOCAPI DoPrivacyDlg(HWND hwndParent,LPOLESTR pszUrl,IEnumPrivacyRecords *pPrivacyEnum,WINBOOL fReportAllSites);
   2681 
   2682 #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
   2683 
   2684 #endif
   2685