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