/*****************************************************************************\
* *
* shlwapi.h - Interface for the Windows light-weight utility APIs *
* *
* Version 1.0 *
* *
* Copyright (c) Microsoft Corporation. All rights reserved. *
* *
\*****************************************************************************/
#ifndef _INC_SHLWAPI
#define _INC_SHLWAPI
#include <winapifamily.h>
#ifndef NOSHLWAPI
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#include <SpecStrings.h>
#include <objbase.h>
#include <shtypes.h>
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#ifndef WINSHLWAPI
#if !defined(_SHLWAPI_)
#define LWSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
#define LWSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
#define LWSTDAPIV EXTERN_C DECLSPEC_IMPORT HRESULT STDAPIVCALLTYPE
#define LWSTDAPIV_(type) EXTERN_C DECLSPEC_IMPORT type STDAPIVCALLTYPE
#else
#define LWSTDAPI STDAPI
#define LWSTDAPI_(type) STDAPI_(type)
#define LWSTDAPIV STDAPIV
#define LWSTDAPIV_(type) STDAPIV_(type)
#endif
#endif // WINSHLWAPI
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#if _MSC_VER >= 1200
#pragma warning(push)
#pragma warning(disable:4820) // padding added after data member
#endif
#pragma warning(disable:
4820
)
#ifdef _WIN32
#include <pshpack8.h>
#endif
#if defined(DEPRECATE_SUPPORTED)
#pragma warning(push)
#pragma warning(disable:
4995
)
#endif
#ifndef __IBindCtx_FWD_DEFINED__
#define __IBindCtx_FWD_DEFINED__
typedef interface IBindCtx IBindCtx;
#endif /* __IBindCtx_FWD_DEFINED__ */
#ifdef __cplusplus
extern
"C"
{
#endif
#if defined(__cplusplus) && defined(STRICT_CONST)
#define USE_STRICT_CONST
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#ifndef NO_SHLWAPI_STRFCNS
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#ifdef USE_STRICT_CONST
LWSTDAPI_(PCSTR) StrChrA(_In_ PCSTR pszStart, WORD wMatch);
LWSTDAPI_(PCWSTR) StrChrW(_In_ PCWSTR pszStart, WCHAR wMatch);
LWSTDAPI_(PCSTR) StrChrIA(_In_ PCSTR pszStart, WORD wMatch);
LWSTDAPI_(PCWSTR) StrChrIW(_In_ PCWSTR pszStart, WCHAR wMatch);
#if (_WIN32_IE >= _WIN32_IE_IE60)
LWSTDAPI_(PCWSTR) StrChrNW(_In_ PCWSTR pszStart, WCHAR wMatch, UINT cchMax);
LWSTDAPI_(PCWSTR) StrChrNIW(_In_ PCWSTR pszStart, WCHAR wMatch, UINT cchMax);
#endif // _WIN32_IE_IE60
#else
LWSTDAPI_(PSTR) StrChrA(_In_ PCSTR pszStart, WORD wMatch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(PWSTR) StrChrW(_In_ PCWSTR pszStart, WCHAR wMatch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(PSTR) StrChrIA(_In_ PCSTR pszStart, WORD wMatch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(PWSTR) StrChrIW(_In_ PCWSTR pszStart, WCHAR wMatch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
#if (_WIN32_IE >= _WIN32_IE_IE60)
LWSTDAPI_(PWSTR) StrChrNW(_In_ PCWSTR pszStart, WCHAR wMatch, UINT cchMax);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(PWSTR) StrChrNIW(_In_ PCWSTR pszStart, WCHAR wMatch, UINT cchMax);
#endif // _WIN32_IE_IE60
#endif
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(int) StrCmpNA(_In_ PCSTR psz1, _In_ PCSTR psz2, int nChar);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
int
);
LWSTDAPI_(int) StrCmpNW(_In_ PCWSTR psz1, _In_ PCWSTR psz2, int nChar);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
int
);
LWSTDAPI_(int) StrCmpNIA(_In_ PCSTR psz1, _In_ PCSTR psz2, int nChar);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
int
);
LWSTDAPI_(int) StrCmpNIW(_In_ PCWSTR psz1, _In_ PCWSTR psz2, int nChar);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
int
);
LWSTDAPI_(int) StrCSpnA(_In_ PCSTR pszStr, _In_ PCSTR pszSet);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
);
LWSTDAPI_(int) StrCSpnW(_In_ PCWSTR pszStr, _In_ PCWSTR pszSet);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
);
LWSTDAPI_(int) StrCSpnIA(_In_ PCSTR pszStr, _In_ PCSTR pszSet);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
);
LWSTDAPI_(int) StrCSpnIW(_In_ PCWSTR pszStr, _In_ PCWSTR pszSet);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
);
LWSTDAPI_(PSTR) StrDupA(_In_ PCSTR pszSrch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(PWSTR) StrDupW(_In_ PCWSTR pszSrch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#if (NTDDI_VERSION >= NTDDI_VISTASP1)
enum
{
=
0x0001
,
=
0x0002
,
};
typedef
int
;
LWSTDAPI StrFormatByteSizeEx(ULONGLONG ull, SFBS_FLAGS flags, _Out_writes_(cchBuf) PWSTR pszBuf, _In_range_(>,0) UINT cchBuf);
#endif // (NTDDI_VERSION >= NTDDI_VISTASP1)
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
);
LWSTDAPI_(PSTR) StrFormatByteSizeA(DWORD dw, _Out_writes_(cchBuf) PSTR pszBuf, UINT cchBuf);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(PSTR) StrFormatByteSize64A(LONGLONG qdw, _Out_writes_(cchBuf) PSTR pszBuf, UINT cchBuf);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(PWSTR) StrFormatByteSizeW(LONGLONG qdw, _Out_writes_(cchBuf) PWSTR pszBuf, UINT cchBuf);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(PWSTR) StrFormatKBSizeW(LONGLONG qdw, _Out_writes_(cchBuf) PWSTR pszBuf, UINT cchBuf);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(PSTR) StrFormatKBSizeA(LONGLONG qdw, _Out_writes_(cchBuf) PSTR pszBuf, UINT cchBuf);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(int) StrFromTimeIntervalA(_Out_writes_(cchMax) PSTR pszOut, UINT cchMax, DWORD dwTimeMS, int digits);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
,
int
);
LWSTDAPI_(int) StrFromTimeIntervalW(_Out_writes_(cchMax) PWSTR pszOut, UINT cchMax, DWORD dwTimeMS, int digits);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
,
int
);
LWSTDAPI_(BOOL) StrIsIntlEqualA(BOOL fCaseSens, _In_ PCSTR pszString1, _In_ PCSTR pszString2, int nChar);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
int
);
LWSTDAPI_(BOOL) StrIsIntlEqualW(BOOL fCaseSens, _In_ PCWSTR pszString1, _In_ PCWSTR pszString2, int nChar);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
int
);
LWSTDAPI_(PSTR) StrNCatA(_Inout_updates_(cchMax) PSTR psz1, PCSTR psz2, int cchMax);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
int
);
LWSTDAPI_(PWSTR) StrNCatW(_Inout_updates_(cchMax) PWSTR psz1, PCWSTR psz2, int cchMax);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
int
);
#ifdef USE_STRICT_CONST
LWSTDAPI_(PCSTR) StrPBrkA(_In_ PCSTR psz, _In_ PCSTR pszSet);
LWSTDAPI_(PCWSTR) StrPBrkW(_In_ PCWSTR psz, _In_ PCWSTR pszSet);
LWSTDAPI_(PCSTR) StrRChrA(_In_ PCSTR pszStart, _In_opt_ PCSTR pszEnd, WORD wMatch);
LWSTDAPI_(PCWSTR) StrRChrW(_In_ PCWSTR pszStart, _In_opt_ PCWSTR pszEnd, WCHAR wMatch);
LWSTDAPI_(PCSTR) StrRChrIA(_In_ PCSTR pszStart, _In_opt_ PCSTR pszEnd, WORD wMatch);
LWSTDAPI_(PCWSTR) StrRChrIW(_In_ PCWSTR pszStart, _In_opt_ PCWSTR pszEnd, WCHAR wMatch);
LWSTDAPI_(PCSTR) StrRStrIA(_In_ PCSTR pszSource, _In_opt_ PCSTR pszLast, _In_ PCSTR pszSrch);
LWSTDAPI_(PCWSTR) StrRStrIW(_In_ PCWSTR pszSource, _In_opt_ PCWSTR pszLast, _In_ PCWSTR pszSrch);
#else
LWSTDAPI_(PSTR) StrPBrkA(_In_ PCSTR psz, _In_ PCSTR pszSet);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(PWSTR) StrPBrkW(_In_ PCWSTR psz, _In_ PCWSTR pszSet);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(PSTR) StrRChrA(_In_ PCSTR pszStart, _In_opt_ PCSTR pszEnd, WORD wMatch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(PWSTR) StrRChrW(_In_ PCWSTR pszStart, _In_opt_ PCWSTR pszEnd, WCHAR wMatch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(PSTR) StrRChrIA(_In_ PCSTR pszStart, _In_opt_ PCSTR pszEnd, WORD wMatch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(PWSTR) StrRChrIW(_In_ PCWSTR pszStart, _In_opt_ PCWSTR pszEnd, WCHAR wMatch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(PSTR) StrRStrIA(_In_ PCSTR pszSource, _In_opt_ PCSTR pszLast, _In_ PCSTR pszSrch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(PWSTR) StrRStrIW(_In_ PCWSTR pszSource, _In_opt_ PCWSTR pszLast, _In_ PCWSTR pszSrch);
#endif
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(int) StrSpnA(_In_ PCSTR psz, _In_ PCSTR pszSet);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
);
LWSTDAPI_(int) StrSpnW(_In_ PCWSTR psz, _In_ PCWSTR pszSet);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
);
#ifdef USE_STRICT_CONST
LWSTDAPI_(PCSTR) StrStrA(_In_ PCSTR pszFirst, _In_ PCSTR pszSrch);
LWSTDAPI_(PCWSTR) StrStrW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch);
LWSTDAPI_(PCSTR) StrStrIA(_In_ PCSTR pszFirst, _In_ PCSTR pszSrch);
LWSTDAPI_(PCWSTR) StrStrIW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch);
#if (_WIN32_IE >= _WIN32_IE_IE6)
LWSTDAPI_(PCWSTR) StrStrNW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch, UINT cchMax);
LWSTDAPI_(PCWSTR) StrStrNIW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch, UINT cchMax);
#endif // _WIN32_IE_IE6
#else
LWSTDAPI_(PSTR) StrStrA(_In_ PCSTR pszFirst, _In_ PCSTR pszSrch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(PWSTR) StrStrW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(PSTR) StrStrIA(_In_ PCSTR pszFirst, _In_ PCSTR pszSrch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(PWSTR) StrStrIW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
#if (_WIN32_IE >= _WIN32_IE_IE60)
LWSTDAPI_(PWSTR) StrStrNW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch, UINT cchMax);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(PWSTR) StrStrNIW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch, UINT cchMax);
#endif // _WIN32_IE_IE60
#endif
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
#define STIF_DEFAULT 0x00000000L
#define STIF_SUPPORT_HEX 0x00000001L
typedef
int
;
LWSTDAPI_(int) StrToIntA(_In_ PCSTR pszSrc);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
);
LWSTDAPI_(int) StrToIntW(_In_ PCWSTR pszSrc);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
);
LWSTDAPI_(BOOL) StrToIntExA(_In_ PCSTR pszString, STIF_FLAGS dwFlags, _Out_ int * piRet);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
int
*
);
LWSTDAPI_(BOOL) StrToIntExW(_In_ PCWSTR pszString, STIF_FLAGS dwFlags, _Out_ int * piRet);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
int
*
);
#if (_WIN32_IE >= _WIN32_IE_IE60)
LWSTDAPI_(BOOL) StrToInt64ExA(_In_ PCSTR pszString, STIF_FLAGS dwFlags, _Out_ LONGLONG * pllRet);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
);
LWSTDAPI_(BOOL) StrToInt64ExW(_In_ PCWSTR pszString, STIF_FLAGS dwFlags, _Out_ LONGLONG * pllRet);
#endif // _WIN32_IE_IE60
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
);
LWSTDAPI_(BOOL) StrTrimA(_Inout_ PSTR psz, _In_ PCSTR pszTrimChars);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) StrTrimW(_Inout_ PWSTR psz, _In_ PCWSTR pszTrimChars);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(PWSTR) StrCatW(_Inout_ PWSTR psz1, _In_ PCWSTR psz2);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(int) StrCmpW(_In_ PCWSTR psz1, _In_ PCWSTR psz2);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
);
LWSTDAPI_(int) StrCmpIW(_In_ PCWSTR psz1, _In_ PCWSTR psz2);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
);
LWSTDAPI_(PWSTR) StrCpyW(_Out_ PWSTR psz1, _In_ PCWSTR psz2);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(PWSTR) StrCpyNW(_Out_writes_(cchMax) PWSTR pszDst, _In_ PCWSTR pszSrc, int cchMax);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
int
);
LWSTDAPI_(PWSTR) StrCatBuffW(_Inout_updates_(cchDestBuffSize) PWSTR pszDest, _In_ PCWSTR pszSrc, int cchDestBuffSize);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
int
);
LWSTDAPI_(PSTR) StrCatBuffA(_Inout_updates_(cchDestBuffSize) PSTR pszDest, _In_ PCSTR pszSrc, int cchDestBuffSize);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
int
);
LWSTDAPI_(BOOL) ChrCmpIA(WORD w1, WORD w2);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) ChrCmpIW(WCHAR w1, WCHAR w2);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(int) wvnsprintfA(_Out_writes_(cchDest) PSTR pszDest, _In_ int cchDest, _In_ _Printf_format_string_ PCSTR pszFmt, _In_ va_list arglist);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
int
,
,
);
LWSTDAPI_(int) wvnsprintfW(_Out_writes_(cchDest) PWSTR pszDest, _In_ int cchDest, _In_ _Printf_format_string_ PCWSTR pszFmt, _In_ va_list arglist);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
int
,
,
);
LWSTDAPIV_(int) wnsprintfA(_Out_writes_(cchDest) PSTR pszDest, _In_ int cchDest, _In_ _Printf_format_string_ PCSTR pszFmt, ...);
extern
"C"
__declspec
(dllimport)
int
__cdecl
(
,
int
,
, ...);
LWSTDAPIV_(int) wnsprintfW(_Out_writes_(cchDest) PWSTR pszDest, _In_ int cchDest, _In_ _Printf_format_string_ PCWSTR pszFmt, ...);
extern
"C"
__declspec
(dllimport)
int
__cdecl
(
,
int
,
, ...);
#define StrIntlEqNA( s1, s2, nChar) StrIsIntlEqualA( TRUE, s1, s2, nChar)
#define StrIntlEqNW( s1, s2, nChar) StrIsIntlEqualW( TRUE, s1, s2, nChar)
#define StrIntlEqNIA(s1, s2, nChar) StrIsIntlEqualA(FALSE, s1, s2, nChar)
#define StrIntlEqNIW(s1, s2, nChar) StrIsIntlEqualW(FALSE, s1, s2, nChar)
LWSTDAPI StrRetToStrA(_Inout_ STRRET *pstr, _In_opt_ PCUITEMID_CHILD pidl, _Outptr_ LPSTR *ppsz);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
,
*
);
LWSTDAPI StrRetToStrW(_Inout_ STRRET *pstr, _In_opt_ PCUITEMID_CHILD pidl, _Outptr_ LPWSTR *ppsz);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
,
*
);
#ifdef UNICODE
#define StrRetToStr StrRetToStrW
#else
#define StrRetToStr StrRetToStrA
#endif // !UNICODE
LWSTDAPI StrRetToBufA(_Inout_ STRRET *pstr, _In_opt_ PCUITEMID_CHILD pidl, _Out_writes_(cchBuf) LPSTR pszBuf, UINT cchBuf);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
,
,
);
LWSTDAPI StrRetToBufW(_Inout_ STRRET *pstr, _In_opt_ PCUITEMID_CHILD pidl, _Out_writes_(cchBuf) LPWSTR pszBuf, UINT cchBuf);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
,
,
);
#ifdef UNICODE
#define StrRetToBuf StrRetToBufW
#else
#define StrRetToBuf StrRetToBufA
#endif // !UNICODE
LWSTDAPI SHStrDupA(_In_ LPCSTR psz, _Outptr_result_nullonfailure_ LPWSTR *ppwsz);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
);
LWSTDAPI SHStrDupW(_In_ LPCWSTR psz, _Outptr_result_nullonfailure_ LPWSTR *ppwsz);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
);
#ifdef UNICODE
#define SHStrDup SHStrDupW
#else
#define SHStrDup SHStrDupA
#endif // !UNICODE
#ifdef __cplusplus
#pragma warning(push)
#pragma warning(disable:
6387
)
inline HRESULT SHLocalStrDupW(_In_ PCWSTR psz, _Outptr_result_maybenull_ PWSTR *ppsz)
{
*
=
(
);
return *ppsz ? S_OK : E_OUTOFMEMORY;
return
*
? ((
)
0L
) : ((
)
0x8007000EL
);
}
inline HRESULT SHLocalStrDupA(_In_ PCSTR psz, _Outptr_result_maybenull_ PSTR *ppsz)
{
*
=
(
);
return *ppsz ? S_OK : E_OUTOFMEMORY;
return
*
? ((
)
0L
) : ((
)
0x8007000EL
);
}
#pragma warning(pop) // C6387
#pragma warning(pop)
#ifdef UNICODE
#define SHLocalStrDup SHLocalStrDupW
#else
#define SHLocalStrDup SHLocalStrDupA
#endif
#endif // __cplusplus
LWSTDAPI_(int) StrCmpLogicalW(_In_ PCWSTR psz1, _In_ PCWSTR psz2);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
);
LWSTDAPI_(DWORD) StrCatChainW(_Out_writes_(cchDst) PWSTR pszDst, DWORD cchDst, DWORD ichAt, _In_ PCWSTR pszSrc);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
);
LWSTDAPI StrRetToBSTR(_Inout_ STRRET *pstr, _In_opt_ PCUITEMID_CHILD pidl, _Outptr_ BSTR *pbstr);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
,
*
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
LWSTDAPI SHLoadIndirectString(_In_ PCWSTR pszSource, _Out_writes_(cchOutBuf) PWSTR pszOutBuf, _In_ UINT cchOutBuf, _Reserved_ void **ppvReserved);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
void
**
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
LWSTDAPI_(BOOL) IsCharSpaceA(CHAR wch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) IsCharSpaceW(WCHAR wch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define IsCharSpace IsCharSpaceW
#else
#define IsCharSpace IsCharSpaceA
#endif // !UNICODE
LWSTDAPI_(int) StrCmpCA(_In_ LPCSTR pszStr1, _In_ LPCSTR pszStr2);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
);
LWSTDAPI_(int) StrCmpCW(_In_ LPCWSTR pszStr1, _In_ LPCWSTR pszStr2);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
);
#ifdef UNICODE
#define StrCmpC StrCmpCW
#else
#define StrCmpC StrCmpCA
#endif // !UNICODE
LWSTDAPI_(int) StrCmpICA(_In_ LPCSTR pszStr1, _In_ LPCSTR pszStr2);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
);
LWSTDAPI_(int) StrCmpICW(_In_ LPCWSTR pszStr1, _In_ LPCWSTR pszStr2);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
);
#ifdef UNICODE
#define StrCmpIC StrCmpICW
#else
#define StrCmpIC StrCmpICA
#endif // !UNICODE
#endif // _WIN32_IE_IE60SP2
#ifdef UNICODE
#define StrChr StrChrW
#define StrRChr StrRChrW
#define StrChrI StrChrIW
#define StrRChrI StrRChrIW
#define StrCmpN StrCmpNW
#define StrCmpNI StrCmpNIW
#define StrStr StrStrW
#define StrStrI StrStrIW
#define StrDup StrDupW
#define StrRStrI StrRStrIW
#define StrCSpn StrCSpnW
#define StrCSpnI StrCSpnIW
#define StrSpn StrSpnW
#define StrToInt StrToIntW
#define StrPBrk StrPBrkW
#define StrToIntEx StrToIntExW
#if (_WIN32_IE >= 0x0600)
#define StrToInt64Ex StrToInt64ExW
#endif
#define StrFromTimeInterval StrFromTimeIntervalW
#define StrIntlEqN StrIntlEqNW
#define StrIntlEqNI StrIntlEqNIW
#define StrFormatByteSize StrFormatByteSizeW
#define StrFormatByteSize64 StrFormatByteSizeW
#define StrFormatKBSize StrFormatKBSizeW
#define StrNCat StrNCatW
#define StrTrim StrTrimW
#define StrCatBuff StrCatBuffW
#define ChrCmpI ChrCmpIW
#define wvnsprintf wvnsprintfW
#define wnsprintf wnsprintfW
#define StrIsIntlEqual StrIsIntlEqualW
#else
#define StrChr StrChrA
#define StrRChr StrRChrA
#define StrChrI StrChrIA
#define StrRChrI StrRChrIA
#define StrCmpN StrCmpNA
#define StrCmpNI StrCmpNIA
#define StrStr StrStrA
#define StrStrI StrStrIA
#define StrDup StrDupA
#define StrRStrI StrRStrIA
#define StrCSpn StrCSpnA
#define StrCSpnI StrCSpnIA
#define StrSpn StrSpnA
#define StrToInt StrToIntA
#define StrPBrk StrPBrkA
#define StrToIntEx StrToIntExA
#if (_WIN32_IE >= 0x0600)
#define StrToInt64Ex StrToInt64ExA
#endif
#define StrFromTimeInterval StrFromTimeIntervalA
#define StrIntlEqN StrIntlEqNA
#define StrIntlEqNI StrIntlEqNIA
#define StrFormatByteSize StrFormatByteSizeA
#define StrFormatByteSize64 StrFormatByteSize64A
#define StrFormatKBSize StrFormatKBSizeA
#define StrNCat StrNCatA
#define StrTrim StrTrimA
#define StrCatBuff StrCatBuffA
#define ChrCmpI ChrCmpIA
#define wvnsprintf wvnsprintfA
#define wnsprintf wnsprintfA
#define StrIsIntlEqual StrIsIntlEqualA
#endif
LWSTDAPI_(int) StrCmpNCA(_In_ LPCSTR pszStr1, _In_ LPCSTR pszStr2, int nChar);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
int
);
LWSTDAPI_(int) StrCmpNCW(_In_ LPCWSTR pszStr1, _In_ LPCWSTR pszStr2, int nChar);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
int
);
#ifdef UNICODE
#define StrCmpNC StrCmpNCW
#else
#define StrCmpNC StrCmpNCA
#endif // !UNICODE
LWSTDAPI_(int) StrCmpNICA(_In_ LPCSTR pszStr1, _In_ LPCSTR pszStr2, int nChar);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
int
);
LWSTDAPI_(int) StrCmpNICW(_In_ LPCWSTR pszStr1, _In_ LPCWSTR pszStr2, int nChar);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
int
);
#ifdef UNICODE
#define StrCmpNIC StrCmpNICW
#else
#define StrCmpNIC StrCmpNICA
#endif // !UNICODE
LWSTDAPI_(BOOL) IntlStrEqWorkerA(BOOL fCaseSens, _In_reads_(nChar) LPCSTR lpString1, _In_reads_(nChar) LPCSTR lpString2, int nChar);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
int
);
LWSTDAPI_(BOOL) IntlStrEqWorkerW(BOOL fCaseSens, _In_reads_(nChar) LPCWSTR lpString1, _In_reads_(nChar) LPCWSTR lpString2, int nChar);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
int
);
#define IntlStrEqNA( s1, s2, nChar) IntlStrEqWorkerA( TRUE, s1, s2, nChar)
#define IntlStrEqNW( s1, s2, nChar) IntlStrEqWorkerW( TRUE, s1, s2, nChar)
#define IntlStrEqNIA(s1, s2, nChar) IntlStrEqWorkerA(FALSE, s1, s2, nChar)
#define IntlStrEqNIW(s1, s2, nChar) IntlStrEqWorkerW(FALSE, s1, s2, nChar)
#ifdef UNICODE
#define IntlStrEqN IntlStrEqNW
#define IntlStrEqNI IntlStrEqNIW
#else
#define IntlStrEqN IntlStrEqNA
#define IntlStrEqNI IntlStrEqNIA
#endif
#define SZ_CONTENTTYPE_HTMLA "text/html"
#define SZ_CONTENTTYPE_HTMLW L"text/html"
#define SZ_CONTENTTYPE_CDFA "application/x-cdf"
#define SZ_CONTENTTYPE_CDFW L"application/x-cdf"
#ifdef UNICODE
#define SZ_CONTENTTYPE_HTML SZ_CONTENTTYPE_HTMLW
#define SZ_CONTENTTYPE_CDF SZ_CONTENTTYPE_CDFW
#else
#define SZ_CONTENTTYPE_HTML SZ_CONTENTTYPE_HTMLA
#define SZ_CONTENTTYPE_CDF SZ_CONTENTTYPE_CDFA
#endif
#define PathIsHTMLFileA(pszPath) PathIsContentTypeA(pszPath, SZ_CONTENTTYPE_HTMLA)
#define PathIsHTMLFileW(pszPath) PathIsContentTypeW(pszPath, SZ_CONTENTTYPE_HTMLW)
#define StrCatA lstrcatA
#define StrCmpA lstrcmpA
#define StrCmpIA lstrcmpiA
#define StrCpyA lstrcpyA
#define StrCpyNA lstrcpynA
#define StrToLong StrToInt
#define StrNCmp StrCmpN
#define StrNCmpI StrCmpNI
#define StrNCpy StrCpyN
#define StrCatN StrNCat
#ifdef UNICODE
#define StrCat StrCatW
#define StrCmp StrCmpW
#define StrCmpI StrCmpIW
#define StrCpy StrCpyW
#define StrCpyN StrCpyNW
#define StrCatBuff StrCatBuffW
#else
#define StrCat lstrcatA
#define StrCmp lstrcmpA
#define StrCmpI lstrcmpiA
#define StrCpy lstrcpyA
#define StrCpyN lstrcpynA
#define StrCatBuff StrCatBuffA
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif // NO_SHLWAPI_STRFCNS
#ifndef NO_SHLWAPI_PATH
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
LWSTDAPI_(LPSTR) PathAddBackslashA(_Inout_updates_(MAX_PATH) LPSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(LPWSTR) PathAddBackslashW(_Inout_updates_(MAX_PATH) LPWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathAddBackslash PathAddBackslashW
#else
#define PathAddBackslash PathAddBackslashA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathAddExtensionA(_Inout_updates_(MAX_PATH) LPSTR pszPath, _In_opt_ LPCSTR pszExt);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) PathAddExtensionW(_Inout_updates_(MAX_PATH) LPWSTR pszPath, _In_opt_ LPCWSTR pszExt);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
#ifdef UNICODE
#define PathAddExtension PathAddExtensionW
#else
#define PathAddExtension PathAddExtensionA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathAppendA(_Inout_updates_(MAX_PATH) LPSTR pszPath, _In_ LPCSTR pszMore);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) PathAppendW(_Inout_updates_(MAX_PATH) LPWSTR pszPath, _In_ LPCWSTR pszMore);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(LPSTR) PathBuildRootA(_Out_writes_(4) LPSTR pszRoot, int iDrive);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
int
);
LWSTDAPI_(LPWSTR) PathBuildRootW(_Out_writes_(4) LPWSTR pszRoot, int iDrive);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
int
);
#ifdef UNICODE
#define PathBuildRoot PathBuildRootW
#else
#define PathBuildRoot PathBuildRootA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathCanonicalizeA(_Out_writes_(MAX_PATH) LPSTR pszBuf, _In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) PathCanonicalizeW(_Out_writes_(MAX_PATH) LPWSTR pszBuf, _In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(LPSTR) PathCombineA(_Out_writes_(MAX_PATH) LPSTR pszDest, _In_opt_ LPCSTR pszDir, _In_opt_ LPCSTR pszFile);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(LPWSTR) PathCombineW(_Out_writes_(MAX_PATH) LPWSTR pszDest, _In_opt_ LPCWSTR pszDir, _In_opt_ LPCWSTR pszFile);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
#ifdef UNICODE
#define PathCombine PathCombineW
#else
#define PathCombine PathCombineA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathCompactPathA(_In_opt_ HDC hDC, _Inout_updates_(MAX_PATH) LPSTR pszPath, _In_ UINT dx);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(BOOL) PathCompactPathW(_In_opt_ HDC hDC, _Inout_updates_(MAX_PATH) LPWSTR pszPath, _In_ UINT dx);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(BOOL) PathCompactPathExA(_Out_writes_(cchMax) LPSTR pszOut, _In_ LPCSTR pszSrc, _In_ UINT cchMax, _In_ DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
);
LWSTDAPI_(BOOL) PathCompactPathExW(_Out_writes_(cchMax) LPWSTR pszOut, _In_ LPCWSTR pszSrc, _In_ UINT cchMax, _In_ DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
);
LWSTDAPI_(int) PathCommonPrefixA(_In_ LPCSTR pszFile1, _In_ LPCSTR pszFile2, _Out_writes_opt_(MAX_PATH) LPSTR achPath);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
);
LWSTDAPI_(int) PathCommonPrefixW(_In_ LPCWSTR pszFile1, _In_ LPCWSTR pszFile2, _Out_writes_opt_(MAX_PATH) LPWSTR achPath);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
);
LWSTDAPI_(BOOL) PathFileExistsA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathFileExistsW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathFileExists PathFileExistsW
#else
#define PathFileExists PathFileExistsA
#endif // !UNICODE
#ifdef USE_STRICT_CONST
LWSTDAPI_(LPCSTR) PathFindExtensionA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPCWSTR) PathFindExtensionW(_In_ LPCWSTR pszPath);
#ifdef UNICODE
#define PathFindExtension PathFindExtensionW
#else
#define PathFindExtension PathFindExtensionA
#endif // !UNICODE
LWSTDAPI_(LPCSTR) PathFindFileNameA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPCWSTR) PathFindFileNameW(_In_ LPCWSTR pszPath);
#ifdef UNICODE
#define PathFindFileName PathFindFileNameW
#else
#define PathFindFileName PathFindFileNameA
#endif // !UNICODE
LWSTDAPI_(LPCSTR) PathFindNextComponentA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPCWSTR) PathFindNextComponentW(_In_ LPCWSTR pszPath);
#ifdef UNICODE
#define PathFindNextComponent PathFindNextComponentW
#else
#define PathFindNextComponent PathFindNextComponentA
#endif // !UNICODE
#else
LWSTDAPI_(LPSTR) PathFindExtensionA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(LPWSTR) PathFindExtensionW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathFindExtension PathFindExtensionW
#else
#define PathFindExtension PathFindExtensionA
#endif // !UNICODE
LWSTDAPI_(LPSTR) PathFindFileNameA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(LPWSTR) PathFindFileNameW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathFindFileName PathFindFileNameW
#else
#define PathFindFileName PathFindFileNameA
#endif // !UNICODE
LWSTDAPI_(LPSTR) PathFindNextComponentA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(LPWSTR) PathFindNextComponentW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathFindNextComponent PathFindNextComponentW
#else
#define PathFindNextComponent PathFindNextComponentA
#endif // !UNICODE
#endif
LWSTDAPI_(BOOL) PathFindOnPathA(_Inout_updates_(MAX_PATH) LPSTR pszPath, _In_opt_ PZPCSTR ppszOtherDirs);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) PathFindOnPathW(_Inout_updates_(MAX_PATH) LPWSTR pszPath, _In_opt_ PZPCWSTR ppszOtherDirs);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(LPCSTR) PathFindSuffixArrayA(_In_ LPCSTR pszPath, _In_reads_(iArraySize) const LPCSTR *apszSuffix, _In_ int iArraySize);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
const
*
,
int
);
LWSTDAPI_(LPCWSTR) PathFindSuffixArrayW(_In_ LPCWSTR pszPath, _In_reads_(iArraySize) const LPCWSTR *apszSuffix, _In_ int iArraySize);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
const
*
,
int
);
#ifdef UNICODE
#define PathFindSuffixArray PathFindSuffixArrayW
#else
#define PathFindSuffixArray PathFindSuffixArrayA
#endif // !UNICODE
#ifdef USE_STRICT_CONST
LWSTDAPI_(LPCSTR) PathGetArgsA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPCWSTR) PathGetArgsW(_In_ LPCWSTR pszPath);
#ifdef UNICODE
#define PathGetArgs PathGetArgsW
#else
#define PathGetArgs PathGetArgsA
#endif // !UNICODE
#else
LWSTDAPI_(LPSTR) PathGetArgsA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(LPWSTR) PathGetArgsW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathGetArgs PathGetArgsW
#else
#define PathGetArgs PathGetArgsA
#endif // !UNICODE
#endif
LWSTDAPI_(BOOL) PathIsLFNFileSpecA(_In_ LPCSTR pszName);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathIsLFNFileSpecW(_In_ LPCWSTR pszName);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathIsLFNFileSpec PathIsLFNFileSpecW
#else
#define PathIsLFNFileSpec PathIsLFNFileSpecA
#endif // !UNICODE
LWSTDAPI_(UINT) PathGetCharTypeA(_In_ UCHAR ch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(UINT) PathGetCharTypeW(_In_ WCHAR ch);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#define GCT_INVALID 0x0000
#define GCT_LFNCHAR 0x0001
#define GCT_SHORTCHAR 0x0002
#define GCT_WILD 0x0004
#define GCT_SEPARATOR 0x0008
LWSTDAPI_(int) PathGetDriveNumberA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
);
LWSTDAPI_(int) PathGetDriveNumberW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
);
#ifdef UNICODE
#define PathGetDriveNumber PathGetDriveNumberW
#else
#define PathGetDriveNumber PathGetDriveNumberA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathIsDirectoryA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathIsDirectoryW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathIsDirectory PathIsDirectoryW
#else
#define PathIsDirectory PathIsDirectoryA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathIsDirectoryEmptyA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathIsDirectoryEmptyW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathIsDirectoryEmpty PathIsDirectoryEmptyW
#else
#define PathIsDirectoryEmpty PathIsDirectoryEmptyA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathIsFileSpecA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathIsFileSpecW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathIsFileSpec PathIsFileSpecW
#else
#define PathIsFileSpec PathIsFileSpecA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathIsPrefixA(_In_ LPCSTR pszPrefix, _In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) PathIsPrefixW(_In_ LPCWSTR pszPrefix, _In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
#ifdef UNICODE
#define PathIsPrefix PathIsPrefixW
#else
#define PathIsPrefix PathIsPrefixA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathIsRelativeA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathIsRelativeW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathIsRelative PathIsRelativeW
#else
#define PathIsRelative PathIsRelativeA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathIsRootA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathIsRootW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathIsRoot PathIsRootW
#else
#define PathIsRoot PathIsRootA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathIsSameRootA(_In_ LPCSTR pszPath1, _In_ LPCSTR pszPath2);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) PathIsSameRootW(_In_ LPCWSTR pszPath1, _In_ LPCWSTR pszPath2);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
#ifdef UNICODE
#define PathIsSameRoot PathIsSameRootW
#else
#define PathIsSameRoot PathIsSameRootA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathIsUNCA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathIsUNCW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathIsUNC PathIsUNCW
#else
#define PathIsUNC PathIsUNCA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathIsNetworkPathA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathIsNetworkPathW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathIsNetworkPath PathIsNetworkPathW
#else
#define PathIsNetworkPath PathIsNetworkPathA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathIsUNCServerA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathIsUNCServerW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathIsUNCServer PathIsUNCServerW
#else
#define PathIsUNCServer PathIsUNCServerA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathIsUNCServerShareA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathIsUNCServerShareW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathIsUNCServerShare PathIsUNCServerShareW
#else
#define PathIsUNCServerShare PathIsUNCServerShareA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathIsContentTypeA(_In_ LPCSTR pszPath, _In_ LPCSTR pszContentType);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) PathIsContentTypeW(_In_ LPCWSTR pszPath, _In_ LPCWSTR pszContentType);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) PathIsURLA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathIsURLW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathIsURL PathIsURLW
#else
#define PathIsURL PathIsURLA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathMakePrettyA(_Inout_ LPSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathMakePrettyW(_Inout_ LPWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathMatchSpecA(_In_ LPCSTR pszFile, _In_ LPCSTR pszSpec);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) PathMatchSpecW(_In_ LPCWSTR pszFile, _In_ LPCWSTR pszSpec);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
#if (_WIN32_IE >= _WIN32_IE_IE70)
#define PMSF_NORMAL 0x00000000
#define PMSF_MULTIPLE 0x00000001
#define PMSF_DONT_STRIP_SPACES 0x00010000 // modifies either of the above
LWSTDAPI PathMatchSpecExA(_In_ LPCSTR pszFile, _In_ LPCSTR pszSpec, _In_ DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI PathMatchSpecExW(_In_ LPCWSTR pszFile, _In_ LPCWSTR pszSpec, _In_ DWORD dwFlags);
#endif // _WIN32_IE_IE70
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(int) PathParseIconLocationA(_Inout_ LPSTR pszIconFile);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
);
LWSTDAPI_(int) PathParseIconLocationW(_Inout_ LPWSTR pszIconFile);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
);
LWSTDAPI_(BOOL) PathQuoteSpacesA(_Inout_updates_(MAX_PATH) LPSTR lpsz);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathQuoteSpacesW(_Inout_updates_(MAX_PATH) LPWSTR lpsz);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathRelativePathToA(_Out_writes_(MAX_PATH) LPSTR pszPath, _In_ LPCSTR pszFrom, _In_ DWORD dwAttrFrom, _In_ LPCSTR pszTo, _In_ DWORD dwAttrTo);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
LWSTDAPI_(BOOL) PathRelativePathToW(_Out_writes_(MAX_PATH) LPWSTR pszPath, _In_ LPCWSTR pszFrom, _In_ DWORD dwAttrFrom, _In_ LPCWSTR pszTo, _In_ DWORD dwAttrTo);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
LWSTDAPI_(void) PathRemoveArgsA(_Inout_ LPSTR pszPath);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
);
LWSTDAPI_(void) PathRemoveArgsW(_Inout_ LPWSTR pszPath);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
);
LWSTDAPI_(LPSTR) PathRemoveBackslashA(_Inout_ LPSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(LPWSTR) PathRemoveBackslashW(_Inout_ LPWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathRemoveBackslash PathRemoveBackslashW
#else
#define PathRemoveBackslash PathRemoveBackslashA
#endif // !UNICODE
LWSTDAPI_(void) PathRemoveBlanksA(_Inout_ LPSTR pszPath);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
);
LWSTDAPI_(void) PathRemoveBlanksW(_Inout_ LPWSTR pszPath);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
);
LWSTDAPI_(void) PathRemoveExtensionA(_Inout_ LPSTR pszPath);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
);
LWSTDAPI_(void) PathRemoveExtensionW(_Inout_ LPWSTR pszPath);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
);
LWSTDAPI_(BOOL) PathRemoveFileSpecA(_Inout_ LPSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathRemoveFileSpecW(_Inout_ LPWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathRenameExtensionA(_Inout_updates_(MAX_PATH) LPSTR pszPath, _In_ LPCSTR pszExt);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) PathRenameExtensionW(_Inout_updates_(MAX_PATH) LPWSTR pszPath, _In_ LPCWSTR pszExt);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) PathSearchAndQualifyA(_In_ LPCSTR pszPath, _Out_writes_(cchBuf) LPSTR pszBuf, _In_ UINT cchBuf);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(BOOL) PathSearchAndQualifyW(_In_ LPCWSTR pszPath, _Out_writes_(cchBuf) LPWSTR pszBuf, _In_ UINT cchBuf);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(void) PathSetDlgItemPathA(_In_ HWND hDlg, int id, LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
,
int
,
);
LWSTDAPI_(void) PathSetDlgItemPathW(_In_ HWND hDlg, int id, LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
,
int
,
);
#ifdef USE_STRICT_CONST
LWSTDAPI_(LPCSTR) PathSkipRootA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPCWSTR) PathSkipRootW(_In_ LPCWSTR pszPath);
#ifdef UNICODE
#define PathSkipRoot PathSkipRootW
#else
#define PathSkipRoot PathSkipRootA
#endif // !UNICODE
#else
LWSTDAPI_(LPSTR) PathSkipRootA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(LPWSTR) PathSkipRootW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathSkipRoot PathSkipRootW
#else
#define PathSkipRoot PathSkipRootA
#endif // !UNICODE
#endif
LWSTDAPI_(void) PathStripPathA(_Inout_ LPSTR pszPath);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
);
LWSTDAPI_(void) PathStripPathW(_Inout_ LPWSTR pszPath);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
);
#ifdef UNICODE
#define PathStripPath PathStripPathW
#else
#define PathStripPath PathStripPathA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathStripToRootA(_Inout_ LPSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathStripToRootW(_Inout_ LPWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathStripToRoot PathStripToRootW
#else
#define PathStripToRoot PathStripToRootA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathUnquoteSpacesA(_Inout_ LPSTR lpsz);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathUnquoteSpacesW(_Inout_ LPWSTR lpsz);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathMakeSystemFolderA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathMakeSystemFolderW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathMakeSystemFolder PathMakeSystemFolderW
#else
#define PathMakeSystemFolder PathMakeSystemFolderA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathUnmakeSystemFolderA(_In_ LPCSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) PathUnmakeSystemFolderW(_In_ LPCWSTR pszPath);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define PathUnmakeSystemFolder PathUnmakeSystemFolderW
#else
#define PathUnmakeSystemFolder PathUnmakeSystemFolderA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathIsSystemFolderA(_In_opt_ LPCSTR pszPath, _In_ DWORD dwAttrb);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) PathIsSystemFolderW(_In_opt_ LPCWSTR pszPath, _In_ DWORD dwAttrb);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
#ifdef UNICODE
#define PathIsSystemFolder PathIsSystemFolderW
#else
#define PathIsSystemFolder PathIsSystemFolderA
#endif // !UNICODE
LWSTDAPI_(void) PathUndecorateA(_Inout_ LPSTR pszPath);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
);
LWSTDAPI_(void) PathUndecorateW(_Inout_ LPWSTR pszPath);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
);
#ifdef UNICODE
#define PathUndecorate PathUndecorateW
#else
#define PathUndecorate PathUndecorateA
#endif // !UNICODE
LWSTDAPI_(BOOL) PathUnExpandEnvStringsA(_In_ LPCSTR pszPath, _Out_writes_(cchBuf) LPSTR pszBuf, _In_ UINT cchBuf);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(BOOL) PathUnExpandEnvStringsW(_In_ LPCWSTR pszPath, _Out_writes_(cchBuf) LPWSTR pszBuf, _In_ UINT cchBuf);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
#ifdef UNICODE
#define PathUnExpandEnvStrings PathUnExpandEnvStringsW
#else
#define PathUnExpandEnvStrings PathUnExpandEnvStringsA
#endif // !UNICODE
#ifdef UNICODE
#define PathAppend PathAppendW
#define PathCanonicalize PathCanonicalizeW
#define PathCompactPath PathCompactPathW
#define PathCompactPathEx PathCompactPathExW
#define PathCommonPrefix PathCommonPrefixW
#define PathFindOnPath PathFindOnPathW
#define PathGetCharType PathGetCharTypeW
#define PathIsContentType PathIsContentTypeW
#define PathIsHTMLFile PathIsHTMLFileW
#define PathMakePretty PathMakePrettyW
#define PathMatchSpec PathMatchSpecW
#if (_WIN32_IE >= _WIN32_IE_IE70)
#define PathMatchSpecEx PathMatchSpecExW
#endif // _WIN32_IE_IE70
#define PathParseIconLocation PathParseIconLocationW
#define PathQuoteSpaces PathQuoteSpacesW
#define PathRelativePathTo PathRelativePathToW
#define PathRemoveArgs PathRemoveArgsW
#define PathRemoveBlanks PathRemoveBlanksW
#define PathRemoveExtension PathRemoveExtensionW
#define PathRemoveFileSpec PathRemoveFileSpecW
#define PathRenameExtension PathRenameExtensionW
#define PathSearchAndQualify PathSearchAndQualifyW
#define PathSetDlgItemPath PathSetDlgItemPathW
#define PathUnquoteSpaces PathUnquoteSpacesW
#else
#define PathAppend PathAppendA
#define PathCanonicalize PathCanonicalizeA
#define PathCompactPath PathCompactPathA
#define PathCompactPathEx PathCompactPathExA
#define PathCommonPrefix PathCommonPrefixA
#define PathFindOnPath PathFindOnPathA
#define PathGetCharType PathGetCharTypeA
#define PathIsContentType PathIsContentTypeA
#define PathIsHTMLFile PathIsHTMLFileA
#define PathMakePretty PathMakePrettyA
#define PathMatchSpec PathMatchSpecA
#if (_WIN32_IE >= _WIN32_IE_IE70)
#define PathMatchSpecEx PathMatchSpecExA
#endif // _WIN32_IE_IE70
#define PathParseIconLocation PathParseIconLocationA
#define PathQuoteSpaces PathQuoteSpacesA
#define PathRelativePathTo PathRelativePathToA
#define PathRemoveArgs PathRemoveArgsA
#define PathRemoveBlanks PathRemoveBlanksA
#define PathRemoveExtension PathRemoveExtensionA
#define PathRemoveFileSpec PathRemoveFileSpecA
#define PathRenameExtension PathRenameExtensionA
#define PathSearchAndQualify PathSearchAndQualifyA
#define PathSetDlgItemPath PathSetDlgItemPathA
#define PathUnquoteSpaces PathUnquoteSpacesA
#endif
typedef
enum
{
= -
1
,
=
0
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
#if (_WIN32_IE >= _WIN32_IE_IE60)
,
,
,
#endif // _WIN32_IE_IE60
#if (_WIN32_IE >= _WIN32_IE_IE70)
,
,
#endif // _WIN32_IE_IE70
#if (NTDDI_VERSION >= NTDDI_VISTA)
,
#endif
#if (NTDDI_VERSION >= NTDDI_VISTASP1)
,
#endif
#if (NTDDI_VERSION >= NTDDI_WIN7)
,
#endif
,
}
;
typedef
enum
{
=
0
,
=
1
,
,
,
,
,
,
}
;
typedef
enum
{
,
,
,
,
,
,
,
}
;
#define URL_UNESCAPE 0x10000000
#define URL_ESCAPE_UNSAFE 0x20000000
#define URL_PLUGGABLE_PROTOCOL 0x40000000
#define URL_WININET_COMPATIBILITY 0x80000000
#define URL_DONT_ESCAPE_EXTRA_INFO 0x02000000
#define URL_DONT_UNESCAPE_EXTRA_INFO URL_DONT_ESCAPE_EXTRA_INFO
#define URL_BROWSER_MODE URL_DONT_ESCAPE_EXTRA_INFO
#define URL_ESCAPE_SPACES_ONLY 0x04000000
#define URL_DONT_SIMPLIFY 0x08000000
#define URL_NO_META URL_DONT_SIMPLIFY
#define URL_UNESCAPE_INPLACE 0x00100000
#define URL_CONVERT_IF_DOSPATH 0x00200000
#define URL_UNESCAPE_HIGH_ANSI_ONLY 0x00400000
#define URL_INTERNAL_PATH 0x00800000 // Will escape #'s in paths
#define URL_FILE_USE_PATHURL 0x00010000
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
#define URL_DONT_UNESCAPE 0x00020000 // Do not unescape the path/url at all
#endif // _WIN32_IE_IE60SP2
#if (NTDDI_VERSION >= NTDDI_WIN7)
#define URL_ESCAPE_AS_UTF8 0x00040000 // Percent-encode all non-ASCII characters as their UTF-8 equivalents.
#endif // (NTDDI_VERSION >= NTDDI_WIN7)
#if (NTDDI_VERSION >= NTDDI_WIN8)
#define URL_UNESCAPE_AS_UTF8 URL_ESCAPE_AS_UTF8
#define URL_ESCAPE_ASCII_URI_COMPONENT 0x00080000 // Percent-encode all ASCII characters outside of the unreserved set from URI RFC 3986 (a-zA-Z0-9-.~_) (i.e.) No need for URL_ESCAPE_PERCENT along with this.
#define URL_ESCAPE_URI_COMPONENT (URL_ESCAPE_ASCII_URI_COMPONENT | URL_ESCAPE_AS_UTF8)
#define URL_UNESCAPE_URI_COMPONENT URL_UNESCAPE_AS_UTF8
#endif // (NTDDI_VERSION >= NTDDI_WIN8)
#define URL_ESCAPE_PERCENT 0x00001000
#define URL_ESCAPE_SEGMENT_ONLY 0x00002000 // Treat the entire URL param as one URL segment.
#define URL_PARTFLAG_KEEPSCHEME 0x00000001
#define URL_APPLY_DEFAULT 0x00000001
#define URL_APPLY_GUESSSCHEME 0x00000002
#define URL_APPLY_GUESSFILE 0x00000004
#define URL_APPLY_FORCEAPPLY 0x00000008
LWSTDAPI_(int) UrlCompareA(_In_ PCSTR psz1, _In_ PCSTR psz2, BOOL fIgnoreSlash);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
);
LWSTDAPI_(int) UrlCompareW(_In_ PCWSTR psz1, _In_ PCWSTR psz2, BOOL fIgnoreSlash);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
);
LWSTDAPI UrlCombineA(_In_ PCSTR pszBase, _In_ PCSTR pszRelative, _Out_writes_to_opt_(*pcchCombined, *pcchCombined) PSTR pszCombined, _Inout_ DWORD *pcchCombined, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
*
,
);
LWSTDAPI UrlCombineW(_In_ PCWSTR pszBase, _In_ PCWSTR pszRelative, _Out_writes_to_opt_(*pcchCombined, *pcchCombined) PWSTR pszCombined, _Inout_ DWORD *pcchCombined, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
*
,
);
LWSTDAPI UrlCanonicalizeA(_In_ PCSTR pszUrl, _Out_writes_to_(*pcchCanonicalized, *pcchCanonicalized) PSTR pszCanonicalized, _Inout_ DWORD *pcchCanonicalized, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
);
LWSTDAPI UrlCanonicalizeW(_In_ PCWSTR pszUrl, _Out_writes_to_(*pcchCanonicalized, *pcchCanonicalized) PWSTR pszCanonicalized, _Inout_ DWORD *pcchCanonicalized, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
);
LWSTDAPI_(BOOL) UrlIsOpaqueA(_In_ PCSTR pszURL);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) UrlIsOpaqueW(_In_ PCWSTR pszURL);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) UrlIsNoHistoryA(_In_ PCSTR pszURL);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(BOOL) UrlIsNoHistoryW(_In_ PCWSTR pszURL);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#define UrlIsFileUrlA(pszURL) UrlIsA(pszURL, URLIS_FILEURL)
#define UrlIsFileUrlW(pszURL) UrlIsW(pszURL, URLIS_FILEURL)
LWSTDAPI_(BOOL) UrlIsA(_In_ PCSTR pszUrl, URLIS UrlIs);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(BOOL) UrlIsW(_In_ PCWSTR pszUrl, URLIS UrlIs);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(LPCSTR) UrlGetLocationA(_In_ PCSTR pszURL);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(LPCWSTR) UrlGetLocationW(_In_ PCWSTR pszURL);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI UrlUnescapeA(_Inout_ PSTR pszUrl, _Out_writes_to_opt_(*pcchUnescaped, *pcchUnescaped) PSTR pszUnescaped, _Inout_opt_ DWORD *pcchUnescaped, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
);
LWSTDAPI UrlUnescapeW(_Inout_ PWSTR pszUrl, _Out_writes_to_opt_(*pcchUnescaped, *pcchUnescaped) PWSTR pszUnescaped, _Inout_opt_ DWORD *pcchUnescaped, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
);
LWSTDAPI UrlEscapeA(_In_ PCSTR pszUrl, _Out_writes_to_(*pcchEscaped, *pcchEscaped) PSTR pszEscaped, _Inout_ DWORD *pcchEscaped, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
);
LWSTDAPI UrlEscapeW(_In_ PCWSTR pszUrl, _Out_writes_to_(*pcchEscaped, *pcchEscaped) PWSTR pszEscaped, _Inout_ DWORD *pcchEscaped, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
);
LWSTDAPI UrlCreateFromPathA(_In_ PCSTR pszPath, _Out_writes_to_(*pcchUrl, *pcchUrl) PSTR pszUrl, _Inout_ DWORD *pcchUrl, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
);
LWSTDAPI UrlCreateFromPathW(_In_ PCWSTR pszPath, _Out_writes_to_(*pcchUrl, *pcchUrl) PWSTR pszUrl, _Inout_ DWORD *pcchUrl, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
);
LWSTDAPI PathCreateFromUrlA(_In_ PCSTR pszUrl, _Out_writes_to_(*pcchPath, *pcchPath) PSTR pszPath, _Inout_ DWORD *pcchPath, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
);
LWSTDAPI PathCreateFromUrlW(_In_ PCWSTR pszUrl, _Out_writes_to_(*pcchPath, *pcchPath) PWSTR pszPath, _Inout_ DWORD *pcchPath, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
);
#if (_WIN32_IE >= _WIN32_IE_IE70)
LWSTDAPI PathCreateFromUrlAlloc(_In_ PCWSTR pszIn, _Outptr_ PWSTR *ppszOut, DWORD dwFlags);
#endif // _WIN32_IE_IE70
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
,
);
LWSTDAPI UrlHashA(_In_ PCSTR pszUrl, _Out_writes_bytes_(cbHash) BYTE *pbHash, DWORD cbHash);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
,
);
LWSTDAPI UrlHashW(_In_ PCWSTR pszUrl, _Out_writes_bytes_(cbHash) BYTE *pbHash, DWORD cbHash);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
,
);
LWSTDAPI UrlGetPartW(_In_ PCWSTR pszIn, _Out_writes_(*pcchOut) PWSTR pszOut, _Inout_ DWORD *pcchOut, DWORD dwPart, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
,
);
LWSTDAPI UrlGetPartA(_In_ PCSTR pszIn, _Out_writes_(*pcchOut) PSTR pszOut, _Inout_ DWORD *pcchOut, DWORD dwPart, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
,
);
LWSTDAPI UrlApplySchemeA(_In_ PCSTR pszIn, _Out_writes_(*pcchOut) PSTR pszOut, _Inout_ DWORD *pcchOut, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
);
LWSTDAPI UrlApplySchemeW(_In_ PCWSTR pszIn, _Out_writes_(*pcchOut) PWSTR pszOut, _Inout_ DWORD *pcchOut, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
*
,
);
LWSTDAPI HashData(_In_reads_bytes_(cbData) BYTE *pbData, DWORD cbData, _Out_writes_bytes_(cbHash) BYTE *pbHash, DWORD cbHash);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
,
*
,
);
LWSTDAPI UrlFixupW(_In_ PCWSTR pcszUrl, _Out_writes_(cchMax) PWSTR pszTranslatedUrl, DWORD cchMax);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
#ifdef UNICODE
#define UrlCompare UrlCompareW
#define UrlCombine UrlCombineW
#define UrlCanonicalize UrlCanonicalizeW
#define UrlIsOpaque UrlIsOpaqueW
#define UrlIsFileUrl UrlIsFileUrlW
#define UrlGetLocation UrlGetLocationW
#define UrlUnescape UrlUnescapeW
#define UrlEscape UrlEscapeW
#define UrlCreateFromPath UrlCreateFromPathW
#define PathCreateFromUrl PathCreateFromUrlW
#define UrlHash UrlHashW
#define UrlGetPart UrlGetPartW
#define UrlApplyScheme UrlApplySchemeW
#define UrlIs UrlIsW
#define UrlFixup UrlFixupW
#else //!UNICODE
#define UrlCompare UrlCompareA
#define UrlCombine UrlCombineA
#define UrlCanonicalize UrlCanonicalizeA
#define UrlIsOpaque UrlIsOpaqueA
#define UrlIsFileUrl UrlIsFileUrlA
#define UrlGetLocation UrlGetLocationA
#define UrlUnescape UrlUnescapeA
#define UrlEscape UrlEscapeA
#define UrlCreateFromPath UrlCreateFromPathA
#define PathCreateFromUrl PathCreateFromUrlA
#define UrlHash UrlHashA
#define UrlGetPart UrlGetPartA
#define UrlApplyScheme UrlApplySchemeA
#define UrlIs UrlIsA
// no UrlFixupA
#endif //UNICODE
#define UrlEscapeSpaces(pszUrl, pszEscaped, pcchEscaped) UrlCanonicalize(pszUrl, pszEscaped, pcchEscaped, URL_ESCAPE_SPACES_ONLY |URL_DONT_ESCAPE_EXTRA_INFO )
#define UrlUnescapeInPlace(pszUrl, dwFlags) UrlUnescape(pszUrl, NULL, NULL, dwFlags | URL_UNESCAPE_INPLACE)
typedef
struct
{
;
;
;
;
;
;
}
, *
;
typedef
struct
{
;
;
;
;
;
;
}
, *
;
#ifdef UNICODE
typedef
;
typedef
;
#else
typedef PARSEDURLA PARSEDURL;
typedef PPARSEDURLA PPARSEDURL;
#endif // UNICODE
LWSTDAPI ParseURLA(_In_ LPCSTR pcszURL, _Inout_ PARSEDURLA * ppu);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
);
LWSTDAPI ParseURLW(_In_ LPCWSTR pcszURL, _Inout_ PARSEDURLW * ppu);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
);
#ifdef UNICODE
#define ParseURL ParseURLW
#else
#define ParseURL ParseURLA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif // NO_SHLWAPI_PATH
#ifndef NO_SHLWAPI_REG
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
LWSTDAPI_(LSTATUS) SHDeleteEmptyKeyA(_In_ HKEY hkey, _In_opt_ LPCSTR pszSubKey);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(LSTATUS) SHDeleteEmptyKeyW(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubKey);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
#ifdef UNICODE
#define SHDeleteEmptyKey SHDeleteEmptyKeyW
#else
#define SHDeleteEmptyKey SHDeleteEmptyKeyA
#endif // !UNICODE
LWSTDAPI_(LSTATUS) SHDeleteKeyA(_In_ HKEY hkey, _In_opt_ LPCSTR pszSubKey);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(LSTATUS) SHDeleteKeyW(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubKey);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
#ifdef UNICODE
#define SHDeleteKey SHDeleteKeyW
#else
#define SHDeleteKey SHDeleteKeyA
#endif // !UNICODE
LWSTDAPI_(HKEY) SHRegDuplicateHKey(_In_ HKEY hkey);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(LSTATUS) SHDeleteValueA(_In_ HKEY hkey, _In_opt_ LPCSTR pszSubKey, _In_ LPCSTR pszValue);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(LSTATUS) SHDeleteValueW(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubKey, _In_ LPCWSTR pszValue);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
#ifdef UNICODE
#define SHDeleteValue SHDeleteValueW
#else
#define SHDeleteValue SHDeleteValueA
#endif // !UNICODE
LWSTDAPI_(LSTATUS) SHGetValueA(
extern
"C"
__declspec
(dllimport)
__stdcall
(
_In_opt_ LPCSTR pszSubKey,
_In_opt_ LPCSTR pszValue,
_Out_opt_ DWORD *pdwType,
_Out_writes_bytes_opt_(*pcbData) void *pvData,
_Inout_opt_ DWORD *pcbData);
LWSTDAPI_(LSTATUS) SHGetValueW(
extern
"C"
__declspec
(dllimport)
__stdcall
(
_In_opt_ LPCWSTR pszSubKey,
_In_opt_ LPCWSTR pszValue,
_Out_opt_ DWORD *pdwType,
_Out_writes_bytes_opt_(*pcbData) void *pvData,
_Inout_opt_ DWORD *pcbData);
#ifdef UNICODE
#define SHGetValue SHGetValueW
#else
#define SHGetValue SHGetValueA
#endif // !UNICODE
LWSTDAPI_(LSTATUS) SHSetValueA(_In_ HKEY hkey, _In_opt_ LPCSTR pszSubKey, _In_opt_ LPCSTR pszValue, _In_ DWORD dwType,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
_In_reads_bytes_opt_(cbData) LPCVOID pvData, _In_ DWORD cbData);
LWSTDAPI_(LSTATUS) SHSetValueW(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubKey, _In_opt_ LPCWSTR pszValue, _In_ DWORD dwType,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
_In_reads_bytes_opt_(cbData) LPCVOID pvData, _In_ DWORD cbData);
#ifdef UNICODE
#define SHSetValue SHSetValueW
#else
#define SHSetValue SHSetValueA
#endif // !UNICODE
#if (_WIN32_IE >= 0x0602)
typedef
int
;
#define SRRF_RT_REG_NONE 0x00000001 // restrict type to REG_NONE (other data types will not return ERROR_SUCCESS)
#define SRRF_RT_REG_SZ 0x00000002 // restrict type to REG_SZ (other data types will not return ERROR_SUCCESS) (automatically converts REG_EXPAND_SZ to REG_SZ unless SRRF_NOEXPAND is specified)
#define SRRF_RT_REG_EXPAND_SZ 0x00000004 // restrict type to REG_EXPAND_SZ (other data types will not return ERROR_SUCCESS) (must specify SRRF_NOEXPAND or SHRegGetValue will fail with ERROR_INVALID_PARAMETER)
#define SRRF_RT_REG_BINARY 0x00000008 // restrict type to REG_BINARY (other data types will not return ERROR_SUCCESS)
#define SRRF_RT_REG_DWORD 0x00000010 // restrict type to REG_DWORD (other data types will not return ERROR_SUCCESS)
#define SRRF_RT_REG_MULTI_SZ 0x00000020 // restrict type to REG_MULTI_SZ (other data types will not return ERROR_SUCCESS)
#define SRRF_RT_REG_QWORD 0x00000040 // restrict type to REG_QWORD (other data types will not return ERROR_SUCCESS)
#define SRRF_RT_DWORD (SRRF_RT_REG_BINARY | SRRF_RT_REG_DWORD) // restrict type to *32-bit* SRRF_RT_REG_BINARY or SRRF_RT_REG_DWORD (other data types will not return ERROR_SUCCESS)
#define SRRF_RT_QWORD (SRRF_RT_REG_BINARY | SRRF_RT_REG_QWORD) // restrict type to *64-bit* SRRF_RT_REG_BINARY or SRRF_RT_REG_DWORD (other data types will not return ERROR_SUCCESS)
#define SRRF_RT_ANY 0x0000ffff // no type restriction
#define SRRF_RM_ANY 0x00000000 // no mode restriction (default is to allow any mode)
#define SRRF_RM_NORMAL 0x00010000 // restrict system startup mode to "normal boot" (other startup modes will not return ERROR_SUCCESS)
#define SRRF_RM_SAFE 0x00020000 // restrict system startup mode to "safe mode" (other startup modes will not return ERROR_SUCCESS)
#define SRRF_RM_SAFENETWORK 0x00040000 // restrict system startup mode to "safe mode with networking" (other startup modes will not return ERROR_SUCCESS)
#define SRRF_NOEXPAND 0x10000000 // do not automatically expand environment strings if value is of type REG_EXPAND_SZ
#define SRRF_ZEROONFAILURE 0x20000000 // if pvData is not NULL, set content to all zeros on failure
#define SRRF_NOVIRT 0x40000000 // if the requested key is virtualized, then fail with ERROR_FILE_NOT_FOUND
LWSTDAPI_(LSTATUS) SHRegGetValueA(_In_ HKEY hkey, _In_opt_ LPCSTR pszSubKey, _In_opt_ LPCSTR pszValue,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
_In_ SRRF srrfFlags, _Out_opt_ DWORD *pdwType, _Out_writes_bytes_to_opt_(*pcbData,*pcbData) void *pvData,
_Inout_opt_ DWORD *pcbData);
LWSTDAPI_(LSTATUS) SHRegGetValueW(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubKey, _In_opt_ LPCWSTR pszValue,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
_In_ SRRF srrfFlags, _Out_opt_ DWORD *pdwType, _Out_writes_bytes_to_opt_(*pcbData,*pcbData) void *pvData,
_Inout_opt_ DWORD *pcbData);
#ifdef UNICODE
#define SHRegGetValue SHRegGetValueW
#else
#define SHRegGetValue SHRegGetValueA
#endif // !UNICODE
LWSTDAPI_(LSTATUS) SHRegSetValue(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubKey, _In_opt_ LPCWSTR pszValue, _In_ SRRF srrfFlags,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
_In_ DWORD dwType, _In_reads_bytes_opt_(cbData) LPCVOID pvData, _In_opt_ DWORD cbData);
LWSTDAPI_(LSTATUS) SHRegGetValueFromHKCUHKLM(_In_ PCWSTR pwszKey, _In_opt_ PCWSTR pwszValue, _In_ SRRF srrfFlags,
extern
"C"
__declspec
(dllimport)
__stdcall
SHRegGetValueFromHKCUHKLM
(
,
,
,
_Out_opt_ DWORD* pdwType, _Out_writes_bytes_to_opt_(*pcbData,*pcbData) void* pvData,
_Inout_opt_ _When_(pvData != 0, _Pre_notnull_) DWORD * pcbData);
STDAPI_(BOOL) SHRegGetBoolValueFromHKCUHKLM(_In_ PCWSTR pszKey, _In_opt_ PCWSTR pszValue, _In_ BOOL fDefault);
#endif // (_WIN32_IE >= 0x0602)
extern
"C"
__stdcall
SHRegGetBoolValueFromHKCUHKLM
(
,
,
);
LWSTDAPI_(LSTATUS) SHQueryValueExA(
extern
"C"
__declspec
(dllimport)
__stdcall
(
_In_opt_ LPCSTR pszValue,
_Reserved_ DWORD *pdwReserved,
_Out_opt_ DWORD *pdwType,
_Out_writes_bytes_to_opt_(*pcbData,*pcbData) void *pvData,
_Inout_opt_ DWORD *pcbData);
LWSTDAPI_(LSTATUS) SHQueryValueExW(
extern
"C"
__declspec
(dllimport)
__stdcall
(
_In_opt_ LPCWSTR pszValue,
_Reserved_ DWORD *pdwReserved,
_Out_opt_ DWORD *pdwType,
_Out_writes_bytes_to_opt_(*pcbData,*pcbData) void *pvData,
_Inout_opt_ DWORD *pcbData);
#ifdef UNICODE
#define SHQueryValueEx SHQueryValueExW
#else
#define SHQueryValueEx SHQueryValueExA
#endif // !UNICODE
LWSTDAPI_(LSTATUS) SHEnumKeyExA(_In_ HKEY hkey, _In_ DWORD dwIndex, _Out_writes_(*pcchName) LPSTR pszName, _Inout_ LPDWORD pcchName);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
);
LWSTDAPI_(LSTATUS) SHEnumKeyExW(_In_ HKEY hkey, _In_ DWORD dwIndex, _Out_writes_(*pcchName) LPWSTR pszName, _Inout_ LPDWORD pcchName);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
);
LWSTDAPI_(LSTATUS) SHEnumValueA(_In_ HKEY hkey, _In_ DWORD dwIndex, _Out_writes_opt_(*pcchValueName) PSTR pszValueName,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
_Inout_opt_ LPDWORD pcchValueName, _Out_opt_ LPDWORD pdwType, _Out_writes_bytes_to_opt_(*pcbData,*pcbData) void *pvData,
_Inout_opt_ LPDWORD pcbData);
LWSTDAPI_(LSTATUS) SHEnumValueW(_In_ HKEY hkey, _In_ DWORD dwIndex, _Out_writes_opt_(*pcchValueName) PWSTR pszValueName,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
_Inout_opt_ LPDWORD pcchValueName, _Out_opt_ LPDWORD pdwType, _Out_writes_bytes_to_opt_(*pcbData,*pcbData) void *pvData,
_Inout_opt_ LPDWORD pcbData);
LWSTDAPI_(LSTATUS) SHQueryInfoKeyA(_In_ HKEY hkey, _Out_opt_ LPDWORD pcSubKeys, _Out_opt_ LPDWORD pcchMaxSubKeyLen, _Out_opt_ LPDWORD pcValues, _Out_opt_ LPDWORD pcchMaxValueNameLen);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
LWSTDAPI_(LSTATUS) SHQueryInfoKeyW(_In_ HKEY hkey, _Out_opt_ LPDWORD pcSubKeys, _Out_opt_ LPDWORD pcchMaxSubKeyLen, _Out_opt_ LPDWORD pcValues, _Out_opt_ LPDWORD pcchMaxValueNameLen);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
LWSTDAPI_(LSTATUS) SHCopyKeyA(_In_ HKEY hkeySrc, _In_opt_ LPCSTR pszSrcSubKey, _In_ HKEY hkeyDest, _Reserved_ DWORD fReserved);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
);
LWSTDAPI_(LSTATUS) SHCopyKeyW(_In_ HKEY hkeySrc, _In_opt_ LPCWSTR pszSrcSubKey, _In_ HKEY hkeyDest, _Reserved_ DWORD fReserved);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
);
LWSTDAPI_(LSTATUS) SHRegGetPathA(_In_ HKEY hKey, _In_opt_ LPCSTR pcszSubKey, _In_opt_ LPCSTR pcszValue, _Out_writes_(MAX_PATH) LPSTR pszPath, _In_ DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
LWSTDAPI_(LSTATUS) SHRegGetPathW(_In_ HKEY hKey, _In_opt_ LPCWSTR pcszSubKey, _In_opt_ LPCWSTR pcszValue, _Out_writes_(MAX_PATH) LPWSTR pszPath, _In_ DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
LWSTDAPI_(LSTATUS) SHRegSetPathA(_In_ HKEY hKey, _In_opt_ LPCSTR pcszSubKey, _In_opt_ LPCSTR pcszValue, _In_ LPCSTR pcszPath, _In_ DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
LWSTDAPI_(LSTATUS) SHRegSetPathW(_In_ HKEY hKey, _In_opt_ LPCWSTR pcszSubKey, _In_opt_ LPCWSTR pcszValue, _In_ LPCWSTR pcszPath, _In_ DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
#ifdef UNICODE
#define SHEnumKeyEx SHEnumKeyExW
#define SHEnumValue SHEnumValueW
#define SHQueryInfoKey SHQueryInfoKeyW
#define SHCopyKey SHCopyKeyW
#define SHRegGetPath SHRegGetPathW
#define SHRegSetPath SHRegSetPathW
#else
#define SHEnumKeyEx SHEnumKeyExA
#define SHEnumValue SHEnumValueA
#define SHQueryInfoKey SHQueryInfoKeyA
#define SHCopyKey SHCopyKeyA
#define SHRegGetPath SHRegGetPathA
#define SHRegSetPath SHRegSetPathA
#endif
typedef
enum
{
=
0x00000000
,
=
0x00000001
,
=
0x00000010
,
=
0x00000011
,
}
;
typedef
enum
{
=
0x00000000
,
=
0x00000001
,
=
0x00000010
,
=
0x00000011
,
}
;
#define SHREGSET_HKCU 0x00000001 // Write to HKCU if empty.
#define SHREGSET_FORCE_HKCU 0x00000002 // Write to HKCU.
#define SHREGSET_HKLM 0x00000004 // Write to HKLM if empty.
#define SHREGSET_FORCE_HKLM 0x00000008 // Write to HKLM.
#define SHREGSET_DEFAULT (SHREGSET_FORCE_HKCU | SHREGSET_HKLM) // Default is SHREGSET_FORCE_HKCU | SHREGSET_HKLM.
typedef
;
typedef
*
;
LWSTDAPI_(LSTATUS) SHRegCreateUSKeyA(_In_ LPCSTR pszPath, _In_ REGSAM samDesired, _In_opt_ HUSKEY hRelativeUSKey, _Out_ PHUSKEY phNewUSKey, _In_ DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
LWSTDAPI_(LSTATUS) SHRegCreateUSKeyW(_In_ LPCWSTR pwzPath, _In_ REGSAM samDesired, _In_opt_ HUSKEY hRelativeUSKey, _Out_ PHUSKEY phNewUSKey, _In_ DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
LWSTDAPI_(LSTATUS) SHRegOpenUSKeyA(_In_ LPCSTR pszPath, _In_ REGSAM samDesired, _In_opt_ HUSKEY hRelativeUSKey, _Out_ PHUSKEY phNewUSKey, _In_ BOOL fIgnoreHKCU);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
LWSTDAPI_(LSTATUS) SHRegOpenUSKeyW(_In_ LPCWSTR pwzPath, _In_ REGSAM samDesired, _In_opt_ HUSKEY hRelativeUSKey, _Out_ PHUSKEY phNewUSKey, _In_ BOOL fIgnoreHKCU);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
LWSTDAPI_(LSTATUS) SHRegQueryUSValueA(
extern
"C"
__declspec
(dllimport)
__stdcall
(
_In_opt_ LPCSTR pszValue,
_Inout_opt_ DWORD * pdwType,
_Out_writes_bytes_to_opt_(*pcbData, *pcbData) void * pvData,
_Inout_opt_ DWORD * pcbData,
_In_reads_bytes_opt_(dwDefaultDataSize) void * pvDefaultData,
_In_opt_ DWORD dwDefaultDataSize);
LWSTDAPI_(LSTATUS) SHRegQueryUSValueW(
extern
"C"
__declspec
(dllimport)
__stdcall
(
_In_opt_ LPCWSTR pszValue,
_Inout_opt_ DWORD * pdwType,
_Out_writes_bytes_to_opt_(*pcbData, *pcbData) void * pvData,
_Inout_opt_ DWORD * pcbData,
_In_reads_bytes_opt_(dwDefaultDataSize) void * pvDefaultData,
_In_opt_ DWORD dwDefaultDataSize);
LWSTDAPI_(LSTATUS) SHRegWriteUSValueA(_In_ HUSKEY hUSKey, _In_ LPCSTR pszValue, _In_ DWORD dwType, _In_reads_bytes_(cbData) const void *pvData, _In_ DWORD cbData, _In_ DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
const
void
*
,
,
);
LWSTDAPI_(LSTATUS) SHRegWriteUSValueW(_In_ HUSKEY hUSKey, _In_ LPCWSTR pwzValue, _In_ DWORD dwType, _In_reads_bytes_(cbData) const void *pvData, _In_ DWORD cbData, _In_ DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
const
void
*
,
,
);
LWSTDAPI_(LSTATUS) SHRegDeleteUSValueA(_In_ HUSKEY hUSKey, _In_ LPCSTR pszValue, _In_ SHREGDEL_FLAGS delRegFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(LSTATUS) SHRegDeleteUSValueW(_In_ HUSKEY hUSKey, _In_ LPCWSTR pwzValue, _In_ SHREGDEL_FLAGS delRegFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(LSTATUS) SHRegDeleteEmptyUSKeyW(_In_ HUSKEY hUSKey, _In_ LPCWSTR pwzSubKey, _In_ SHREGDEL_FLAGS delRegFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(LSTATUS) SHRegDeleteEmptyUSKeyA(_In_ HUSKEY hUSKey, _In_ LPCSTR pszSubKey, _In_ SHREGDEL_FLAGS delRegFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(LSTATUS) SHRegEnumUSKeyA(_In_ HUSKEY hUSKey, _In_ DWORD dwIndex, _Out_writes_to_(*pcchName,*pcchName) LPSTR pszName, _Inout_ LPDWORD pcchName, _In_ SHREGENUM_FLAGS enumRegFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
LWSTDAPI_(LSTATUS) SHRegEnumUSKeyW(_In_ HUSKEY hUSKey, _In_ DWORD dwIndex, _Out_writes_to_(*pcchName,*pcchName) LPWSTR pwzName, _Inout_ LPDWORD pcchName, _In_ SHREGENUM_FLAGS enumRegFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
);
LWSTDAPI_(LSTATUS) SHRegEnumUSValueA(_In_ HUSKEY hUSkey, _In_ DWORD dwIndex,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
_Out_writes_to_(*pcchValueName,*pcchValueName) LPSTR pszValueName, _Inout_ LPDWORD pcchValueName, _Out_opt_ LPDWORD pdwType,
_Out_writes_bytes_to_opt_(*pcbData, *pcbData) void *pvData, _Inout_opt_ LPDWORD pcbData, _In_ SHREGENUM_FLAGS enumRegFlags);
LWSTDAPI_(LSTATUS) SHRegEnumUSValueW(_In_ HUSKEY hUSkey, _In_ DWORD dwIndex,
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
_Out_writes_to_(*pcchValueName,*pcchValueName) LPWSTR pszValueName, _Inout_ LPDWORD pcchValueName, _Out_opt_ LPDWORD pdwType,
_Out_writes_bytes_to_opt_(*pcbData, *pcbData) void *pvData, _Inout_opt_ LPDWORD pcbData, _In_ SHREGENUM_FLAGS enumRegFlags);
LWSTDAPI_(LSTATUS) SHRegQueryInfoUSKeyA(_In_ HUSKEY hUSKey, _Out_opt_ LPDWORD pcSubKeys, _Out_opt_ LPDWORD pcchMaxSubKeyLen, _Out_opt_ LPDWORD pcValues, _Out_opt_ LPDWORD pcchMaxValueNameLen, _In_ SHREGENUM_FLAGS enumRegFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
,
);
LWSTDAPI_(LSTATUS) SHRegQueryInfoUSKeyW(_In_ HUSKEY hUSKey, _Out_opt_ LPDWORD pcSubKeys, _Out_opt_ LPDWORD pcchMaxSubKeyLen, _Out_opt_ LPDWORD pcValues, _Out_opt_ LPDWORD pcchMaxValueNameLen, _In_ SHREGENUM_FLAGS enumRegFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
,
);
LWSTDAPI_(LSTATUS) SHRegCloseUSKey(_In_ HUSKEY hUSKey);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
STDAPI_(LSTATUS) SHRegGetUSValueA(
_In_opt_ LPCSTR pszValue,
_Inout_opt_ DWORD *pdwType,
_Out_writes_bytes_to_opt_(*pcbData, *pcbData) void *pvData,
_Inout_opt_ DWORD *pcbData,
_In_reads_bytes_opt_(dwDefaultDataSize) void *pvDefaultData,
_In_ DWORD dwDefaultDataSize);
STDAPI_(LSTATUS) SHRegGetUSValueW(
_In_opt_ LPCWSTR pszValue,
_Inout_opt_ DWORD *pdwType,
_Out_writes_bytes_to_opt_(*pcbData, *pcbData) void *pvData,
_Inout_opt_ DWORD *pcbData,
_In_reads_bytes_opt_(dwDefaultDataSize) void *pvDefaultData,
_In_ DWORD dwDefaultDataSize);
LWSTDAPI_(LSTATUS) SHRegSetUSValueA(_In_ LPCSTR pszSubKey, _In_ LPCSTR pszValue, _In_ DWORD dwType, _In_reads_bytes_opt_(cbData) const void *pvData, _In_opt_ DWORD cbData, _In_opt_ DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
const
void
*
,
,
);
LWSTDAPI_(LSTATUS) SHRegSetUSValueW(_In_ LPCWSTR pwzSubKey, _In_ LPCWSTR pwzValue, _In_ DWORD dwType, _In_reads_bytes_opt_(cbData) const void *pvData, _In_opt_ DWORD cbData, _In_opt_ DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
const
void
*
,
,
);
LWSTDAPI_(int) SHRegGetIntW(_In_ HKEY hk, _In_opt_ PCWSTR pwzKey, _In_ int iDefault);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
int
);
#ifdef UNICODE
#define SHRegCreateUSKey SHRegCreateUSKeyW
#define SHRegOpenUSKey SHRegOpenUSKeyW
#define SHRegQueryUSValue SHRegQueryUSValueW
#define SHRegWriteUSValue SHRegWriteUSValueW
#define SHRegDeleteUSValue SHRegDeleteUSValueW
#define SHRegDeleteEmptyUSKey SHRegDeleteEmptyUSKeyW
#define SHRegEnumUSKey SHRegEnumUSKeyW
#define SHRegEnumUSValue SHRegEnumUSValueW
#define SHRegQueryInfoUSKey SHRegQueryInfoUSKeyW
#define SHRegGetUSValue SHRegGetUSValueW
#define SHRegSetUSValue SHRegSetUSValueW
#define SHRegGetInt SHRegGetIntW
#else
#define SHRegCreateUSKey SHRegCreateUSKeyA
#define SHRegOpenUSKey SHRegOpenUSKeyA
#define SHRegQueryUSValue SHRegQueryUSValueA
#define SHRegWriteUSValue SHRegWriteUSValueA
#define SHRegDeleteUSValue SHRegDeleteUSValueA
#define SHRegDeleteEmptyUSKey SHRegDeleteEmptyUSKeyA
#define SHRegEnumUSKey SHRegEnumUSKeyA
#define SHRegEnumUSValue SHRegEnumUSValueA
#define SHRegQueryInfoUSKey SHRegQueryInfoUSKeyA
#define SHRegGetUSValue SHRegGetUSValueA
#define SHRegSetUSValue SHRegSetUSValueA
#endif
LWSTDAPI_(BOOL) SHRegGetBoolUSValueA(_In_ LPCSTR pszSubKey, _In_opt_ LPCSTR pszValue, _In_ BOOL fIgnoreHKCU, _In_ BOOL fDefault);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
);
LWSTDAPI_(BOOL) SHRegGetBoolUSValueW(_In_ LPCWSTR pszSubKey, _In_opt_ LPCWSTR pszValue, _In_ BOOL fIgnoreHKCU, _In_ BOOL fDefault);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
);
#ifdef UNICODE
#define SHRegGetBoolUSValue SHRegGetBoolUSValueW
#else
#define SHRegGetBoolUSValue SHRegGetBoolUSValueA
#endif // !UNICODE
enum
{
=
0x00000000
,
=
0x00000001
,
=
0x00000002
,
=
0x00000002
,
ASSOCF_INIT_DEFAULTTOSTAR
=
0x00000004
,
ASSOCF_INIT_DEFAULTTOFOLDER
=
0x00000008
,
=
0x00000010
,
=
0x00000020
,
=
0x00000040
,
=
0x00000080
,
=
0x00000100
,
=
0x00000200
,
ASSOCF_INIT_IGNOREUNKNOWN
=
0x00000400
,
#if (NTDDI_VERSION >= NTDDI_WIN8)
=
0x00000800
,
=
0x00001000
,
=
0x00002000
,
#endif
#if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
=
0x00004000
,
=
0x00008000
,
#endif
#if (NTDDI_VERSION >= NTDDI_WIN10_RS4)
=
0x00010000
,
#endif
};
typedef
;
typedef
enum
{
=
1
,
,
,
,
,
,
,
,
,
,
,
#if (_WIN32_IE >= _WIN32_IE_IE60)
,
,
,
,
,
#endif // _WIN32_IE_IE60
#if (_WIN32_IE >= _WIN32_IE_IE80)
,
,
#endif // _WIN32_IE_IE80
ASSOCSTR_SUPPORTED_URI_PROTOCOLS
,
#if (NTDDI_VERSION >= NTDDI_WIN10)
,
,
,
ASSOCSTR_APPICONREFERENCE
,
#endif // NTDDI_WIN10
}
;
typedef
enum
{
=
1
,
,
,
,
}
;
typedef
enum
{
=
1
,
ASSOCDATA_NOACTIVATEHANDLER
,
,
ASSOCDATA_HASPERUSERASSOC
,
#if (_WIN32_IE >= _WIN32_IE_IE60)
,
,
#endif // _WIN32_IE_IE60
}
;
typedef
enum
{
}
;
typedef
enum
{
=
0x00000000
,
=
0x00000001
,
=
0x00000002
,
=
0x00000004
,
=
0x00000008
,
=
0x00000010
,
=
0x00000020
,
=
0x00000040
,
=
0x00000080
,
=
0x00000100
,
=
0x00000200
,
=
0x00000400
,
=
0x00000800
,
=
0x00001000
,
=
0x00002000
,
=
0x00008000
,
=
0x00010000
,
=
0x00020000
,
=
0x00100000
,
=
0x00200000
,
FTA_AlwaysUseDirectInvoke
=
0x00400000
,
}
;
DEFINE_ENUM_FLAG_OPERATORS(FILETYPEATTRIBUTEFLAGS)
extern
"C++"
{
inline
constexpr
(
,
)
throw
() {
return
(((
<
>::
)
) | ((
<
>::
)
)); }
inline
&
(
&
,
)
throw
() {
return
(
&)(((
<
>::
&)
) |= ((
<
>::
)
)); }
inline
constexpr
(
,
)
throw
() {
return
(((
<
>::
)
) & ((
<
>::
)
)); }
inline
&
(
&
,
)
throw
() {
return
(
&)(((
<
>::
&)
) &= ((
<
>::
)
)); }
inline
constexpr
(
)
throw
() {
return
(~((
<
>::
)
)); }
inline
constexpr
(
,
)
throw
() {
return
(((
<
>::
)
) ^ ((
<
>::
)
)); }
inline
&
(
&
,
)
throw
() {
return
(
&)(((
<
>::
&)
) ^= ((
<
>::
)
)); } }
#undef INTERFACE
#define INTERFACE IQueryAssociations
DECLARE_INTERFACE_IID_( IQueryAssociations, IUnknown, "c46ca590-3c3f-11d2-bee6-0000f805ca57" )
struct
__declspec
(uuid(
"c46ca590-3c3f-11d2-bee6-0000f805ca57"
))
__declspec
(novtable)
:
public
{
STDMETHOD (Init)(THIS_ _In_ ASSOCF flags, _In_opt_ LPCWSTR pszAssoc, _In_opt_ HKEY hkProgid, _In_opt_ HWND hwnd) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
,
,
,
) =
0
;
STDMETHOD (GetString)(THIS_ _In_ ASSOCF flags, _In_ ASSOCSTR str, _In_opt_ LPCWSTR pszExtra, _Out_writes_opt_(*pcchOut) LPWSTR pszOut, _Inout_ DWORD *pcchOut) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
,
,
,
,
*
) =
0
;
STDMETHOD (GetKey)(THIS_ _In_ ASSOCF flags, _In_ ASSOCKEY key, _In_opt_ LPCWSTR pszExtra, _Out_ HKEY *phkeyOut) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
,
,
,
*
) =
0
;
STDMETHOD (GetData)(THIS_ _In_ ASSOCF flags, _In_ ASSOCDATA data, _In_opt_ LPCWSTR pszExtra, _Out_writes_bytes_opt_(*pcbOut) void * pvOut, _Inout_opt_ DWORD *pcbOut) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
,
,
,
void
*
,
*
) =
0
;
STDMETHOD (GetEnum)(THIS_ _In_ ASSOCF flags, _In_ ASSOCENUM assocenum, _In_opt_ LPCWSTR pszExtra, _In_ REFIID riid, _Outptr_ void **ppvOut) PURE;
virtual
__declspec
(nothrow)
__stdcall
(
,
,
,
const
&
,
void
**
) =
0
;
};
LWSTDAPI AssocCreate(_In_ CLSID clsid, _In_ REFIID riid, _Outptr_ void **ppv);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
const
&
,
void
**
);
STDAPI_(DWORD) SHGetAssocKeys(_In_ IQueryAssociations *pqa, _Out_writes_to_(cKeys, return) HKEY *rgKeys, DWORD cKeys);
extern
"C"
__stdcall
(
*
,
*
,
);
LWSTDAPI AssocQueryStringA(_In_ ASSOCF flags, _In_ ASSOCSTR str, _In_ LPCSTR pszAssoc, _In_opt_ LPCSTR pszExtra, _Out_writes_opt_(*pcchOut) LPSTR pszOut, _Inout_ DWORD *pcchOut);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
,
*
);
LWSTDAPI AssocQueryStringW(_In_ ASSOCF flags, _In_ ASSOCSTR str, _In_ LPCWSTR pszAssoc, _In_opt_ LPCWSTR pszExtra, _Out_writes_opt_(*pcchOut) LPWSTR pszOut, _Inout_ DWORD *pcchOut);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
,
*
);
#ifdef UNICODE
#define AssocQueryString AssocQueryStringW
#else
#define AssocQueryString AssocQueryStringA
#endif // !UNICODE
LWSTDAPI AssocQueryStringByKeyA(_In_ ASSOCF flags, _In_ ASSOCSTR str, _In_ HKEY hkAssoc, _In_opt_ LPCSTR pszExtra, _Out_writes_opt_(*pcchOut) LPSTR pszOut, _Inout_ DWORD *pcchOut);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
,
*
);
LWSTDAPI AssocQueryStringByKeyW(_In_ ASSOCF flags, _In_ ASSOCSTR str, _In_ HKEY hkAssoc, _In_opt_ LPCWSTR pszExtra, _Out_writes_opt_(*pcchOut) LPWSTR pszOut, _Inout_ DWORD *pcchOut);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
,
*
);
#ifdef UNICODE
#define AssocQueryStringByKey AssocQueryStringByKeyW
#else
#define AssocQueryStringByKey AssocQueryStringByKeyA
#endif // !UNICODE
LWSTDAPI AssocQueryKeyA(_In_ ASSOCF flags, _In_ ASSOCKEY key, _In_ LPCSTR pszAssoc, _In_opt_ LPCSTR pszExtra, _Out_ HKEY *phkeyOut);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
*
);
LWSTDAPI AssocQueryKeyW(_In_ ASSOCF flags, _In_ ASSOCKEY key, _In_ LPCWSTR pszAssoc, _In_opt_ LPCWSTR pszExtra, _Out_ HKEY *phkeyOut);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
*
);
#ifdef UNICODE
#define AssocQueryKey AssocQueryKeyW
#else
#define AssocQueryKey AssocQueryKeyA
#endif // !UNICODE
#if (_WIN32_IE >= 0x0601)
LWSTDAPI_(BOOL) AssocIsDangerous(_In_ PCWSTR pszAssoc);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#endif // _WIN32_IE >= 0x0601
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
LWSTDAPI AssocGetPerceivedType(_In_ PCWSTR pszExt, _Out_ PERCEIVED *ptype, _Out_ PERCEIVEDFLAG *pflag, _Outptr_opt_ PWSTR *ppszType);
#endif
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
,
*
,
*
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif // NO_SHLWAPI_REG
#ifndef NO_SHLWAPI_STREAM
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#ifndef __IStream_FWD_DEFINED__
#define __IStream_FWD_DEFINED__
typedef interface IStream IStream;
#endif /* __IStream_FWD_DEFINED__ */
LWSTDAPI_(IStream *) SHOpenRegStreamA(_In_ HKEY hkey, _In_opt_ LPCSTR pszSubkey, _In_opt_ LPCSTR pszValue, _In_ DWORD grfMode);
extern
"C"
__declspec
(dllimport)
*
__stdcall
(
,
,
,
);
LWSTDAPI_(IStream *) SHOpenRegStreamW(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubkey, _In_opt_ LPCWSTR pszValue, _In_ DWORD grfMode);
extern
"C"
__declspec
(dllimport)
*
__stdcall
(
,
,
,
);
#ifdef UNICODE
#define SHOpenRegStream SHOpenRegStreamW
#else
#define SHOpenRegStream SHOpenRegStreamA
#endif // !UNICODE
LWSTDAPI_(IStream *) SHOpenRegStream2A(_In_ HKEY hkey, _In_opt_ LPCSTR pszSubkey, _In_opt_ LPCSTR pszValue, _In_ DWORD grfMode);
extern
"C"
__declspec
(dllimport)
*
__stdcall
(
,
,
,
);
LWSTDAPI_(IStream *) SHOpenRegStream2W(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubkey, _In_opt_ LPCWSTR pszValue, _In_ DWORD grfMode);
extern
"C"
__declspec
(dllimport)
*
__stdcall
(
,
,
,
);
#ifdef UNICODE
#define SHOpenRegStream2 SHOpenRegStream2W
#else
#define SHOpenRegStream2 SHOpenRegStream2A
#endif // !UNICODE
#undef SHOpenRegStream
#define SHOpenRegStream SHOpenRegStream2
LWSTDAPI SHCreateStreamOnFileA(_In_ LPCSTR pszFile, _In_ DWORD grfMode, _Outptr_ IStream **ppstm);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
**
);
LWSTDAPI SHCreateStreamOnFileW(_In_ LPCWSTR pszFile, _In_ DWORD grfMode, _Outptr_ IStream **ppstm);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
**
);
#ifdef UNICODE
#define SHCreateStreamOnFile SHCreateStreamOnFileW
#else
#define SHCreateStreamOnFile SHCreateStreamOnFileA
#endif // !UNICODE
#if (_WIN32_IE >= 0x0600)
LWSTDAPI SHCreateStreamOnFileEx(_In_ LPCWSTR pszFile, _In_ DWORD grfMode, _In_ DWORD dwAttributes, _In_ BOOL fCreate, _In_opt_ IStream *pstmTemplate, _Outptr_ IStream **ppstm);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
,
,
*
,
**
);
#endif // (_WIN32_IE >= 0x0600)
LWSTDAPI_(IStream *) SHCreateMemStream(_In_reads_bytes_opt_(cbInit) const BYTE *pInit, _In_ UINT cbInit);
extern
"C"
__declspec
(dllimport)
*
__stdcall
(
const
*
,
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif // NO_SHLWAPI_STREAM
#ifndef NO_SHLWAPI_HTTP
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#if (_WIN32_IE >= 0x0603)
LWSTDAPI GetAcceptLanguagesA(_Out_writes_to_(*pcchLanguages, *pcchLanguages) LPSTR pszLanguages, _Inout_ DWORD *pcchLanguages);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
);
LWSTDAPI GetAcceptLanguagesW(_Out_writes_to_(*pcchLanguages, *pcchLanguages) LPWSTR pszLanguages, _Inout_ DWORD *pcchLanguages);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
*
);
#ifdef UNICODE
#define GetAcceptLanguages GetAcceptLanguagesW
#else
#define GetAcceptLanguages GetAcceptLanguagesA
#endif // !UNICODE
#endif // (_WIN32_IE >= 0x0603)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
#pragma endregion
#endif // NO_SHLWAPI_HTTP
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if (_WIN32_IE < _WIN32_IE_IE70) && !defined(NO_SHLWAPI_STOPWATCH)
#define SPMODE_SHELL 0x00000001
#define SPMODE_DEBUGOUT 0x00000002
#define SPMODE_TEST 0x00000004
#define SPMODE_BROWSER 0x00000008
#define SPMODE_FLUSH 0x00000010
#define SPMODE_EVENT 0x00000020
#define SPMODE_MSVM 0x00000040
#define SPMODE_FORMATTEXT 0x00000080
#define SPMODE_PROFILE 0x00000100
#define SPMODE_DEBUGBREAK 0x00000200
#define SPMODE_MSGTRACE 0x00000400
#define SPMODE_PERFTAGS 0x00000800
#define SPMODE_MEMWATCH 0x00001000
#define SPMODE_DBMON 0x00002000
#define SPMODE_MULTISTOP 0x00004000
#ifndef NO_ETW_TRACING
#define SPMODE_EVENTTRACE 0x00008000 // Event Tracing for Windows Enabled
#endif
DWORD WINAPI StopWatchMode(void);
DWORD WINAPI StopWatchFlush(void);
#endif // (_WIN32_IE < _WIN32_IE_IE70) && !defined(NO_SHLWAPI_STOPWATCH)
LWSTDAPI_(void) IUnknown_Set(_Inout_ IUnknown ** ppunk, _In_opt_ IUnknown * punk);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
**
,
*
);
LWSTDAPI_(void) IUnknown_AtomicRelease(_Inout_opt_ void ** ppunk);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
void
**
);
LWSTDAPI IUnknown_GetWindow(_In_ IUnknown* punk, _Out_ HWND* phwnd);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
*
);
LWSTDAPI IUnknown_SetSite(_In_ IUnknown *punk, _In_opt_ IUnknown *punkSite);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
*
);
LWSTDAPI IUnknown_GetSite(_In_ IUnknown *punk, _In_ REFIID riid, _Outptr_ void **ppv);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
const
&
,
void
**
);
LWSTDAPI IUnknown_QueryService(_In_opt_ IUnknown* punk, _In_ REFGUID guidService, _In_ REFIID riid, _COM_Outptr_ void ** ppvOut);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
const
&
,
const
&
,
void
**
);
#if !defined(__cplusplus) && defined(COBJMACROS)
#undef IStream_Read
#undef IStream_Write
#endif
LWSTDAPI IStream_Read(_In_ IStream *pstm, _Out_writes_bytes_all_(cb) void *pv, _In_ ULONG cb);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
void
*
,
);
LWSTDAPI IStream_Write(_In_ IStream *pstm, _In_reads_bytes_(cb) const void *pv, _In_ ULONG cb);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
const
void
*
,
);
LWSTDAPI IStream_Reset(_In_ IStream *pstm);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
);
LWSTDAPI IStream_Size(_In_ IStream *pstm, _Out_ ULARGE_INTEGER *pui);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
*
);
#ifndef __IConnectionPoint_FWD_DEFINED__
#define __IConnectionPoint_FWD_DEFINED__
typedef interface IConnectionPoint IConnectionPoint;
#endif /* __IConnectionPoint_FWD_DEFINED__ */
typedef
struct
IConnectionPoint
;
LWSTDAPI ConnectToConnectionPoint(_In_opt_ IUnknown* punk, _In_ REFIID riidEvent, BOOL fConnect, _In_ IUnknown* punkTarget, _Out_ DWORD* pdwCookie, _Outptr_opt_ IConnectionPoint** ppcpOut);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
const
&
,
,
*
,
*
,
**
);
#if (NTDDI_VERSION >= NTDDI_VISTA)
LWSTDAPI IStream_ReadPidl(_In_ IStream *pstm, _Outptr_ PIDLIST_RELATIVE *ppidlOut);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
*
);
LWSTDAPI IStream_WritePidl(_In_ IStream *pstm, _In_ PCUIDLIST_RELATIVE pidlWrite);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
);
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#if (_WIN32_IE >= _WIN32_IE_IE70)
LWSTDAPI IStream_ReadStr(_In_ IStream *pstm, _Outptr_ PWSTR *ppsz);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
*
);
LWSTDAPI IStream_WriteStr(_In_ IStream *pstm, _In_ PCWSTR psz);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
);
LWSTDAPI IStream_Copy(_In_ IStream *pstmFrom, _In_ IStream *pstmTo, DWORD cb);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
*
,
);
#endif // (_WIN32_IE >= _WIN32_IE_IE70)
#if (_WIN32_IE >= 0x0600)
#define SHGVSPB_PERUSER 0x00000001 // must have one of PERUSER or ALLUSERS
#define SHGVSPB_ALLUSERS 0x00000002
#define SHGVSPB_PERFOLDER 0x00000004 // must have one of PERFOLDER ALLFOLDERS or INHERIT
#define SHGVSPB_ALLFOLDERS 0x00000008
#define SHGVSPB_INHERIT 0x00000010
#define SHGVSPB_ROAM 0x00000020 // modifies the above
#define SHGVSPB_NOAUTODEFAULTS 0x80000000 // turns off read delegation to more general property bags
#define SHGVSPB_FOLDER (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER)
#define SHGVSPB_FOLDERNODEFAULTS (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER | SHGVSPB_NOAUTODEFAULTS)
#define SHGVSPB_USERDEFAULTS (SHGVSPB_PERUSER | SHGVSPB_ALLFOLDERS)
#define SHGVSPB_GLOBALDEFAULTS (SHGVSPB_ALLUSERS | SHGVSPB_ALLFOLDERS)
LWSTDAPI SHGetViewStatePropertyBag(_In_opt_ PCIDLIST_ABSOLUTE pidl, _In_opt_ PCWSTR pszBagName, DWORD dwFlags, _In_ REFIID riid, _Outptr_ void **ppv);
#endif // (_WIN32_IE >= 0x0600)
extern
"C"
__declspec
(dllimport)
__stdcall
SHGetViewStatePropertyBag
(
,
,
,
const
&
,
void
**
);
#define FDTF_SHORTTIME 0x00000001 // eg, "7:48 PM"
#define FDTF_SHORTDATE 0x00000002 // eg, "3/29/98"
#define FDTF_DEFAULT (FDTF_SHORTDATE | FDTF_SHORTTIME) // eg, "3/29/98 7:48 PM"
#define FDTF_LONGDATE 0x00000004 // eg, "Monday, March 29, 1998"
#define FDTF_LONGTIME 0x00000008 // eg. "7:48:33 PM"
#define FDTF_RELATIVE 0x00000010 // uses "Yesterday", etc. if possible
#define FDTF_LTRDATE 0x00000100 // Left To Right reading order
#define FDTF_RTLDATE 0x00000200 // Right To Left reading order
#define FDTF_NOAUTOREADINGORDER 0x00000400 // Don't detect reading order automatically. Useful if you will be converting to Ansi and don't want Unicode reading order characters
LWSTDAPI_(int) SHFormatDateTimeA(_In_ const FILETIME UNALIGNED * pft, _Inout_opt_ DWORD * pdwFlags, _Out_writes_(cchBuf) LPSTR pszBuf, UINT cchBuf);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
const
*
,
*
,
,
);
LWSTDAPI_(int) SHFormatDateTimeW(_In_ const FILETIME UNALIGNED * pft, _Inout_opt_ DWORD * pdwFlags, _Out_writes_(cchBuf) LPWSTR pszBuf, UINT cchBuf);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
const
*
,
*
,
,
);
#ifdef UNICODE
#define SHFormatDateTime SHFormatDateTimeW
#else
#define SHFormatDateTime SHFormatDateTimeA
#endif // !UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
_Success_(return > 0)
LWSTDAPI_(int) SHAnsiToUnicode(_In_ PCSTR pszSrc, _Out_writes_(cwchBuf) PWSTR pwszDst, _In_ int cwchBuf);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
int
);
_Success_(return > 0)
LWSTDAPI_(int) SHAnsiToAnsi(_In_ PCSTR pszSrc, _Out_writes_(cchBuf) PSTR pszDst, _In_ int cchBuf);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
int
);
_Success_(return > 0)
LWSTDAPI_(int) SHUnicodeToAnsi(_In_ PCWSTR pwszSrc, _Out_writes_(cchBuf) PSTR pszDst, _In_ int cchBuf);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
int
);
_Success_(return > 0)
LWSTDAPI_(int) SHUnicodeToUnicode(_In_ PCWSTR pwzSrc, _Out_writes_(cwchBuf) PWSTR pwzDst, _In_ int cwchBuf);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
int
);
#ifdef UNICODE
#define SHTCharToUnicode(wzSrc, wzDest, cchSize) SHUnicodeToUnicode(wzSrc, wzDest, cchSize)
#define SHTCharToAnsi(wzSrc, szDest, cchSize) SHUnicodeToAnsi(wzSrc, szDest, cchSize)
#define SHUnicodeToTChar(wzSrc, wzDest, cchSize) SHUnicodeToUnicode(wzSrc, wzDest, cchSize)
#define SHAnsiToTChar(szSrc, wzDest, cchSize) SHAnsiToUnicode(szSrc, wzDest, cchSize)
#else // UNICODE
#define SHTCharToUnicode(szSrc, wzDest, cchSize) SHAnsiToUnicode(szSrc, wzDest, cchSize)
#define SHTCharToAnsi(szSrc, szDest, cchSize) SHAnsiToAnsi(szSrc, szDest, cchSize)
#define SHUnicodeToTChar(wzSrc, szDest, cchSize) SHUnicodeToAnsi(wzSrc, szDest, cchSize)
#define SHAnsiToTChar(szSrc, szDest, cchSize) SHAnsiToAnsi(szSrc, szDest, cchSize)
#endif // UNICODE
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
LWSTDAPI_(int) SHMessageBoxCheckA(_In_opt_ HWND hwnd, _In_ LPCSTR pszText, _In_ LPCSTR pszCaption, UINT uType, int iDefault, _In_ LPCSTR pszRegVal);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
,
,
int
,
);
LWSTDAPI_(int) SHMessageBoxCheckW(_In_opt_ HWND hwnd, _In_ LPCWSTR pszText, _In_ LPCWSTR pszCaption, UINT uType, int iDefault, _In_ LPCWSTR pszRegVal);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
,
,
,
int
,
);
#ifdef UNICODE
#define SHMessageBoxCheck SHMessageBoxCheckW
#else
#define SHMessageBoxCheck SHMessageBoxCheckA
#endif // !UNICODE
LWSTDAPI_(LRESULT) SHSendMessageBroadcastA(_In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(LRESULT) SHSendMessageBroadcastW(_In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
#ifdef UNICODE
#define SHSendMessageBroadcast SHSendMessageBroadcastW
#else
#define SHSendMessageBroadcast SHSendMessageBroadcastA
#endif // !UNICODE
LWSTDAPI_(CHAR) SHStripMneumonicA(_Inout_ LPSTR pszMenu);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(WCHAR) SHStripMneumonicW(_Inout_ LPWSTR pszMenu);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#ifdef UNICODE
#define SHStripMneumonic SHStripMneumonicW
#else
#define SHStripMneumonic SHStripMneumonicA
#endif // !UNICODE
#ifndef NO_SHLWAPI_ISOS
#define OS_WINDOWS 0 // Windows 9x vs. NT
#define OS_NT 1 // Windows 9x vs. NT
#define OS_WIN95ORGREATER 2 // Win95 or greater
#define OS_NT4ORGREATER 3 // NT4 or greater
#define OS_WIN98ORGREATER 5 // Win98 or greater
#define OS_WIN98_GOLD 6 // Win98 Gold (Version 4.10 build 1998)
#define OS_WIN2000ORGREATER 7 // Some derivative of Win2000
#define OS_WIN2000PRO 8 // Windows 2000 Professional (Workstation)
#define OS_WIN2000SERVER 9 // Windows 2000 Server
#define OS_WIN2000ADVSERVER 10 // Windows 2000 Advanced Server
#define OS_WIN2000DATACENTER 11 // Windows 2000 Data Center Server
#define OS_WIN2000TERMINAL 12 // Windows 2000 Terminal Server in "Application Server" mode (now simply called "Terminal Server")
#define OS_EMBEDDED 13 // Embedded Windows Edition
#define OS_TERMINALCLIENT 14 // Windows Terminal Client (eg user is comming in via tsclient)
#define OS_TERMINALREMOTEADMIN 15 // Terminal Server in "Remote Administration" mode
#define OS_WIN95_GOLD 16 // Windows 95 Gold (Version 4.0 Build 1995)
#define OS_MEORGREATER 17 // Windows Millennium (Version 5.0)
#define OS_XPORGREATER 18 // Windows XP or greater
#define OS_HOME 19 // Home Edition (eg NOT Professional, Server, Advanced Server, or Datacenter)
#define OS_PROFESSIONAL 20 // Professional (aka Workstation; eg NOT Server, Advanced Server, or Datacenter)
#define OS_DATACENTER 21 // Datacenter (eg NOT Server, Advanced Server, Professional, or Personal)
#define OS_ADVSERVER 22 // Advanced Server (eg NOT Datacenter, Server, Professional, or Personal)
#define OS_SERVER 23 // Server (eg NOT Datacenter, Advanced Server, Professional, or Personal)
#define OS_TERMINALSERVER 24 // Terminal Server - server running in what used to be called "Application Server" mode (now simply called "Terminal Server")
#define OS_PERSONALTERMINALSERVER 25 // Personal Terminal Server - per/pro machine running in single user TS mode
#define OS_FASTUSERSWITCHING 26 // Fast User Switching
#define OS_WELCOMELOGONUI 27 // New friendly logon UI
#define OS_DOMAINMEMBER 28 // Is this machine a member of a domain (eg NOT a workgroup)
#define OS_ANYSERVER 29 // is this machine any type of server? (eg datacenter or advanced server or server)?
#define OS_WOW6432 30 // Is this process a 32-bit process running on an 64-bit platform?
#define OS_WEBSERVER 31 // Web Edition Server
#define OS_SMALLBUSINESSSERVER 32 // SBS Server
#define OS_TABLETPC 33 // Are we running on a TabletPC?
#define OS_SERVERADMINUI 34 // Should defaults lean towards those preferred by server administrators?
#define OS_MEDIACENTER 35 // eHome Freestyle Project
#define OS_APPLIANCE 36 // Windows .NET Appliance Server
LWSTDAPI_(BOOL) IsOS(DWORD dwOS);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
#endif // NO_SHLWAPI_ISOS
typedef
enum
{
GLOBALCOUNTER_SEARCHMANAGER
,
GLOBALCOUNTER_SEARCHOPTIONS
,
GLOBALCOUNTER_FOLDERSETTINGSCHANGE
,
,
GLOBALCOUNTER_APPROVEDSITES
,
GLOBALCOUNTER_RESTRICTIONS
,
GLOBALCOUNTER_SHELLSETTINGSCHANGED
,
GLOBALCOUNTER_SYSTEMPIDLCHANGE
,
GLOBALCOUNTER_OVERLAYMANAGER
,
GLOBALCOUNTER_QUERYASSOCIATIONS
,
,
GLOBALCOUNTER_IEONLY_SESSIONS
,
GLOBALCOUNTER_APPLICATION_DESTINATIONS
,
__UNUSED_RECYCLE_WAS_GLOBALCOUNTER_CSCSYNCINPROGRESS
,
GLOBALCOUNTER_BITBUCKETNUMDELETERS
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_SHARES
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_A
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_B
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_C
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_D
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_E
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_F
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_G
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_H
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_I
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_J
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_K
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_L
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_M
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_N
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_O
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_P
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_Q
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_R
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_S
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_T
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_U
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_V
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_W
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_X
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_Y
,
GLOBALCOUNTER_RECYCLEDIRTYCOUNT_DRIVE_Z
,
__UNUSED_RECYCLE_WAS_GLOBALCOUNTER_RECYCLEDIRTYCOUNT_SERVERDRIVE
,
__UNUSED_RECYCLE_WAS_GLOBALCOUNTER_RECYCLEGLOBALDIRTYCOUNT
,
GLOBALCOUNTER_RECYCLEBINENUM
,
GLOBALCOUNTER_RECYCLEBINCORRUPTED
,
GLOBALCOUNTER_RATINGS_STATECOUNTER
,
GLOBALCOUNTER_PRIVATE_PROFILE_CACHE
,
,
GLOBALCOUNTER_FOLDERDEFINITION_CACHE
,
GLOBALCOUNTER_COMMONPLACES_LIST_CACHE
,
GLOBALCOUNTER_PRIVATE_PROFILE_CACHE_MACHINEWIDE
,
GLOBALCOUNTER_ASSOCCHANGED
,
#if (NTDDI_VERSION >= NTDDI_WIN8)
GLOBALCOUNTER_APP_ITEMS_STATE_STORE_CACHE
,
GLOBALCOUNTER_SETTINGSYNC_ENABLED
,
GLOBALCOUNTER_APPSFOLDER_FILETYPEASSOCIATION_COUNTER
,
GLOBALCOUNTER_USERINFOCHANGED
,
#if (NTDDI_VERSION >= NTDDI_WINBLUE)
,
#endif // (NTDDI_VERSION >= NTDDI_WINBLUE)
#endif // (NTDDI_VERSION >= NTDDI_WIN8)
#if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
GLOBALCOUNTER_BANNERS_DATAMODEL_CACHE_MACHINEWIDE
,
#endif // (NTDDI_VERSION >= NTDDI_WIN10_RS1)
GLOBALCOUNTER_MAXIMUMVALUE
}
;
#if (NTDDI_VERSION >= NTDDI_WIN7)
LWSTDAPI_(long) SHGlobalCounterGetValue(const SHGLOBALCOUNTER id);
extern
"C"
__declspec
(dllimport)
long
__stdcall
(
const
);
LWSTDAPI_(long) SHGlobalCounterIncrement(const SHGLOBALCOUNTER id);
extern
"C"
__declspec
(dllimport)
long
__stdcall
(
const
);
LWSTDAPI_(long) SHGlobalCounterDecrement(const SHGLOBALCOUNTER id);
#endif // (NTDDI_VERSION >= NTDDI_WIN7)
extern
"C"
__declspec
(dllimport)
long
__stdcall
(
const
);
#if (_WIN32_IE >= 0x0603)
LWSTDAPI_(HANDLE) SHAllocShared(_In_reads_bytes_opt_(dwSize) const void *pvData, _In_ DWORD dwSize, _In_ DWORD dwProcessId);
extern
"C"
__declspec
(dllimport)
__stdcall
(
const
void
*
,
,
);
LWSTDAPI_(BOOL) SHFreeShared(_In_ HANDLE hData, _In_ DWORD dwProcessId);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
LWSTDAPI_(void *) SHLockShared(_In_ HANDLE hData, _In_ DWORD dwProcessId);
extern
"C"
__declspec
(dllimport)
void
*
__stdcall
(
,
);
LWSTDAPI_(BOOL) SHUnlockShared(_In_reads_(_Inexpressible_("header-preceded")) void *pvData);
#endif // _WIN32_IE >= 0x0603
extern
"C"
__declspec
(dllimport)
__stdcall
(
void
*
);
LWSTDAPI_(UINT) WhichPlatform(void);
extern
"C"
__declspec
(dllimport)
__stdcall
(
void
);
#define PLATFORM_UNKNOWN 0
#define PLATFORM_IE3 1 // obsolete: use PLATFORM_BROWSERONLY
#define PLATFORM_BROWSERONLY 1 // browser-only (no new shell)
#define PLATFORM_INTEGRATED 2 // integrated shell
typedef
struct
{
const
*
;
;
}
, *
;
typedef
const
*
;
#ifdef __cplusplus
#define QITABENTMULTI(Cthis, Ifoo, Iimpl) \
{ &__uuidof(Ifoo), OFFSETOFCLASS(Iimpl, Cthis) }
#else
#define QITABENTMULTI(Cthis, Ifoo, Iimpl) \
{ (IID*) &IID_##Ifoo, OFFSETOFCLASS(Iimpl, Cthis) }
#endif // __cplusplus
#define QITABENTMULTI2(Cthis, Ifoo, Iimpl) \
{ (IID*) &Ifoo, OFFSETOFCLASS(Iimpl, Cthis) }
#define QITABENT(Cthis, Ifoo) QITABENTMULTI(Cthis, Ifoo, Ifoo)
STDAPI QISearch(_Inout_ void* that, _In_ LPCQITAB pqit, _In_ REFIID riid, _COM_Outptr_ void **ppv);
extern
"C"
__stdcall
(
void
*
,
,
const
&
,
void
**
);
#ifndef STATIC_CAST
#define STATIC_CAST(typ) static_cast<typ>
#ifndef _X86_
// assume only intel compiler (>=vc5) supports static_cast for now
// we could key off of _MSC_VER >= 1100 but i'm not sure that will work
//
// a straight cast will give the correct result but no error checking,
// so we'll have to catch errors on intel.
#undef STATIC_CAST
#define STATIC_CAST(typ) (typ)
#endif
#endif
#ifndef OFFSETOFCLASS
#define OFFSETOFCLASS(base, derived) \
((DWORD)(DWORD_PTR)(STATIC_CAST(base*)((derived*)8))-8)
#endif
#define ILMM_IE4 0 // 1997-era machine
LWSTDAPI_(BOOL) SHIsLowMemoryMachine(DWORD dwType);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(int) GetMenuPosFromID(_In_ HMENU hmenu, UINT id);
extern
"C"
__declspec
(dllimport)
int
__stdcall
(
,
);
LWSTDAPI SHGetInverseCMAP(_Out_writes_bytes_(cbMap) BYTE *pbMap, ULONG cbMap);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
);
#define SHACF_DEFAULT 0x00000000 // Currently (SHACF_FILESYSTEM | SHACF_URLALL)
#define SHACF_FILESYSTEM 0x00000001 // This includes the File System as well as the rest of the shell (Desktop\My Computer\Control Panel\)
#define SHACF_URLALL (SHACF_URLHISTORY | SHACF_URLMRU)
#define SHACF_URLHISTORY 0x00000002 // URLs in the User's History
#define SHACF_URLMRU 0x00000004 // URLs in the User's Recently Used list.
#define SHACF_USETAB 0x00000008 // Use the tab to move thru the autocomplete possibilities instead of to the next dialog/window control.
#define SHACF_FILESYS_ONLY 0x00000010 // This includes the File System
#if (_WIN32_IE >= 0x0600)
#define SHACF_FILESYS_DIRS 0x00000020 // Same as SHACF_FILESYS_ONLY except it only includes directories, UNC servers, and UNC server shares.
#endif // (_WIN32_IE >= 0x0600)
#if (_WIN32_IE >= _WIN32_IE_IE70)
#define SHACF_VIRTUAL_NAMESPACE 0x00000040 // Also include the virtual namespace
#endif // _WIN32_IE_IE70
#define SHACF_AUTOSUGGEST_FORCE_ON 0x10000000 // Ignore the registry default and force the feature on.
#define SHACF_AUTOSUGGEST_FORCE_OFF 0x20000000 // Ignore the registry default and force the feature off.
#define SHACF_AUTOAPPEND_FORCE_ON 0x40000000 // Ignore the registry default and force the feature on. (Also know as AutoComplete)
#define SHACF_AUTOAPPEND_FORCE_OFF 0x80000000 // Ignore the registry default and force the feature off. (Also know as AutoComplete)
LWSTDAPI SHAutoComplete(_In_ HWND hwndEdit, DWORD dwFlags);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
);
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
LWSTDAPI SHCreateThreadRef(_Inout_ LONG *pcRef, _Outptr_ IUnknown **ppunk);
#endif // _WIN32_IE_IE60SP2
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
**
);
LWSTDAPI SHSetThreadRef(_In_opt_ IUnknown *punk);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
);
LWSTDAPI SHGetThreadRef(_COM_Outptr_ IUnknown **ppunk);
extern
"C"
__declspec
(dllimport)
__stdcall
(
**
);
LWSTDAPI_(BOOL) SHSkipJunction(_In_opt_ IBindCtx* pbc, _In_ const CLSID *pclsid);
extern
"C"
__declspec
(dllimport)
__stdcall
(
*
,
const
*
);
enum
{
=
0x00000001
,
=
0x00000002
,
=
0x00000004
,
=
0x00000008
,
=
0x00000008
,
#if (_WIN32_IE >= _WIN32_IE_IE60)
=
0x00000010
,
=
0x00000020
,
=
0x00000040
,
#endif // _WIN32_IE_IE60
#if (_WIN32_IE >= _WIN32_IE_IE70)
=
0x00000080
,
=
0x00000100
,
#endif // _WIN32_IE_IE70
#if (NTDDI_VERSION >= NTDDI_VISTA)
=
0x00000200
,
#endif // (NTDDI_VERSION >= NTDDI_VISTA)
#if (NTDDI_VERSION >= NTDDI_WIN7)
=
0x00000400
,
=
0x00000800
,
=
0x00001000
,
=
0x00002000
,
#endif // (NTDDI_VERSION >= NTDDI_WIN7)
};
typedef
;
LWSTDAPI_(BOOL) SHCreateThread(_In_ LPTHREAD_START_ROUTINE pfnThreadProc, _In_opt_ void *pData, _In_ SHCT_FLAGS flags, _In_opt_ LPTHREAD_START_ROUTINE pfnCallback);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
void
*
,
,
);
LWSTDAPI_(BOOL) SHCreateThreadWithHandle(_In_ LPTHREAD_START_ROUTINE pfnThreadProc, _In_opt_ void *pData, _In_ SHCT_FLAGS flags, _In_opt_ LPTHREAD_START_ROUTINE pfnCallback, _Out_opt_ HANDLE *pHandle);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
void
*
,
,
,
*
);
#if (NTDDI_VERSION >= NTDDI_WIN8)
LWSTDAPI_(void) SetProcessReference(_In_opt_ IUnknown *punk);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
*
);
LWSTDAPI GetProcessReference(_COM_Outptr_ IUnknown **punk);
#endif // (NTDDI_VERSION >= NTDDI_WIN8)
extern
"C"
__declspec
(dllimport)
__stdcall
(
**
);
#if (_WIN32_IE >= _WIN32_IE_IE60)
LWSTDAPI SHReleaseThreadRef(void); // release a CTF_THREAD_REF reference earlier than the return of pfnThreadProc
#endif // _WIN32_IE_IE60
extern
"C"
__declspec
(dllimport)
__stdcall
(
void
);
#ifndef NO_SHLWAPI_GDI
LWSTDAPI_(HPALETTE) SHCreateShellPalette(_In_opt_ HDC hdc);
extern
"C"
__declspec
(dllimport)
__stdcall
(
);
LWSTDAPI_(void) ColorRGBToHLS(COLORREF clrRGB, _Out_ WORD* pwHue, _Out_ WORD* pwLuminance, _Out_ WORD* pwSaturation);
extern
"C"
__declspec
(dllimport)
void
__stdcall
(
,
*
,
*
,
*
);
LWSTDAPI_(COLORREF) ColorHLSToRGB(WORD wHue, WORD wLuminance, WORD wSaturation);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
,
);
LWSTDAPI_(COLORREF) ColorAdjustLuma(COLORREF clrRGB, int n, BOOL fScale);
extern
"C"
__declspec
(dllimport)
__stdcall
(
,
int
,
);
#endif // NO_SHLWAPI_GDI
typedef
struct
{
;
;
;
;
;
}
;
#define DLLVER_PLATFORM_WINDOWS 0x00000001 // Windows 95
#define DLLVER_PLATFORM_NT 0x00000002 // Windows NT
typedef
struct
{
;
;
;
}
;
#define DLLVER_MAJOR_MASK 0xFFFF000000000000
#define DLLVER_MINOR_MASK 0x0000FFFF00000000
#define DLLVER_BUILD_MASK 0x00000000FFFF0000
#define DLLVER_QFE_MASK 0x000000000000FFFF
#define MAKEDLLVERULL(major, minor, build, qfe) \
(((ULONGLONG)(major) << 48) | \
((ULONGLONG)(minor) << 32) | \
((ULONGLONG)(build) << 16) | \
((ULONGLONG)( qfe) << 0))
typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *);
typedef
(
__stdcall
*
)(
*);
STDAPI DllInstall(BOOL bInstall, _In_opt_ PCWSTR pszCmdLine);
extern
"C"
__stdcall
(
,
);
#if (_WIN32_IE >= 0x0602)
LWSTDAPI_(BOOL) IsInternetESCEnabled(void);
#endif // (_WIN32_IE >= 0x0602)
extern
"C"
__declspec
(dllimport)
__stdcall
(
void
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#ifdef __cplusplus
}
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#ifdef __cplusplus
#if defined(USE_STRICT_CONST) && !defined(NO_SHLWAPI_STRFCNS)
//=============================================================================
// C++ versions to help detect "const" violations
__inline PSTR StrChrA(_In_ PSTR pszStart, WORD wMatch)
{
return const_cast<PSTR>(StrChrA(const_cast<PCSTR>(pszStart), wMatch));
}
__inline PWSTR StrChrW(_In_ PWSTR pszStart, WCHAR wMatch)
{
return const_cast<PWSTR>(StrChrW(const_cast<PCWSTR>(pszStart), wMatch));
}
__inline PSTR StrChrIA(_In_ PSTR pszStart, WORD wMatch)
{
return const_cast<PSTR>(StrChrIA(const_cast<PCSTR>(pszStart), wMatch));
}
__inline PWSTR StrChrIW(_In_ PWSTR pszStart, WCHAR wMatch)
{
return const_cast<PWSTR>(StrChrIW(const_cast<PCWSTR>(pszStart), wMatch));
}
#if (_WIN32_IE >= _WIN32_IE_IE60)
__inline PWSTR StrChrNW(_In_ PWSTR pszStart, WCHAR wMatch, UINT cchMax)
{
return const_cast<PWSTR>(StrChrNW(const_cast<PCWSTR>(pszStart), wMatch, cchMax));
}
__inline PWSTR StrChrNIW(_In_ PWSTR pszStart, WCHAR wMatch, UINT cchMax)
{
return const_cast<PWSTR>(StrChrNIW(const_cast<PCWSTR>(pszStart), wMatch, cchMax));
}
#endif // _WIN32_IE_IE60
__inline PSTR StrPBrkA(_In_ PSTR psz, _In_ PCSTR pszSet)
{
return const_cast<PSTR>(StrPBrkA(const_cast<PCSTR>(psz), pszSet));
}
__inline PWSTR StrPBrkW(_In_ PWSTR psz, _In_ PCWSTR pszSet)
{
return const_cast<PWSTR>(StrPBrkW(const_cast<PCWSTR>(psz), pszSet));
}
__inline PSTR StrRChrA(_In_ PSTR pszStart, _In_opt_ PCSTR pszEnd, WORD wMatch)
{
return const_cast<PSTR>(StrRChrA(const_cast<PCSTR>(pszStart), pszEnd, wMatch));
}
__inline PWSTR StrRChrW(_In_ PWSTR pszStart, _In_opt_ PCWSTR pszEnd, WCHAR wMatch)
{
return const_cast<PWSTR>(StrRChrW(const_cast<PCWSTR>(pszStart), pszEnd, wMatch));
}
__inline PSTR StrRChrIA(_In_ PSTR pszStart, _In_opt_ PCSTR pszEnd, WORD wMatch)
{
return const_cast<PSTR>(StrRChrIA(const_cast<PCSTR>(pszStart), pszEnd, wMatch));
}
__inline PWSTR StrRChrIW(_In_ PWSTR pszStart, _In_opt_ PCWSTR pszEnd, WCHAR wMatch)
{
return const_cast<PWSTR>(StrRChrIW(const_cast<PCWSTR>(pszStart), pszEnd, wMatch));
}
__inline PSTR StrRStrIA(_In_ PSTR pszSource, _In_opt_ PCSTR pszLast, _In_ PCSTR pszSrch)
{
return const_cast<PSTR>(StrRStrIA(const_cast<PCSTR>(pszSource), pszLast, pszSrch));
}
__inline PWSTR StrRStrIW(_In_ PWSTR pszSource, _In_opt_ PCWSTR pszLast, _In_ PCWSTR pszSrch)
{
return const_cast<PWSTR>(StrRStrIW(const_cast<PCWSTR>(pszSource), pszLast, pszSrch));
}
__inline PSTR StrStrA(_In_ PSTR pszFirst, _In_ PCSTR pszSrch)
{
return const_cast<PSTR>(StrStrA(const_cast<PCSTR>(pszFirst), pszSrch));
}
__inline PWSTR StrStrW(_In_ PWSTR pszFirst, _In_ PCWSTR pszSrch)
{
return const_cast<PWSTR>(StrStrW(const_cast<PCWSTR>(pszFirst), pszSrch));
}
__inline PSTR StrStrIA(_In_ PSTR pszFirst, _In_ PCSTR pszSrch)
{
return const_cast<PSTR>(StrStrIA(const_cast<PCSTR>(pszFirst), pszSrch));
}
__inline PWSTR StrStrIW(_In_ PWSTR pszFirst, _In_ PCWSTR pszSrch)
{
return const_cast<PWSTR>(StrStrIW(const_cast<PCWSTR>(pszFirst), pszSrch));
}
#if (_WIN32_IE >= _WIN32_IE_IE60)
__inline PWSTR StrStrNW(_In_ PWSTR pszFirst, _In_ PCWSTR pszSrch, UINT cchMax)
{
return const_cast<PWSTR>(StrStrNW(const_cast<PCWSTR>(pszFirst), pszSrch, cchMax));
}
__inline PWSTR StrStrNIW(_In_ PWSTR pszFirst, _In_ PCWSTR pszSrch, UINT cchMax)
{
return const_cast<PWSTR>(StrStrNIW(const_cast<PCWSTR>(pszFirst), pszSrch, cchMax));
}
#endif
__inline PSTR PathFindExtensionA(_In_ PSTR pszPath)
{
return const_cast<PSTR>(PathFindExtensionA(const_cast<PCSTR>(pszPath)));
}
__inline PWSTR PathFindExtensionW(_In_ PWSTR pszPath)
{
return const_cast<PWSTR>(PathFindExtensionW(const_cast<PCWSTR>(pszPath)));
}
__inline PSTR PathFindFileNameA(_In_ PSTR pszPath)
{
return const_cast<PSTR>(PathFindFileNameA(const_cast<PCSTR>(pszPath)));
}
__inline PWSTR PathFindFileNameW(_In_ PWSTR pszPath)
{
return const_cast<PWSTR>(PathFindFileNameW(const_cast<PCWSTR>(pszPath)));
}
__inline PSTR PathFindNextComponentA(_In_ PSTR pszPath)
{
return const_cast<PSTR>(PathFindNextComponentA(const_cast<PCSTR>(pszPath)));
}
__inline PWSTR PathFindNextComponentW(_In_ PWSTR pszPath)
{
return const_cast<PWSTR>(PathFindNextComponentW(const_cast<PCWSTR>(pszPath)));
}
__inline PSTR PathGetArgsA(_In_ PSTR pszPath)
{
return const_cast<PSTR>(PathGetArgsA(const_cast<PCSTR>(pszPath)));
}
__inline PWSTR PathGetArgsW(_In_ PWSTR pszPath)
{
return const_cast<PWSTR>(PathGetArgsW(const_cast<PCWSTR>(pszPath)));
}
__inline PSTR PathSkipRootA(_In_ PSTR pszPath)
{
return const_cast<PSTR>(PathSkipRootA(const_cast<PCSTR>(pszPath)));
}
__inline PWSTR PathSkipRootW(_In_ PWSTR pszPath)
{
return const_cast<PWSTR>(PathSkipRootW(const_cast<PCWSTR>(pszPath)));
}
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#endif
#if defined(DEPRECATE_SUPPORTED)
#pragma warning(pop)
#endif
#ifdef _WIN32
#include <poppack.h>
#endif
#if _MSC_VER >= 1200
#pragma warning(pop)
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#endif
#endif // _INC_SHLWAPI