Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _INC_SHLWAPI
      7 #define _INC_SHLWAPI
      8 
      9 #include <_mingw_unicode.h>
     10 
     11 #ifndef NOSHLWAPI
     12 
     13 #include <objbase.h>
     14 #include <shtypes.h>
     15 
     16 #ifndef _WINRESRC_
     17 #ifndef _WIN32_IE
     18 #define _WIN32_IE 0x0601
     19 #endif
     20 #endif
     21 
     22 #ifndef WINSHLWAPI
     23 #if !defined(_SHLWAPI_)
     24 #define LWSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT WINAPI
     25 #define LWSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type WINAPI
     26 #define LWSTDAPIV EXTERN_C DECLSPEC_IMPORT HRESULT STDAPIVCALLTYPE
     27 #define LWSTDAPIV_(type) EXTERN_C DECLSPEC_IMPORT type STDAPIVCALLTYPE
     28 #else
     29 #define LWSTDAPI STDAPI
     30 #define LWSTDAPI_(type) STDAPI_(type)
     31 #define LWSTDAPIV STDAPIV
     32 #define LWSTDAPIV_(type) STDAPIV_(type)
     33 #endif
     34 #endif
     35 
     36 #include <pshpack8.h>
     37 
     38 #ifdef __cplusplus
     39 extern "C" {
     40 #endif
     41 
     42 #ifndef NO_SHLWAPI_STRFCNS
     43   LWSTDAPI_(LPSTR) StrChrA(LPCSTR lpStart,WORD wMatch);
     44   LWSTDAPI_(LPWSTR) StrChrW(LPCWSTR lpStart,WCHAR wMatch);
     45   LWSTDAPI_(LPSTR) StrChrIA(LPCSTR lpStart,WORD wMatch);
     46   LWSTDAPI_(LPWSTR) StrChrIW(LPCWSTR lpStart,WCHAR wMatch);
     47   LWSTDAPI_(int) StrCmpNA(LPCSTR lpStr1,LPCSTR lpStr2,int nChar);
     48   LWSTDAPI_(int) StrCmpNW(LPCWSTR lpStr1,LPCWSTR lpStr2,int nChar);
     49   LWSTDAPI_(int) StrCmpNIA(LPCSTR lpStr1,LPCSTR lpStr2,int nChar);
     50   LWSTDAPI_(int) StrCmpNIW(LPCWSTR lpStr1,LPCWSTR lpStr2,int nChar);
     51   LWSTDAPI_(int) StrCSpnA(LPCSTR lpStr,LPCSTR lpSet);
     52   LWSTDAPI_(int) StrCSpnW(LPCWSTR lpStr,LPCWSTR lpSet);
     53   LWSTDAPI_(int) StrCSpnIA(LPCSTR lpStr,LPCSTR lpSet);
     54   LWSTDAPI_(int) StrCSpnIW(LPCWSTR lpStr,LPCWSTR lpSet);
     55   LWSTDAPI_(LPSTR) StrDupA(LPCSTR lpSrch);
     56   LWSTDAPI_(LPWSTR) StrDupW(LPCWSTR lpSrch);
     57   LWSTDAPI_(LPSTR) StrFormatByteSizeA(DWORD dw,LPSTR szBuf,UINT uiBufSize);
     58   LWSTDAPI_(LPSTR) StrFormatByteSize64A(LONGLONG qdw,LPSTR szBuf,UINT uiBufSize);
     59   LWSTDAPI_(LPWSTR) StrFormatByteSizeW(LONGLONG qdw,LPWSTR szBuf,UINT uiBufSize);
     60   LWSTDAPI_(LPWSTR) StrFormatKBSizeW(LONGLONG qdw,LPWSTR szBuf,UINT uiBufSize);
     61   LWSTDAPI_(LPSTR) StrFormatKBSizeA(LONGLONG qdw,LPSTR szBuf,UINT uiBufSize);
     62   LWSTDAPI_(int) StrFromTimeIntervalA(LPSTR pszOut,UINT cchMax,DWORD dwTimeMS,int digits);
     63   LWSTDAPI_(int) StrFromTimeIntervalW(LPWSTR pszOut,UINT cchMax,DWORD dwTimeMS,int digits);
     64   LWSTDAPI_(WINBOOL) StrIsIntlEqualA(WINBOOL fCaseSens,LPCSTR lpString1,LPCSTR lpString2,int nChar);
     65   LWSTDAPI_(WINBOOL) StrIsIntlEqualW(WINBOOL fCaseSens,LPCWSTR lpString1,LPCWSTR lpString2,int nChar);
     66   LWSTDAPI_(LPSTR) StrNCatA(LPSTR psz1,LPCSTR psz2,int cchMax);
     67   LWSTDAPI_(LPWSTR) StrNCatW(LPWSTR psz1,LPCWSTR psz2,int cchMax);
     68   LWSTDAPI_(LPSTR) StrPBrkA(LPCSTR psz,LPCSTR pszSet);
     69   LWSTDAPI_(LPWSTR) StrPBrkW(LPCWSTR psz,LPCWSTR pszSet);
     70   LWSTDAPI_(LPSTR) StrRChrA(LPCSTR lpStart,LPCSTR lpEnd,WORD wMatch);
     71   LWSTDAPI_(LPWSTR) StrRChrW(LPCWSTR lpStart,LPCWSTR lpEnd,WCHAR wMatch);
     72   LWSTDAPI_(LPSTR) StrRChrIA(LPCSTR lpStart,LPCSTR lpEnd,WORD wMatch);
     73   LWSTDAPI_(LPWSTR) StrRChrIW(LPCWSTR lpStart,LPCWSTR lpEnd,WCHAR wMatch);
     74   LWSTDAPI_(LPSTR) StrRStrIA(LPCSTR lpSource,LPCSTR lpLast,LPCSTR lpSrch);
     75   LWSTDAPI_(LPWSTR) StrRStrIW(LPCWSTR lpSource,LPCWSTR lpLast,LPCWSTR lpSrch);
     76   LWSTDAPI_(int) StrSpnA(LPCSTR psz,LPCSTR pszSet);
     77   LWSTDAPI_(int) StrSpnW(LPCWSTR psz,LPCWSTR pszSet);
     78   LWSTDAPI_(LPSTR) StrStrA(LPCSTR lpFirst,LPCSTR lpSrch);
     79   LWSTDAPI_(LPWSTR) StrStrW(LPCWSTR lpFirst,LPCWSTR lpSrch);
     80   LWSTDAPI_(LPSTR) StrStrIA(LPCSTR lpFirst,LPCSTR lpSrch);
     81   LWSTDAPI_(LPWSTR) StrStrIW(LPCWSTR lpFirst,LPCWSTR lpSrch);
     82   LWSTDAPI_(int) StrToIntA(LPCSTR lpSrc);
     83   LWSTDAPI_(int) StrToIntW(LPCWSTR lpSrc);
     84   LWSTDAPI_(WINBOOL) StrToIntExA(LPCSTR pszString,DWORD dwFlags,int *piRet);
     85   LWSTDAPI_(WINBOOL) StrToIntExW(LPCWSTR pszString,DWORD dwFlags,int *piRet);
     86 #if (_WIN32_IE >= 0x0600)
     87   LWSTDAPI_(WINBOOL) StrToInt64ExA(LPCSTR pszString,DWORD dwFlags,LONGLONG *pllRet);
     88   LWSTDAPI_(WINBOOL) StrToInt64ExW(LPCWSTR pszString,DWORD dwFlags,LONGLONG *pllRet);
     89 #endif
     90   LWSTDAPI_(WINBOOL) StrTrimA(LPSTR psz,LPCSTR pszTrimChars);
     91   LWSTDAPI_(WINBOOL) StrTrimW(LPWSTR psz,LPCWSTR pszTrimChars);
     92   LWSTDAPI_(LPWSTR) StrCatW(LPWSTR psz1,LPCWSTR psz2);
     93   LWSTDAPI_(int) StrCmpW(LPCWSTR psz1,LPCWSTR psz2);
     94   LWSTDAPI_(int) StrCmpIW(LPCWSTR psz1,LPCWSTR psz2);
     95   LWSTDAPI_(LPWSTR) StrCpyW(LPWSTR psz1,LPCWSTR psz2);
     96   LWSTDAPI_(LPWSTR) StrCpyNW(LPWSTR psz1,LPCWSTR psz2,int cchMax);
     97   LWSTDAPI_(LPWSTR) StrCatBuffW(LPWSTR pszDest,LPCWSTR pszSrc,int cchDestBuffSize);
     98   LWSTDAPI_(LPSTR) StrCatBuffA(LPSTR pszDest,LPCSTR pszSrc,int cchDestBuffSize);
     99   LWSTDAPI_(WINBOOL) ChrCmpIA(WORD w1,WORD w2);
    100   LWSTDAPI_(WINBOOL) ChrCmpIW(WCHAR w1,WCHAR w2);
    101   LWSTDAPI_(int) wvnsprintfA(LPSTR lpOut,int cchLimitIn,LPCSTR lpFmt,va_list arglist);
    102   LWSTDAPI_(int) wvnsprintfW(LPWSTR lpOut,int cchLimitIn,LPCWSTR lpFmt,va_list arglist);
    103   LWSTDAPIV_(int) wnsprintfA(LPSTR lpOut,int cchLimitIn,LPCSTR lpFmt,...);
    104   LWSTDAPIV_(int) wnsprintfW(LPWSTR lpOut,int cchLimitIn,LPCWSTR lpFmt,...);
    105 
    106 #define StrIntlEqNA(s1,s2,nChar) StrIsIntlEqualA(TRUE,s1,s2,nChar)
    107 #define StrIntlEqNW(s1,s2,nChar) StrIsIntlEqualW(TRUE,s1,s2,nChar)
    108 #define StrIntlEqNIA(s1,s2,nChar) StrIsIntlEqualA(FALSE,s1,s2,nChar)
    109 #define StrIntlEqNIW(s1,s2,nChar) StrIsIntlEqualW(FALSE,s1,s2,nChar)
    110 
    111 #define StrRetToStr __MINGW_NAME_AW(StrRetToStr)
    112 #define StrRetToBuf __MINGW_NAME_AW(StrRetToBuf)
    113 #define SHStrDup __MINGW_NAME_AW(SHStrDup)
    114 
    115   LWSTDAPI StrRetToStrA(STRRET *pstr,LPCITEMIDLIST pidl,LPSTR *ppsz);
    116   LWSTDAPI StrRetToStrW(STRRET *pstr,LPCITEMIDLIST pidl,LPWSTR *ppsz);
    117   LWSTDAPI StrRetToBufA(STRRET *pstr,LPCITEMIDLIST pidl,LPSTR pszBuf,UINT cchBuf);
    118   LWSTDAPI StrRetToBufW(STRRET *pstr,LPCITEMIDLIST pidl,LPWSTR pszBuf,UINT cchBuf);
    119   LWSTDAPI StrRetToBSTR(STRRET *pstr,LPCITEMIDLIST pidl,BSTR *pbstr);
    120   LWSTDAPI SHStrDupA(LPCSTR psz,WCHAR **ppwsz);
    121   LWSTDAPI SHStrDupW(LPCWSTR psz,WCHAR **ppwsz);
    122   LWSTDAPI_(int) StrCmpLogicalW(LPCWSTR psz1,LPCWSTR psz2);
    123   LWSTDAPI_(DWORD) StrCatChainW(LPWSTR pszDst,DWORD cchDst,DWORD ichAt,LPCWSTR pszSrc);
    124   LWSTDAPI SHLoadIndirectString(LPCWSTR pszSource,LPWSTR pszOutBuf,UINT cchOutBuf,void **ppvReserved);
    125 #if (_WIN32_IE >= 0x0603)
    126   LWSTDAPI_(WINBOOL) IsCharSpaceA(CHAR wch);
    127   LWSTDAPI_(WINBOOL) IsCharSpaceW(WCHAR wch);
    128 
    129 #define IsCharSpace __MINGW_NAME_AW(IsCharSpace)
    130 
    131   LWSTDAPI_(int) StrCmpCA(LPCSTR pszStr1,LPCSTR pszStr2);
    132   LWSTDAPI_(int) StrCmpCW(LPCWSTR pszStr1,LPCWSTR pszStr2);
    133 
    134 #define StrCmpC __MINGW_NAME_AW(StrCmpC)
    135 
    136   LWSTDAPI_(int) StrCmpICA(LPCSTR pszStr1,LPCSTR pszStr2);
    137   LWSTDAPI_(int) StrCmpICW(LPCWSTR pszStr1,LPCWSTR pszStr2);
    138 
    139 #define StrCmpIC __MINGW_NAME_AW(StrCmpIC)
    140 #endif
    141 
    142 #define StrChr __MINGW_NAME_AW(StrChr)
    143 #define StrRChr __MINGW_NAME_AW(StrRChr)
    144 #define StrChrI __MINGW_NAME_AW(StrChrI)
    145 #define StrRChrI __MINGW_NAME_AW(StrRChrI)
    146 #define StrCmpN __MINGW_NAME_AW(StrCmpN)
    147 #define StrCmpNI __MINGW_NAME_AW(StrCmpNI)
    148 #define StrStr __MINGW_NAME_AW(StrStr)
    149 
    150 #define StrStrI __MINGW_NAME_AW(StrStrI)
    151 #define StrDup __MINGW_NAME_AW(StrDup)
    152 #define StrRStrI __MINGW_NAME_AW(StrRStrI)
    153 #define StrCSpn __MINGW_NAME_AW(StrCSpn)
    154 #define StrCSpnI __MINGW_NAME_AW(StrCSpnI)
    155 #define StrSpn __MINGW_NAME_AW(StrSpn)
    156 #define StrToInt __MINGW_NAME_AW(StrToInt)
    157 #define StrPBrk __MINGW_NAME_AW(StrPBrk)
    158 #define StrToIntEx __MINGW_NAME_AW(StrToIntEx)
    159 
    160 #if (_WIN32_IE >= 0x0600)
    161 #define StrToInt64Ex __MINGW_NAME_AW(StrToInt64Ex)
    162 #endif
    163 
    164 #define StrFromTimeInterval __MINGW_NAME_AW(StrFromTimeInterval)
    165 #define StrIntlEqN __MINGW_NAME_AW(StrIntlEqN)
    166 #define StrIntlEqNI __MINGW_NAME_AW(StrIntlEqNI)
    167 #define StrFormatByteSize __MINGW_NAME_AW(StrFormatByteSize)
    168 #define StrFormatKBSize __MINGW_NAME_AW(StrFormatKBSize)
    169 
    170 #define StrNCat __MINGW_NAME_AW(StrNCat)
    171 #define StrTrim __MINGW_NAME_AW(StrTrim)
    172 #define StrCatBuff __MINGW_NAME_AW(StrCatBuff)
    173 #define ChrCmpI __MINGW_NAME_AW(ChrCmpI)
    174 #define wvnsprintf __MINGW_NAME_AW(wvnsprintf)
    175 #define wnsprintf __MINGW_NAME_AW(wnsprintf)
    176 #define StrIsIntlEqual __MINGW_NAME_AW(StrIsIntlEqual)
    177 
    178 #if defined(UNICODE)
    179 #define StrFormatByteSize64 StrFormatByteSizeW
    180 #else
    181 #define StrFormatByteSize64 StrFormatByteSize64A
    182 #endif
    183 
    184   LWSTDAPI_(WINBOOL) IntlStrEqWorkerA(WINBOOL fCaseSens,LPCSTR lpString1,LPCSTR lpString2,int nChar);
    185   LWSTDAPI_(WINBOOL) IntlStrEqWorkerW(WINBOOL fCaseSens,LPCWSTR lpString1,LPCWSTR lpString2,int nChar);
    186 
    187 #define IntlStrEqNA(s1,s2,nChar) IntlStrEqWorkerA(TRUE,s1,s2,nChar)
    188 #define IntlStrEqNW(s1,s2,nChar) IntlStrEqWorkerW(TRUE,s1,s2,nChar)
    189 #define IntlStrEqNIA(s1,s2,nChar) IntlStrEqWorkerA(FALSE,s1,s2,nChar)
    190 #define IntlStrEqNIW(s1,s2,nChar) IntlStrEqWorkerW(FALSE,s1,s2,nChar)
    191 
    192 #define IntlStrEqN __MINGW_NAME_AW(IntlStrEqN)
    193 #define IntlStrEqNI __MINGW_NAME_AW(IntlStrEqNI)
    194 
    195 #define SZ_CONTENTTYPE_HTMLA "text/html"
    196 #define SZ_CONTENTTYPE_HTMLW L"text/html"
    197 #define SZ_CONTENTTYPE_CDFA "application/x-cdf"
    198 #define SZ_CONTENTTYPE_CDFW L"application/x-cdf"
    199 
    200 #define SZ_CONTENTTYPE_HTML __MINGW_NAME_AW(SZ_CONTENTTYPE_HTML)
    201 #define SZ_CONTENTTYPE_CDF __MINGW_NAME_AW(SZ_CONTENTTYPE_CDF)
    202 
    203 #define PathIsHTMLFileA(pszPath) PathIsContentTypeA(pszPath,SZ_CONTENTTYPE_HTMLA)
    204 #define PathIsHTMLFileW(pszPath) PathIsContentTypeW(pszPath,SZ_CONTENTTYPE_HTMLW)
    205 
    206 #define STIF_DEFAULT __MSABI_LONG(0x00000000)
    207 #define STIF_SUPPORT_HEX __MSABI_LONG(0x00000001)
    208 
    209 #define StrCatA lstrcatA
    210 #define StrCmpA lstrcmpA
    211 #define StrCmpIA lstrcmpiA
    212 #define StrCpyA lstrcpyA
    213 #define StrCpyNA lstrcpynA
    214 
    215 #define StrToLong StrToInt
    216 #define StrNCmp StrCmpN
    217 #define StrNCmpI StrCmpNI
    218 #define StrNCpy StrCpyN
    219 #define StrCatN StrNCat
    220 
    221 #define StrCatBuff __MINGW_NAME_AW(StrCatBuff)
    222 
    223 #if defined(UNICODE)
    224 #define StrCat StrCatW
    225 #define StrCmp StrCmpW
    226 #define StrCmpI StrCmpIW
    227 #define StrCpy StrCpyW
    228 #define StrCpyN StrCpyNW
    229 #else
    230 #define StrCat lstrcatA
    231 #define StrCmp lstrcmpA
    232 #define StrCmpI lstrcmpiA
    233 #define StrCpy lstrcpyA
    234 #define StrCpyN lstrcpynA
    235 #endif
    236 
    237 #endif
    238 
    239 #ifndef NO_SHLWAPI_PATH
    240 
    241   LWSTDAPI_(LPSTR) PathAddBackslashA(LPSTR pszPath);
    242   LWSTDAPI_(LPWSTR) PathAddBackslashW(LPWSTR pszPath);
    243 
    244 #define PathAddBackslash __MINGW_NAME_AW(PathAddBackslash)
    245 
    246   LWSTDAPI_(WINBOOL) PathAddExtensionA(LPSTR pszPath,LPCSTR pszExt);
    247   LWSTDAPI_(WINBOOL) PathAddExtensionW(LPWSTR pszPath,LPCWSTR pszExt);
    248 
    249 #define PathAddExtension __MINGW_NAME_AW(PathAddExtension)
    250 
    251   LWSTDAPI_(WINBOOL) PathAppendA(LPSTR pszPath,LPCSTR pMore);
    252   LWSTDAPI_(WINBOOL) PathAppendW(LPWSTR pszPath,LPCWSTR pMore);
    253   LWSTDAPI_(LPSTR) PathBuildRootA(LPSTR pszRoot,int iDrive);
    254   LWSTDAPI_(LPWSTR) PathBuildRootW(LPWSTR pszRoot,int iDrive);
    255 
    256 #define PathBuildRoot __MINGW_NAME_AW(PathBuildRoot)
    257 
    258   LWSTDAPI_(WINBOOL) PathCanonicalizeA(LPSTR pszBuf,LPCSTR pszPath);
    259   LWSTDAPI_(WINBOOL) PathCanonicalizeW(LPWSTR pszBuf,LPCWSTR pszPath);
    260   LWSTDAPI_(LPSTR) PathCombineA(LPSTR pszDest,LPCSTR pszDir,LPCSTR pszFile);
    261   LWSTDAPI_(LPWSTR) PathCombineW(LPWSTR pszDest,LPCWSTR pszDir,LPCWSTR pszFile);
    262 
    263 #define PathCombine __MINGW_NAME_AW(PathCombine)
    264 
    265   LWSTDAPI_(WINBOOL) PathCompactPathA(HDC hDC,LPSTR pszPath,UINT dx);
    266   LWSTDAPI_(WINBOOL) PathCompactPathW(HDC hDC,LPWSTR pszPath,UINT dx);
    267   LWSTDAPI_(WINBOOL) PathCompactPathExA(LPSTR pszOut,LPCSTR pszSrc,UINT cchMax,DWORD dwFlags);
    268   LWSTDAPI_(WINBOOL) PathCompactPathExW(LPWSTR pszOut,LPCWSTR pszSrc,UINT cchMax,DWORD dwFlags);
    269   LWSTDAPI_(int) PathCommonPrefixA(LPCSTR pszFile1,LPCSTR pszFile2,LPSTR achPath);
    270   LWSTDAPI_(int) PathCommonPrefixW(LPCWSTR pszFile1,LPCWSTR pszFile2,LPWSTR achPath);
    271   LWSTDAPI_(WINBOOL) PathFileExistsA(LPCSTR pszPath);
    272   LWSTDAPI_(WINBOOL) PathFileExistsW(LPCWSTR pszPath);
    273 
    274 #define PathFileExists __MINGW_NAME_AW(PathFileExists)
    275 
    276   LWSTDAPI_(LPSTR) PathFindExtensionA(LPCSTR pszPath);
    277   LWSTDAPI_(LPWSTR) PathFindExtensionW(LPCWSTR pszPath);
    278 
    279 #define PathFindExtension __MINGW_NAME_AW(PathFindExtension)
    280 
    281   LWSTDAPI_(LPSTR) PathFindFileNameA(LPCSTR pszPath);
    282   LWSTDAPI_(LPWSTR) PathFindFileNameW(LPCWSTR pszPath);
    283 
    284 #define PathFindFileName __MINGW_NAME_AW(PathFindFileName)
    285 
    286   LWSTDAPI_(LPSTR) PathFindNextComponentA(LPCSTR pszPath);
    287   LWSTDAPI_(LPWSTR) PathFindNextComponentW(LPCWSTR pszPath);
    288 
    289 #define PathFindNextComponent __MINGW_NAME_AW(PathFindNextComponent)
    290 
    291   LWSTDAPI_(WINBOOL) PathFindOnPathA(LPSTR pszPath,LPCSTR *ppszOtherDirs);
    292   LWSTDAPI_(WINBOOL) PathFindOnPathW(LPWSTR pszPath,LPCWSTR *ppszOtherDirs);
    293   LWSTDAPI_(LPSTR) PathGetArgsA(LPCSTR pszPath);
    294   LWSTDAPI_(LPWSTR) PathGetArgsW(LPCWSTR pszPath);
    295 
    296 #define PathGetArgs __MINGW_NAME_AW(PathGetArgs)
    297 
    298   LWSTDAPI_(LPCSTR) PathFindSuffixArrayA(LPCSTR pszPath,const LPCSTR *apszSuffix,int iArraySize);
    299   LWSTDAPI_(LPCWSTR) PathFindSuffixArrayW(LPCWSTR pszPath,const LPCWSTR *apszSuffix,int iArraySize);
    300 
    301 #define PathFindSuffixArray __MINGW_NAME_AW(PathFindSuffixArray)
    302 
    303   LWSTDAPI_(WINBOOL) PathIsLFNFileSpecA(LPCSTR lpName);
    304   LWSTDAPI_(WINBOOL) PathIsLFNFileSpecW(LPCWSTR lpName);
    305 
    306 #define PathIsLFNFileSpec __MINGW_NAME_AW(PathIsLFNFileSpec)
    307 
    308   LWSTDAPI_(UINT) PathGetCharTypeA(UCHAR ch);
    309   LWSTDAPI_(UINT) PathGetCharTypeW(WCHAR ch);
    310 
    311 #define GCT_INVALID 0x0000
    312 #define GCT_LFNCHAR 0x0001
    313 #define GCT_SHORTCHAR 0x0002
    314 #define GCT_WILD 0x0004
    315 #define GCT_SEPARATOR 0x0008
    316 
    317   LWSTDAPI_(int) PathGetDriveNumberA(LPCSTR pszPath);
    318   LWSTDAPI_(int) PathGetDriveNumberW(LPCWSTR pszPath);
    319 
    320 #define PathGetDriveNumber __MINGW_NAME_AW(PathGetDriveNumber)
    321 
    322   LWSTDAPI_(WINBOOL) PathIsDirectoryA(LPCSTR pszPath);
    323   LWSTDAPI_(WINBOOL) PathIsDirectoryW(LPCWSTR pszPath);
    324 
    325 #define PathIsDirectory __MINGW_NAME_AW(PathIsDirectory)
    326 
    327   LWSTDAPI_(WINBOOL) PathIsDirectoryEmptyA(LPCSTR pszPath);
    328   LWSTDAPI_(WINBOOL) PathIsDirectoryEmptyW(LPCWSTR pszPath);
    329 
    330 #define PathIsDirectoryEmpty __MINGW_NAME_AW(PathIsDirectoryEmpty)
    331 
    332   LWSTDAPI_(WINBOOL) PathIsFileSpecA(LPCSTR pszPath);
    333   LWSTDAPI_(WINBOOL) PathIsFileSpecW(LPCWSTR pszPath);
    334 
    335 #define PathIsFileSpec __MINGW_NAME_AW(PathIsFileSpec)
    336 
    337   LWSTDAPI_(WINBOOL) PathIsPrefixA(LPCSTR pszPrefix,LPCSTR pszPath);
    338   LWSTDAPI_(WINBOOL) PathIsPrefixW(LPCWSTR pszPrefix,LPCWSTR pszPath);
    339 
    340 #define PathIsPrefix __MINGW_NAME_AW(PathIsPrefix)
    341 
    342   LWSTDAPI_(WINBOOL) PathIsRelativeA(LPCSTR pszPath);
    343   LWSTDAPI_(WINBOOL) PathIsRelativeW(LPCWSTR pszPath);
    344 
    345 #define PathIsRelative __MINGW_NAME_AW(PathIsRelative)
    346 
    347   LWSTDAPI_(WINBOOL) PathIsRootA(LPCSTR pszPath);
    348   LWSTDAPI_(WINBOOL) PathIsRootW(LPCWSTR pszPath);
    349 
    350 #define PathIsRoot __MINGW_NAME_AW(PathIsRoot)
    351 
    352   LWSTDAPI_(WINBOOL) PathIsSameRootA(LPCSTR pszPath1,LPCSTR pszPath2);
    353   LWSTDAPI_(WINBOOL) PathIsSameRootW(LPCWSTR pszPath1,LPCWSTR pszPath2);
    354 
    355 #define PathIsSameRoot __MINGW_NAME_AW(PathIsSameRoot)
    356 
    357   LWSTDAPI_(WINBOOL) PathIsUNCA(LPCSTR pszPath);
    358   LWSTDAPI_(WINBOOL) PathIsUNCW(LPCWSTR pszPath);
    359 
    360 #define PathIsUNC __MINGW_NAME_AW(PathIsUNC)
    361 
    362   LWSTDAPI_(WINBOOL) PathIsNetworkPathA(LPCSTR pszPath);
    363   LWSTDAPI_(WINBOOL) PathIsNetworkPathW(LPCWSTR pszPath);
    364 
    365 #define PathIsNetworkPath __MINGW_NAME_AW(PathIsNetworkPath)
    366 
    367   LWSTDAPI_(WINBOOL) PathIsUNCServerA(LPCSTR pszPath);
    368   LWSTDAPI_(WINBOOL) PathIsUNCServerW(LPCWSTR pszPath);
    369 
    370 #define PathIsUNCServer __MINGW_NAME_AW(PathIsUNCServer)
    371 
    372   LWSTDAPI_(WINBOOL) PathIsUNCServerShareA(LPCSTR pszPath);
    373   LWSTDAPI_(WINBOOL) PathIsUNCServerShareW(LPCWSTR pszPath);
    374 
    375 #define PathIsUNCServerShare __MINGW_NAME_AW(PathIsUNCServerShare)
    376 
    377   LWSTDAPI_(WINBOOL) PathIsContentTypeA(LPCSTR pszPath,LPCSTR pszContentType);
    378   LWSTDAPI_(WINBOOL) PathIsContentTypeW(LPCWSTR pszPath,LPCWSTR pszContentType);
    379   LWSTDAPI_(WINBOOL) PathIsURLA(LPCSTR pszPath);
    380   LWSTDAPI_(WINBOOL) PathIsURLW(LPCWSTR pszPath);
    381 
    382 #define PathIsURL __MINGW_NAME_AW(PathIsURL)
    383 
    384   LWSTDAPI_(WINBOOL) PathMakePrettyA(LPSTR pszPath);
    385   LWSTDAPI_(WINBOOL) PathMakePrettyW(LPWSTR pszPath);
    386   LWSTDAPI_(WINBOOL) PathMatchSpecA(LPCSTR pszFile,LPCSTR pszSpec);
    387   LWSTDAPI_(WINBOOL) PathMatchSpecW(LPCWSTR pszFile,LPCWSTR pszSpec);
    388   LWSTDAPI_(int) PathParseIconLocationA(LPSTR pszIconFile);
    389   LWSTDAPI_(int) PathParseIconLocationW(LPWSTR pszIconFile);
    390   LWSTDAPI_(void) PathQuoteSpacesA(LPSTR lpsz);
    391   LWSTDAPI_(void) PathQuoteSpacesW(LPWSTR lpsz);
    392   LWSTDAPI_(WINBOOL) PathRelativePathToA(LPSTR pszPath,LPCSTR pszFrom,DWORD dwAttrFrom,LPCSTR pszTo,DWORD dwAttrTo);
    393   LWSTDAPI_(WINBOOL) PathRelativePathToW(LPWSTR pszPath,LPCWSTR pszFrom,DWORD dwAttrFrom,LPCWSTR pszTo,DWORD dwAttrTo);
    394   LWSTDAPI_(void) PathRemoveArgsA(LPSTR pszPath);
    395   LWSTDAPI_(void) PathRemoveArgsW(LPWSTR pszPath);
    396   LWSTDAPI_(LPSTR) PathRemoveBackslashA(LPSTR pszPath);
    397   LWSTDAPI_(LPWSTR) PathRemoveBackslashW(LPWSTR pszPath);
    398 
    399 #define PathRemoveBackslash __MINGW_NAME_AW(PathRemoveBackslash)
    400 
    401   LWSTDAPI_(void) PathRemoveBlanksA(LPSTR pszPath);
    402   LWSTDAPI_(void) PathRemoveBlanksW(LPWSTR pszPath);
    403   LWSTDAPI_(void) PathRemoveExtensionA(LPSTR pszPath);
    404   LWSTDAPI_(void) PathRemoveExtensionW(LPWSTR pszPath);
    405   LWSTDAPI_(WINBOOL) PathRemoveFileSpecA(LPSTR pszPath);
    406   LWSTDAPI_(WINBOOL) PathRemoveFileSpecW(LPWSTR pszPath);
    407   LWSTDAPI_(WINBOOL) PathRenameExtensionA(LPSTR pszPath,LPCSTR pszExt);
    408   LWSTDAPI_(WINBOOL) PathRenameExtensionW(LPWSTR pszPath,LPCWSTR pszExt);
    409   LWSTDAPI_(WINBOOL) PathSearchAndQualifyA(LPCSTR pszPath,LPSTR pszBuf,UINT cchBuf);
    410   LWSTDAPI_(WINBOOL) PathSearchAndQualifyW(LPCWSTR pszPath,LPWSTR pszBuf,UINT cchBuf);
    411   LWSTDAPI_(void) PathSetDlgItemPathA(HWND hDlg,int id,LPCSTR pszPath);
    412   LWSTDAPI_(void) PathSetDlgItemPathW(HWND hDlg,int id,LPCWSTR pszPath);
    413   LWSTDAPI_(LPSTR) PathSkipRootA(LPCSTR pszPath);
    414   LWSTDAPI_(LPWSTR) PathSkipRootW(LPCWSTR pszPath);
    415 
    416 #define PathSkipRoot __MINGW_NAME_AW(PathSkipRoot)
    417 
    418   LWSTDAPI_(void) PathStripPathA(LPSTR pszPath);
    419   LWSTDAPI_(void) PathStripPathW(LPWSTR pszPath);
    420 
    421 #define PathStripPath __MINGW_NAME_AW(PathStripPath)
    422 
    423   LWSTDAPI_(WINBOOL) PathStripToRootA(LPSTR pszPath);
    424   LWSTDAPI_(WINBOOL) PathStripToRootW(LPWSTR pszPath);
    425 
    426 #define PathStripToRoot __MINGW_NAME_AW(PathStripToRoot)
    427 
    428   LWSTDAPI_(void) PathUnquoteSpacesA(LPSTR lpsz);
    429   LWSTDAPI_(void) PathUnquoteSpacesW(LPWSTR lpsz);
    430   LWSTDAPI_(WINBOOL) PathMakeSystemFolderA(LPCSTR pszPath);
    431   LWSTDAPI_(WINBOOL) PathMakeSystemFolderW(LPCWSTR pszPath);
    432 
    433 #define PathMakeSystemFolder __MINGW_NAME_AW(PathMakeSystemFolder)
    434 
    435   LWSTDAPI_(WINBOOL) PathUnmakeSystemFolderA(LPCSTR pszPath);
    436   LWSTDAPI_(WINBOOL) PathUnmakeSystemFolderW(LPCWSTR pszPath);
    437 
    438 #define PathUnmakeSystemFolder __MINGW_NAME_AW(PathUnmakeSystemFolder)
    439 
    440   LWSTDAPI_(WINBOOL) PathIsSystemFolderA(LPCSTR pszPath,DWORD dwAttrb);
    441   LWSTDAPI_(WINBOOL) PathIsSystemFolderW(LPCWSTR pszPath,DWORD dwAttrb);
    442 
    443 #define PathIsSystemFolder __MINGW_NAME_AW(PathIsSystemFolder)
    444 
    445   LWSTDAPI_(void) PathUndecorateA(LPSTR pszPath);
    446   LWSTDAPI_(void) PathUndecorateW(LPWSTR pszPath);
    447 
    448 #define PathUndecorate __MINGW_NAME_AW(PathUndecorate)
    449 
    450   LWSTDAPI_(WINBOOL) PathUnExpandEnvStringsA(LPCSTR pszPath,LPSTR pszBuf,UINT cchBuf);
    451   LWSTDAPI_(WINBOOL) PathUnExpandEnvStringsW(LPCWSTR pszPath,LPWSTR pszBuf,UINT cchBuf);
    452 
    453 #define PathUnExpandEnvStrings __MINGW_NAME_AW(PathUnExpandEnvStrings)
    454 #define PathAppend __MINGW_NAME_AW(PathAppend)
    455 #define PathCanonicalize __MINGW_NAME_AW(PathCanonicalize)
    456 #define PathCompactPath __MINGW_NAME_AW(PathCompactPath)
    457 #define PathCompactPathEx __MINGW_NAME_AW(PathCompactPathEx)
    458 #define PathCommonPrefix __MINGW_NAME_AW(PathCommonPrefix)
    459 #define PathFindOnPath __MINGW_NAME_AW(PathFindOnPath)
    460 #define PathGetCharType __MINGW_NAME_AW(PathGetCharType)
    461 #define PathIsContentType __MINGW_NAME_AW(PathIsContentType)
    462 #define PathIsHTMLFile __MINGW_NAME_AW(PathIsHTMLFile)
    463 #define PathMakePretty __MINGW_NAME_AW(PathMakePretty)
    464 #define PathMatchSpec __MINGW_NAME_AW(PathMatchSpec)
    465 #define PathParseIconLocation __MINGW_NAME_AW(PathParseIconLocation)
    466 #define PathQuoteSpaces __MINGW_NAME_AW(PathQuoteSpaces)
    467 #define PathRelativePathTo __MINGW_NAME_AW(PathRelativePathTo)
    468 #define PathRemoveArgs __MINGW_NAME_AW(PathRemoveArgs)
    469 #define PathRemoveBlanks __MINGW_NAME_AW(PathRemoveBlanks)
    470 #define PathRemoveExtension __MINGW_NAME_AW(PathRemoveExtension)
    471 #define PathRemoveFileSpec __MINGW_NAME_AW(PathRemoveFileSpec)
    472 #define PathRenameExtension __MINGW_NAME_AW(PathRenameExtension)
    473 #define PathSearchAndQualify __MINGW_NAME_AW(PathSearchAndQualify)
    474 #define PathSetDlgItemPath __MINGW_NAME_AW(PathSetDlgItemPath)
    475 #define PathUnquoteSpaces __MINGW_NAME_AW(PathUnquoteSpaces)
    476 
    477   typedef enum {
    478     URL_SCHEME_INVALID = -1,URL_SCHEME_UNKNOWN = 0,URL_SCHEME_FTP,URL_SCHEME_HTTP,URL_SCHEME_GOPHER,URL_SCHEME_MAILTO,URL_SCHEME_NEWS,URL_SCHEME_NNTP,URL_SCHEME_TELNET,URL_SCHEME_WAIS,URL_SCHEME_FILE,URL_SCHEME_MK,URL_SCHEME_HTTPS,URL_SCHEME_SHELL,URL_SCHEME_SNEWS,URL_SCHEME_LOCAL,URL_SCHEME_JAVASCRIPT,URL_SCHEME_VBSCRIPT,URL_SCHEME_ABOUT,URL_SCHEME_RES,URL_SCHEME_MSSHELLROOTED,URL_SCHEME_MSSHELLIDLIST,URL_SCHEME_MSHELP,URL_SCHEME_MAXVALUE
    479   } URL_SCHEME;
    480 
    481   typedef enum {
    482     URL_PART_NONE = 0,URL_PART_SCHEME = 1,URL_PART_HOSTNAME,URL_PART_USERNAME,URL_PART_PASSWORD,URL_PART_PORT,URL_PART_QUERY
    483   } URL_PART;
    484 
    485   typedef enum {
    486     URLIS_URL,URLIS_OPAQUE,URLIS_NOHISTORY,URLIS_FILEURL,URLIS_APPLIABLE,URLIS_DIRECTORY,URLIS_HASQUERY
    487   } URLIS;
    488 
    489 #define URL_UNESCAPE 0x10000000
    490 #define URL_ESCAPE_UNSAFE 0x20000000
    491 #define URL_PLUGGABLE_PROTOCOL 0x40000000
    492 #define URL_WININET_COMPATIBILITY 0x80000000
    493 #define URL_DONT_ESCAPE_EXTRA_INFO 0x02000000
    494 #define URL_DONT_UNESCAPE_EXTRA_INFO URL_DONT_ESCAPE_EXTRA_INFO
    495 #define URL_BROWSER_MODE URL_DONT_ESCAPE_EXTRA_INFO
    496 #define URL_ESCAPE_SPACES_ONLY 0x04000000
    497 #define URL_DONT_SIMPLIFY 0x08000000
    498 #define URL_NO_META URL_DONT_SIMPLIFY
    499 #define URL_UNESCAPE_INPLACE 0x00100000
    500 #define URL_CONVERT_IF_DOSPATH 0x00200000
    501 #define URL_UNESCAPE_HIGH_ANSI_ONLY 0x00400000
    502 #define URL_INTERNAL_PATH 0x00800000
    503 #define URL_FILE_USE_PATHURL 0x00010000
    504 #define URL_DONT_UNESCAPE 0x00020000
    505 #define URL_ESCAPE_PERCENT 0x00001000
    506 #define URL_ESCAPE_SEGMENT_ONLY 0x00002000
    507 
    508 #define URL_PARTFLAG_KEEPSCHEME 0x00000001
    509 
    510 #define URL_APPLY_DEFAULT 0x00000001
    511 #define URL_APPLY_GUESSSCHEME 0x00000002
    512 #define URL_APPLY_GUESSFILE 0x00000004
    513 #define URL_APPLY_FORCEAPPLY 0x00000008
    514 
    515   LWSTDAPI_(int) UrlCompareA(LPCSTR psz1,LPCSTR psz2,WINBOOL fIgnoreSlash);
    516   LWSTDAPI_(int) UrlCompareW(LPCWSTR psz1,LPCWSTR psz2,WINBOOL fIgnoreSlash);
    517   LWSTDAPI UrlCombineA(LPCSTR pszBase,LPCSTR pszRelative,LPSTR pszCombined,LPDWORD pcchCombined,DWORD dwFlags);
    518   LWSTDAPI UrlCombineW(LPCWSTR pszBase,LPCWSTR pszRelative,LPWSTR pszCombined,LPDWORD pcchCombined,DWORD dwFlags);
    519   LWSTDAPI UrlCanonicalizeA(LPCSTR pszUrl,LPSTR pszCanonicalized,LPDWORD pcchCanonicalized,DWORD dwFlags);
    520   LWSTDAPI UrlCanonicalizeW(LPCWSTR pszUrl,LPWSTR pszCanonicalized,LPDWORD pcchCanonicalized,DWORD dwFlags);
    521   LWSTDAPI_(WINBOOL) UrlIsOpaqueA(LPCSTR pszURL);
    522   LWSTDAPI_(WINBOOL) UrlIsOpaqueW(LPCWSTR pszURL);
    523   LWSTDAPI_(WINBOOL) UrlIsNoHistoryA(LPCSTR pszURL);
    524   LWSTDAPI_(WINBOOL) UrlIsNoHistoryW(LPCWSTR pszURL);
    525 #define UrlIsFileUrlA(pszURL) UrlIsA(pszURL,URLIS_FILEURL)
    526 #define UrlIsFileUrlW(pszURL) UrlIsW(pszURL,URLIS_FILEURL)
    527   LWSTDAPI_(WINBOOL) UrlIsA(LPCSTR pszUrl,URLIS UrlIs);
    528   LWSTDAPI_(WINBOOL) UrlIsW(LPCWSTR pszUrl,URLIS UrlIs);
    529   LWSTDAPI_(LPCSTR) UrlGetLocationA(LPCSTR psz1);
    530   LWSTDAPI_(LPCWSTR) UrlGetLocationW(LPCWSTR psz1);
    531   LWSTDAPI UrlUnescapeA(LPSTR pszUrl,LPSTR pszUnescaped,LPDWORD pcchUnescaped,DWORD dwFlags);
    532   LWSTDAPI UrlUnescapeW(LPWSTR pszUrl,LPWSTR pszUnescaped,LPDWORD pcchUnescaped,DWORD dwFlags);
    533   LWSTDAPI UrlEscapeA(LPCSTR pszUrl,LPSTR pszEscaped,LPDWORD pcchEscaped,DWORD dwFlags);
    534   LWSTDAPI UrlEscapeW(LPCWSTR pszUrl,LPWSTR pszEscaped,LPDWORD pcchEscaped,DWORD dwFlags);
    535   LWSTDAPI UrlCreateFromPathA(LPCSTR pszPath,LPSTR pszUrl,LPDWORD pcchUrl,DWORD dwFlags);
    536   LWSTDAPI UrlCreateFromPathW(LPCWSTR pszPath,LPWSTR pszUrl,LPDWORD pcchUrl,DWORD dwFlags);
    537   LWSTDAPI PathCreateFromUrlA(LPCSTR pszUrl,LPSTR pszPath,LPDWORD pcchPath,DWORD dwFlags);
    538   LWSTDAPI PathCreateFromUrlW(LPCWSTR pszUrl,LPWSTR pszPath,LPDWORD pcchPath,DWORD dwFlags);
    539   LWSTDAPI UrlHashA(LPCSTR pszUrl,LPBYTE pbHash,DWORD cbHash);
    540   LWSTDAPI UrlHashW(LPCWSTR pszUrl,LPBYTE pbHash,DWORD cbHash);
    541   LWSTDAPI UrlGetPartW(LPCWSTR pszIn,LPWSTR pszOut,LPDWORD pcchOut,DWORD dwPart,DWORD dwFlags);
    542   LWSTDAPI UrlGetPartA(LPCSTR pszIn,LPSTR pszOut,LPDWORD pcchOut,DWORD dwPart,DWORD dwFlags);
    543   LWSTDAPI UrlApplySchemeA(LPCSTR pszIn,LPSTR pszOut,LPDWORD pcchOut,DWORD dwFlags);
    544   LWSTDAPI UrlApplySchemeW(LPCWSTR pszIn,LPWSTR pszOut,LPDWORD pcchOut,DWORD dwFlags);
    545   LWSTDAPI HashData(LPBYTE pbData,DWORD cbData,LPBYTE pbHash,DWORD cbHash);
    546 
    547 #define UrlCompare __MINGW_NAME_AW(UrlCompare)
    548 #define UrlCombine __MINGW_NAME_AW(UrlCombine)
    549 #define UrlCanonicalize __MINGW_NAME_AW(UrlCanonicalize)
    550 #define UrlIsOpaque __MINGW_NAME_AW(UrlIsOpaque)
    551 #define UrlIsFileUrl __MINGW_NAME_AW(UrlIsFileUrl)
    552 #define UrlGetLocation __MINGW_NAME_AW(UrlGetLocation)
    553 #define UrlUnescape __MINGW_NAME_AW(UrlUnescape)
    554 #define UrlEscape __MINGW_NAME_AW(UrlEscape)
    555 #define UrlCreateFromPath __MINGW_NAME_AW(UrlCreateFromPath)
    556 #define PathCreateFromUrl __MINGW_NAME_AW(PathCreateFromUrl)
    557 #define UrlHash __MINGW_NAME_AW(UrlHash)
    558 #define UrlGetPart __MINGW_NAME_AW(UrlGetPart)
    559 #define UrlApplyScheme __MINGW_NAME_AW(UrlApplyScheme)
    560 #define UrlIs __MINGW_NAME_AW(UrlIs)
    561 
    562 #define UrlEscapeSpaces(pszUrl,pszEscaped,pcchEscaped) UrlCanonicalize(pszUrl,pszEscaped,pcchEscaped,URL_ESCAPE_SPACES_ONLY |URL_DONT_ESCAPE_EXTRA_INFO)
    563 #define UrlUnescapeInPlace(pszUrl,dwFlags) UrlUnescape(pszUrl,NULL,NULL,dwFlags | URL_UNESCAPE_INPLACE)
    564 #endif
    565 
    566 #ifndef NO_SHLWAPI_REG
    567 
    568   LWSTDAPI_(DWORD) SHDeleteEmptyKeyA(HKEY hkey,LPCSTR pszSubKey);
    569   LWSTDAPI_(DWORD) SHDeleteEmptyKeyW(HKEY hkey,LPCWSTR pszSubKey);
    570 
    571 #define SHDeleteEmptyKey __MINGW_NAME_AW(SHDeleteEmptyKey)
    572 
    573   LWSTDAPI_(DWORD) SHDeleteKeyA(HKEY hkey,LPCSTR pszSubKey);
    574   LWSTDAPI_(DWORD) SHDeleteKeyW(HKEY hkey,LPCWSTR pszSubKey);
    575 
    576 #define SHDeleteKey __MINGW_NAME_AW(SHDeleteKey)
    577 
    578   LWSTDAPI_(HKEY) SHRegDuplicateHKey(HKEY hkey);
    579 
    580   LWSTDAPI_(DWORD) SHDeleteValueA(HKEY hkey,LPCSTR pszSubKey,LPCSTR pszValue);
    581   LWSTDAPI_(DWORD) SHDeleteValueW(HKEY hkey,LPCWSTR pszSubKey,LPCWSTR pszValue);
    582 
    583 #define SHDeleteValue __MINGW_NAME_AW(SHDeleteValue)
    584 
    585   LWSTDAPI_(DWORD) SHGetValueA(HKEY hkey,LPCSTR pszSubKey,LPCSTR pszValue,DWORD *pdwType,void *pvData,DWORD *pcbData);
    586   LWSTDAPI_(DWORD) SHGetValueW(HKEY hkey,LPCWSTR pszSubKey,LPCWSTR pszValue,DWORD *pdwType,void *pvData,DWORD *pcbData);
    587 
    588 #define SHGetValue __MINGW_NAME_AW(SHGetValue)
    589 
    590   LWSTDAPI_(DWORD) SHSetValueA(HKEY hkey,LPCSTR pszSubKey,LPCSTR pszValue,DWORD dwType,LPCVOID pvData,DWORD cbData);
    591   LWSTDAPI_(DWORD) SHSetValueW(HKEY hkey,LPCWSTR pszSubKey,LPCWSTR pszValue,DWORD dwType,LPCVOID pvData,DWORD cbData);
    592 
    593 #define SHSetValue __MINGW_NAME_AW(SHSetValue)
    594 
    595 #if (_WIN32_IE >= 0x0602)
    596 
    597   typedef DWORD SRRF;
    598 
    599 #define SRRF_RT_REG_NONE 0x00000001
    600 #define SRRF_RT_REG_SZ 0x00000002
    601 #define SRRF_RT_REG_EXPAND_SZ 0x00000004
    602 #define SRRF_RT_REG_BINARY 0x00000008
    603 #define SRRF_RT_REG_DWORD 0x00000010
    604 #define SRRF_RT_REG_MULTI_SZ 0x00000020
    605 #define SRRF_RT_REG_QWORD 0x00000040
    606 
    607 #define SRRF_RT_DWORD (SRRF_RT_REG_BINARY | SRRF_RT_REG_DWORD)
    608 #define SRRF_RT_QWORD (SRRF_RT_REG_BINARY | SRRF_RT_REG_QWORD)
    609 #define SRRF_RT_ANY 0x0000ffff
    610 
    611 #define SRRF_RM_ANY 0x00000000
    612 #define SRRF_RM_NORMAL 0x00010000
    613 #define SRRF_RM_SAFE 0x00020000
    614 #define SRRF_RM_SAFENETWORK 0x00040000
    615 
    616 #define SRRF_NOEXPAND 0x10000000
    617 #define SRRF_ZEROONFAILURE 0x20000000
    618 
    619   LWSTDAPI_(LONG) SHRegGetValueA(HKEY hkey,LPCSTR pszSubKey,LPCSTR pszValue,SRRF dwFlags,DWORD *pdwType,void *pvData,DWORD *pcbData);
    620   LWSTDAPI_(LONG) SHRegGetValueW(HKEY hkey,LPCWSTR pszSubKey,LPCWSTR pszValue,SRRF dwFlags,DWORD *pdwType,void *pvData,DWORD *pcbData);
    621 
    622 #define SHRegGetValue __MINGW_NAME_AW(SHRegGetValue)
    623 #endif
    624 
    625 #define SHQueryValueEx __MINGW_NAME_AW(SHQueryValueEx)
    626 #define SHEnumKeyEx __MINGW_NAME_AW(SHEnumKeyEx)
    627 #define SHEnumValue __MINGW_NAME_AW(SHEnumValue)
    628 #define SHQueryInfoKey __MINGW_NAME_AW(SHQueryInfoKey)
    629 #define SHCopyKey __MINGW_NAME_AW(SHCopyKey)
    630 #define SHRegGetPath __MINGW_NAME_AW(SHRegGetPath)
    631 #define SHRegSetPath __MINGW_NAME_AW(SHRegSetPath)
    632 
    633   LWSTDAPI_(DWORD) SHQueryValueExA(HKEY hkey,LPCSTR pszValue,DWORD *pdwReserved,DWORD *pdwType,void *pvData,DWORD *pcbData);
    634   LWSTDAPI_(DWORD) SHQueryValueExW(HKEY hkey,LPCWSTR pszValue,DWORD *pdwReserved,DWORD *pdwType,void *pvData,DWORD *pcbData);
    635   LWSTDAPI_(LONG) SHEnumKeyExA(HKEY hkey,DWORD dwIndex,LPSTR pszName,LPDWORD pcchName);
    636   LWSTDAPI_(LONG) SHEnumKeyExW(HKEY hkey,DWORD dwIndex,LPWSTR pszName,LPDWORD pcchName);
    637   LWSTDAPI_(LONG) SHEnumValueA(HKEY hkey,DWORD dwIndex,LPSTR pszValueName,LPDWORD pcchValueName,LPDWORD pdwType,void *pvData,LPDWORD pcbData);
    638   LWSTDAPI_(LONG) SHEnumValueW(HKEY hkey,DWORD dwIndex,LPWSTR pszValueName,LPDWORD pcchValueName,LPDWORD pdwType,void *pvData,LPDWORD pcbData);
    639   LWSTDAPI_(LONG) SHQueryInfoKeyA(HKEY hkey,LPDWORD pcSubKeys,LPDWORD pcchMaxSubKeyLen,LPDWORD pcValues,LPDWORD pcchMaxValueNameLen);
    640   LWSTDAPI_(LONG) SHQueryInfoKeyW(HKEY hkey,LPDWORD pcSubKeys,LPDWORD pcchMaxSubKeyLen,LPDWORD pcValues,LPDWORD pcchMaxValueNameLen);
    641   LWSTDAPI_(DWORD) SHCopyKeyA(HKEY hkeySrc,LPCSTR szSrcSubKey,HKEY hkeyDest,DWORD fReserved);
    642   LWSTDAPI_(DWORD) SHCopyKeyW(HKEY hkeySrc,LPCWSTR wszSrcSubKey,HKEY hkeyDest,DWORD fReserved);
    643   LWSTDAPI_(DWORD) SHRegGetPathA(HKEY hKey,LPCSTR pcszSubKey,LPCSTR pcszValue,LPSTR pszPath,DWORD dwFlags);
    644   LWSTDAPI_(DWORD) SHRegGetPathW(HKEY hKey,LPCWSTR pcszSubKey,LPCWSTR pcszValue,LPWSTR pszPath,DWORD dwFlags);
    645   LWSTDAPI_(DWORD) SHRegSetPathA(HKEY hKey,LPCSTR pcszSubKey,LPCSTR pcszValue,LPCSTR pcszPath,DWORD dwFlags);
    646   LWSTDAPI_(DWORD) SHRegSetPathW(HKEY hKey,LPCWSTR pcszSubKey,LPCWSTR pcszValue,LPCWSTR pcszPath,DWORD dwFlags);
    647 
    648   typedef enum {
    649     SHREGDEL_DEFAULT = 0x00000000,SHREGDEL_HKCU = 0x00000001,SHREGDEL_HKLM = 0x00000010,SHREGDEL_BOTH = 0x00000011
    650   } SHREGDEL_FLAGS;
    651 
    652   typedef enum {
    653     SHREGENUM_DEFAULT = 0x00000000,SHREGENUM_HKCU = 0x00000001,SHREGENUM_HKLM = 0x00000010,SHREGENUM_BOTH = 0x00000011
    654   } SHREGENUM_FLAGS;
    655 
    656 #define SHREGSET_HKCU 0x00000001
    657 #define SHREGSET_FORCE_HKCU 0x00000002
    658 #define SHREGSET_HKLM 0x00000004
    659 #define SHREGSET_FORCE_HKLM 0x00000008
    660 #define SHREGSET_DEFAULT (SHREGSET_FORCE_HKCU | SHREGSET_HKLM)
    661 
    662   typedef HANDLE HUSKEY;
    663   typedef HUSKEY *PHUSKEY;
    664 
    665   LWSTDAPI_(LONG) SHRegCreateUSKeyA(LPCSTR pszPath,REGSAM samDesired,HUSKEY hRelativeUSKey,PHUSKEY phNewUSKey,DWORD dwFlags);
    666   LWSTDAPI_(LONG) SHRegCreateUSKeyW(LPCWSTR pwzPath,REGSAM samDesired,HUSKEY hRelativeUSKey,PHUSKEY phNewUSKey,DWORD dwFlags);
    667   LWSTDAPI_(LONG) SHRegOpenUSKeyA(LPCSTR pszPath,REGSAM samDesired,HUSKEY hRelativeUSKey,PHUSKEY phNewUSKey,WINBOOL fIgnoreHKCU);
    668   LWSTDAPI_(LONG) SHRegOpenUSKeyW(LPCWSTR pwzPath,REGSAM samDesired,HUSKEY hRelativeUSKey,PHUSKEY phNewUSKey,WINBOOL fIgnoreHKCU);
    669   LWSTDAPI_(LONG) SHRegQueryUSValueA(HUSKEY hUSKey,LPCSTR pszValue,LPDWORD pdwType,void *pvData,LPDWORD pcbData,WINBOOL fIgnoreHKCU,void *pvDefaultData,DWORD dwDefaultDataSize);
    670   LWSTDAPI_(LONG) SHRegQueryUSValueW(HUSKEY hUSKey,LPCWSTR pwzValue,LPDWORD pdwType,void *pvData,LPDWORD pcbData,WINBOOL fIgnoreHKCU,void *pvDefaultData,DWORD dwDefaultDataSize);
    671   LWSTDAPI_(LONG) SHRegWriteUSValueA(HUSKEY hUSKey,LPCSTR pszValue,DWORD dwType,const void *pvData,DWORD cbData,DWORD dwFlags);
    672   LWSTDAPI_(LONG) SHRegWriteUSValueW(HUSKEY hUSKey,LPCWSTR pwzValue,DWORD dwType,const void *pvData,DWORD cbData,DWORD dwFlags);
    673   LWSTDAPI_(LONG) SHRegDeleteUSValueA(HUSKEY hUSKey,LPCSTR pszValue,SHREGDEL_FLAGS delRegFlags);
    674   LWSTDAPI_(LONG) SHRegDeleteEmptyUSKeyW(HUSKEY hUSKey,LPCWSTR pwzSubKey,SHREGDEL_FLAGS delRegFlags);
    675   LWSTDAPI_(LONG) SHRegDeleteEmptyUSKeyA(HUSKEY hUSKey,LPCSTR pszSubKey,SHREGDEL_FLAGS delRegFlags);
    676   LWSTDAPI_(LONG) SHRegDeleteUSValueW(HUSKEY hUSKey,LPCWSTR pwzValue,SHREGDEL_FLAGS delRegFlags);
    677   LWSTDAPI_(LONG) SHRegEnumUSKeyA(HUSKEY hUSKey,DWORD dwIndex,LPSTR pszName,LPDWORD pcchName,SHREGENUM_FLAGS enumRegFlags);
    678   LWSTDAPI_(LONG) SHRegEnumUSKeyW(HUSKEY hUSKey,DWORD dwIndex,LPWSTR pwzName,LPDWORD pcchName,SHREGENUM_FLAGS enumRegFlags);
    679   LWSTDAPI_(LONG) SHRegEnumUSValueA(HUSKEY hUSkey,DWORD dwIndex,LPSTR pszValueName,LPDWORD pcchValueName,LPDWORD pdwType,void *pvData,LPDWORD pcbData,SHREGENUM_FLAGS enumRegFlags);
    680   LWSTDAPI_(LONG) SHRegEnumUSValueW(HUSKEY hUSkey,DWORD dwIndex,LPWSTR pszValueName,LPDWORD pcchValueName,LPDWORD pdwType,void *pvData,LPDWORD pcbData,SHREGENUM_FLAGS enumRegFlags);
    681   LWSTDAPI_(LONG) SHRegQueryInfoUSKeyA(HUSKEY hUSKey,LPDWORD pcSubKeys,LPDWORD pcchMaxSubKeyLen,LPDWORD pcValues,LPDWORD pcchMaxValueNameLen,SHREGENUM_FLAGS enumRegFlags);
    682   LWSTDAPI_(LONG) SHRegQueryInfoUSKeyW(HUSKEY hUSKey,LPDWORD pcSubKeys,LPDWORD pcchMaxSubKeyLen,LPDWORD pcValues,LPDWORD pcchMaxValueNameLen,SHREGENUM_FLAGS enumRegFlags);
    683   LWSTDAPI_(LONG) SHRegCloseUSKey(HUSKEY hUSKey);
    684   LWSTDAPI_(LONG) SHRegGetUSValueA(LPCSTR pszSubKey,LPCSTR pszValue,LPDWORD pdwType,void *pvData,LPDWORD pcbData,WINBOOL fIgnoreHKCU,void *pvDefaultData,DWORD dwDefaultDataSize);
    685   LWSTDAPI_(LONG) SHRegGetUSValueW(LPCWSTR pwzSubKey,LPCWSTR pwzValue,LPDWORD pdwType,void *pvData,LPDWORD pcbData,WINBOOL fIgnoreHKCU,void *pvDefaultData,DWORD dwDefaultDataSize);
    686   LWSTDAPI_(LONG) SHRegSetUSValueA(LPCSTR pszSubKey,LPCSTR pszValue,DWORD dwType,const void *pvData,DWORD cbData,DWORD dwFlags);
    687   LWSTDAPI_(LONG) SHRegSetUSValueW(LPCWSTR pwzSubKey,LPCWSTR pwzValue,DWORD dwType,const void *pvData,DWORD cbData,DWORD dwFlags);
    688   LWSTDAPI_(int) SHRegGetIntW(HKEY hk,LPCWSTR pwzKey,int iDefault);
    689 
    690 #define SHRegCreateUSKey __MINGW_NAME_AW(SHRegCreateUSKey)
    691 #define SHRegOpenUSKey __MINGW_NAME_AW(SHRegOpenUSKey)
    692 #define SHRegQueryUSValue __MINGW_NAME_AW(SHRegQueryUSValue)
    693 #define SHRegWriteUSValue __MINGW_NAME_AW(SHRegWriteUSValue)
    694 #define SHRegDeleteUSValue __MINGW_NAME_AW(SHRegDeleteUSValue)
    695 #define SHRegDeleteEmptyUSKey __MINGW_NAME_AW(SHRegDeleteEmptyUSKey)
    696 #define SHRegEnumUSKey __MINGW_NAME_AW(SHRegEnumUSKey)
    697 #define SHRegEnumUSValue __MINGW_NAME_AW(SHRegEnumUSValue)
    698 #define SHRegQueryInfoUSKey __MINGW_NAME_AW(SHRegQueryInfoUSKey)
    699 #define SHRegGetUSValue __MINGW_NAME_AW(SHRegGetUSValue)
    700 #define SHRegSetUSValue __MINGW_NAME_AW(SHRegSetUSValue)
    701 #define SHRegGetInt __MINGW_NAME_AW(SHRegGetInt)
    702 #define SHRegGetBoolUSValue __MINGW_NAME_AW(SHRegGetBoolUSValue)
    703 
    704   LWSTDAPI_(WINBOOL) SHRegGetBoolUSValueA(LPCSTR pszSubKey,LPCSTR pszValue,WINBOOL fIgnoreHKCU,WINBOOL fDefault);
    705   LWSTDAPI_(WINBOOL) SHRegGetBoolUSValueW(LPCWSTR pszSubKey,LPCWSTR pszValue,WINBOOL fIgnoreHKCU,WINBOOL fDefault);
    706 
    707   enum {
    708     ASSOCF_INIT_NOREMAPCLSID = 0x00000001,
    709     ASSOCF_INIT_BYEXENAME = 0x00000002,
    710     ASSOCF_OPEN_BYEXENAME = 0x00000002,
    711     ASSOCF_INIT_DEFAULTTOSTAR = 0x00000004,
    712     ASSOCF_INIT_DEFAULTTOFOLDER = 0x00000008,
    713     ASSOCF_NOUSERSETTINGS = 0x00000010,
    714     ASSOCF_NOTRUNCATE = 0x00000020,
    715     ASSOCF_VERIFY = 0x00000040,
    716     ASSOCF_REMAPRUNDLL = 0x00000080,
    717     ASSOCF_NOFIXUPS = 0x00000100,
    718     ASSOCF_IGNOREBASECLASS = 0x00000200,
    719     ASSOCF_INIT_IGNOREUNKNOWN = 0x00000400
    720   };
    721 
    722   typedef DWORD ASSOCF;
    723 
    724   typedef enum {
    725     ASSOCSTR_COMMAND = 1,
    726     ASSOCSTR_EXECUTABLE,
    727     ASSOCSTR_FRIENDLYDOCNAME,
    728     ASSOCSTR_FRIENDLYAPPNAME,
    729     ASSOCSTR_NOOPEN,
    730     ASSOCSTR_SHELLNEWVALUE,
    731     ASSOCSTR_DDECOMMAND,
    732     ASSOCSTR_DDEIFEXEC,
    733     ASSOCSTR_DDEAPPLICATION,
    734     ASSOCSTR_DDETOPIC,
    735     ASSOCSTR_INFOTIP,
    736     ASSOCSTR_QUICKTIP,
    737     ASSOCSTR_TILEINFO,
    738     ASSOCSTR_CONTENTTYPE,
    739     ASSOCSTR_DEFAULTICON,
    740     ASSOCSTR_SHELLEXTENSION,
    741 #if _WIN32_WINNT >= 0x601
    742     ASSOCSTR_DROPTARGET,
    743     ASSOCSTR_DELEGATEEXECUTE,
    744 #endif
    745     ASSOCSTR_MAX
    746   } ASSOCSTR;
    747 
    748   typedef enum {
    749     ASSOCKEY_SHELLEXECCLASS = 1,
    750     ASSOCKEY_APP,
    751     ASSOCKEY_CLASS,
    752     ASSOCKEY_BASECLASS,
    753     ASSOCKEY_MAX
    754   } ASSOCKEY;
    755 
    756   typedef enum {
    757     ASSOCDATA_MSIDESCRIPTOR = 1,
    758     ASSOCDATA_NOACTIVATEHANDLER,
    759     ASSOCDATA_QUERYCLASSSTORE,
    760     ASSOCDATA_HASPERUSERASSOC,
    761     ASSOCDATA_EDITFLAGS,
    762     ASSOCDATA_VALUE,
    763     ASSOCDATA_MAX
    764   } ASSOCDATA;
    765 
    766   typedef enum {
    767     ASSOCENUM_NONE
    768   } ASSOCENUM;
    769 
    770 #undef INTERFACE
    771 #define INTERFACE IQueryAssociations
    772   DECLARE_INTERFACE_(IQueryAssociations,IUnknown) {
    773     STDMETHOD (QueryInterface)(THIS_ REFIID riid,void **ppv) PURE;
    774     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
    775     STDMETHOD_(ULONG,Release) (THIS) PURE;
    776     STDMETHOD (Init)(THIS_ ASSOCF flags,LPCWSTR pszAssoc,HKEY hkProgid,HWND hwnd) PURE;
    777     STDMETHOD (GetString)(THIS_ ASSOCF flags,ASSOCSTR str,LPCWSTR pszExtra,LPWSTR pszOut,DWORD *pcchOut) PURE;
    778     STDMETHOD (GetKey)(THIS_ ASSOCF flags,ASSOCKEY key,LPCWSTR pszExtra,HKEY *phkeyOut) PURE;
    779     STDMETHOD (GetData)(THIS_ ASSOCF flags,ASSOCDATA data,LPCWSTR pszExtra,LPVOID pvOut,DWORD *pcbOut) PURE;
    780     STDMETHOD (GetEnum)(THIS_ ASSOCF flags,ASSOCENUM assocenum,LPCWSTR pszExtra,REFIID riid,LPVOID *ppvOut) PURE;
    781   };
    782 
    783 #define AssocQueryString __MINGW_NAME_AW(AssocQueryString)
    784 #define AssocQueryStringByKey __MINGW_NAME_AW(AssocQueryStringByKey)
    785 #define AssocQueryKey __MINGW_NAME_AW(AssocQueryKey)
    786 
    787   LWSTDAPI AssocCreate(CLSID clsid,REFIID riid,LPVOID *ppv);
    788   LWSTDAPI AssocQueryStringA(ASSOCF flags,ASSOCSTR str,LPCSTR pszAssoc,LPCSTR pszExtra,LPSTR pszOut,DWORD *pcchOut);
    789   LWSTDAPI AssocQueryStringW(ASSOCF flags,ASSOCSTR str,LPCWSTR pszAssoc,LPCWSTR pszExtra,LPWSTR pszOut,DWORD *pcchOut);
    790   LWSTDAPI AssocQueryStringByKeyA(ASSOCF flags,ASSOCSTR str,HKEY hkAssoc,LPCSTR pszExtra,LPSTR pszOut,DWORD *pcchOut);
    791   LWSTDAPI AssocQueryStringByKeyW(ASSOCF flags,ASSOCSTR str,HKEY hkAssoc,LPCWSTR pszExtra,LPWSTR pszOut,DWORD *pcchOut);
    792   LWSTDAPI AssocQueryKeyA(ASSOCF flags,ASSOCKEY key,LPCSTR pszAssoc,LPCSTR pszExtra,HKEY *phkeyOut);
    793   LWSTDAPI AssocQueryKeyW(ASSOCF flags,ASSOCKEY key,LPCWSTR pszAssoc,LPCWSTR pszExtra,HKEY *phkeyOut);
    794 
    795 #if (_WIN32_IE >= 0x0601)
    796   LWSTDAPI_(WINBOOL) AssocIsDangerous(LPCWSTR pszAssoc);
    797 #endif
    798 
    799 #if (_WIN32_IE >= 0x0603)
    800   typedef enum {
    801     PERCEIVED_TYPE_CUSTOM = -3,PERCEIVED_TYPE_UNSPECIFIED = -2,PERCEIVED_TYPE_FOLDER = -1,PERCEIVED_TYPE_UNKNOWN = 0,
    802     PERCEIVED_TYPE_TEXT,PERCEIVED_TYPE_IMAGE,PERCEIVED_TYPE_AUDIO,PERCEIVED_TYPE_VIDEO,PERCEIVED_TYPE_COMPRESSED,PERCEIVED_TYPE_DOCUMENT,
    803     PERCEIVED_TYPE_SYSTEM,PERCEIVED_TYPE_APPLICATION
    804   } PERCEIVED;
    805 
    806 #define PERCEIVEDFLAG_UNDEFINED 0x0000
    807 #define PERCEIVEDFLAG_SOFTCODED 0x0001
    808 #define PERCEIVEDFLAG_HARDCODED 0x0002
    809 #define PERCEIVEDFLAG_NATIVESUPPORT 0x0004
    810 #define PERCEIVEDFLAG_GDIPLUS 0x0010
    811 #define PERCEIVEDFLAG_WMSDK 0x0020
    812 #define PERCEIVEDFLAG_ZIPFOLDER 0x0040
    813 
    814   typedef DWORD PERCEIVEDFLAG;
    815 
    816   LWSTDAPI AssocGetPerceivedType(LPCWSTR pszExt,PERCEIVED *ptype,PERCEIVEDFLAG *pflag,LPWSTR *ppszType);
    817 #endif
    818 #endif
    819 
    820 #ifndef NO_SHLWAPI_STREAM
    821 #define SHOpenRegStream __MINGW_NAME_AW(SHOpenRegStream)
    822 #define SHOpenRegStream2 __MINGW_NAME_AW(SHOpenRegStream2)
    823 #define SHCreateStreamOnFile __MINGW_NAME_AW(SHCreateStreamOnFile)
    824 
    825   LWSTDAPI_(struct IStream *) SHOpenRegStreamA(HKEY hkey,LPCSTR pszSubkey,LPCSTR pszValue,DWORD grfMode);
    826   LWSTDAPI_(struct IStream *) SHOpenRegStreamW(HKEY hkey,LPCWSTR pszSubkey,LPCWSTR pszValue,DWORD grfMode);
    827   LWSTDAPI_(struct IStream *) SHOpenRegStream2A(HKEY hkey,LPCSTR pszSubkey,LPCSTR pszValue,DWORD grfMode);
    828   LWSTDAPI_(struct IStream *) SHOpenRegStream2W(HKEY hkey,LPCWSTR pszSubkey,LPCWSTR pszValue,DWORD grfMode);
    829 
    830 #undef SHOpenRegStream
    831 #define SHOpenRegStream SHOpenRegStream2
    832   LWSTDAPI SHCreateStreamOnFileA(LPCSTR pszFile,DWORD grfMode,struct IStream **ppstm);
    833   LWSTDAPI SHCreateStreamOnFileW(LPCWSTR pszFile,DWORD grfMode,struct IStream **ppstm);
    834 
    835 #if (_WIN32_IE >= 0x0600)
    836   LWSTDAPI SHCreateStreamOnFileEx(LPCWSTR pszFile,DWORD grfMode,DWORD dwAttributes,WINBOOL fCreate,struct IStream *pstmTemplate,struct IStream **ppstm);
    837 #endif
    838 #endif
    839 
    840 #ifndef NO_SHLWAPI_HTTP
    841 #if (_WIN32_IE >= 0x0603)
    842 
    843 #define GetAcceptLanguages __MINGW_NAME_AW(GetAcceptLanguages)
    844 
    845   LWSTDAPI GetAcceptLanguagesA(LPSTR psz,DWORD *pcch);
    846   LWSTDAPI GetAcceptLanguagesW(LPWSTR psz,DWORD *pcch);
    847 #endif
    848 #endif
    849 
    850 #if (_WIN32_IE >= 0x0601)
    851 #define SHGVSPB_PERUSER 0x00000001
    852 #define SHGVSPB_ALLUSERS 0x00000002
    853 #define SHGVSPB_PERFOLDER 0x00000004
    854 #define SHGVSPB_ALLFOLDERS 0x00000008
    855 #define SHGVSPB_INHERIT 0x00000010
    856 #define SHGVSPB_ROAM 0x00000020
    857 #define SHGVSPB_NOAUTODEFAULTS 0x80000000
    858 
    859 #define SHGVSPB_FOLDER (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER)
    860 #define SHGVSPB_FOLDERNODEFAULTS (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER | SHGVSPB_NOAUTODEFAULTS)
    861 #define SHGVSPB_USERDEFAULTS (SHGVSPB_PERUSER | SHGVSPB_ALLFOLDERS)
    862 #define SHGVSPB_GLOBALDEAFAULTS (SHGVSPB_ALLUSERS | SHGVSPB_ALLFOLDERS)
    863 
    864   LWSTDAPI SHGetViewStatePropertyBag(LPCITEMIDLIST pidl,LPCWSTR pszBagName,DWORD dwFlags,REFIID riid,void **ppv);
    865 #endif
    866 
    867 #if (_WIN32_IE >= 0x0603)
    868   LWSTDAPI_(HANDLE) SHAllocShared(const void *pvData,DWORD dwSize,DWORD dwProcessId);
    869   LWSTDAPI_(WINBOOL) SHFreeShared(HANDLE hData,DWORD dwProcessId);
    870   LWSTDAPI_(void *) SHLockShared(HANDLE hData,DWORD dwProcessId);
    871   LWSTDAPI_(WINBOOL) SHUnlockShared(void *pvData);
    872 #endif
    873 
    874 #define SHACF_DEFAULT 0x00000000
    875 #define SHACF_FILESYSTEM 0x00000001
    876 #define SHACF_URLALL (SHACF_URLHISTORY | SHACF_URLMRU)
    877 #define SHACF_URLHISTORY 0x00000002
    878 #define SHACF_URLMRU 0x00000004
    879 #define SHACF_USETAB 0x00000008
    880 #define SHACF_FILESYS_ONLY 0x00000010
    881 
    882 #if (_WIN32_IE >= 0x0600)
    883 #define SHACF_FILESYS_DIRS 0x00000020
    884 #endif
    885 
    886 #define SHACF_AUTOSUGGEST_FORCE_ON 0x10000000
    887 #define SHACF_AUTOSUGGEST_FORCE_OFF 0x20000000
    888 #define SHACF_AUTOAPPEND_FORCE_ON 0x40000000
    889 #define SHACF_AUTOAPPEND_FORCE_OFF 0x80000000
    890 
    891   LWSTDAPI SHAutoComplete(HWND hwndEdit,DWORD dwFlags);
    892   LWSTDAPI SHSetThreadRef(IUnknown *punk);
    893   LWSTDAPI SHGetThreadRef(IUnknown **ppunk);
    894   LWSTDAPI_(WINBOOL) SHSkipJunction(struct IBindCtx *pbc,const CLSID *pclsid);
    895 
    896 #if (_WIN32_IE >= 0x0603)
    897   LWSTDAPI SHCreateThreadRef(LONG *pcRef,IUnknown **ppunk);
    898 #endif
    899 
    900 #define CTF_INSIST 0x00000001
    901 #define CTF_THREAD_REF 0x00000002
    902 #define CTF_PROCESS_REF 0x00000004
    903 #define CTF_COINIT 0x00000008
    904 #define CTF_FREELIBANDEXIT 0x00000010
    905 #define CTF_REF_COUNTED 0x00000020
    906 #define CTF_WAIT_ALLOWCOM 0x00000040
    907 
    908   LWSTDAPI_(WINBOOL) SHCreateThread(LPTHREAD_START_ROUTINE pfnThreadProc,void *pData,DWORD dwFlags,LPTHREAD_START_ROUTINE pfnCallback);
    909   LWSTDAPI SHReleaseThreadRef();
    910 
    911 #ifndef NO_SHLWAPI_GDI
    912   LWSTDAPI_(HPALETTE) SHCreateShellPalette(HDC hdc);
    913   LWSTDAPI_(void) ColorRGBToHLS(COLORREF clrRGB,WORD *pwHue,WORD *pwLuminance,WORD *pwSaturation);
    914   LWSTDAPI_(COLORREF) ColorHLSToRGB(WORD wHue,WORD wLuminance,WORD wSaturation);
    915   LWSTDAPI_(COLORREF) ColorAdjustLuma(COLORREF clrRGB,int n,WINBOOL fScale);
    916 #endif
    917 
    918   typedef struct _DLLVERSIONINFO {
    919     DWORD cbSize;
    920     DWORD dwMajorVersion;
    921     DWORD dwMinorVersion;
    922     DWORD dwBuildNumber;
    923     DWORD dwPlatformID;
    924   } DLLVERSIONINFO;
    925 
    926 #define DLLVER_PLATFORM_WINDOWS 0x00000001
    927 #define DLLVER_PLATFORM_NT 0x00000002
    928 
    929   typedef struct _DLLVERSIONINFO2 {
    930     DLLVERSIONINFO info1;
    931     DWORD dwFlags;
    932     ULONGLONG ullVersion;
    933 
    934   } DLLVERSIONINFO2;
    935 
    936 #define DLLVER_MAJOR_MASK 0xFFFF000000000000
    937 #define DLLVER_MINOR_MASK 0x0000FFFF00000000
    938 #define DLLVER_BUILD_MASK 0x00000000FFFF0000
    939 #define DLLVER_QFE_MASK 0x000000000000FFFF
    940 
    941 #define MAKEDLLVERULL(major,minor,build,qfe) (((ULONGLONG)(major) << 48) | ((ULONGLONG)(minor) << 32) | ((ULONGLONG)(build) << 16) | ((ULONGLONG)(qfe) << 0))
    942 
    943   typedef HRESULT (CALLBACK *DLLGETVERSIONPROC)(DLLVERSIONINFO *);
    944 
    945   STDAPI DllInstall(WINBOOL bInstall,LPCWSTR pszCmdLine);
    946 
    947 #if (_WIN32_IE >= 0x0602)
    948   LWSTDAPI_(WINBOOL) IsInternetESCEnabled();
    949 #endif
    950 
    951 #ifdef __cplusplus
    952 }
    953 #endif
    954 
    955 #include <poppack.h>
    956 #endif
    957 #endif
    958