Headers diff for shlwapi.dll between 6.1.7601.17514-Windows_7.0 and 6.3.9600.17415-Windows_8.1 versions



 shlwapi.h (6.1.7601.17514-Windows_7.0)   shlwapi.h (6.3.9600.17415-Windows_8.1) 
skipping to change at line 15 skipping to change at line 15
* * * *
* Version 1.0 * * Version 1.0 *
* * * *
* Copyright (c) Microsoft Corporation. All rights reserved. * * Copyright (c) Microsoft Corporation. All rights reserved. *
* * * *
\*****************************************************************************/ \*****************************************************************************/
#ifndef _INC_SHLWAPI #ifndef _INC_SHLWAPI
#define _INC_SHLWAPI #define _INC_SHLWAPI
#include <winapifamily.h>
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#ifndef NOSHLWAPI #ifndef NOSHLWAPI
#include <SpecStrings.h> #include <SpecStrings.h>
#include <objbase.h> #include <objbase.h>
#include <shtypes.h> #include <shtypes.h>
// //
// Define API decoration for direct importing of DLL references. // Define API decoration for direct importing of DLL references.
// //
#ifndef WINSHLWAPI #ifndef WINSHLWAPI
skipping to change at line 76 skipping to change at line 81
// NO_SHLWAPI_REG Registry functions // NO_SHLWAPI_REG Registry functions
// NO_SHLWAPI_STREAM Stream functions // NO_SHLWAPI_STREAM Stream functions
// NO_SHLWAPI_GDI GDI helper functions // NO_SHLWAPI_GDI GDI helper functions
#ifndef NO_SHLWAPI_STRFCNS #ifndef NO_SHLWAPI_STRFCNS
// //
//=============== String Routines =================================== //=============== String Routines ===================================
// //
#ifdef USE_STRICT_CONST #ifdef USE_STRICT_CONST
LWSTDAPI_(LPCSTR) StrChrA(LPCSTR lpStart, WORD wMatch); LWSTDAPI_(PCSTR) StrChrA(_In_ PCSTR pszStart, WORD wMatch);
LWSTDAPI_(LPCWSTR) StrChrW(LPCWSTR lpStart, WCHAR wMatch); LWSTDAPI_(PCWSTR) StrChrW(_In_ PCWSTR pszStart, WCHAR wMatch);
LWSTDAPI_(LPCSTR) StrChrIA(LPCSTR lpStart, WORD wMatch); LWSTDAPI_(PCSTR) StrChrIA(_In_ PCSTR pszStart, WORD wMatch);
LWSTDAPI_(LPCWSTR) StrChrIW(LPCWSTR lpStart, WCHAR wMatch); LWSTDAPI_(PCWSTR) StrChrIW(_In_ PCWSTR pszStart, WCHAR wMatch);
#if (_WIN32_IE >= _WIN32_IE_IE60) #if (_WIN32_IE >= _WIN32_IE_IE60)
LWSTDAPI_(LPCWSTR) StrChrNW(LPCWSTR lpStart, WCHAR wMatch, UINT cchMax); LWSTDAPI_(PCWSTR) StrChrNW(_In_ PCWSTR pszStart, WCHAR wMatch, UINT cchMax);
LWSTDAPI_(LPCWSTR) StrChrNIW(LPCWSTR lpStart, WCHAR wMatch, UINT cchMax); LWSTDAPI_(PCWSTR) StrChrNIW(_In_ PCWSTR pszStart, WCHAR wMatch, UINT cchMax);
#endif // _WIN32_IE_IE60 #endif // _WIN32_IE_IE60
#else #else
LWSTDAPI_(LPSTR) StrChrA(LPCSTR lpStart, WORD wMatch); LWSTDAPI_(PSTR) StrChrA(_In_ PCSTR pszStart, WORD wMatch);
LWSTDAPI_(LPWSTR) StrChrW(LPCWSTR lpStart, WCHAR wMatch); LWSTDAPI_(PWSTR) StrChrW(_In_ PCWSTR pszStart, WCHAR wMatch);
LWSTDAPI_(LPSTR) StrChrIA(LPCSTR lpStart, WORD wMatch); LWSTDAPI_(PSTR) StrChrIA(_In_ PCSTR pszStart, WORD wMatch);
LWSTDAPI_(LPWSTR) StrChrIW(LPCWSTR lpStart, WCHAR wMatch); LWSTDAPI_(PWSTR) StrChrIW(_In_ PCWSTR pszStart, WCHAR wMatch);
#if (_WIN32_IE >= _WIN32_IE_IE60) #if (_WIN32_IE >= _WIN32_IE_IE60)
LWSTDAPI_(LPWSTR) StrChrNW(LPCWSTR lpStart, WCHAR wMatch, UINT cchMax); LWSTDAPI_(PWSTR) StrChrNW(_In_ PCWSTR pszStart, WCHAR wMatch, UINT cchMax);
LWSTDAPI_(LPWSTR) StrChrNIW(LPCWSTR lpStart, WCHAR wMatch, UINT cchMax); LWSTDAPI_(PWSTR) StrChrNIW(_In_ PCWSTR pszStart, WCHAR wMatch, UINT cchMax);
#endif // _WIN32_IE_IE60 #endif // _WIN32_IE_IE60
#endif #endif
LWSTDAPI_(int) StrCmpNA(__in LPCSTR lpStr1, __in LPCSTR lpStr2, int nChar); LWSTDAPI_(int) StrCmpNA(_In_ PCSTR psz1, _In_ PCSTR psz2, int nChar);
LWSTDAPI_(int) StrCmpNW(__in LPCWSTR lpStr1, __in LPCWSTR lpStr2, int nChar LWSTDAPI_(int) StrCmpNW(_In_ PCWSTR psz1, _In_ PCWSTR psz2, int nChar);
); LWSTDAPI_(int) StrCmpNIA(_In_ PCSTR psz1, _In_ PCSTR psz2, int nChar);
LWSTDAPI_(int) StrCmpNIA(__in LPCSTR lpStr1, __in LPCSTR lpStr2, int nChar) LWSTDAPI_(int) StrCmpNIW(_In_ PCWSTR psz1, _In_ PCWSTR psz2, int nChar);
; LWSTDAPI_(int) StrCSpnA(_In_ PCSTR pszStr, _In_ PCSTR pszSet);
LWSTDAPI_(int) StrCmpNIW(__in LPCWSTR lpStr1, __in LPCWSTR lpStr2, int nCha LWSTDAPI_(int) StrCSpnW(_In_ PCWSTR pszStr, _In_ PCWSTR pszSet);
r); LWSTDAPI_(int) StrCSpnIA(_In_ PCSTR pszStr, _In_ PCSTR pszSet);
LWSTDAPI_(int) StrCSpnA(LPCSTR lpStr, LPCSTR lpSet); LWSTDAPI_(int) StrCSpnIW(_In_ PCWSTR pszStr, _In_ PCWSTR pszSet);
LWSTDAPI_(int) StrCSpnW(LPCWSTR lpStr, LPCWSTR lpSet); LWSTDAPI_(PSTR) StrDupA(_In_ PCSTR pszSrch);
LWSTDAPI_(int) StrCSpnIA(LPCSTR lpStr, LPCSTR lpSet); LWSTDAPI_(PWSTR) StrDupW(_In_ PCWSTR pszSrch);
LWSTDAPI_(int) StrCSpnIW(LPCWSTR lpStr, LPCWSTR lpSet);
LWSTDAPI_(LPSTR) StrDupA(LPCSTR lpSrch);
LWSTDAPI_(LPWSTR) StrDupW(LPCWSTR lpSrch);
#if (NTDDI_VERSION >= NTDDI_VISTASP1)
// StrFormatByteSizeEx takes a ULONGLONG as a byte count and formats a string // StrFormatByteSizeEx takes a ULONGLONG as a byte count and formats a string
// representing that number of bytes in an appropriately concise manner, where // representing that number of bytes in an appropriately concise manner, where
// "appropriate manner" is determine by several factors: // "appropriate manner" is determine by several factors:
// //
// 1) order - is this most appropriately expressed as KB? MB? GB? // 1) order - is this most appropriately expressed as KB? MB? GB?
// for example: 1039 -> "1.01 KB", 5454608466 -> "5.08 GB", etc // for example: 1039 -> "1.01 KB", 5454608466 -> "5.08 GB", etc
// //
// 2) number of whole number places shown - if there are more than a few whole // 2) number of whole number places shown - if there are more than a few whole
// number places to display, decimal places are omitted. // number places to display, decimal places are omitted.
// for example: 1024 -> "1.00 KB", 12288 -> "12.0 KB", 125952 -> "123 KB" // for example: 1024 -> "1.00 KB", 12288 -> "12.0 KB", 125952 -> "123 KB"
skipping to change at line 129 skipping to change at line 135
// for example: with rounding, 2147483647 -> "2.00 GB" // for example: with rounding, 2147483647 -> "2.00 GB"
// with truncation, 2147483647 -> "1.99 GB" // with truncation, 2147483647 -> "1.99 GB"
enum tagSFBS_FLAGS enum tagSFBS_FLAGS
{ {
SFBS_FLAGS_ROUND_TO_NEAREST_DISPLAYED_DIGIT = 0x0001, // round to the nearest displayed digit SFBS_FLAGS_ROUND_TO_NEAREST_DISPLAYED_DIGIT = 0x0001, // round to the nearest displayed digit
SFBS_FLAGS_TRUNCATE_UNDISPLAYED_DECIMAL_DIGITS = 0x0002, // discard undis played digits SFBS_FLAGS_TRUNCATE_UNDISPLAYED_DECIMAL_DIGITS = 0x0002, // discard undis played digits
}; };
typedef int SFBS_FLAGS; typedef int SFBS_FLAGS;
LWSTDAPI StrFormatByteSizeEx(__in ULONGLONG ull, __in SFBS_FLAGS flag LWSTDAPI StrFormatByteSizeEx(ULONGLONG ull, SFBS_FLAGS flags, _Out_wr
s, __out_ecount(cchBuf) LPWSTR pszBuf, __in_range(>,0) UINT cchBuf); ites_(cchBuf) PWSTR pszBuf, _In_range_(>,0) UINT cchBuf);
#endif // (NTDDI_VERSION >= NTDDI_VISTASP1)
LWSTDAPI_(LPSTR) StrFormatByteSizeA(DWORD dw, __out_ecount(cchBuf) LPSTR pszB LWSTDAPI_(PSTR) StrFormatByteSizeA(DWORD dw, _Out_writes_(cchBuf) PSTR pszBu
uf, UINT cchBuf); f, UINT cchBuf);
LWSTDAPI_(LPSTR) StrFormatByteSize64A(LONGLONG qdw, __out_ecount(cchBuf) LPST LWSTDAPI_(PSTR) StrFormatByteSize64A(LONGLONG qdw, _Out_writes_(cchBuf) PSTR
R pszBuf, UINT cchBuf); pszBuf, UINT cchBuf);
LWSTDAPI_(LPWSTR) StrFormatByteSizeW(LONGLONG qdw, __out_ecount(cchBuf) LPWSTR LWSTDAPI_(PWSTR) StrFormatByteSizeW(LONGLONG qdw, _Out_writes_(cchBuf) PWSTR
pszBuf, UINT cchBuf); pszBuf, UINT cchBuf);
LWSTDAPI_(LPWSTR) StrFormatKBSizeW(LONGLONG qdw, __out_ecount(cchBuf) LPWSTR p LWSTDAPI_(PWSTR) StrFormatKBSizeW(LONGLONG qdw, _Out_writes_(cchBuf) PWSTR ps
szBuf, UINT cchBuf); zBuf, UINT cchBuf);
LWSTDAPI_(LPSTR) StrFormatKBSizeA(LONGLONG qdw, __out_ecount(cchBuf) LPSTR ps LWSTDAPI_(PSTR) StrFormatKBSizeA(LONGLONG qdw, _Out_writes_(cchBuf) PSTR psz
zBuf, UINT cchBuf); Buf, UINT cchBuf);
LWSTDAPI_(int) StrFromTimeIntervalA(__out_ecount(cchMax) LPSTR pszOut, UINT LWSTDAPI_(int) StrFromTimeIntervalA(_Out_writes_(cchMax) PSTR pszOut, UINT
cchMax, DWORD dwTimeMS, int digits); cchMax, DWORD dwTimeMS, int digits);
LWSTDAPI_(int) StrFromTimeIntervalW(__out_ecount(cchMax) LPWSTR pwszOut, UI LWSTDAPI_(int) StrFromTimeIntervalW(_Out_writes_(cchMax) PWSTR pszOut, UINT
NT cchMax, DWORD dwTimeMS, int digits); cchMax, DWORD dwTimeMS, int digits);
LWSTDAPI_(BOOL) StrIsIntlEqualA(__in BOOL fCaseSens, __in LPCSTR lpString1, LWSTDAPI_(BOOL) StrIsIntlEqualA(BOOL fCaseSens, _In_ PCSTR pszString1, _In_
__in LPCSTR lpString2, __in int nChar); PCSTR pszString2, int nChar);
LWSTDAPI_(BOOL) StrIsIntlEqualW(__in BOOL fCaseSens, __in LPCWSTR lpString1, LWSTDAPI_(BOOL) StrIsIntlEqualW(BOOL fCaseSens, _In_ PCWSTR pszString1, _In_
__in LPCWSTR lpString2, __in int nChar); PCWSTR pszString2, int nChar);
LWSTDAPI_(LPSTR) StrNCatA(__inout_ecount(cchMax) LPSTR psz1, LPCSTR psz2, int LWSTDAPI_(PSTR) StrNCatA(_Inout_updates_(cchMax) PSTR psz1, PCSTR psz2, int
cchMax); cchMax);
LWSTDAPI_(LPWSTR) StrNCatW(__inout_ecount(cchMax) LPWSTR psz1, LPCWSTR psz2, i LWSTDAPI_(PWSTR) StrNCatW(_Inout_updates_(cchMax) PWSTR psz1, PCWSTR psz2, in
nt cchMax); t cchMax);
#ifdef USE_STRICT_CONST #ifdef USE_STRICT_CONST
LWSTDAPI_(LPCSTR) StrPBrkA(__in LPCSTR psz, __in LPCSTR pszSet); LWSTDAPI_(PCSTR) StrPBrkA(_In_ PCSTR psz, _In_ PCSTR pszSet);
LWSTDAPI_(LPCWSTR) StrPBrkW(__in LPCWSTR psz, __in LPCWSTR pszSet); LWSTDAPI_(PCWSTR) StrPBrkW(_In_ PCWSTR psz, _In_ PCWSTR pszSet);
LWSTDAPI_(LPCSTR) StrRChrA(__in LPCSTR lpStart, __in_opt LPCSTR lpEnd, __in W LWSTDAPI_(PCSTR) StrRChrA(_In_ PCSTR pszStart, _In_opt_ PCSTR pszEnd, WORD wM
ORD wMatch); atch);
LWSTDAPI_(LPCWSTR) StrRChrW(__in LPCWSTR lpStart, __in_opt LPCWSTR lpEnd, __in LWSTDAPI_(PCWSTR) StrRChrW(_In_ PCWSTR pszStart, _In_opt_ PCWSTR pszEnd, WCHAR
WCHAR wMatch); wMatch);
LWSTDAPI_(LPCSTR) StrRChrIA(__in LPCSTR lpStart, __in_opt LPCSTR lpEnd, __in LWSTDAPI_(PCSTR) StrRChrIA(_In_ PCSTR pszStart, _In_opt_ PCSTR pszEnd, WORD w
WORD wMatch); Match);
LWSTDAPI_(LPCWSTR) StrRChrIW(__in LPCWSTR lpStart, __in_opt LPCWSTR lpEnd, __i LWSTDAPI_(PCWSTR) StrRChrIW(_In_ PCWSTR pszStart, _In_opt_ PCWSTR pszEnd, WCHA
n WCHAR wMatch); R wMatch);
LWSTDAPI_(LPCSTR) StrRStrIA(__in LPCSTR lpSource, __in_opt LPCSTR lpLast, __i LWSTDAPI_(PCSTR) StrRStrIA(_In_ PCSTR pszSource, _In_opt_ PCSTR pszLast, _In_
n LPCSTR lpSrch); PCSTR pszSrch);
LWSTDAPI_(LPCWSTR) StrRStrIW(__in LPCWSTR lpSource, __in_opt LPCWSTR lpLast, _ LWSTDAPI_(PCWSTR) StrRStrIW(_In_ PCWSTR pszSource, _In_opt_ PCWSTR pszLast, _I
_in LPCWSTR lpSrch); n_ PCWSTR pszSrch);
#else #else
LWSTDAPI_(LPSTR) StrPBrkA(__in LPCSTR psz, __in LPCSTR pszSet); LWSTDAPI_(PSTR) StrPBrkA(_In_ PCSTR psz, _In_ PCSTR pszSet);
LWSTDAPI_(LPWSTR) StrPBrkW(__in LPCWSTR psz, __in LPCWSTR pszSet); LWSTDAPI_(PWSTR) StrPBrkW(_In_ PCWSTR psz, _In_ PCWSTR pszSet);
LWSTDAPI_(LPSTR) StrRChrA(__in LPCSTR lpStart, __in_opt LPCSTR lpEnd, __in WO LWSTDAPI_(PSTR) StrRChrA(_In_ PCSTR pszStart, _In_opt_ PCSTR pszEnd, WORD wM
RD wMatch); atch);
LWSTDAPI_(LPWSTR) StrRChrW(__in LPCWSTR lpStart, __in_opt LPCWSTR lpEnd, __in LWSTDAPI_(PWSTR) StrRChrW(_In_ PCWSTR pszStart, _In_opt_ PCWSTR pszEnd, WCHAR
WCHAR wMatch); wMatch);
LWSTDAPI_(LPSTR) StrRChrIA(__in LPCSTR lpStart, __in_opt LPCSTR lpEnd, __in W LWSTDAPI_(PSTR) StrRChrIA(_In_ PCSTR pszStart, _In_opt_ PCSTR pszEnd, WORD w
ORD wMatch); Match);
LWSTDAPI_(LPWSTR) StrRChrIW(__in LPCWSTR lpStart, __in_opt LPCWSTR lpEnd, __in LWSTDAPI_(PWSTR) StrRChrIW(_In_ PCWSTR pszStart, _In_opt_ PCWSTR pszEnd, WCHA
WCHAR wMatch); R wMatch);
LWSTDAPI_(LPSTR) StrRStrIA(__in LPCSTR lpSource, __in_opt LPCSTR lpLast, __in LWSTDAPI_(PSTR) StrRStrIA(_In_ PCSTR pszSource, _In_opt_ PCSTR pszLast, _In_
LPCSTR lpSrch); PCSTR pszSrch);
LWSTDAPI_(LPWSTR) StrRStrIW(__in LPCWSTR lpSource, __in_opt LPCWSTR lpLast, __ LWSTDAPI_(PWSTR) StrRStrIW(_In_ PCWSTR pszSource, _In_opt_ PCWSTR pszLast, _I
in LPCWSTR lpSrch); n_ PCWSTR pszSrch);
#endif #endif
LWSTDAPI_(int) StrSpnA(__in LPCSTR psz, __in LPCSTR pszSet); LWSTDAPI_(int) StrSpnA(_In_ PCSTR psz, _In_ PCSTR pszSet);
LWSTDAPI_(int) StrSpnW(__in LPCWSTR psz, __in LPCWSTR pszSet); LWSTDAPI_(int) StrSpnW(_In_ PCWSTR psz, _In_ PCWSTR pszSet);
#ifdef USE_STRICT_CONST #ifdef USE_STRICT_CONST
LWSTDAPI_(LPCSTR) StrStrA(__in LPCSTR lpFirst, __in LPCSTR lpSrch); LWSTDAPI_(PCSTR) StrStrA(_In_ PCSTR pszFirst, _In_ PCSTR pszSrch);
LWSTDAPI_(LPCWSTR) StrStrW(__in LPCWSTR lpFirst, __in LPCWSTR lpSrch); LWSTDAPI_(PCWSTR) StrStrW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch);
LWSTDAPI_(LPCSTR) StrStrIA(__in LPCSTR lpFirst, __in LPCSTR lpSrch); LWSTDAPI_(PCSTR) StrStrIA(_In_ PCSTR pszFirst, _In_ PCSTR pszSrch);
LWSTDAPI_(LPCWSTR) StrStrIW(__in LPCWSTR lpFirst, __in LPCWSTR lpSrch); LWSTDAPI_(PCWSTR) StrStrIW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch);
#if (_WIN32_IE >= _WIN32_IE_IE6) #if (_WIN32_IE >= _WIN32_IE_IE6)
LWSTDAPI_(LPCWSTR) StrStrNW(__in LPCWSTR lpFirst, __in LPCWSTR lpSrch, __in UI LWSTDAPI_(PCWSTR) StrStrNW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch, UINT cch
NT cchMax); Max);
LWSTDAPI_(LPCWSTR) StrStrNIW(__in LPCWSTR lpFirst, __in LPCWSTR lpSrch, __in U LWSTDAPI_(PCWSTR) StrStrNIW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch, UINT cc
INT cchMax); hMax);
#endif // _WIN32_IE_IE6 #endif // _WIN32_IE_IE6
#else #else
LWSTDAPI_(LPSTR) StrStrA(__in LPCSTR lpFirst, __in LPCSTR lpSrch); LWSTDAPI_(PSTR) StrStrA(_In_ PCSTR pszFirst, _In_ PCSTR pszSrch);
LWSTDAPI_(LPWSTR) StrStrW(__in LPCWSTR lpFirst, __in LPCWSTR lpSrch); LWSTDAPI_(PWSTR) StrStrW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch);
LWSTDAPI_(LPSTR) StrStrIA(__in LPCSTR lpFirst, __in LPCSTR lpSrch); LWSTDAPI_(PSTR) StrStrIA(_In_ PCSTR pszFirst, _In_ PCSTR pszSrch);
LWSTDAPI_(LPWSTR) StrStrIW(__in LPCWSTR lpFirst, __in LPCWSTR lpSrch); LWSTDAPI_(PWSTR) StrStrIW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch);
#if (_WIN32_IE >= _WIN32_IE_IE60) #if (_WIN32_IE >= _WIN32_IE_IE60)
LWSTDAPI_(LPWSTR) StrStrNW(__in LPCWSTR lpFirst, __in LPCWSTR lpSrch, __in UIN LWSTDAPI_(PWSTR) StrStrNW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch, UINT cch
T cchMax); Max);
LWSTDAPI_(LPWSTR) StrStrNIW(__in LPCWSTR lpFirst, __in LPCWSTR lpSrch, __in UI LWSTDAPI_(PWSTR) StrStrNIW(_In_ PCWSTR pszFirst, _In_ PCWSTR pszSrch, UINT cc
NT cchMax); hMax);
#endif // _WIN32_IE_IE60 #endif // _WIN32_IE_IE60
#endif #endif
#define STIF_DEFAULT 0x00000000L #define STIF_DEFAULT 0x00000000L
#define STIF_SUPPORT_HEX 0x00000001L #define STIF_SUPPORT_HEX 0x00000001L
typedef int STIF_FLAGS; typedef int STIF_FLAGS;
LWSTDAPI_(int) StrToIntA(__in LPCSTR lpSrc); LWSTDAPI_(int) StrToIntA(_In_ PCSTR pszSrc);
LWSTDAPI_(int) StrToIntW(__in LPCWSTR lpSrc); LWSTDAPI_(int) StrToIntW(_In_ PCWSTR pszSrc);
LWSTDAPI_(BOOL) StrToIntExA(__in LPCSTR pszString, __in STIF_FLAGS dwFlags, LWSTDAPI_(BOOL) StrToIntExA(_In_ PCSTR pszString, STIF_FLAGS dwFlags, _Out_
__out int * piRet); int * piRet);
LWSTDAPI_(BOOL) StrToIntExW(__in LPCWSTR pszString, __in STIF_FLAGS dwFlags, LWSTDAPI_(BOOL) StrToIntExW(_In_ PCWSTR pszString, STIF_FLAGS dwFlags, _Out_
__out int * piRet); int * piRet);
#if (_WIN32_IE >= _WIN32_IE_IE60) #if (_WIN32_IE >= _WIN32_IE_IE60)
LWSTDAPI_(BOOL) StrToInt64ExA(__in LPCSTR pszString, __in STIF_FLAGS dwFlags LWSTDAPI_(BOOL) StrToInt64ExA(_In_ PCSTR pszString, STIF_FLAGS dwFlags, _Out
, __out LONGLONG * pllRet); _ LONGLONG * pllRet);
LWSTDAPI_(BOOL) StrToInt64ExW(__in LPCWSTR pszString, __in STIF_FLAGS dwFlag LWSTDAPI_(BOOL) StrToInt64ExW(_In_ PCWSTR pszString, STIF_FLAGS dwFlags, _Ou
s, __out LONGLONG * pllRet); t_ LONGLONG * pllRet);
#endif // _WIN32_IE_IE60 #endif // _WIN32_IE_IE60
LWSTDAPI_(BOOL) StrTrimA(__inout LPSTR psz, __in LPCSTR pszTrimChars); LWSTDAPI_(BOOL) StrTrimA(_Inout_ PSTR psz, _In_ PCSTR pszTrimChars);
LWSTDAPI_(BOOL) StrTrimW(__inout LPWSTR psz, __in LPCWSTR pszTrimChars); LWSTDAPI_(BOOL) StrTrimW(_Inout_ PWSTR psz, _In_ PCWSTR pszTrimChars);
LWSTDAPI_(LPWSTR) StrCatW(__inout LPWSTR psz1, LPCWSTR psz2); LWSTDAPI_(PWSTR) StrCatW(_Inout_ PWSTR psz1, _In_ PCWSTR psz2);
LWSTDAPI_(int) StrCmpW(__in LPCWSTR psz1, __in LPCWSTR psz2); LWSTDAPI_(int) StrCmpW(_In_ PCWSTR psz1, _In_ PCWSTR psz2);
LWSTDAPI_(int) StrCmpIW(__in LPCWSTR psz1, __in LPCWSTR psz2); LWSTDAPI_(int) StrCmpIW(_In_ PCWSTR psz1, _In_ PCWSTR psz2);
LWSTDAPI_(LPWSTR) StrCpyW(__out LPWSTR psz1, LPCWSTR psz2); LWSTDAPI_(PWSTR) StrCpyW(_Out_ PWSTR psz1, _In_ PCWSTR psz2);
LWSTDAPI_(LPWSTR) StrCpyNW(__out_ecount(cchMax) LPWSTR psz1, __in LPCWSTR psz2 LWSTDAPI_(PWSTR) StrCpyNW(_Out_writes_(cchMax) PWSTR pszDst, _In_ PCWSTR pszS
, __in int cchMax); rc, int cchMax);
LWSTDAPI_(LPWSTR) StrCatBuffW(__inout_ecount(cchDestBuffSize) LPWSTR pszDest, LWSTDAPI_(PWSTR) StrCatBuffW(_Inout_updates_(cchDestBuffSize) PWSTR pszDest,
__in LPCWSTR pszSrc, __in int cchDestBuffSize); _In_ PCWSTR pszSrc, int cchDestBuffSize);
LWSTDAPI_(LPSTR) StrCatBuffA(__inout_ecount(cchDestBuffSize) LPSTR pszDest, _ LWSTDAPI_(PSTR) StrCatBuffA(_Inout_updates_(cchDestBuffSize) PSTR pszDest, _
_in LPCSTR pszSrc, __in int cchDestBuffSize); In_ PCSTR pszSrc, int cchDestBuffSize);
LWSTDAPI_(BOOL) ChrCmpIA(WORD w1, WORD w2); LWSTDAPI_(BOOL) ChrCmpIA(WORD w1, WORD w2);
LWSTDAPI_(BOOL) ChrCmpIW(WCHAR w1, WCHAR w2); LWSTDAPI_(BOOL) ChrCmpIW(WCHAR w1, WCHAR w2);
LWSTDAPI_(int) wvnsprintfA(__out_ecount(cchDest) LPSTR pszDest, __in int cc LWSTDAPI_(int) wvnsprintfA(_Out_writes_(cchDest) PSTR pszDest, _In_ int cch
hDest, __in __format_string LPCSTR pszFmt, __in va_list arglist); Dest, _In_ _Printf_format_string_ PCSTR pszFmt, _In_ va_list arglist);
LWSTDAPI_(int) wvnsprintfW(__out_ecount(cchDest) LPWSTR pszDest, __in int c LWSTDAPI_(int) wvnsprintfW(_Out_writes_(cchDest) PWSTR pszDest, _In_ int cc
chDest, __in __format_string LPCWSTR pszFmt, __in va_list arglist); hDest, _In_ _Printf_format_string_ PCWSTR pszFmt, _In_ va_list arglist);
LWSTDAPIV_(int) wnsprintfA(__out_ecount(cchDest) LPSTR pszDest, __in int cch LWSTDAPIV_(int) wnsprintfA(_Out_writes_(cchDest) PSTR pszDest, _In_ int cchD
Dest, __in __format_string LPCSTR pszFmt, ...); est, _In_ _Printf_format_string_ PCSTR pszFmt, ...);
LWSTDAPIV_(int) wnsprintfW(__out_ecount(cchDest) LPWSTR pszDest, __in int cc LWSTDAPIV_(int) wnsprintfW(_Out_writes_(cchDest) PWSTR pszDest, _In_ int cch
hDest, __in __format_string LPCWSTR pszFmt, ...); Dest, _In_ _Printf_format_string_ PCWSTR pszFmt, ...);
#define StrIntlEqNA( s1, s2, nChar) StrIsIntlEqualA( TRUE, s1, s2, nChar) #define StrIntlEqNA( s1, s2, nChar) StrIsIntlEqualA( TRUE, s1, s2, nChar)
#define StrIntlEqNW( s1, s2, nChar) StrIsIntlEqualW( 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 StrIntlEqNIA(s1, s2, nChar) StrIsIntlEqualA(FALSE, s1, s2, nChar)
#define StrIntlEqNIW(s1, s2, nChar) StrIsIntlEqualW(FALSE, s1, s2, nChar) #define StrIntlEqNIW(s1, s2, nChar) StrIsIntlEqualW(FALSE, s1, s2, nChar)
LWSTDAPI StrRetToStrA(__inout STRRET *pstr, __in_opt PCUITEMID_CHILD pidl, __der LWSTDAPI StrRetToStrA(_Inout_ STRRET *pstr, _In_opt_ PCUITEMID_CHILD pidl, _Outp
ef_out LPSTR *ppsz); tr_ LPSTR *ppsz);
LWSTDAPI StrRetToStrW(__inout STRRET *pstr, __in_opt PCUITEMID_CHILD pidl, __der LWSTDAPI StrRetToStrW(_Inout_ STRRET *pstr, _In_opt_ PCUITEMID_CHILD pidl, _Outp
ef_out LPWSTR *ppsz); tr_ LPWSTR *ppsz);
#ifdef UNICODE #ifdef UNICODE
#define StrRetToStr StrRetToStrW #define StrRetToStr StrRetToStrW
#else #else
#define StrRetToStr StrRetToStrA #define StrRetToStr StrRetToStrA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI StrRetToBufA(__inout STRRET *pstr, __in_opt PCUITEMID_CHILD pidl, __out LWSTDAPI StrRetToBufA(_Inout_ STRRET *pstr, _In_opt_ PCUITEMID_CHILD pidl, _Out_
_ecount(cchBuf) LPSTR pszBuf, UINT cchBuf); writes_(cchBuf) LPSTR pszBuf, UINT cchBuf);
LWSTDAPI StrRetToBufW(__inout STRRET *pstr, __in_opt PCUITEMID_CHILD pidl, __out LWSTDAPI StrRetToBufW(_Inout_ STRRET *pstr, _In_opt_ PCUITEMID_CHILD pidl, _Out_
_ecount(cchBuf) LPWSTR pszBuf, UINT cchBuf); writes_(cchBuf) LPWSTR pszBuf, UINT cchBuf);
#ifdef UNICODE #ifdef UNICODE
#define StrRetToBuf StrRetToBufW #define StrRetToBuf StrRetToBufW
#else #else
#define StrRetToBuf StrRetToBufA #define StrRetToBuf StrRetToBufA
#endif // !UNICODE #endif // !UNICODE
// helper to duplicate a string using the task allocator // helper to duplicate a string using the task allocator
LWSTDAPI SHStrDupA(__in LPCSTR psz, __deref_out LPWSTR *ppwsz); LWSTDAPI SHStrDupA(_In_ LPCSTR psz, _Outptr_result_nullonfailure_ LPWSTR *ppwsz)
LWSTDAPI SHStrDupW(__in LPCWSTR psz, __deref_out LPWSTR *ppwsz); ;
LWSTDAPI SHStrDupW(_In_ LPCWSTR psz, _Outptr_result_nullonfailure_ LPWSTR *ppwsz
);
#ifdef UNICODE #ifdef UNICODE
#define SHStrDup SHStrDupW #define SHStrDup SHStrDupW
#else #else
#define SHStrDup SHStrDupA #define SHStrDup SHStrDupA
#endif // !UNICODE #endif // !UNICODE
#ifdef __cplusplus #ifdef __cplusplus
#pragma warning(push)
#pragma warning(disable:6387)
// make the above helper function a bit easier to use in the HRESULT world // make the above helper function a bit easier to use in the HRESULT world
inline HRESULT SHLocalStrDupW(LPCWSTR psz, __out LPWSTR *ppsz) inline HRESULT SHLocalStrDupW(_In_ PCWSTR psz, _Outptr_result_maybenull_ PWSTR * ppsz)
{ {
*ppsz = StrDupW(psz); *ppsz = StrDupW(psz);
return *ppsz ? S_OK : E_OUTOFMEMORY; return *ppsz ? S_OK : E_OUTOFMEMORY;
} }
inline HRESULT SHLocalStrDupA(LPCSTR psz, __out LPSTR *ppsz)
inline HRESULT SHLocalStrDupA(_In_ PCSTR psz, _Outptr_result_maybenull_ PSTR *pp
sz)
{ {
*ppsz = StrDupA(psz); *ppsz = StrDupA(psz);
return *ppsz ? S_OK : E_OUTOFMEMORY; return *ppsz ? S_OK : E_OUTOFMEMORY;
} }
#pragma warning(pop) // C6387
#ifdef UNICODE #ifdef UNICODE
#define SHLocalStrDup SHLocalStrDupW #define SHLocalStrDup SHLocalStrDupW
#else #else
#define SHLocalStrDup SHLocalStrDupA #define SHLocalStrDup SHLocalStrDupA
#endif #endif
#endif // __cplusplus #endif // __cplusplus
#if (_WIN32_IE >= _WIN32_IE_IE55) LWSTDAPI_(int) StrCmpLogicalW(_In_ PCWSTR psz1, _In_ PCWSTR psz2);
LWSTDAPI_(int) StrCmpLogicalW(__in LPCWSTR psz1, __in LPCWSTR psz2); LWSTDAPI_(DWORD) StrCatChainW(_Out_writes_(cchDst) PWSTR pszDst, DWORD cchDst, D
LWSTDAPI_(DWORD) StrCatChainW(__out_ecount(cchDst) LPWSTR pszDst, __in DWORD cch WORD ichAt, _In_ PCWSTR pszSrc);
Dst, __in DWORD ichAt, __in LPCWSTR pszSrc); LWSTDAPI StrRetToBSTR(_Inout_ STRRET *pstr, _In_opt_ PCUITEMID_CHILD pidl, _Outp
LWSTDAPI StrRetToBSTR(__inout STRRET *pstr, __in_opt PCUITEMID_CHILD pidl, __der tr_ BSTR *pbstr);
ef_out BSTR *pbstr); LWSTDAPI SHLoadIndirectString(_In_ PCWSTR pszSource, _Out_writes_(cchOutBuf) PWS
LWSTDAPI SHLoadIndirectString(__in LPCWSTR pszSource, __out_ecount(cchOutBuf) LP TR pszOutBuf, _In_ UINT cchOutBuf, _Reserved_ void **ppvReserved);
WSTR pszOutBuf, __in UINT cchOutBuf, __reserved void **ppvReserved);
#endif // _WIN32_IE_IE55
#if (_WIN32_IE >= _WIN32_IE_IE60SP2) #if (_WIN32_IE >= _WIN32_IE_IE60SP2)
LWSTDAPI_(BOOL) IsCharSpaceA(__in CHAR wch); LWSTDAPI_(BOOL) IsCharSpaceA(CHAR wch);
LWSTDAPI_(BOOL) IsCharSpaceW(__in WCHAR wch); LWSTDAPI_(BOOL) IsCharSpaceW(WCHAR wch);
#ifdef UNICODE #ifdef UNICODE
#define IsCharSpace IsCharSpaceW #define IsCharSpace IsCharSpaceW
#else #else
#define IsCharSpace IsCharSpaceA #define IsCharSpace IsCharSpaceA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(int) StrCmpCA(__in LPCSTR pszStr1, __in LPCSTR pszStr2); LWSTDAPI_(int) StrCmpCA(_In_ LPCSTR pszStr1, _In_ LPCSTR pszStr2);
LWSTDAPI_(int) StrCmpCW(__in LPCWSTR pszStr1, __in LPCWSTR pszStr2); LWSTDAPI_(int) StrCmpCW(_In_ LPCWSTR pszStr1, _In_ LPCWSTR pszStr2);
#ifdef UNICODE #ifdef UNICODE
#define StrCmpC StrCmpCW #define StrCmpC StrCmpCW
#else #else
#define StrCmpC StrCmpCA #define StrCmpC StrCmpCA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(int) StrCmpICA(__in LPCSTR pszStr1, __in LPCSTR pszStr2); LWSTDAPI_(int) StrCmpICA(_In_ LPCSTR pszStr1, _In_ LPCSTR pszStr2);
LWSTDAPI_(int) StrCmpICW(__in LPCWSTR pszStr1, __in LPCWSTR pszStr2); LWSTDAPI_(int) StrCmpICW(_In_ LPCWSTR pszStr1, _In_ LPCWSTR pszStr2);
#ifdef UNICODE #ifdef UNICODE
#define StrCmpIC StrCmpICW #define StrCmpIC StrCmpICW
#else #else
#define StrCmpIC StrCmpICA #define StrCmpIC StrCmpICA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_IE_IE60SP2 #endif // _WIN32_IE_IE60SP2
#ifdef UNICODE #ifdef UNICODE
#define StrChr StrChrW #define StrChr StrChrW
#define StrRChr StrRChrW #define StrRChr StrRChrW
skipping to change at line 365 skipping to change at line 377
#define StrFormatKBSize StrFormatKBSizeA #define StrFormatKBSize StrFormatKBSizeA
#define StrNCat StrNCatA #define StrNCat StrNCatA
#define StrTrim StrTrimA #define StrTrim StrTrimA
#define StrCatBuff StrCatBuffA #define StrCatBuff StrCatBuffA
#define ChrCmpI ChrCmpIA #define ChrCmpI ChrCmpIA
#define wvnsprintf wvnsprintfA #define wvnsprintf wvnsprintfA
#define wnsprintf wnsprintfA #define wnsprintf wnsprintfA
#define StrIsIntlEqual StrIsIntlEqualA #define StrIsIntlEqual StrIsIntlEqualA
#endif #endif
#if (_WIN32_IE >= _WIN32_IE_IE50)
// StrCmp*C* - Compare strings using C runtime collation rules. // StrCmp*C* - Compare strings using C runtime collation rules.
LWSTDAPI_(int) StrCmpNCA(__in LPCSTR lpStr1, __in LPCSTR lpStr2, __in int nChar ); LWSTDAPI_(int) StrCmpNCA(_In_ LPCSTR pszStr1, _In_ LPCSTR pszStr2, int nChar);
// StrCmp*C* - Compare strings using C runtime collation rules. // StrCmp*C* - Compare strings using C runtime collation rules.
LWSTDAPI_(int) StrCmpNCW(__in LPCWSTR lpStr1, __in LPCWSTR lpStr2, __in int nCh ar); LWSTDAPI_(int) StrCmpNCW(_In_ LPCWSTR pszStr1, _In_ LPCWSTR pszStr2, int nChar) ;
#ifdef UNICODE #ifdef UNICODE
#define StrCmpNC StrCmpNCW #define StrCmpNC StrCmpNCW
#else #else
#define StrCmpNC StrCmpNCA #define StrCmpNC StrCmpNCA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(int) StrCmpNICA(__in LPCSTR lpStr1, __in LPCSTR lpStr2, __in int nCha LWSTDAPI_(int) StrCmpNICA(_In_ LPCSTR pszStr1, _In_ LPCSTR pszStr2, int nChar);
r); LWSTDAPI_(int) StrCmpNICW(_In_ LPCWSTR pszStr1, _In_ LPCWSTR pszStr2, int nChar
LWSTDAPI_(int) StrCmpNICW(__in LPCWSTR lpStr1, __in LPCWSTR lpStr2, __in int nC );
har);
#ifdef UNICODE #ifdef UNICODE
#define StrCmpNIC StrCmpNICW #define StrCmpNIC StrCmpNICW
#else #else
#define StrCmpNIC StrCmpNICA #define StrCmpNIC StrCmpNICA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_IE_IE50
// Backward compatible to NT's non-standard naming (strictly // Backward compatible to NT's non-standard naming (strictly
// for comctl32) // for comctl32)
// //
LWSTDAPI_(BOOL) IntlStrEqWorkerA(BOOL fCaseSens, __in_ecount(nChar) LPCSTR l LWSTDAPI_(BOOL) IntlStrEqWorkerA(BOOL fCaseSens, _In_reads_(nChar) LPCSTR lp
pString1, __in_ecount(nChar) LPCSTR lpString2, int nChar); String1, _In_reads_(nChar) LPCSTR lpString2, int nChar);
LWSTDAPI_(BOOL) IntlStrEqWorkerW(BOOL fCaseSens, __in_ecount(nChar) LPCWSTR LWSTDAPI_(BOOL) IntlStrEqWorkerW(BOOL fCaseSens, _In_reads_(nChar) LPCWSTR l
lpString1, __in_ecount(nChar) LPCWSTR lpString2, int nChar); pString1, _In_reads_(nChar) LPCWSTR lpString2, int nChar);
#define IntlStrEqNA( s1, s2, nChar) IntlStrEqWorkerA( TRUE, s1, s2, nChar) #define IntlStrEqNA( s1, s2, nChar) IntlStrEqWorkerA( TRUE, s1, s2, nChar)
#define IntlStrEqNW( s1, s2, nChar) IntlStrEqWorkerW( 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 IntlStrEqNIA(s1, s2, nChar) IntlStrEqWorkerA(FALSE, s1, s2, nChar)
#define IntlStrEqNIW(s1, s2, nChar) IntlStrEqWorkerW(FALSE, s1, s2, nChar) #define IntlStrEqNIW(s1, s2, nChar) IntlStrEqWorkerW(FALSE, s1, s2, nChar)
#ifdef UNICODE #ifdef UNICODE
#define IntlStrEqN IntlStrEqNW #define IntlStrEqN IntlStrEqNW
#define IntlStrEqNI IntlStrEqNIW #define IntlStrEqNI IntlStrEqNIW
#else #else
skipping to change at line 455 skipping to change at line 465
#endif #endif
#endif // NO_SHLWAPI_STRFCNS #endif // NO_SHLWAPI_STRFCNS
#ifndef NO_SHLWAPI_PATH #ifndef NO_SHLWAPI_PATH
// //
//=============== Path Routines =================================== //=============== Path Routines ===================================
// //
LWSTDAPI_(LPSTR) PathAddBackslashA(__inout_ecount(MAX_PATH) LPSTR pszPath); LWSTDAPI_(LPSTR) PathAddBackslashA(_Inout_updates_(MAX_PATH) LPSTR pszPath);
LWSTDAPI_(LPWSTR) PathAddBackslashW(__inout_ecount(MAX_PATH) LPWSTR pszPath); LWSTDAPI_(LPWSTR) PathAddBackslashW(_Inout_updates_(MAX_PATH) LPWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathAddBackslash PathAddBackslashW #define PathAddBackslash PathAddBackslashW
#else #else
#define PathAddBackslash PathAddBackslashA #define PathAddBackslash PathAddBackslashA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathAddExtensionA(__inout_ecount(MAX_PATH) LPSTR pszPath, __ LWSTDAPI_(BOOL) PathAddExtensionA(_Inout_updates_(MAX_PATH) LPSTR pszPath, _
in_opt LPCSTR pszExt); In_opt_ LPCSTR pszExt);
LWSTDAPI_(BOOL) PathAddExtensionW(__inout_ecount(MAX_PATH) LPWSTR pszPath, _ LWSTDAPI_(BOOL) PathAddExtensionW(_Inout_updates_(MAX_PATH) LPWSTR pszPath,
_in_opt LPCWSTR pszExt); _In_opt_ LPCWSTR pszExt);
#ifdef UNICODE #ifdef UNICODE
#define PathAddExtension PathAddExtensionW #define PathAddExtension PathAddExtensionW
#else #else
#define PathAddExtension PathAddExtensionA #define PathAddExtension PathAddExtensionA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathAppendA(__inout_ecount(MAX_PATH) LPSTR pszPath, __in LPC LWSTDAPI_(BOOL) PathAppendA(_Inout_updates_(MAX_PATH) LPSTR pszPath, _In_ LP
STR pMore); CSTR pszMore);
LWSTDAPI_(BOOL) PathAppendW(__inout_ecount(MAX_PATH) LPWSTR pszPath, __in LP LWSTDAPI_(BOOL) PathAppendW(_Inout_updates_(MAX_PATH) LPWSTR pszPath, _In_ L
CWSTR pMore); PCWSTR pszMore);
LWSTDAPI_(LPSTR) PathBuildRootA(__out_ecount(4) LPSTR pszRoot, int iDrive); LWSTDAPI_(LPSTR) PathBuildRootA(_Out_writes_(4) LPSTR pszRoot, int iDrive);
LWSTDAPI_(LPWSTR) PathBuildRootW(__out_ecount(4) LPWSTR pszRoot, int iDrive); LWSTDAPI_(LPWSTR) PathBuildRootW(_Out_writes_(4) LPWSTR pszRoot, int iDrive);
#ifdef UNICODE #ifdef UNICODE
#define PathBuildRoot PathBuildRootW #define PathBuildRoot PathBuildRootW
#else #else
#define PathBuildRoot PathBuildRootA #define PathBuildRoot PathBuildRootA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathCanonicalizeA(__out_ecount(MAX_PATH) LPSTR pszBuf, __in LWSTDAPI_(BOOL) PathCanonicalizeA(_Out_writes_(MAX_PATH) LPSTR pszBuf, _In_
LPCSTR pszPath); LPCSTR pszPath);
LWSTDAPI_(BOOL) PathCanonicalizeW(__out_ecount(MAX_PATH) LPWSTR pszBuf, __in LWSTDAPI_(BOOL) PathCanonicalizeW(_Out_writes_(MAX_PATH) LPWSTR pszBuf, _In_
LPCWSTR pszPath); LPCWSTR pszPath);
LWSTDAPI_(LPSTR) PathCombineA(__out_ecount(MAX_PATH) LPSTR pszDest, __in_opt LP LWSTDAPI_(LPSTR) PathCombineA(_Out_writes_(MAX_PATH) LPSTR pszDest, _In_opt_ LP
CSTR pszDir, __in_opt LPCSTR pszFile); CSTR pszDir, _In_opt_ LPCSTR pszFile);
LWSTDAPI_(LPWSTR) PathCombineW(__out_ecount(MAX_PATH) LPWSTR pszDest, __in_opt LWSTDAPI_(LPWSTR) PathCombineW(_Out_writes_(MAX_PATH) LPWSTR pszDest, _In_opt_
LPCWSTR pszDir, __in_opt LPCWSTR pszFile); LPCWSTR pszDir, _In_opt_ LPCWSTR pszFile);
#ifdef UNICODE #ifdef UNICODE
#define PathCombine PathCombineW #define PathCombine PathCombineW
#else #else
#define PathCombine PathCombineA #define PathCombine PathCombineA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathCompactPathA(__in_opt HDC hDC, __inout_ecount(MAX_PATH) LWSTDAPI_(BOOL) PathCompactPathA(_In_opt_ HDC hDC, _Inout_updates_(MAX_PATH)
LPSTR pszPath, __in UINT dx); LPSTR pszPath, _In_ UINT dx);
LWSTDAPI_(BOOL) PathCompactPathW(__in_opt HDC hDC, __inout_ecount(MAX_PATH) LWSTDAPI_(BOOL) PathCompactPathW(_In_opt_ HDC hDC, _Inout_updates_(MAX_PATH)
LPWSTR pszPath, __in UINT dx); LPWSTR pszPath, _In_ UINT dx);
LWSTDAPI_(BOOL) PathCompactPathExA(__out_ecount(cchMax) LPSTR pszOut, __in L LWSTDAPI_(BOOL) PathCompactPathExA(_Out_writes_(cchMax) LPSTR pszOut, _In_ L
PCSTR pszSrc, __in UINT cchMax, __in DWORD dwFlags); PCSTR pszSrc, _In_ UINT cchMax, _In_ DWORD dwFlags);
LWSTDAPI_(BOOL) PathCompactPathExW(__out_ecount(cchMax) LPWSTR pszOut, __in LWSTDAPI_(BOOL) PathCompactPathExW(_Out_writes_(cchMax) LPWSTR pszOut, _In_
LPCWSTR pszSrc, __in UINT cchMax, __in DWORD dwFlags); LPCWSTR pszSrc, _In_ UINT cchMax, _In_ DWORD dwFlags);
LWSTDAPI_(int) PathCommonPrefixA(__in LPCSTR pszFile1, __in LPCSTR pszFile2 LWSTDAPI_(int) PathCommonPrefixA(_In_ LPCSTR pszFile1, _In_ LPCSTR pszFile2
, __out_ecount_opt(MAX_PATH) LPSTR achPath); , _Out_writes_opt_(MAX_PATH) LPSTR achPath);
LWSTDAPI_(int) PathCommonPrefixW(__in LPCWSTR pszFile1, __in LPCWSTR pszFil LWSTDAPI_(int) PathCommonPrefixW(_In_ LPCWSTR pszFile1, _In_ LPCWSTR pszFil
e2, __out_ecount_opt(MAX_PATH) LPWSTR achPath); e2, _Out_writes_opt_(MAX_PATH) LPWSTR achPath);
LWSTDAPI_(BOOL) PathFileExistsA(__in LPCSTR pszPath); LWSTDAPI_(BOOL) PathFileExistsA(_In_ LPCSTR pszPath);
LWSTDAPI_(BOOL) PathFileExistsW(__in LPCWSTR pszPath); LWSTDAPI_(BOOL) PathFileExistsW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathFileExists PathFileExistsW #define PathFileExists PathFileExistsW
#else #else
#define PathFileExists PathFileExistsA #define PathFileExists PathFileExistsA
#endif // !UNICODE #endif // !UNICODE
#ifdef USE_STRICT_CONST #ifdef USE_STRICT_CONST
LWSTDAPI_(LPCSTR) PathFindExtensionA(__in LPCSTR pszPath); LWSTDAPI_(LPCSTR) PathFindExtensionA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPCWSTR) PathFindExtensionW(__in LPCWSTR pszPath); LWSTDAPI_(LPCWSTR) PathFindExtensionW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathFindExtension PathFindExtensionW #define PathFindExtension PathFindExtensionW
#else #else
#define PathFindExtension PathFindExtensionA #define PathFindExtension PathFindExtensionA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(LPCSTR) PathFindFileNameA(__in LPCSTR pszPath); LWSTDAPI_(LPCSTR) PathFindFileNameA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPCWSTR) PathFindFileNameW(__in LPCWSTR pszPath); LWSTDAPI_(LPCWSTR) PathFindFileNameW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathFindFileName PathFindFileNameW #define PathFindFileName PathFindFileNameW
#else #else
#define PathFindFileName PathFindFileNameA #define PathFindFileName PathFindFileNameA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(LPCSTR) PathFindNextComponentA(__in LPCSTR pszPath); LWSTDAPI_(LPCSTR) PathFindNextComponentA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPCWSTR) PathFindNextComponentW(__in LPCWSTR pszPath); LWSTDAPI_(LPCWSTR) PathFindNextComponentW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathFindNextComponent PathFindNextComponentW #define PathFindNextComponent PathFindNextComponentW
#else #else
#define PathFindNextComponent PathFindNextComponentA #define PathFindNextComponent PathFindNextComponentA
#endif // !UNICODE #endif // !UNICODE
#else #else
LWSTDAPI_(LPSTR) PathFindExtensionA(__in LPCSTR pszPath); LWSTDAPI_(LPSTR) PathFindExtensionA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPWSTR) PathFindExtensionW(__in LPCWSTR pszPath); LWSTDAPI_(LPWSTR) PathFindExtensionW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathFindExtension PathFindExtensionW #define PathFindExtension PathFindExtensionW
#else #else
#define PathFindExtension PathFindExtensionA #define PathFindExtension PathFindExtensionA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(LPSTR) PathFindFileNameA(__in LPCSTR pszPath); LWSTDAPI_(LPSTR) PathFindFileNameA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPWSTR) PathFindFileNameW(__in LPCWSTR pszPath); LWSTDAPI_(LPWSTR) PathFindFileNameW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathFindFileName PathFindFileNameW #define PathFindFileName PathFindFileNameW
#else #else
#define PathFindFileName PathFindFileNameA #define PathFindFileName PathFindFileNameA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(LPSTR) PathFindNextComponentA(__in LPCSTR pszPath); LWSTDAPI_(LPSTR) PathFindNextComponentA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPWSTR) PathFindNextComponentW(__in LPCWSTR pszPath); LWSTDAPI_(LPWSTR) PathFindNextComponentW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathFindNextComponent PathFindNextComponentW #define PathFindNextComponent PathFindNextComponentW
#else #else
#define PathFindNextComponent PathFindNextComponentA #define PathFindNextComponent PathFindNextComponentA
#endif // !UNICODE #endif // !UNICODE
#endif #endif
LWSTDAPI_(BOOL) PathFindOnPathA(__inout_ecount(MAX_PATH) LPSTR pszPath, __in LWSTDAPI_(BOOL) PathFindOnPathA(_Inout_updates_(MAX_PATH) LPSTR pszPath, _In
_opt PZPCSTR ppszOtherDirs); _opt_ PZPCSTR ppszOtherDirs);
LWSTDAPI_(BOOL) PathFindOnPathW(__inout_ecount(MAX_PATH) LPWSTR pszPath, __i LWSTDAPI_(BOOL) PathFindOnPathW(_Inout_updates_(MAX_PATH) LPWSTR pszPath, _I
n_opt PZPCWSTR ppszOtherDirs); n_opt_ PZPCWSTR ppszOtherDirs);
LWSTDAPI_(LPCSTR) PathFindSuffixArrayA(__in LPCSTR pszPath, __in_ecount(iArraySi LWSTDAPI_(LPCSTR) PathFindSuffixArrayA(_In_ LPCSTR pszPath, _In_reads_(iArraySiz
ze) const LPCSTR *apszSuffix, __in int iArraySize); e) const LPCSTR *apszSuffix, _In_ int iArraySize);
LWSTDAPI_(LPCWSTR) PathFindSuffixArrayW(__in LPCWSTR pszPath, __in_ecount(iArray LWSTDAPI_(LPCWSTR) PathFindSuffixArrayW(_In_ LPCWSTR pszPath, _In_reads_(iArrayS
Size) const LPCWSTR *apszSuffix, __in int iArraySize); ize) const LPCWSTR *apszSuffix, _In_ int iArraySize);
#ifdef UNICODE #ifdef UNICODE
#define PathFindSuffixArray PathFindSuffixArrayW #define PathFindSuffixArray PathFindSuffixArrayW
#else #else
#define PathFindSuffixArray PathFindSuffixArrayA #define PathFindSuffixArray PathFindSuffixArrayA
#endif // !UNICODE #endif // !UNICODE
#ifdef USE_STRICT_CONST #ifdef USE_STRICT_CONST
LWSTDAPI_(LPCSTR) PathGetArgsA(__in LPCSTR pszPath); LWSTDAPI_(LPCSTR) PathGetArgsA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPCWSTR) PathGetArgsW(__in LPCWSTR pszPath); LWSTDAPI_(LPCWSTR) PathGetArgsW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathGetArgs PathGetArgsW #define PathGetArgs PathGetArgsW
#else #else
#define PathGetArgs PathGetArgsA #define PathGetArgs PathGetArgsA
#endif // !UNICODE #endif // !UNICODE
#else #else
LWSTDAPI_(LPSTR) PathGetArgsA(__in LPCSTR pszPath); LWSTDAPI_(LPSTR) PathGetArgsA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPWSTR) PathGetArgsW(__in LPCWSTR pszPath); LWSTDAPI_(LPWSTR) PathGetArgsW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathGetArgs PathGetArgsW #define PathGetArgs PathGetArgsW
#else #else
#define PathGetArgs PathGetArgsA #define PathGetArgs PathGetArgsA
#endif // !UNICODE #endif // !UNICODE
#endif #endif
LWSTDAPI_(BOOL) PathIsLFNFileSpecA(__in LPCSTR lpName); LWSTDAPI_(BOOL) PathIsLFNFileSpecA(_In_ LPCSTR pszName);
LWSTDAPI_(BOOL) PathIsLFNFileSpecW(__in LPCWSTR lpName); LWSTDAPI_(BOOL) PathIsLFNFileSpecW(_In_ LPCWSTR pszName);
#ifdef UNICODE #ifdef UNICODE
#define PathIsLFNFileSpec PathIsLFNFileSpecW #define PathIsLFNFileSpec PathIsLFNFileSpecW
#else #else
#define PathIsLFNFileSpec PathIsLFNFileSpecA #define PathIsLFNFileSpec PathIsLFNFileSpecA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(UINT) PathGetCharTypeA(__in UCHAR ch); LWSTDAPI_(UINT) PathGetCharTypeA(_In_ UCHAR ch);
LWSTDAPI_(UINT) PathGetCharTypeW(__in WCHAR ch); LWSTDAPI_(UINT) PathGetCharTypeW(_In_ WCHAR ch);
// Return flags for PathGetCharType // Return flags for PathGetCharType
#define GCT_INVALID 0x0000 #define GCT_INVALID 0x0000
#define GCT_LFNCHAR 0x0001 #define GCT_LFNCHAR 0x0001
#define GCT_SHORTCHAR 0x0002 #define GCT_SHORTCHAR 0x0002
#define GCT_WILD 0x0004 #define GCT_WILD 0x0004
#define GCT_SEPARATOR 0x0008 #define GCT_SEPARATOR 0x0008
LWSTDAPI_(int) PathGetDriveNumberA(__in LPCSTR pszPath); LWSTDAPI_(int) PathGetDriveNumberA(_In_ LPCSTR pszPath);
LWSTDAPI_(int) PathGetDriveNumberW(__in LPCWSTR pszPath); LWSTDAPI_(int) PathGetDriveNumberW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathGetDriveNumber PathGetDriveNumberW #define PathGetDriveNumber PathGetDriveNumberW
#else #else
#define PathGetDriveNumber PathGetDriveNumberA #define PathGetDriveNumber PathGetDriveNumberA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathIsDirectoryA(__in LPCSTR pszPath); LWSTDAPI_(BOOL) PathIsDirectoryA(_In_ LPCSTR pszPath);
LWSTDAPI_(BOOL) PathIsDirectoryW(__in LPCWSTR pszPath); LWSTDAPI_(BOOL) PathIsDirectoryW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathIsDirectory PathIsDirectoryW #define PathIsDirectory PathIsDirectoryW
#else #else
#define PathIsDirectory PathIsDirectoryA #define PathIsDirectory PathIsDirectoryA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathIsDirectoryEmptyA(__in LPCSTR pszPath); LWSTDAPI_(BOOL) PathIsDirectoryEmptyA(_In_ LPCSTR pszPath);
LWSTDAPI_(BOOL) PathIsDirectoryEmptyW(__in LPCWSTR pszPath); LWSTDAPI_(BOOL) PathIsDirectoryEmptyW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathIsDirectoryEmpty PathIsDirectoryEmptyW #define PathIsDirectoryEmpty PathIsDirectoryEmptyW
#else #else
#define PathIsDirectoryEmpty PathIsDirectoryEmptyA #define PathIsDirectoryEmpty PathIsDirectoryEmptyA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathIsFileSpecA(__in LPCSTR pszPath); LWSTDAPI_(BOOL) PathIsFileSpecA(_In_ LPCSTR pszPath);
LWSTDAPI_(BOOL) PathIsFileSpecW(__in LPCWSTR pszPath); LWSTDAPI_(BOOL) PathIsFileSpecW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathIsFileSpec PathIsFileSpecW #define PathIsFileSpec PathIsFileSpecW
#else #else
#define PathIsFileSpec PathIsFileSpecA #define PathIsFileSpec PathIsFileSpecA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathIsPrefixA(__in LPCSTR pszPrefix, __in LPCSTR pszPath); LWSTDAPI_(BOOL) PathIsPrefixA(_In_ LPCSTR pszPrefix, _In_ LPCSTR pszPath);
LWSTDAPI_(BOOL) PathIsPrefixW(__in LPCWSTR pszPrefix, __in LPCWSTR pszPath); LWSTDAPI_(BOOL) PathIsPrefixW(_In_ LPCWSTR pszPrefix, _In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathIsPrefix PathIsPrefixW #define PathIsPrefix PathIsPrefixW
#else #else
#define PathIsPrefix PathIsPrefixA #define PathIsPrefix PathIsPrefixA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathIsRelativeA(__in LPCSTR pszPath); LWSTDAPI_(BOOL) PathIsRelativeA(_In_ LPCSTR pszPath);
LWSTDAPI_(BOOL) PathIsRelativeW(__in LPCWSTR pszPath); LWSTDAPI_(BOOL) PathIsRelativeW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathIsRelative PathIsRelativeW #define PathIsRelative PathIsRelativeW
#else #else
#define PathIsRelative PathIsRelativeA #define PathIsRelative PathIsRelativeA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathIsRootA(__in LPCSTR pszPath); LWSTDAPI_(BOOL) PathIsRootA(_In_ LPCSTR pszPath);
LWSTDAPI_(BOOL) PathIsRootW(__in LPCWSTR pszPath); LWSTDAPI_(BOOL) PathIsRootW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathIsRoot PathIsRootW #define PathIsRoot PathIsRootW
#else #else
#define PathIsRoot PathIsRootA #define PathIsRoot PathIsRootA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathIsSameRootA(__in LPCSTR pszPath1, __in LPCSTR pszPath2); LWSTDAPI_(BOOL) PathIsSameRootA(_In_ LPCSTR pszPath1, _In_ LPCSTR pszPath2);
LWSTDAPI_(BOOL) PathIsSameRootW(__in LPCWSTR pszPath1, __in LPCWSTR pszPath2 LWSTDAPI_(BOOL) PathIsSameRootW(_In_ LPCWSTR pszPath1, _In_ LPCWSTR pszPath2
); );
#ifdef UNICODE #ifdef UNICODE
#define PathIsSameRoot PathIsSameRootW #define PathIsSameRoot PathIsSameRootW
#else #else
#define PathIsSameRoot PathIsSameRootA #define PathIsSameRoot PathIsSameRootA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathIsUNCA(__in LPCSTR pszPath); LWSTDAPI_(BOOL) PathIsUNCA(_In_ LPCSTR pszPath);
LWSTDAPI_(BOOL) PathIsUNCW(__in LPCWSTR pszPath); LWSTDAPI_(BOOL) PathIsUNCW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathIsUNC PathIsUNCW #define PathIsUNC PathIsUNCW
#else #else
#define PathIsUNC PathIsUNCA #define PathIsUNC PathIsUNCA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathIsNetworkPathA(__in LPCSTR pszPath); LWSTDAPI_(BOOL) PathIsNetworkPathA(_In_ LPCSTR pszPath);
LWSTDAPI_(BOOL) PathIsNetworkPathW(__in LPCWSTR pszPath); LWSTDAPI_(BOOL) PathIsNetworkPathW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathIsNetworkPath PathIsNetworkPathW #define PathIsNetworkPath PathIsNetworkPathW
#else #else
#define PathIsNetworkPath PathIsNetworkPathA #define PathIsNetworkPath PathIsNetworkPathA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathIsUNCServerA(__in LPCSTR pszPath); LWSTDAPI_(BOOL) PathIsUNCServerA(_In_ LPCSTR pszPath);
LWSTDAPI_(BOOL) PathIsUNCServerW(__in LPCWSTR pszPath); LWSTDAPI_(BOOL) PathIsUNCServerW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathIsUNCServer PathIsUNCServerW #define PathIsUNCServer PathIsUNCServerW
#else #else
#define PathIsUNCServer PathIsUNCServerA #define PathIsUNCServer PathIsUNCServerA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathIsUNCServerShareA(__in LPCSTR pszPath); LWSTDAPI_(BOOL) PathIsUNCServerShareA(_In_ LPCSTR pszPath);
LWSTDAPI_(BOOL) PathIsUNCServerShareW(__in LPCWSTR pszPath); LWSTDAPI_(BOOL) PathIsUNCServerShareW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathIsUNCServerShare PathIsUNCServerShareW #define PathIsUNCServerShare PathIsUNCServerShareW
#else #else
#define PathIsUNCServerShare PathIsUNCServerShareA #define PathIsUNCServerShare PathIsUNCServerShareA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathIsContentTypeA(__in LPCSTR pszPath, __in LPCSTR pszConte LWSTDAPI_(BOOL) PathIsContentTypeA(_In_ LPCSTR pszPath, _In_ LPCSTR pszConte
ntType); ntType);
LWSTDAPI_(BOOL) PathIsContentTypeW(__in LPCWSTR pszPath, __in LPCWSTR pszCon LWSTDAPI_(BOOL) PathIsContentTypeW(_In_ LPCWSTR pszPath, _In_ LPCWSTR pszCon
tentType); tentType);
LWSTDAPI_(BOOL) PathIsURLA(__in LPCSTR pszPath); LWSTDAPI_(BOOL) PathIsURLA(_In_ LPCSTR pszPath);
LWSTDAPI_(BOOL) PathIsURLW(__in LPCWSTR pszPath); LWSTDAPI_(BOOL) PathIsURLW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathIsURL PathIsURLW #define PathIsURL PathIsURLW
#else #else
#define PathIsURL PathIsURLA #define PathIsURL PathIsURLA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathMakePrettyA(__inout LPSTR pszPath); LWSTDAPI_(BOOL) PathMakePrettyA(_Inout_ LPSTR pszPath);
LWSTDAPI_(BOOL) PathMakePrettyW(__inout LPWSTR pszPath); LWSTDAPI_(BOOL) PathMakePrettyW(_Inout_ LPWSTR pszPath);
LWSTDAPI_(BOOL) PathMatchSpecA(__in LPCSTR pszFile, __in LPCSTR pszSpec); LWSTDAPI_(BOOL) PathMatchSpecA(_In_ LPCSTR pszFile, _In_ LPCSTR pszSpec);
LWSTDAPI_(BOOL) PathMatchSpecW(__in LPCWSTR pszFile, __in LPCWSTR pszSpec); LWSTDAPI_(BOOL) PathMatchSpecW(_In_ LPCWSTR pszFile, _In_ LPCWSTR pszSpec);
#if (_WIN32_IE >= _WIN32_IE_IE70) #if (_WIN32_IE >= _WIN32_IE_IE70)
// Flags for PathMatchSpecEx // Flags for PathMatchSpecEx
#define PMSF_NORMAL 0x00000000 #define PMSF_NORMAL 0x00000000
#define PMSF_MULTIPLE 0x00000001 #define PMSF_MULTIPLE 0x00000001
#define PMSF_DONT_STRIP_SPACES 0x00010000 // modifies either of the above #define PMSF_DONT_STRIP_SPACES 0x00010000 // modifies either of the above
LWSTDAPI PathMatchSpecExA(__in LPCSTR pszFile, __in LPCSTR pszSpec, __in DWORD d LWSTDAPI PathMatchSpecExA(_In_ LPCSTR pszFile, _In_ LPCSTR pszSpec, _In_ DWORD d
wFlags); wFlags);
LWSTDAPI PathMatchSpecExW(__in LPCWSTR pszFile, __in LPCWSTR pszSpec, __in DWORD LWSTDAPI PathMatchSpecExW(_In_ LPCWSTR pszFile, _In_ LPCWSTR pszSpec, _In_ DWORD
dwFlags); dwFlags);
#endif // _WIN32_IE_IE70 #endif // _WIN32_IE_IE70
LWSTDAPI_(int) PathParseIconLocationA(__inout LPSTR pszIconFile); LWSTDAPI_(int) PathParseIconLocationA(_Inout_ LPSTR pszIconFile);
LWSTDAPI_(int) PathParseIconLocationW(__inout LPWSTR pszIconFile); LWSTDAPI_(int) PathParseIconLocationW(_Inout_ LPWSTR pszIconFile);
LWSTDAPI_(BOOL) PathQuoteSpacesA(__inout_ecount(MAX_PATH) LPSTR lpsz); LWSTDAPI_(BOOL) PathQuoteSpacesA(_Inout_updates_(MAX_PATH) LPSTR lpsz);
LWSTDAPI_(BOOL) PathQuoteSpacesW(__inout_ecount(MAX_PATH) LPWSTR lpsz); LWSTDAPI_(BOOL) PathQuoteSpacesW(_Inout_updates_(MAX_PATH) LPWSTR lpsz);
LWSTDAPI_(BOOL) PathRelativePathToA(__out_ecount(MAX_PATH) LPSTR pszPath, __ LWSTDAPI_(BOOL) PathRelativePathToA(_Out_writes_(MAX_PATH) LPSTR pszPath, _I
in LPCSTR pszFrom, __in DWORD dwAttrFrom, __in LPCSTR pszTo, __in DWORD dwAttrTo n_ LPCSTR pszFrom, _In_ DWORD dwAttrFrom, _In_ LPCSTR pszTo, _In_ DWORD dwAttrTo
); );
LWSTDAPI_(BOOL) PathRelativePathToW(__out_ecount(MAX_PATH) LPWSTR pszPath, _ LWSTDAPI_(BOOL) PathRelativePathToW(_Out_writes_(MAX_PATH) LPWSTR pszPath, _
_in LPCWSTR pszFrom, __in DWORD dwAttrFrom, __in LPCWSTR pszTo, __in DWORD dwAtt In_ LPCWSTR pszFrom, _In_ DWORD dwAttrFrom, _In_ LPCWSTR pszTo, _In_ DWORD dwAtt
rTo); rTo);
LWSTDAPI_(void) PathRemoveArgsA(__inout LPSTR pszPath); LWSTDAPI_(void) PathRemoveArgsA(_Inout_ LPSTR pszPath);
LWSTDAPI_(void) PathRemoveArgsW(__inout LPWSTR pszPath); LWSTDAPI_(void) PathRemoveArgsW(_Inout_ LPWSTR pszPath);
LWSTDAPI_(LPSTR) PathRemoveBackslashA(__inout LPSTR pszPath); LWSTDAPI_(LPSTR) PathRemoveBackslashA(_Inout_ LPSTR pszPath);
LWSTDAPI_(LPWSTR) PathRemoveBackslashW(__inout LPWSTR pszPath); LWSTDAPI_(LPWSTR) PathRemoveBackslashW(_Inout_ LPWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathRemoveBackslash PathRemoveBackslashW #define PathRemoveBackslash PathRemoveBackslashW
#else #else
#define PathRemoveBackslash PathRemoveBackslashA #define PathRemoveBackslash PathRemoveBackslashA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(void) PathRemoveBlanksA(__inout LPSTR pszPath); LWSTDAPI_(void) PathRemoveBlanksA(_Inout_ LPSTR pszPath);
LWSTDAPI_(void) PathRemoveBlanksW(__inout LPWSTR pszPath); LWSTDAPI_(void) PathRemoveBlanksW(_Inout_ LPWSTR pszPath);
LWSTDAPI_(void) PathRemoveExtensionA(__inout LPSTR pszPath); LWSTDAPI_(void) PathRemoveExtensionA(_Inout_ LPSTR pszPath);
LWSTDAPI_(void) PathRemoveExtensionW(__inout LPWSTR pszPath); LWSTDAPI_(void) PathRemoveExtensionW(_Inout_ LPWSTR pszPath);
LWSTDAPI_(BOOL) PathRemoveFileSpecA(__inout LPSTR pszPath); LWSTDAPI_(BOOL) PathRemoveFileSpecA(_Inout_ LPSTR pszPath);
LWSTDAPI_(BOOL) PathRemoveFileSpecW(__inout LPWSTR pszPath); LWSTDAPI_(BOOL) PathRemoveFileSpecW(_Inout_ LPWSTR pszPath);
LWSTDAPI_(BOOL) PathRenameExtensionA(__inout_ecount(MAX_PATH) LPSTR pszPath, LWSTDAPI_(BOOL) PathRenameExtensionA(_Inout_updates_(MAX_PATH) LPSTR pszPath
__in LPCSTR pszExt); , _In_ LPCSTR pszExt);
LWSTDAPI_(BOOL) PathRenameExtensionW(__inout_ecount(MAX_PATH) LPWSTR pszPath LWSTDAPI_(BOOL) PathRenameExtensionW(_Inout_updates_(MAX_PATH) LPWSTR pszPat
, __in LPCWSTR pszExt); h, _In_ LPCWSTR pszExt);
LWSTDAPI_(BOOL) PathSearchAndQualifyA(__in LPCSTR pszPath, __out_ecount(cchB LWSTDAPI_(BOOL) PathSearchAndQualifyA(_In_ LPCSTR pszPath, _Out_writes_(cchB
uf) LPSTR pszBuf, UINT __in cchBuf); uf) LPSTR pszBuf, _In_ UINT cchBuf);
LWSTDAPI_(BOOL) PathSearchAndQualifyW(__in LPCWSTR pszPath, __out_ecount(cch LWSTDAPI_(BOOL) PathSearchAndQualifyW(_In_ LPCWSTR pszPath, _Out_writes_(cch
Buf) LPWSTR pszBuf, __in UINT cchBuf); Buf) LPWSTR pszBuf, _In_ UINT cchBuf);
LWSTDAPI_(void) PathSetDlgItemPathA(__in HWND hDlg, int id, LPCSTR pszPath); LWSTDAPI_(void) PathSetDlgItemPathA(_In_ HWND hDlg, int id, LPCSTR pszPath);
LWSTDAPI_(void) PathSetDlgItemPathW(__in HWND hDlg, int id, LPCWSTR pszPath) LWSTDAPI_(void) PathSetDlgItemPathW(_In_ HWND hDlg, int id, LPCWSTR pszPath)
; ;
#ifdef USE_STRICT_CONST #ifdef USE_STRICT_CONST
LWSTDAPI_(LPCSTR) PathSkipRootA(__in LPCSTR pszPath); LWSTDAPI_(LPCSTR) PathSkipRootA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPCWSTR) PathSkipRootW(__in LPCWSTR pszPath); LWSTDAPI_(LPCWSTR) PathSkipRootW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathSkipRoot PathSkipRootW #define PathSkipRoot PathSkipRootW
#else #else
#define PathSkipRoot PathSkipRootA #define PathSkipRoot PathSkipRootA
#endif // !UNICODE #endif // !UNICODE
#else #else
LWSTDAPI_(LPSTR) PathSkipRootA(__in LPCSTR pszPath); LWSTDAPI_(LPSTR) PathSkipRootA(_In_ LPCSTR pszPath);
LWSTDAPI_(LPWSTR) PathSkipRootW(__in LPCWSTR pszPath); LWSTDAPI_(LPWSTR) PathSkipRootW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathSkipRoot PathSkipRootW #define PathSkipRoot PathSkipRootW
#else #else
#define PathSkipRoot PathSkipRootA #define PathSkipRoot PathSkipRootA
#endif // !UNICODE #endif // !UNICODE
#endif #endif
LWSTDAPI_(void) PathStripPathA(__inout LPSTR pszPath); LWSTDAPI_(void) PathStripPathA(_Inout_ LPSTR pszPath);
LWSTDAPI_(void) PathStripPathW(__inout LPWSTR pszPath); LWSTDAPI_(void) PathStripPathW(_Inout_ LPWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathStripPath PathStripPathW #define PathStripPath PathStripPathW
#else #else
#define PathStripPath PathStripPathA #define PathStripPath PathStripPathA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathStripToRootA(__inout LPSTR pszPath); LWSTDAPI_(BOOL) PathStripToRootA(_Inout_ LPSTR pszPath);
LWSTDAPI_(BOOL) PathStripToRootW(__inout LPWSTR pszPath); LWSTDAPI_(BOOL) PathStripToRootW(_Inout_ LPWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathStripToRoot PathStripToRootW #define PathStripToRoot PathStripToRootW
#else #else
#define PathStripToRoot PathStripToRootA #define PathStripToRoot PathStripToRootA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathUnquoteSpacesA(__inout LPSTR lpsz); LWSTDAPI_(BOOL) PathUnquoteSpacesA(_Inout_ LPSTR lpsz);
LWSTDAPI_(BOOL) PathUnquoteSpacesW(__inout LPWSTR lpsz); LWSTDAPI_(BOOL) PathUnquoteSpacesW(_Inout_ LPWSTR lpsz);
LWSTDAPI_(BOOL) PathMakeSystemFolderA(__in LPCSTR pszPath); LWSTDAPI_(BOOL) PathMakeSystemFolderA(_In_ LPCSTR pszPath);
LWSTDAPI_(BOOL) PathMakeSystemFolderW(__in LPCWSTR pszPath); LWSTDAPI_(BOOL) PathMakeSystemFolderW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathMakeSystemFolder PathMakeSystemFolderW #define PathMakeSystemFolder PathMakeSystemFolderW
#else #else
#define PathMakeSystemFolder PathMakeSystemFolderA #define PathMakeSystemFolder PathMakeSystemFolderA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathUnmakeSystemFolderA(__in LPCSTR pszPath); LWSTDAPI_(BOOL) PathUnmakeSystemFolderA(_In_ LPCSTR pszPath);
LWSTDAPI_(BOOL) PathUnmakeSystemFolderW(__in LPCWSTR pszPath); LWSTDAPI_(BOOL) PathUnmakeSystemFolderW(_In_ LPCWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathUnmakeSystemFolder PathUnmakeSystemFolderW #define PathUnmakeSystemFolder PathUnmakeSystemFolderW
#else #else
#define PathUnmakeSystemFolder PathUnmakeSystemFolderA #define PathUnmakeSystemFolder PathUnmakeSystemFolderA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathIsSystemFolderA(__in_opt LPCSTR pszPath, __in DWORD dwAt LWSTDAPI_(BOOL) PathIsSystemFolderA(_In_opt_ LPCSTR pszPath, _In_ DWORD dwAt
trb); trb);
LWSTDAPI_(BOOL) PathIsSystemFolderW(__in_opt LPCWSTR pszPath, __in DWORD dwA LWSTDAPI_(BOOL) PathIsSystemFolderW(_In_opt_ LPCWSTR pszPath, _In_ DWORD dwA
ttrb); ttrb);
#ifdef UNICODE #ifdef UNICODE
#define PathIsSystemFolder PathIsSystemFolderW #define PathIsSystemFolder PathIsSystemFolderW
#else #else
#define PathIsSystemFolder PathIsSystemFolderA #define PathIsSystemFolder PathIsSystemFolderA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(void) PathUndecorateA(__inout LPSTR pszPath); LWSTDAPI_(void) PathUndecorateA(_Inout_ LPSTR pszPath);
LWSTDAPI_(void) PathUndecorateW(__inout LPWSTR pszPath); LWSTDAPI_(void) PathUndecorateW(_Inout_ LPWSTR pszPath);
#ifdef UNICODE #ifdef UNICODE
#define PathUndecorate PathUndecorateW #define PathUndecorate PathUndecorateW
#else #else
#define PathUndecorate PathUndecorateA #define PathUndecorate PathUndecorateA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(BOOL) PathUnExpandEnvStringsA(__in LPCSTR pszPath, __out_ecount(cc LWSTDAPI_(BOOL) PathUnExpandEnvStringsA(_In_ LPCSTR pszPath, _Out_writes_(cc
hBuf) LPSTR pszBuf, __in UINT cchBuf); hBuf) LPSTR pszBuf, _In_ UINT cchBuf);
LWSTDAPI_(BOOL) PathUnExpandEnvStringsW(__in LPCWSTR pszPath, __out_ecount(c LWSTDAPI_(BOOL) PathUnExpandEnvStringsW(_In_ LPCWSTR pszPath, _Out_writes_(c
chBuf) LPWSTR pszBuf, __in UINT cchBuf); chBuf) LPWSTR pszBuf, _In_ UINT cchBuf);
#ifdef UNICODE #ifdef UNICODE
#define PathUnExpandEnvStrings PathUnExpandEnvStringsW #define PathUnExpandEnvStrings PathUnExpandEnvStringsW
#else #else
#define PathUnExpandEnvStrings PathUnExpandEnvStringsA #define PathUnExpandEnvStrings PathUnExpandEnvStringsA
#endif // !UNICODE #endif // !UNICODE
#ifdef UNICODE #ifdef UNICODE
#define PathAppend PathAppendW #define PathAppend PathAppendW
#define PathCanonicalize PathCanonicalizeW #define PathCanonicalize PathCanonicalizeW
#define PathCompactPath PathCompactPathW #define PathCompactPath PathCompactPathW
skipping to change at line 932 skipping to change at line 942
#define URL_CONVERT_IF_DOSPATH 0x00200000 #define URL_CONVERT_IF_DOSPATH 0x00200000
#define URL_UNESCAPE_HIGH_ANSI_ONLY 0x00400000 #define URL_UNESCAPE_HIGH_ANSI_ONLY 0x00400000
#define URL_INTERNAL_PATH 0x00800000 // Will escape #'s in paths #define URL_INTERNAL_PATH 0x00800000 // Will escape #'s in paths
#define URL_FILE_USE_PATHURL 0x00010000 #define URL_FILE_USE_PATHURL 0x00010000
#if (_WIN32_IE >= _WIN32_IE_IE60SP2) #if (_WIN32_IE >= _WIN32_IE_IE60SP2)
#define URL_DONT_UNESCAPE 0x00020000 // Do not unescape the path/ url at all #define URL_DONT_UNESCAPE 0x00020000 // Do not unescape the path/ url at all
#endif // _WIN32_IE_IE60SP2 #endif // _WIN32_IE_IE60SP2
#if (NTDDI_VERSION >= NTDDI_WIN7) #if (NTDDI_VERSION >= NTDDI_WIN7)
#define URL_ESCAPE_AS_UTF8 0x00040000 // Percent-encode all non-AS CII characters as their UTF-8 equivalents. #define URL_ESCAPE_AS_UTF8 0x00040000 // Percent-encode all non-AS CII characters as their UTF-8 equivalents.
#endif // (NTDDI_VERSION >= NTDDI_WIN7) #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_ES
CAPE_AS_UTF8)
#define URL_UNESCAPE_URI_COMPONENT URL_UNESCAPE_AS_UTF8
#endif // (NTDDI_VERSION >= NTDDI_WIN8)
#define URL_ESCAPE_PERCENT 0x00001000 #define URL_ESCAPE_PERCENT 0x00001000
#define URL_ESCAPE_SEGMENT_ONLY 0x00002000 // Treat the entire URL para m as one URL segment. #define URL_ESCAPE_SEGMENT_ONLY 0x00002000 // Treat the entire URL para m as one URL segment.
#define URL_PARTFLAG_KEEPSCHEME 0x00000001 #define URL_PARTFLAG_KEEPSCHEME 0x00000001
#define URL_APPLY_DEFAULT 0x00000001 #define URL_APPLY_DEFAULT 0x00000001
#define URL_APPLY_GUESSSCHEME 0x00000002 #define URL_APPLY_GUESSSCHEME 0x00000002
#define URL_APPLY_GUESSFILE 0x00000004 #define URL_APPLY_GUESSFILE 0x00000004
#define URL_APPLY_FORCEAPPLY 0x00000008 #define URL_APPLY_FORCEAPPLY 0x00000008
LWSTDAPI_(int) UrlCompareA(__in LPCSTR psz1, __in LPCSTR psz2, __in BOO LWSTDAPI_(int) UrlCompareA(_In_ PCSTR psz1, _In_ PCSTR psz2, BOOL fIgno
L fIgnoreSlash); reSlash);
LWSTDAPI_(int) UrlCompareW(__in LPCWSTR psz1, __in LPCWSTR psz2, __in LWSTDAPI_(int) UrlCompareW(_In_ PCWSTR psz1, _In_ PCWSTR psz2, BOOL fIg
BOOL fIgnoreSlash); noreSlash);
LWSTDAPI UrlCombineA(LPCSTR pszBase, LPCSTR pszRelative, __out_ec LWSTDAPI UrlCombineA(_In_ PCSTR pszBase, _In_ PCSTR pszRelative,
ount_opt(*pcchCombined) LPSTR pszCombined, __inout LPDWORD pcchCombined, DWORD d _Out_writes_to_opt_(*pcchCombined, *pcchCombined) PSTR pszCombined, _Inout_ DWOR
wFlags); D *pcchCombined, DWORD dwFlags);
LWSTDAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative, __out_ LWSTDAPI UrlCombineW(_In_ PCWSTR pszBase, _In_ PCWSTR pszRelative
ecount_opt(*pcchCombined) LPWSTR pszCombined, __inout LPDWORD pcchCombined, DWOR , _Out_writes_to_opt_(*pcchCombined, *pcchCombined) PWSTR pszCombined, _Inout_ D
D dwFlags); WORD *pcchCombined, DWORD dwFlags);
LWSTDAPI UrlCanonicalizeA(__in LPCSTR pszUrl, __out_ecount(*pcchC LWSTDAPI UrlCanonicalizeA(_In_ PCSTR pszUrl, _Out_writes_to_(*pcc
anonicalized) LPSTR pszCanonicalized, __inout LPDWORD pcchCanonicalized, __in DW hCanonicalized, *pcchCanonicalized) PSTR pszCanonicalized, _Inout_ DWORD *pcchCa
ORD dwFlags); nonicalized, DWORD dwFlags);
LWSTDAPI UrlCanonicalizeW(__in LPCWSTR pszUrl, __out_ecount(*pcch LWSTDAPI UrlCanonicalizeW(_In_ PCWSTR pszUrl, _Out_writes_to_(*pc
Canonicalized) LPWSTR pszCanonicalized, __inout LPDWORD pcchCanonicalized, __in chCanonicalized, *pcchCanonicalized) PWSTR pszCanonicalized, _Inout_ DWORD *pcch
DWORD dwFlags); Canonicalized, DWORD dwFlags);
LWSTDAPI_(BOOL) UrlIsOpaqueA(LPCSTR pszURL); LWSTDAPI_(BOOL) UrlIsOpaqueA(_In_ PCSTR pszURL);
LWSTDAPI_(BOOL) UrlIsOpaqueW(LPCWSTR pszURL); LWSTDAPI_(BOOL) UrlIsOpaqueW(_In_ PCWSTR pszURL);
LWSTDAPI_(BOOL) UrlIsNoHistoryA(LPCSTR pszURL); LWSTDAPI_(BOOL) UrlIsNoHistoryA(_In_ PCSTR pszURL);
LWSTDAPI_(BOOL) UrlIsNoHistoryW(LPCWSTR pszURL); LWSTDAPI_(BOOL) UrlIsNoHistoryW(_In_ PCWSTR pszURL);
#define UrlIsFileUrlA(pszURL) UrlIsA(pszURL, URLIS_FILEURL) #define UrlIsFileUrlA(pszURL) UrlIsA(pszURL, URLIS_FILEURL)
#define UrlIsFileUrlW(pszURL) UrlIsW(pszURL, URLIS_FILEURL) #define UrlIsFileUrlW(pszURL) UrlIsW(pszURL, URLIS_FILEURL)
LWSTDAPI_(BOOL) UrlIsA(LPCSTR pszUrl, __in URLIS UrlIs); LWSTDAPI_(BOOL) UrlIsA(_In_ PCSTR pszUrl, URLIS UrlIs);
LWSTDAPI_(BOOL) UrlIsW(LPCWSTR pszUrl, __in URLIS UrlIs); LWSTDAPI_(BOOL) UrlIsW(_In_ PCWSTR pszUrl, URLIS UrlIs);
LWSTDAPI_(LPCSTR) UrlGetLocationA(LPCSTR psz1); LWSTDAPI_(LPCSTR) UrlGetLocationA(_In_ PCSTR pszURL);
LWSTDAPI_(LPCWSTR) UrlGetLocationW(LPCWSTR psz1); LWSTDAPI_(LPCWSTR) UrlGetLocationW(_In_ PCWSTR pszURL);
LWSTDAPI UrlUnescapeA(__inout LPSTR pszUrl, __out_ecount_opt(*pcc LWSTDAPI UrlUnescapeA(_Inout_ PSTR pszUrl, _Out_writes_to_opt_(*p
hUnescaped) LPSTR pszUnescaped, __inout_opt LPDWORD pcchUnescaped, DWORD dwFlags cchUnescaped, *pcchUnescaped) PSTR pszUnescaped, _Inout_opt_ DWORD *pcchUnescape
); d, DWORD dwFlags);
LWSTDAPI UrlUnescapeW(__inout LPWSTR pszUrl, __out_ecount_opt(*pc LWSTDAPI UrlUnescapeW(_Inout_ PWSTR pszUrl, _Out_writes_to_opt_(*
chUnescaped) LPWSTR pszUnescaped, __inout_opt LPDWORD pcchUnescaped, DWORD dwFla pcchUnescaped, *pcchUnescaped) PWSTR pszUnescaped, _Inout_opt_ DWORD *pcchUnesca
gs); ped, DWORD dwFlags);
LWSTDAPI UrlEscapeA(__in LPCSTR pszUrl, __out_ecount(*pcchEscaped LWSTDAPI UrlEscapeA(_In_ PCSTR pszUrl, _Out_writes_to_(*pcchEscap
) LPSTR pszEscaped, __inout LPDWORD pcchEscaped, __in DWORD dwFlags); ed, *pcchEscaped) PSTR pszEscaped, _Inout_ DWORD *pcchEscaped, DWORD dwFlags);
LWSTDAPI UrlEscapeW(__in LPCWSTR pszUrl, __out_ecount(*pcchEscape LWSTDAPI UrlEscapeW(_In_ PCWSTR pszUrl, _Out_writes_to_(*pcchEsca
d) LPWSTR pszEscaped, __inout LPDWORD pcchEscaped, __in DWORD dwFlags); ped, *pcchEscaped) PWSTR pszEscaped, _Inout_ DWORD *pcchEscaped, DWORD dwFlags);
LWSTDAPI UrlCreateFromPathA(LPCSTR pszPath, __out_ecount(*pcchUrl LWSTDAPI UrlCreateFromPathA(_In_ PCSTR pszPath, _Out_writes_to_(*
) LPSTR pszUrl, __inout LPDWORD pcchUrl, DWORD dwFlags); pcchUrl, *pcchUrl) PSTR pszUrl, _Inout_ DWORD *pcchUrl, DWORD dwFlags);
LWSTDAPI UrlCreateFromPathW(LPCWSTR pszPath, __out_ecount(*pcchUr LWSTDAPI UrlCreateFromPathW(_In_ PCWSTR pszPath, _Out_writes_to_(
l) LPWSTR pszUrl, __inout LPDWORD pcchUrl, DWORD dwFlags); *pcchUrl, *pcchUrl) PWSTR pszUrl, _Inout_ DWORD *pcchUrl, DWORD dwFlags);
LWSTDAPI PathCreateFromUrlA(LPCSTR pszUrl, __out_ecount(*pcchPath LWSTDAPI PathCreateFromUrlA(_In_ PCSTR pszUrl, _Out_writes_to_(*p
) LPSTR pszPath, __inout LPDWORD pcchPath, DWORD dwFlags); cchPath, *pcchPath) PSTR pszPath, _Inout_ DWORD *pcchPath, DWORD dwFlags);
LWSTDAPI PathCreateFromUrlW(LPCWSTR pszUrl, __out_ecount(*pcchPat LWSTDAPI PathCreateFromUrlW(_In_ PCWSTR pszUrl, _Out_writes_to_(*
h) LPWSTR pszPath, __inout LPDWORD pcchPath, DWORD dwFlags); pcchPath, *pcchPath) PWSTR pszPath, _Inout_ DWORD *pcchPath, DWORD dwFlags);
#if (_WIN32_IE >= _WIN32_IE_IE70) #if (_WIN32_IE >= _WIN32_IE_IE70)
LWSTDAPI PathCreateFromUrlAlloc(LPCWSTR pszIn, __out LPWSTR *ppsz Out, DWORD dwFlags); LWSTDAPI PathCreateFromUrlAlloc(_In_ PCWSTR pszIn, _Outptr_ PWSTR *ppszOut, DWORD dwFlags);
#endif // _WIN32_IE_IE70 #endif // _WIN32_IE_IE70
LWSTDAPI UrlHashA(LPCSTR pszUrl, __out_ecount(cbHash) LPBYTE pbHa LWSTDAPI UrlHashA(_In_ PCSTR pszUrl, _Out_writes_bytes_(cbHash) B
sh, DWORD cbHash); YTE *pbHash, DWORD cbHash);
LWSTDAPI UrlHashW(LPCWSTR pszUrl, __out_ecount(cbHash) LPBYTE pbH LWSTDAPI UrlHashW(_In_ PCWSTR pszUrl, _Out_writes_bytes_(cbHash)
ash, DWORD cbHash); BYTE *pbHash, DWORD cbHash);
LWSTDAPI UrlGetPartW(__in LPCWSTR pszIn, __out_ecount(*pcchOut) L LWSTDAPI UrlGetPartW(_In_ PCWSTR pszIn, _Out_writes_(*pcchOut) PW
PWSTR pszOut, __inout LPDWORD pcchOut, __in DWORD dwPart, __in DWORD dwFlags); STR pszOut, _Inout_ DWORD *pcchOut, DWORD dwPart, DWORD dwFlags);
LWSTDAPI UrlGetPartA(__in LPCSTR pszIn, __out_ecount(*pcchOut) LP LWSTDAPI UrlGetPartA(_In_ PCSTR pszIn, _Out_writes_(*pcchOut) PST
STR pszOut, __inout LPDWORD pcchOut, __in DWORD dwPart, __in DWORD dwFlags); R pszOut, _Inout_ DWORD *pcchOut, DWORD dwPart, DWORD dwFlags);
LWSTDAPI UrlApplySchemeA(LPCSTR pszIn, __out_ecount(*pcchOut) LPS LWSTDAPI UrlApplySchemeA(_In_ PCSTR pszIn, _Out_writes_(*pcchOut)
TR pszOut, __inout LPDWORD pcchOut, DWORD dwFlags); PSTR pszOut, _Inout_ DWORD *pcchOut, DWORD dwFlags);
LWSTDAPI UrlApplySchemeW(LPCWSTR pszIn, __out_ecount(*pcchOut) LP LWSTDAPI UrlApplySchemeW(_In_ PCWSTR pszIn, _Out_writes_(*pcchOut
WSTR pszOut, __inout LPDWORD pcchOut, DWORD dwFlags); ) PWSTR pszOut, _Inout_ DWORD *pcchOut, DWORD dwFlags);
LWSTDAPI HashData(__in_ecount(cbData) LPBYTE pbData, DWORD cbData LWSTDAPI HashData(_In_reads_bytes_(cbData) BYTE *pbData, DWORD cb
, __out_ecount(cbHash) LPBYTE pbHash, DWORD cbHash); Data, _Out_writes_bytes_(cbHash) BYTE *pbHash, DWORD cbHash);
LWSTDAPI UrlFixupW(LPCWSTR pszIn, __out_ecount(cchOut) LPWSTR psz LWSTDAPI UrlFixupW(_In_ PCWSTR pcszUrl, _Out_writes_(cchMax) PWST
Out, DWORD cchOut); R pszTranslatedUrl, DWORD cchMax);
#ifdef UNICODE #ifdef UNICODE
#define UrlCompare UrlCompareW #define UrlCompare UrlCompareW
#define UrlCombine UrlCombineW #define UrlCombine UrlCombineW
#define UrlCanonicalize UrlCanonicalizeW #define UrlCanonicalize UrlCanonicalizeW
#define UrlIsOpaque UrlIsOpaqueW #define UrlIsOpaque UrlIsOpaqueW
#define UrlIsFileUrl UrlIsFileUrlW #define UrlIsFileUrl UrlIsFileUrlW
#define UrlGetLocation UrlGetLocationW #define UrlGetLocation UrlGetLocationW
#define UrlUnescape UrlUnescapeW #define UrlUnescape UrlUnescapeW
#define UrlEscape UrlEscapeW #define UrlEscape UrlEscapeW
skipping to change at line 1015 skipping to change at line 1031
#define UrlHash UrlHashA #define UrlHash UrlHashA
#define UrlGetPart UrlGetPartA #define UrlGetPart UrlGetPartA
#define UrlApplyScheme UrlApplySchemeA #define UrlApplyScheme UrlApplySchemeA
#define UrlIs UrlIsA #define UrlIs UrlIsA
// no UrlFixupA // no UrlFixupA
#endif //UNICODE #endif //UNICODE
#define UrlEscapeSpaces(pszUrl, pszEscaped, pcchEscaped) UrlCanonicalize( pszUrl, pszEscaped, pcchEscaped, URL_ESCAPE_SPACES_ONLY |URL_DONT_ESCAPE_EXTRA_I NFO ) #define UrlEscapeSpaces(pszUrl, pszEscaped, pcchEscaped) UrlCanonicalize( pszUrl, pszEscaped, pcchEscaped, URL_ESCAPE_SPACES_ONLY |URL_DONT_ESCAPE_EXTRA_I NFO )
#define UrlUnescapeInPlace(pszUrl, dwFlags) UrlUnescape(pszU rl, NULL, NULL, dwFlags | URL_UNESCAPE_INPLACE) #define UrlUnescapeInPlace(pszUrl, dwFlags) UrlUnescape(pszU rl, NULL, NULL, dwFlags | URL_UNESCAPE_INPLACE)
#if (_WIN32_IE >= _WIN32_IE_IE50)
typedef struct tagPARSEDURLA { typedef struct tagPARSEDURLA {
DWORD cbSize; DWORD cbSize;
// Pointers into the buffer that was provided to ParseURL // Pointers into the buffer that was provided to ParseURL
LPCSTR pszProtocol; LPCSTR pszProtocol;
UINT cchProtocol; UINT cchProtocol;
LPCSTR pszSuffix; LPCSTR pszSuffix;
UINT cchSuffix; UINT cchSuffix;
UINT nScheme; // One of URL_SCHEME_* UINT nScheme; // One of URL_SCHEME_*
} PARSEDURLA, * PPARSEDURLA; } PARSEDURLA, * PPARSEDURLA;
typedef struct tagPARSEDURLW { typedef struct tagPARSEDURLW {
skipping to change at line 1043 skipping to change at line 1057
UINT nScheme; // One of URL_SCHEME_* UINT nScheme; // One of URL_SCHEME_*
} PARSEDURLW, * PPARSEDURLW; } PARSEDURLW, * PPARSEDURLW;
#ifdef UNICODE #ifdef UNICODE
typedef PARSEDURLW PARSEDURL; typedef PARSEDURLW PARSEDURL;
typedef PPARSEDURLW PPARSEDURL; typedef PPARSEDURLW PPARSEDURL;
#else #else
typedef PARSEDURLA PARSEDURL; typedef PARSEDURLA PARSEDURL;
typedef PPARSEDURLA PPARSEDURL; typedef PPARSEDURLA PPARSEDURL;
#endif // UNICODE #endif // UNICODE
LWSTDAPI ParseURLA(LPCSTR pcszURL, __inout PARSEDURLA * ppu); LWSTDAPI ParseURLA(_In_ LPCSTR pcszURL, _Inout_ PARSEDURLA * ppu);
LWSTDAPI ParseURLW(LPCWSTR pcszURL, __inout PARSEDURLW * ppu); LWSTDAPI ParseURLW(_In_ LPCWSTR pcszURL, _Inout_ PARSEDURLW * ppu);
#ifdef UNICODE #ifdef UNICODE
#define ParseURL ParseURLW #define ParseURL ParseURLW
#else #else
#define ParseURL ParseURLA #define ParseURL ParseURLA
#endif // !UNICODE #endif // !UNICODE
#endif // _WIN32_IE_IE50
#endif // NO_SHLWAPI_PATH #endif // NO_SHLWAPI_PATH
#ifndef NO_SHLWAPI_REG #ifndef NO_SHLWAPI_REG
// //
//=============== Registry Routines =================================== //=============== Registry Routines ===================================
// //
// SHDeleteEmptyKey mimics RegDeleteKey as it behaves on NT. // SHDeleteEmptyKey mimics RegDeleteKey as it behaves on NT.
// SHDeleteKey mimics RegDeleteKey as it behaves on Win95. // SHDeleteKey mimics RegDeleteKey as it behaves on Win95.
LWSTDAPI_(LSTATUS) SHDeleteEmptyKeyA(__in HKEY hkey, __in_opt LPCSTR pszSubKey) LWSTDAPI_(LSTATUS) SHDeleteEmptyKeyA(_In_ HKEY hkey, _In_opt_ LPCSTR pszSubKey)
; ;
LWSTDAPI_(LSTATUS) SHDeleteEmptyKeyW(__in HKEY hkey, __in_opt LPCWSTR pszSubKey LWSTDAPI_(LSTATUS) SHDeleteEmptyKeyW(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubKey
); );
#ifdef UNICODE #ifdef UNICODE
#define SHDeleteEmptyKey SHDeleteEmptyKeyW #define SHDeleteEmptyKey SHDeleteEmptyKeyW
#else #else
#define SHDeleteEmptyKey SHDeleteEmptyKeyA #define SHDeleteEmptyKey SHDeleteEmptyKeyA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(LSTATUS) SHDeleteKeyA(__in HKEY hkey, __in_opt LPCSTR pszSubKey); LWSTDAPI_(LSTATUS) SHDeleteKeyA(_In_ HKEY hkey, _In_opt_ LPCSTR pszSubKey);
LWSTDAPI_(LSTATUS) SHDeleteKeyW(__in HKEY hkey, __in_opt LPCWSTR pszSubKey); LWSTDAPI_(LSTATUS) SHDeleteKeyW(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubKey);
#ifdef UNICODE #ifdef UNICODE
#define SHDeleteKey SHDeleteKeyW #define SHDeleteKey SHDeleteKeyW
#else #else
#define SHDeleteKey SHDeleteKeyA #define SHDeleteKey SHDeleteKeyA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(HKEY) SHRegDuplicateHKey(__in HKEY hkey); LWSTDAPI_(HKEY) SHRegDuplicateHKey(_In_ HKEY hkey);
// These functions open the key, get/set/delete the value, then close // These functions open the key, get/set/delete the value, then close
// the key. // the key.
LWSTDAPI_(LSTATUS) SHDeleteValueA(__in HKEY hkey, __in_opt LPCSTR pszSubKey, LWSTDAPI_(LSTATUS) SHDeleteValueA(_In_ HKEY hkey, _In_opt_ LPCSTR pszSubKey,
__in_opt LPCSTR pszValue); _In_ LPCSTR pszValue);
LWSTDAPI_(LSTATUS) SHDeleteValueW(__in HKEY hkey, __in_opt LPCWSTR pszSubKey, LWSTDAPI_(LSTATUS) SHDeleteValueW(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubKey,
__in_opt LPCWSTR pszValue); _In_ LPCWSTR pszValue);
#ifdef UNICODE #ifdef UNICODE
#define SHDeleteValue SHDeleteValueW #define SHDeleteValue SHDeleteValueW
#else #else
#define SHDeleteValue SHDeleteValueA #define SHDeleteValue SHDeleteValueA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(LSTATUS) SHGetValueA( LWSTDAPI_(LSTATUS) SHGetValueA(
__in HKEY hkey, _In_ HKEY hkey,
__in_opt LPCSTR pszSubKey, _In_opt_ LPCSTR pszSubKey,
__in_opt LPCSTR pszValue, _In_opt_ LPCSTR pszValue,
__out_opt DWORD *pdwType, _Out_opt_ DWORD *pdwType,
__out_bcount_opt(*pcbData) void *pvData, _Out_writes_bytes_opt_(*pcbData) void *pvData,
__inout_opt DWORD *pcbData); _Inout_opt_ DWORD *pcbData);
LWSTDAPI_(LSTATUS) SHGetValueW( LWSTDAPI_(LSTATUS) SHGetValueW(
__in HKEY hkey, _In_ HKEY hkey,
__in_opt LPCWSTR pszSubKey, _In_opt_ LPCWSTR pszSubKey,
__in_opt LPCWSTR pszValue, _In_opt_ LPCWSTR pszValue,
__out_opt DWORD *pdwType, _Out_opt_ DWORD *pdwType,
__out_bcount_opt(*pcbData) void *pvData, _Out_writes_bytes_opt_(*pcbData) void *pvData,
__inout_opt DWORD *pcbData); _Inout_opt_ DWORD *pcbData);
#ifdef UNICODE #ifdef UNICODE
#define SHGetValue SHGetValueW #define SHGetValue SHGetValueW
#else #else
#define SHGetValue SHGetValueA #define SHGetValue SHGetValueA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(LSTATUS) SHSetValueA(__in HKEY hkey, __in_opt LPCSTR pszSubKey, __i LWSTDAPI_(LSTATUS) SHSetValueA(_In_ HKEY hkey, _In_opt_ LPCSTR pszSubKey, _In
n_opt LPCSTR pszValue, __in DWORD dwType, _opt_ LPCSTR pszValue, _In_ DWORD dwType,
__in_bcount_opt(cbData) LPCVOID pvData, __in DWORD cbData); _In_reads_bytes_opt_(cbData) LPCVOID pvData, _In_ DWORD cbData);
LWSTDAPI_(LSTATUS) SHSetValueW(__in HKEY hkey, __in_opt LPCWSTR pszSubKey, __ LWSTDAPI_(LSTATUS) SHSetValueW(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubKey, _I
in_opt LPCWSTR pszValue, __in DWORD dwType, n_opt_ LPCWSTR pszValue, _In_ DWORD dwType,
__in_bcount_opt(cbData) LPCVOID pvData, __in DWORD cbData); _In_reads_bytes_opt_(cbData) LPCVOID pvData, _In_ DWORD cbData);
#ifdef UNICODE #ifdef UNICODE
#define SHSetValue SHSetValueW #define SHSetValue SHSetValueW
#else #else
#define SHSetValue SHSetValueA #define SHSetValue SHSetValueA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_IE >= 0x0602) #if (_WIN32_IE >= 0x0602)
// //
// SRRF - Shell Registry Routine Flags (for SHRegGetValue) // SRRF - Shell Registry Routine Flags (for SHRegGetValue)
// //
skipping to change at line 1333 skipping to change at line 1345
// DWORD cbData = sizeof(dwData) // DWORD cbData = sizeof(dwData)
// if (ERROR_SUCCESS == SHRegGetValue(hkey, TEXT("MySubKey"), TEXT("MyValue "), SRRF_RT_DWORD, NULL, &dwData, &cbData)) // if (ERROR_SUCCESS == SHRegGetValue(hkey, TEXT("MySubKey"), TEXT("MyValue "), SRRF_RT_DWORD, NULL, &dwData, &cbData))
// { // {
// // use dwData (successful read) // // use dwData (successful read)
// } // }
// //
// 5) determine existence of "MyValue" value of an open hkey // 5) determine existence of "MyValue" value of an open hkey
// //
// BOOL bExists = ERROR_SUCCESS == SHRegGetValue(hkey, NULL, TEXT("MyValue" ), SRRF_RT_ANY, NULL, NULL, NULL) // BOOL bExists = ERROR_SUCCESS == SHRegGetValue(hkey, NULL, TEXT("MyValue" ), SRRF_RT_ANY, NULL, NULL, NULL)
LWSTDAPI_(LSTATUS) SHRegGetValueA(__in HKEY hkey, __in_opt LPCSTR pszSubKey, __i LWSTDAPI_(LSTATUS) SHRegGetValueA(_In_ HKEY hkey, _In_opt_ LPCSTR pszSubKey, _In
n_opt LPCSTR pszValue, _opt_ LPCSTR pszValue,
__in SRRF srrfFlags, __out_opt DWORD *pdwType, __out_bcount_part_opt(*pcbDat _In_ SRRF srrfFlags, _Out_opt_ DWORD *pdwType, _Out_writes_bytes_to_opt_(*pc
a,*pcbData) __typefix(LPBYTE) void *pvData, bData,*pcbData) void *pvData,
__inout_opt DWORD *pcbData); _Inout_opt_ DWORD *pcbData);
LWSTDAPI_(LSTATUS) SHRegGetValueW(__in HKEY hkey, __in_opt LPCWSTR pszSubKey, __ LWSTDAPI_(LSTATUS) SHRegGetValueW(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubKey, _I
in_opt LPCWSTR pszValue, n_opt_ LPCWSTR pszValue,
__in SRRF srrfFlags, __out_opt DWORD *pdwType, __out_bcount_part_opt(*pcbDat _In_ SRRF srrfFlags, _Out_opt_ DWORD *pdwType, _Out_writes_bytes_to_opt_(*pc
a,*pcbData) __typefix(LPBYTE) void *pvData, bData,*pcbData) void *pvData,
__inout_opt DWORD *pcbData); _Inout_opt_ DWORD *pcbData);
#ifdef UNICODE #ifdef UNICODE
#define SHRegGetValue SHRegGetValueW #define SHRegGetValue SHRegGetValueW
#else #else
#define SHRegGetValue SHRegGetValueA #define SHRegGetValue SHRegGetValueA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(LSTATUS) SHRegSetValue(__in HKEY hkey, __in_opt LPCWSTR pszSubKey, LWSTDAPI_(LSTATUS) SHRegSetValue(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubKey,
__in_opt LPCWSTR pszValue, __in SRRF srrfFlags, _In_opt_ LPCWSTR pszValue, _In_ SRRF srrfFlags,
__in DWORD dwType, __in_bcount_opt(cbData) LPCVOID pvData, __in_opt DWORD cb _In_ DWORD dwType, _In_reads_bytes_opt_(cbData) LPCVOID pvData, _In_opt_ DWO
Data); RD cbData);
LWSTDAPI_(LSTATUS) SHRegGetValueFromHKCUHKLM(__in PCWSTR pwszKey, __in_opt PCWST LWSTDAPI_(LSTATUS) SHRegGetValueFromHKCUHKLM(_In_ PCWSTR pwszKey, _In_opt_ PCWST
R pwszValue, __in SRRF srrfFlags, R pwszValue, _In_ SRRF srrfFlags,
__out_opt DWORD* pdwType, __out_bcount_p _Out_opt_ DWORD* pdwType, _Out_writes_by
art_opt(*pcbData,*pcbData) __typefix(LPBYTE) void* pvData, tes_to_opt_(*pcbData,*pcbData) void* pvData,
__inout_opt DWORD * pcbData); _Inout_opt_ _When_(pvData != 0, _Pre_not
STDAPI_(BOOL) SHRegGetBoolValueFromHKCUHKLM(__in PCWSTR pszKey, __in_opt PCWSTR null_) DWORD * pcbData);
pszValue, __in BOOL fDefault); STDAPI_(BOOL) SHRegGetBoolValueFromHKCUHKLM(_In_ PCWSTR pszKey, _In_opt_ PCWSTR
pszValue, _In_ BOOL fDefault);
#endif // (_WIN32_IE >= 0x0602) #endif // (_WIN32_IE >= 0x0602)
// These functions behave just like RegQueryValueEx(), except if the data // These functions behave just like RegQueryValueEx(), except if the data
// type is REG_SZ, REG_EXPAND_SZ or REG_MULTI_SZ then the string is // type is REG_SZ, REG_EXPAND_SZ or REG_MULTI_SZ then the string is
// guaranteed to be properly null terminated. // guaranteed to be properly null terminated.
// //
// Additionally, if the data type is REG_EXPAND_SZ these functions will // Additionally, if the data type is REG_EXPAND_SZ these functions will
// go ahead and expand out the string, and "massage" the returned *pdwType // go ahead and expand out the string, and "massage" the returned *pdwType
// to be REG_SZ. // to be REG_SZ.
LWSTDAPI_(LSTATUS) SHQueryValueExA( LWSTDAPI_(LSTATUS) SHQueryValueExA(
__in HKEY hkey, _In_ HKEY hkey,
__in_opt LPCSTR pszValue, _In_opt_ LPCSTR pszValue,
__reserved DWORD *pdwReserved, _Reserved_ DWORD *pdwReserved,
__out_opt DWORD *pdwType, _Out_opt_ DWORD *pdwType,
__out_bcount_part_opt(*pcbData,*pcbData) void *pvData, _Out_writes_bytes_to_opt_(*pcbData,*pcbData) void *pvData,
__inout_opt DWORD *pcbData); _Inout_opt_ DWORD *pcbData);
// These functions behave just like RegQueryValueEx(), except if the data // These functions behave just like RegQueryValueEx(), except if the data
// type is REG_SZ, REG_EXPAND_SZ or REG_MULTI_SZ then the string is // type is REG_SZ, REG_EXPAND_SZ or REG_MULTI_SZ then the string is
// guaranteed to be properly null terminated. // guaranteed to be properly null terminated.
// //
// Additionally, if the data type is REG_EXPAND_SZ these functions will // Additionally, if the data type is REG_EXPAND_SZ these functions will
// go ahead and expand out the string, and "massage" the returned *pdwType // go ahead and expand out the string, and "massage" the returned *pdwType
// to be REG_SZ. // to be REG_SZ.
LWSTDAPI_(LSTATUS) SHQueryValueExW( LWSTDAPI_(LSTATUS) SHQueryValueExW(
__in HKEY hkey, _In_ HKEY hkey,
__in_opt LPCWSTR pszValue, _In_opt_ LPCWSTR pszValue,
__reserved DWORD *pdwReserved, _Reserved_ DWORD *pdwReserved,
__out_opt DWORD *pdwType, _Out_opt_ DWORD *pdwType,
__out_bcount_part_opt(*pcbData,*pcbData) void *pvData, _Out_writes_bytes_to_opt_(*pcbData,*pcbData) void *pvData,
__inout_opt DWORD *pcbData); _Inout_opt_ DWORD *pcbData);
#ifdef UNICODE #ifdef UNICODE
#define SHQueryValueEx SHQueryValueExW #define SHQueryValueEx SHQueryValueExW
#else #else
#define SHQueryValueEx SHQueryValueExA #define SHQueryValueEx SHQueryValueExA
#endif // !UNICODE #endif // !UNICODE
// Enumeration functions support. // Enumeration functions support.
LWSTDAPI_(LSTATUS) SHEnumKeyExA(__in HKEY hkey, DWORD dwIndex, __out_ecount( LWSTDAPI_(LSTATUS) SHEnumKeyExA(_In_ HKEY hkey, _In_ DWORD dwIndex, _Out_wri
*pcchName) LPSTR pszName, __inout LPDWORD pcchName); tes_(*pcchName) LPSTR pszName, _Inout_ LPDWORD pcchName);
LWSTDAPI_(LSTATUS) SHEnumKeyExW(__in HKEY hkey, DWORD dwIndex, __out_ecount( LWSTDAPI_(LSTATUS) SHEnumKeyExW(_In_ HKEY hkey, _In_ DWORD dwIndex, _Out_wri
*pcchName) LPWSTR pszName, __inout LPDWORD pcchName); tes_(*pcchName) LPWSTR pszName, _Inout_ LPDWORD pcchName);
LWSTDAPI_(LSTATUS) SHEnumValueA(__in HKEY hkey, __in DWORD dwIndex, __out_ec LWSTDAPI_(LSTATUS) SHEnumValueA(_In_ HKEY hkey, _In_ DWORD dwIndex, _Out_wri
ount_opt(*pcchValueName) PSTR pszValueName, tes_opt_(*pcchValueName) PSTR pszValueName,
__inout_opt LPDWORD pcchValueName, __out_opt LPDWORD pdwType, __out_bcount_p _Inout_opt_ LPDWORD pcchValueName, _Out_opt_ LPDWORD pdwType, _Out_writes_by
art_opt(*pcbData,*pcbData) __typefix(LPBYTE) void *pvData, tes_to_opt_(*pcbData,*pcbData) void *pvData,
__inout_opt LPDWORD pcbData); _Inout_opt_ LPDWORD pcbData);
LWSTDAPI_(LSTATUS) SHEnumValueW(__in HKEY hkey, __in DWORD dwIndex, __out_ec LWSTDAPI_(LSTATUS) SHEnumValueW(_In_ HKEY hkey, _In_ DWORD dwIndex, _Out_wri
ount_opt(*pcchValueName) PWSTR pszValueName, tes_opt_(*pcchValueName) PWSTR pszValueName,
__inout_opt LPDWORD pcchValueName, __out_opt LPDWORD pdwType, __out_bcount_p _Inout_opt_ LPDWORD pcchValueName, _Out_opt_ LPDWORD pdwType, _Out_writes_by
art_opt(*pcbData,*pcbData) __typefix(LPBYTE) void *pvData, tes_to_opt_(*pcbData,*pcbData) void *pvData,
__inout_opt LPDWORD pcbData); _Inout_opt_ LPDWORD pcbData);
LWSTDAPI_(LSTATUS) SHQueryInfoKeyA(__in HKEY hkey, __out_opt LPDWORD pcSubKe LWSTDAPI_(LSTATUS) SHQueryInfoKeyA(_In_ HKEY hkey, _Out_opt_ LPDWORD pcSubKe
ys, __out_opt LPDWORD pcchMaxSubKeyLen, __out_opt LPDWORD pcValues, __out_opt LP ys, _Out_opt_ LPDWORD pcchMaxSubKeyLen, _Out_opt_ LPDWORD pcValues, _Out_opt_ LP
DWORD pcchMaxValueNameLen); DWORD pcchMaxValueNameLen);
LWSTDAPI_(LSTATUS) SHQueryInfoKeyW(__in HKEY hkey, __out_opt LPDWORD pcSubKe LWSTDAPI_(LSTATUS) SHQueryInfoKeyW(_In_ HKEY hkey, _Out_opt_ LPDWORD pcSubKe
ys, __out_opt LPDWORD pcchMaxSubKeyLen, __out_opt LPDWORD pcValues, __out_opt LP ys, _Out_opt_ LPDWORD pcchMaxSubKeyLen, _Out_opt_ LPDWORD pcValues, _Out_opt_ LP
DWORD pcchMaxValueNameLen); DWORD pcchMaxValueNameLen);
// recursive key copy // recursive key copy
LWSTDAPI_(LSTATUS) SHCopyKeyA(__in HKEY hkeySrc, __in_opt LPCSTR szSrcSubK LWSTDAPI_(LSTATUS) SHCopyKeyA(_In_ HKEY hkeySrc, _In_opt_ LPCSTR pszSrcSubK
ey, __in HKEY hkeyDest, __reserved DWORD fReserved); ey, _In_ HKEY hkeyDest, _Reserved_ DWORD fReserved);
LWSTDAPI_(LSTATUS) SHCopyKeyW(__in HKEY hkeySrc, __in_opt LPCWSTR wszSrcSubK LWSTDAPI_(LSTATUS) SHCopyKeyW(_In_ HKEY hkeySrc, _In_opt_ LPCWSTR pszSrcSubK
ey, __in HKEY hkeyDest, __reserved DWORD fReserved); ey, _In_ HKEY hkeyDest, _Reserved_ DWORD fReserved);
// Getting and setting file system paths with environment variables // Getting and setting file system paths with environment variables
LWSTDAPI_(LSTATUS) SHRegGetPathA(__in HKEY hKey, __in_opt LPCSTR pcszSubKey, LWSTDAPI_(LSTATUS) SHRegGetPathA(_In_ HKEY hKey, _In_opt_ LPCSTR pcszSubKey,
__in_opt LPCSTR pcszValue, __out_ecount(MAX_PATH) LPSTR pszPath, __in DWORD dwFl _In_opt_ LPCSTR pcszValue, _Out_writes_(MAX_PATH) LPSTR pszPath, _In_ DWORD dwFl
ags); ags);
LWSTDAPI_(LSTATUS) SHRegGetPathW(__in HKEY hKey, __in_opt LPCWSTR pcszSubKey, LWSTDAPI_(LSTATUS) SHRegGetPathW(_In_ HKEY hKey, _In_opt_ LPCWSTR pcszSubKey,
__in_opt LPCWSTR pcszValue, __out_ecount(MAX_PATH) LPWSTR pszPath, __in DWORD d _In_opt_ LPCWSTR pcszValue, _Out_writes_(MAX_PATH) LPWSTR pszPath, _In_ DWORD d
wFlags); wFlags);
LWSTDAPI_(LSTATUS) SHRegSetPathA(__in HKEY hKey, __in_opt LPCSTR pcszSubKey, LWSTDAPI_(LSTATUS) SHRegSetPathA(_In_ HKEY hKey, _In_opt_ LPCSTR pcszSubKey,
__in_opt LPCSTR pcszValue, __in LPCSTR pcszPath, __in DWORD dwFlags); _In_opt_ LPCSTR pcszValue, _In_ LPCSTR pcszPath, _In_ DWORD dwFlags);
LWSTDAPI_(LSTATUS) SHRegSetPathW(__in HKEY hKey, __in_opt LPCWSTR pcszSubKey, LWSTDAPI_(LSTATUS) SHRegSetPathW(_In_ HKEY hKey, _In_opt_ LPCWSTR pcszSubKey,
__in_opt LPCWSTR pcszValue, __in LPCWSTR pcszPath, __in DWORD dwFlags); _In_opt_ LPCWSTR pcszValue, _In_ LPCWSTR pcszPath, _In_ DWORD dwFlags);
#ifdef UNICODE #ifdef UNICODE
#define SHEnumKeyEx SHEnumKeyExW #define SHEnumKeyEx SHEnumKeyExW
#define SHEnumValue SHEnumValueW #define SHEnumValue SHEnumValueW
#define SHQueryInfoKey SHQueryInfoKeyW #define SHQueryInfoKey SHQueryInfoKeyW
#define SHCopyKey SHCopyKeyW #define SHCopyKey SHCopyKeyW
#define SHRegGetPath SHRegGetPathW #define SHRegGetPath SHRegGetPathW
#define SHRegSetPath SHRegSetPathW #define SHRegSetPath SHRegSetPathW
#else #else
#define SHEnumKeyEx SHEnumKeyExA #define SHEnumKeyEx SHEnumKeyExA
skipping to change at line 1458 skipping to change at line 1470
#define SHREGSET_HKCU 0x00000001 // Write to HKCU if empty. #define SHREGSET_HKCU 0x00000001 // Write to HKCU if empty.
#define SHREGSET_FORCE_HKCU 0x00000002 // Write to HKCU. #define SHREGSET_FORCE_HKCU 0x00000002 // Write to HKCU.
#define SHREGSET_HKLM 0x00000004 // Write to HKLM if empty. #define SHREGSET_HKLM 0x00000004 // Write to HKLM if empty.
#define SHREGSET_FORCE_HKLM 0x00000008 // Write to HKLM. #define SHREGSET_FORCE_HKLM 0x00000008 // Write to HKLM.
#define SHREGSET_DEFAULT (SHREGSET_FORCE_HKCU | SHREGSET_HKLM) // Default is SHREGSET_FORCE_HKCU | SHREGSET_HKLM. #define SHREGSET_DEFAULT (SHREGSET_FORCE_HKCU | SHREGSET_HKLM) // Default is SHREGSET_FORCE_HKCU | SHREGSET_HKLM.
typedef HANDLE HUSKEY; // HUSKEY is a Handle to a User Specific KEY. typedef HANDLE HUSKEY; // HUSKEY is a Handle to a User Specific KEY.
typedef HUSKEY *PHUSKEY; typedef HUSKEY *PHUSKEY;
LWSTDAPI_(LSTATUS) SHRegCreateUSKeyA(__in LPCSTR pszPath, __in REGSAM samDes LWSTDAPI_(LSTATUS) SHRegCreateUSKeyA(_In_ LPCSTR pszPath, _In_ REGSAM samDes
ired, __in_opt HUSKEY hRelativeUSKey, __out PHUSKEY phNewUSKey, __in DWORD dwFla ired, _In_opt_ HUSKEY hRelativeUSKey, _Out_ PHUSKEY phNewUSKey, _In_ DWORD dwFla
gs); gs);
LWSTDAPI_(LSTATUS) SHRegCreateUSKeyW(__in LPCWSTR pwzPath, __in REGSAM samDe LWSTDAPI_(LSTATUS) SHRegCreateUSKeyW(_In_ LPCWSTR pwzPath, _In_ REGSAM samDe
sired, __in_opt HUSKEY hRelativeUSKey, __out PHUSKEY phNewUSKey, __in DWORD dwFl sired, _In_opt_ HUSKEY hRelativeUSKey, _Out_ PHUSKEY phNewUSKey, _In_ DWORD dwFl
ags); ags);
LWSTDAPI_(LSTATUS) SHRegOpenUSKeyA(__in LPCSTR pszPath, __in REGSAM samDesir LWSTDAPI_(LSTATUS) SHRegOpenUSKeyA(_In_ LPCSTR pszPath, _In_ REGSAM samDesir
ed, __in_opt HUSKEY hRelativeUSKey, __out PHUSKEY phNewUSKey, __in BOOL fIgnoreH ed, _In_opt_ HUSKEY hRelativeUSKey, _Out_ PHUSKEY phNewUSKey, _In_ BOOL fIgnoreH
KCU); KCU);
LWSTDAPI_(LSTATUS) SHRegOpenUSKeyW(__in LPCWSTR pwzPath, __in REGSAM samDesi LWSTDAPI_(LSTATUS) SHRegOpenUSKeyW(_In_ LPCWSTR pwzPath, _In_ REGSAM samDesi
red, __in_opt HUSKEY hRelativeUSKey, __out PHUSKEY phNewUSKey, __in BOOL fIgnore red, _In_opt_ HUSKEY hRelativeUSKey, _Out_ PHUSKEY phNewUSKey, _In_ BOOL fIgnore
HKCU); HKCU);
LWSTDAPI_(LSTATUS) SHRegQueryUSValueA( LWSTDAPI_(LSTATUS) SHRegQueryUSValueA(
__in HUSKEY hUSKey, _In_ HUSKEY hUSKey,
__in_opt LPCSTR pszValue, _In_opt_ LPCSTR pszValue,
__inout_opt DWORD * pdwType, _Inout_opt_ DWORD * pdwType,
__out_bcount_part_opt(*pcbData, *pcbData) void * pvData, _Out_writes_bytes_to_opt_(*pcbData, *pcbData) void * pvData,
__inout_opt DWORD * pcbData, _Inout_opt_ DWORD * pcbData,
__in BOOL fIgnoreHKCU, _In_ BOOL fIgnoreHKCU,
__in_bcount_opt(dwDefaultDataSize) void * pvDefaultData, _In_reads_bytes_opt_(dwDefaultDataSize) void * pvDefaultData,
__in_opt DWORD dwDefaultDataSize); _In_opt_ DWORD dwDefaultDataSize);
LWSTDAPI_(LSTATUS) SHRegQueryUSValueW( LWSTDAPI_(LSTATUS) SHRegQueryUSValueW(
__in HUSKEY hUSKey, _In_ HUSKEY hUSKey,
__in_opt LPCWSTR pszValue, _In_opt_ LPCWSTR pszValue,
__inout_opt DWORD * pdwType, _Inout_opt_ DWORD * pdwType,
__out_bcount_part_opt(*pcbData, *pcbData) void * pvData, _Out_writes_bytes_to_opt_(*pcbData, *pcbData) void * pvData,
__inout_opt DWORD * pcbData, _Inout_opt_ DWORD * pcbData,
__in BOOL fIgnoreHKCU, _In_ BOOL fIgnoreHKCU,
__in_bcount_opt(dwDefaultDataSize) void * pvDefaultData, _In_reads_bytes_opt_(dwDefaultDataSize) void * pvDefaultData,
__in_opt DWORD dwDefaultDataSize); _In_opt_ DWORD dwDefaultDataSize);
LWSTDAPI_(LSTATUS) SHRegWriteUSValueA(__in HUSKEY hUSKey, __in LPCSTR pszVal LWSTDAPI_(LSTATUS) SHRegWriteUSValueA(_In_ HUSKEY hUSKey, _In_ LPCSTR pszVal
ue, __in DWORD dwType, __in_bcount(cbData) const void *pvData, __in DWORD cbData ue, _In_ DWORD dwType, _In_reads_bytes_(cbData) const void *pvData, _In_ DWORD c
, __in DWORD dwFlags); bData, _In_ DWORD dwFlags);
LWSTDAPI_(LSTATUS) SHRegWriteUSValueW(__in HUSKEY hUSKey, __in LPCWSTR pwzVa LWSTDAPI_(LSTATUS) SHRegWriteUSValueW(_In_ HUSKEY hUSKey, _In_ LPCWSTR pwzVa
lue, __in DWORD dwType, __in_bcount(cbData) const void *pvData, __in DWORD cbDat lue, _In_ DWORD dwType, _In_reads_bytes_(cbData) const void *pvData, _In_ DWORD
a, __in DWORD dwFlags); cbData, _In_ DWORD dwFlags);
LWSTDAPI_(LSTATUS) SHRegDeleteUSValueA(__in HUSKEY hUSKey, __in LPCSTR pszVa LWSTDAPI_(LSTATUS) SHRegDeleteUSValueA(_In_ HUSKEY hUSKey, _In_ LPCSTR pszVa
lue, __in SHREGDEL_FLAGS delRegFlags); lue, _In_ SHREGDEL_FLAGS delRegFlags);
LWSTDAPI_(LSTATUS) SHRegDeleteUSValueW(__in HUSKEY hUSKey, __in LPCWSTR pwzV LWSTDAPI_(LSTATUS) SHRegDeleteUSValueW(_In_ HUSKEY hUSKey, _In_ LPCWSTR pwzV
alue, __in SHREGDEL_FLAGS delRegFlags); alue, _In_ SHREGDEL_FLAGS delRegFlags);
LWSTDAPI_(LSTATUS) SHRegDeleteEmptyUSKeyW(__in HUSKEY hUSKey, __in LPCWSTR p LWSTDAPI_(LSTATUS) SHRegDeleteEmptyUSKeyW(_In_ HUSKEY hUSKey, _In_ LPCWSTR p
wzSubKey, __in SHREGDEL_FLAGS delRegFlags); wzSubKey, _In_ SHREGDEL_FLAGS delRegFlags);
LWSTDAPI_(LSTATUS) SHRegDeleteEmptyUSKeyA(__in HUSKEY hUSKey, __in LPCSTR ps LWSTDAPI_(LSTATUS) SHRegDeleteEmptyUSKeyA(_In_ HUSKEY hUSKey, _In_ LPCSTR ps
zSubKey, __in SHREGDEL_FLAGS delRegFlags); zSubKey, _In_ SHREGDEL_FLAGS delRegFlags);
LWSTDAPI_(LSTATUS) SHRegEnumUSKeyA(__in HUSKEY hUSKey, __in DWORD dwIndex, _ LWSTDAPI_(LSTATUS) SHRegEnumUSKeyA(_In_ HUSKEY hUSKey, _In_ DWORD dwIndex, _
_out_ecount_part(*pcchName,*pcchName) LPSTR pszName, __inout LPDWORD pcchName, _ Out_writes_to_(*pcchName,*pcchName) LPSTR pszName, _Inout_ LPDWORD pcchName, _In
_in SHREGENUM_FLAGS enumRegFlags); _ SHREGENUM_FLAGS enumRegFlags);
LWSTDAPI_(LSTATUS) SHRegEnumUSKeyW(__in HUSKEY hUSKey, __in DWORD dwIndex, _ LWSTDAPI_(LSTATUS) SHRegEnumUSKeyW(_In_ HUSKEY hUSKey, _In_ DWORD dwIndex, _
_out_ecount_part(*pcchName,*pcchName) LPWSTR pwzName, __inout LPDWORD pcchName, Out_writes_to_(*pcchName,*pcchName) LPWSTR pwzName, _Inout_ LPDWORD pcchName, _I
__in SHREGENUM_FLAGS enumRegFlags); n_ SHREGENUM_FLAGS enumRegFlags);
LWSTDAPI_(LSTATUS) SHRegEnumUSValueA(__in HUSKEY hUSkey, __in DWORD dwIndex, LWSTDAPI_(LSTATUS) SHRegEnumUSValueA(_In_ HUSKEY hUSkey, _In_ DWORD dwIndex,
__out_ecount_part(*pcchValueName,*pcchValueName) LPSTR pszValueName, __inout _Out_writes_to_(*pcchValueName,*pcchValueName) LPSTR pszValueName, _Inout_ L
LPDWORD pcchValueName, __out_opt LPDWORD pdwType, PDWORD pcchValueName, _Out_opt_ LPDWORD pdwType,
__out_bcount_part_opt(*pcbData, *pcbData) void *pvData, __inout_opt LPDWORD _Out_writes_bytes_to_opt_(*pcbData, *pcbData) void *pvData, _Inout_opt_ LPDW
pcbData, __in SHREGENUM_FLAGS enumRegFlags); ORD pcbData, _In_ SHREGENUM_FLAGS enumRegFlags);
LWSTDAPI_(LSTATUS) SHRegEnumUSValueW(__in HUSKEY hUSkey, __in DWORD dwIndex, LWSTDAPI_(LSTATUS) SHRegEnumUSValueW(_In_ HUSKEY hUSkey, _In_ DWORD dwIndex,
__out_ecount_part(*pcchValueName,*pcchValueName) LPWSTR pszValueName, __inou _Out_writes_to_(*pcchValueName,*pcchValueName) LPWSTR pszValueName, _Inout_
t LPDWORD pcchValueName, __out_opt LPDWORD pdwType, LPDWORD pcchValueName, _Out_opt_ LPDWORD pdwType,
__out_bcount_part_opt(*pcbData, *pcbData) void *pvData, __inout_opt LPDWORD _Out_writes_bytes_to_opt_(*pcbData, *pcbData) void *pvData, _Inout_opt_ LPDW
pcbData, __in SHREGENUM_FLAGS enumRegFlags); ORD pcbData, _In_ SHREGENUM_FLAGS enumRegFlags);
LWSTDAPI_(LSTATUS) SHRegQueryInfoUSKeyA(__in HUSKEY hUSKey, __out_opt LPDWOR LWSTDAPI_(LSTATUS) SHRegQueryInfoUSKeyA(_In_ HUSKEY hUSKey, _Out_opt_ LPDWOR
D pcSubKeys, __out_opt LPDWORD pcchMaxSubKeyLen, __out_opt LPDWORD pcValues, __o D pcSubKeys, _Out_opt_ LPDWORD pcchMaxSubKeyLen, _Out_opt_ LPDWORD pcValues, _Ou
ut_opt LPDWORD pcchMaxValueNameLen, __in SHREGENUM_FLAGS enumRegFlags); t_opt_ LPDWORD pcchMaxValueNameLen, _In_ SHREGENUM_FLAGS enumRegFlags);
LWSTDAPI_(LSTATUS) SHRegQueryInfoUSKeyW(__in HUSKEY hUSKey, __out_opt LPDWOR LWSTDAPI_(LSTATUS) SHRegQueryInfoUSKeyW(_In_ HUSKEY hUSKey, _Out_opt_ LPDWOR
D pcSubKeys, __out_opt LPDWORD pcchMaxSubKeyLen, __out_opt LPDWORD pcValues, __o D pcSubKeys, _Out_opt_ LPDWORD pcchMaxSubKeyLen, _Out_opt_ LPDWORD pcValues, _Ou
ut_opt LPDWORD pcchMaxValueNameLen, __in SHREGENUM_FLAGS enumRegFlags); t_opt_ LPDWORD pcchMaxValueNameLen, _In_ SHREGENUM_FLAGS enumRegFlags);
LWSTDAPI_(LSTATUS) SHRegCloseUSKey(__in HUSKEY hUSKey); LWSTDAPI_(LSTATUS) SHRegCloseUSKey(_In_ HUSKEY hUSKey);
// These calls are equal to an SHRegOpenUSKey, SHRegQueryUSValue, and then a SHR egCloseUSKey. // These calls are equal to an SHRegOpenUSKey, SHRegQueryUSValue, and then a SHR egCloseUSKey.
STDAPI_(LSTATUS) SHRegGetUSValueA( STDAPI_(LSTATUS) SHRegGetUSValueA(
__in LPCSTR pszSubKey, _In_ LPCSTR pszSubKey,
__in_opt LPCSTR pszValue, _In_opt_ LPCSTR pszValue,
__inout_opt DWORD *pdwType, _Inout_opt_ DWORD *pdwType,
__out_bcount_part_opt(*pcbData, *pcbData) void *pvData, _Out_writes_bytes_to_opt_(*pcbData, *pcbData) void *pvData,
__inout_opt DWORD *pcbData, _Inout_opt_ DWORD *pcbData,
__in BOOL fIgnoreHKCU, _In_ BOOL fIgnoreHKCU,
__in_bcount_opt(dwDefaultDataSize) void *pvDefaultData, _In_reads_bytes_opt_(dwDefaultDataSize) void *pvDefaultData,
__in DWORD dwDefaultDataSize); _In_ DWORD dwDefaultDataSize);
STDAPI_(LSTATUS) SHRegGetUSValueW( STDAPI_(LSTATUS) SHRegGetUSValueW(
__in LPCWSTR pszSubKey, _In_ LPCWSTR pszSubKey,
__in_opt LPCWSTR pszValue, _In_opt_ LPCWSTR pszValue,
__inout_opt DWORD *pdwType, _Inout_opt_ DWORD *pdwType,
__out_bcount_part_opt(*pcbData, *pcbData) void *pvData, _Out_writes_bytes_to_opt_(*pcbData, *pcbData) void *pvData,
__inout_opt DWORD *pcbData, _Inout_opt_ DWORD *pcbData,
__in BOOL fIgnoreHKCU, _In_ BOOL fIgnoreHKCU,
__in_bcount_opt(dwDefaultDataSize) void *pvDefaultData, _In_reads_bytes_opt_(dwDefaultDataSize) void *pvDefaultData,
__in DWORD dwDefaultDataSize); _In_ DWORD dwDefaultDataSize);
LWSTDAPI_(LSTATUS) SHRegSetUSValueA(__in LPCSTR pszSubKey, __in LPCSTR pszVa LWSTDAPI_(LSTATUS) SHRegSetUSValueA(_In_ LPCSTR pszSubKey, _In_ LPCSTR pszVa
lue, __in DWORD dwType, __in_bcount_opt(cbData) const void *pvData, __in_opt DWO lue, _In_ DWORD dwType, _In_reads_bytes_opt_(cbData) const void *pvData, _In_opt
RD cbData, __in_opt DWORD dwFlags); _ DWORD cbData, _In_opt_ DWORD dwFlags);
LWSTDAPI_(LSTATUS) SHRegSetUSValueW(__in LPCWSTR pwzSubKey, __in LPCWSTR pwz LWSTDAPI_(LSTATUS) SHRegSetUSValueW(_In_ LPCWSTR pwzSubKey, _In_ LPCWSTR pwz
Value, __in DWORD dwType, __in_bcount_opt(cbData) const void *pvData, __in_opt D Value, _In_ DWORD dwType, _In_reads_bytes_opt_(cbData) const void *pvData, _In_o
WORD cbData, __in_opt DWORD dwFlags); pt_ DWORD cbData, _In_opt_ DWORD dwFlags);
LWSTDAPI_(int) SHRegGetIntW(__in HKEY hk, __in_opt PCWSTR pwzKey, __in i LWSTDAPI_(int) SHRegGetIntW(_In_ HKEY hk, _In_opt_ PCWSTR pwzKey, _In_ i
nt iDefault); nt iDefault);
#ifdef UNICODE #ifdef UNICODE
#define SHRegCreateUSKey SHRegCreateUSKeyW #define SHRegCreateUSKey SHRegCreateUSKeyW
#define SHRegOpenUSKey SHRegOpenUSKeyW #define SHRegOpenUSKey SHRegOpenUSKeyW
#define SHRegQueryUSValue SHRegQueryUSValueW #define SHRegQueryUSValue SHRegQueryUSValueW
#define SHRegWriteUSValue SHRegWriteUSValueW #define SHRegWriteUSValue SHRegWriteUSValueW
#define SHRegDeleteUSValue SHRegDeleteUSValueW #define SHRegDeleteUSValue SHRegDeleteUSValueW
#define SHRegDeleteEmptyUSKey SHRegDeleteEmptyUSKeyW #define SHRegDeleteEmptyUSKey SHRegDeleteEmptyUSKeyW
#define SHRegEnumUSKey SHRegEnumUSKeyW #define SHRegEnumUSKey SHRegEnumUSKeyW
#define SHRegEnumUSValue SHRegEnumUSValueW #define SHRegEnumUSValue SHRegEnumUSValueW
skipping to change at line 1548 skipping to change at line 1560
#define SHRegWriteUSValue SHRegWriteUSValueA #define SHRegWriteUSValue SHRegWriteUSValueA
#define SHRegDeleteUSValue SHRegDeleteUSValueA #define SHRegDeleteUSValue SHRegDeleteUSValueA
#define SHRegDeleteEmptyUSKey SHRegDeleteEmptyUSKeyA #define SHRegDeleteEmptyUSKey SHRegDeleteEmptyUSKeyA
#define SHRegEnumUSKey SHRegEnumUSKeyA #define SHRegEnumUSKey SHRegEnumUSKeyA
#define SHRegEnumUSValue SHRegEnumUSValueA #define SHRegEnumUSValue SHRegEnumUSValueA
#define SHRegQueryInfoUSKey SHRegQueryInfoUSKeyA #define SHRegQueryInfoUSKey SHRegQueryInfoUSKeyA
#define SHRegGetUSValue SHRegGetUSValueA #define SHRegGetUSValue SHRegGetUSValueA
#define SHRegSetUSValue SHRegSetUSValueA #define SHRegSetUSValue SHRegSetUSValueA
#endif #endif
LWSTDAPI_(BOOL) SHRegGetBoolUSValueA(__in LPCSTR pszSubKey, __in_opt LPCSTR pszV LWSTDAPI_(BOOL) SHRegGetBoolUSValueA(_In_ LPCSTR pszSubKey, _In_opt_ LPCSTR pszV
alue, __in BOOL fIgnoreHKCU, __in BOOL fDefault); alue, _In_ BOOL fIgnoreHKCU, _In_ BOOL fDefault);
LWSTDAPI_(BOOL) SHRegGetBoolUSValueW(__in LPCWSTR pszSubKey, __in_opt LPCWSTR ps LWSTDAPI_(BOOL) SHRegGetBoolUSValueW(_In_ LPCWSTR pszSubKey, _In_opt_ LPCWSTR ps
zValue, __in BOOL fIgnoreHKCU, __in BOOL fDefault); zValue, _In_ BOOL fIgnoreHKCU, _In_ BOOL fDefault);
#ifdef UNICODE #ifdef UNICODE
#define SHRegGetBoolUSValue SHRegGetBoolUSValueW #define SHRegGetBoolUSValue SHRegGetBoolUSValueW
#else #else
#define SHRegGetBoolUSValue SHRegGetBoolUSValueA #define SHRegGetBoolUSValue SHRegGetBoolUSValueA
#endif // !UNICODE #endif // !UNICODE
// //
// Association APIs // Association APIs
// //
// these APIs are to assist in accessing the data in HKCR // these APIs are to assist in accessing the data in HKCR
// getting the Command strings and exe paths // getting the Command strings and exe paths
// for different verbs and extensions are simplified this way // for different verbs and extensions are simplified this way
// //
enum enum
{ {
ASSOCF_NONE = 0x00000000,
ASSOCF_INIT_NOREMAPCLSID = 0x00000001, // do not remap clsids to progids ASSOCF_INIT_NOREMAPCLSID = 0x00000001, // do not remap clsids to progids
ASSOCF_INIT_BYEXENAME = 0x00000002, // executable is being pa ssed in ASSOCF_INIT_BYEXENAME = 0x00000002, // executable is being pa ssed in
ASSOCF_OPEN_BYEXENAME = 0x00000002, // executable is being pa ssed in ASSOCF_OPEN_BYEXENAME = 0x00000002, // executable is being pa ssed in
ASSOCF_INIT_DEFAULTTOSTAR = 0x00000004, // treat "*" as the BaseC lass ASSOCF_INIT_DEFAULTTOSTAR = 0x00000004, // treat "*" as the BaseC lass
ASSOCF_INIT_DEFAULTTOFOLDER = 0x00000008, // treat "Folder" as the BaseClass ASSOCF_INIT_DEFAULTTOFOLDER = 0x00000008, // treat "Folder" as the BaseClass
ASSOCF_NOUSERSETTINGS = 0x00000010, // dont use HKCU ASSOCF_NOUSERSETTINGS = 0x00000010, // dont use HKCU
ASSOCF_NOTRUNCATE = 0x00000020, // dont truncate the retu rn string ASSOCF_NOTRUNCATE = 0x00000020, // dont truncate the retu rn string
ASSOCF_VERIFY = 0x00000040, // verify data is accurat e (DISK HITS) ASSOCF_VERIFY = 0x00000040, // verify data is accurat e (DISK HITS)
ASSOCF_REMAPRUNDLL = 0x00000080, // actually gets info abo ut rundlls target if applicable ASSOCF_REMAPRUNDLL = 0x00000080, // actually gets info abo ut rundlls target if applicable
ASSOCF_NOFIXUPS = 0x00000100, // attempt to fix errors if found ASSOCF_NOFIXUPS = 0x00000100, // attempt to fix errors if found
ASSOCF_IGNOREBASECLASS = 0x00000200, // dont recurse into the baseclass ASSOCF_IGNOREBASECLASS = 0x00000200, // dont recurse into the baseclass
ASSOCF_INIT_IGNOREUNKNOWN = 0x00000400, // dont use the "Unknown" progid, instead fail ASSOCF_INIT_IGNOREUNKNOWN = 0x00000400, // dont use the "Unknown" progid, instead fail
#if (NTDDI_VERSION >= NTDDI_WIN8)
ASSOCF_INIT_FIXED_PROGID = 0x00000800, // the Init() pszAssoc va
lue is a ProgId that should not be mapped using the current user defaults
ASSOCF_IS_PROTOCOL = 0x00001000, // the Init() pszAssoc va
lue is a protocol that should be mapped using the current user defaults
ASSOCF_INIT_FOR_FILE = 0x00002000, // use this flag when spe
cifying ASSOCF_INIT_FIXED_PROGID if the ProgId corresponds with a file extension
based association
#endif
}; };
typedef DWORD ASSOCF; typedef DWORD ASSOCF;
typedef enum typedef enum
{ {
ASSOCSTR_COMMAND = 1, // shell\verb\command string ASSOCSTR_COMMAND = 1, // shell\verb\command string
ASSOCSTR_EXECUTABLE, // the executable part of command string ASSOCSTR_EXECUTABLE, // the executable part of command string
ASSOCSTR_FRIENDLYDOCNAME, // friendly name of the document type ASSOCSTR_FRIENDLYDOCNAME, // friendly name of the document type
ASSOCSTR_FRIENDLYAPPNAME, // friendly name of executable ASSOCSTR_FRIENDLYAPPNAME, // friendly name of executable
ASSOCSTR_NOOPEN, // noopen value ASSOCSTR_NOOPEN, // noopen value
skipping to change at line 1605 skipping to change at line 1623
ASSOCSTR_QUICKTIP, // same as ASSOCSTR_INFOTIP, except, this list contains only quickly retrievable properties ASSOCSTR_QUICKTIP, // same as ASSOCSTR_INFOTIP, except, this list contains only quickly retrievable properties
ASSOCSTR_TILEINFO, // similar to ASSOCSTR_INFOTIP - lists importan t properties for tileview ASSOCSTR_TILEINFO, // similar to ASSOCSTR_INFOTIP - lists importan t properties for tileview
ASSOCSTR_CONTENTTYPE, // MIME Content type ASSOCSTR_CONTENTTYPE, // MIME Content type
ASSOCSTR_DEFAULTICON, // Default icon source ASSOCSTR_DEFAULTICON, // Default icon source
ASSOCSTR_SHELLEXTENSION, // Guid string pointing to the Shellex\Shellext ensionhandler value. ASSOCSTR_SHELLEXTENSION, // Guid string pointing to the Shellex\Shellext ensionhandler value.
#endif // _WIN32_IE_IE60 #endif // _WIN32_IE_IE60
#if (_WIN32_IE >= _WIN32_IE_IE80) #if (_WIN32_IE >= _WIN32_IE_IE80)
ASSOCSTR_DROPTARGET, // The CLSID of DropTarget ASSOCSTR_DROPTARGET, // The CLSID of DropTarget
ASSOCSTR_DELEGATEEXECUTE, // The CLSID of DelegateExecute ASSOCSTR_DELEGATEEXECUTE, // The CLSID of DelegateExecute
#endif // _WIN32_IE_IE80 #endif // _WIN32_IE_IE80
// a string value of the uri protocol schemes, for example "http:https:ftp:f
ile:" or "*" indicating all
ASSOCSTR_SUPPORTED_URI_PROTOCOLS,
ASSOCSTR_MAX // last item in enum... ASSOCSTR_MAX // last item in enum...
} ASSOCSTR; } ASSOCSTR;
typedef enum typedef enum
{ {
ASSOCKEY_SHELLEXECCLASS = 1, // the key that should be passed to ShellExec (hkeyClass) ASSOCKEY_SHELLEXECCLASS = 1, // the key that should be passed to ShellExec (hkeyClass)
ASSOCKEY_APP, // the "Application" key for the association ASSOCKEY_APP, // the "Application" key for the association
ASSOCKEY_CLASS, // the progid or class key ASSOCKEY_CLASS, // the progid or class key
ASSOCKEY_BASECLASS, // the BaseClass key ASSOCKEY_BASECLASS, // the BaseClass key
ASSOCKEY_MAX // last item in enum... ASSOCKEY_MAX // last item in enum...
skipping to change at line 1635 skipping to change at line 1655
ASSOCDATA_VALUE, // use pszExtra as the Value name ASSOCDATA_VALUE, // use pszExtra as the Value name
#endif // _WIN32_IE_IE60 #endif // _WIN32_IE_IE60
ASSOCDATA_MAX ASSOCDATA_MAX
} ASSOCDATA; } ASSOCDATA;
typedef enum typedef enum
{ {
ASSOCENUM_NONE ASSOCENUM_NONE
} ASSOCENUM; } ASSOCENUM;
// Stored under HKCR\<progId> EditFlags(REG_DWORD)
//
// Retrieve these values using IQueryAssociations::GetData as follows
//
// DWORD editFlags, size = sizeof(editFlags);
// queryAssoc->GetData(nullptr, ASSOCDATA_EDITFLAGS, nullptr, &editFlags, &size)
;
//
// Some of these flags are no longer used since editing file type associations h
as been
// removed from Explorer's folder options UI.
typedef enum
{
FTA_None = 0x00000000,
FTA_Exclude = 0x00000001, // used to exclude (hide) types li
ke drvfile
FTA_Show = 0x00000002, // used to show types like folder
that don't have associations
FTA_HasExtension = 0x00000004, // type has a file name extension
FTA_NoEdit = 0x00000008, // no editing of file type
FTA_NoRemove = 0x00000010, // no removing of the file type
FTA_NoNewVerb = 0x00000020, // no adding of verbs
FTA_NoEditVerb = 0x00000040, // no editing of predefined verbs
FTA_NoRemoveVerb = 0x00000080, // no removing of predefined verbs
FTA_NoEditDesc = 0x00000100, // no editing of file type descrip
tion
FTA_NoEditIcon = 0x00000200, // no editing of doc icon
FTA_NoEditDflt = 0x00000400, // no changing of default verb
FTA_NoEditVerbCmd = 0x00000800, // no modification of the commnds
associated with the verbs
FTA_NoEditVerbExe = 0x00001000, // no editing of the verb's exe
FTA_NoDDE = 0x00002000, // no editing of the DDE fields
FTA_NoEditMIME = 0x00008000, // no editing of the Content Type
or Default Extension fields
FTA_OpenIsSafe = 0x00010000, // the open verb should be invoked
automaticaly for downloaded files
FTA_AlwaysUnsafe = 0x00020000, // don't allow the "Never ask me"
checkbox to be enabled; File Type dialog still allows user to turn this off
FTA_NoRecentDocs = 0x00100000, // don't add this file type to the
Recent Documents folder
FTA_SafeForElevation = 0x00200000, // Win8: can be launched in medium
IL by a process running in AppContainer
FTA_AlwaysUseDirectInvoke = 0x00400000, // Win8: when downloading use the
direct invoke feature even if the server headers are not provided
} FILETYPEATTRIBUTEFLAGS;
DEFINE_ENUM_FLAG_OPERATORS(FILETYPEATTRIBUTEFLAGS);
#undef INTERFACE #undef INTERFACE
#define INTERFACE IQueryAssociations #define INTERFACE IQueryAssociations
DECLARE_INTERFACE_IID_( IQueryAssociations, IUnknown, "c46ca590-3c3f-11d2-bee6-0 000f805ca57" ) DECLARE_INTERFACE_IID_( IQueryAssociations, IUnknown, "c46ca590-3c3f-11d2-bee6-0 000f805ca57" )
{ {
// IUnknown methods
STDMETHOD (QueryInterface)(THIS_ __in REFIID riid, __deref_out void **ppv) P
URE;
STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
STDMETHOD_(ULONG, Release) ( THIS ) PURE;
// IQueryAssociations methods // IQueryAssociations methods
STDMETHOD (Init)(THIS_ __in ASSOCF flags, __in_opt LPCWSTR pszAssoc, __in_op STDMETHOD (Init)(THIS_ _In_ ASSOCF flags, _In_opt_ LPCWSTR pszAssoc, _In_opt
t HKEY hkProgid, __in_opt HWND hwnd) PURE; _ HKEY hkProgid, _In_opt_ HWND hwnd) PURE;
STDMETHOD (GetString)(THIS_ __in ASSOCF flags, __in ASSOCSTR str, __in_opt L STDMETHOD (GetString)(THIS_ _In_ ASSOCF flags, _In_ ASSOCSTR str, _In_opt_ L
PCWSTR pszExtra, __out_ecount_opt(*pcchOut) LPWSTR pszOut, __inout DWORD *pcchOu PCWSTR pszExtra, _Out_writes_opt_(*pcchOut) LPWSTR pszOut, _Inout_ DWORD *pcchOu
t) PURE; t) PURE;
STDMETHOD (GetKey)(THIS_ __in ASSOCF flags, __in ASSOCKEY key, __in_opt LPCW STDMETHOD (GetKey)(THIS_ _In_ ASSOCF flags, _In_ ASSOCKEY key, _In_opt_ LPCW
STR pszExtra, __out HKEY *phkeyOut) PURE; STR pszExtra, _Out_ HKEY *phkeyOut) PURE;
STDMETHOD (GetData)(THIS_ __in ASSOCF flags, __in ASSOCDATA data, __in_opt L STDMETHOD (GetData)(THIS_ _In_ ASSOCF flags, _In_ ASSOCDATA data, _In_opt_ L
PCWSTR pszExtra, __out_bcount_opt(*pcbOut) void * pvOut, __inout_opt DWORD *pcbO PCWSTR pszExtra, _Out_writes_bytes_opt_(*pcbOut) void * pvOut, _Inout_opt_ DWORD
ut) PURE; *pcbOut) PURE;
STDMETHOD (GetEnum)(THIS_ __in ASSOCF flags, __in ASSOCENUM assocenum, __in_ STDMETHOD (GetEnum)(THIS_ _In_ ASSOCF flags, _In_ ASSOCENUM assocenum, _In_o
opt LPCWSTR pszExtra, __in REFIID riid, __deref_out void **ppvOut) PURE; pt_ LPCWSTR pszExtra, _In_ REFIID riid, _Outptr_ void **ppvOut) PURE;
}; };
// use CLSID_QueryAssociations for clsid, object implements IQueryAssociations // use CLSID_QueryAssociations for clsid, object implements IQueryAssociations
// AssocCreateForClasses() is the more functional version of this API // AssocCreateForClasses() is the more functional version of this API
LWSTDAPI AssocCreate(__in CLSID clsid, __in REFIID riid, __deref_out void **ppv) LWSTDAPI AssocCreate(_In_ CLSID clsid, _In_ REFIID riid, _Outptr_ void **ppv);
;
// Retrieve an array of class keys from an IQueryAssociations object
// if the caller is just interested in the primary class key,
// call with cKeys == 1. the return value is the number of keys
// inserted into the array.
STDAPI_(DWORD) SHGetAssocKeys(_In_ IQueryAssociations *pqa, _Out_writes_to_(cKey
s, return) HKEY *rgKeys, DWORD cKeys);
// wrappers for the interface // wrappers for the interface
LWSTDAPI AssocQueryStringA(__in ASSOCF flags, __in ASSOCSTR str, __in LPCSTR psz Assoc, __in_opt LPCSTR pszExtra, __out_ecount_opt(*pcchOut) LPSTR pszOut, __inou t DWORD *pcchOut); LWSTDAPI AssocQueryStringA(_In_ ASSOCF flags, _In_ ASSOCSTR str, _In_ LPCSTR psz Assoc, _In_opt_ LPCSTR pszExtra, _Out_writes_opt_(*pcchOut) LPSTR pszOut, _Inout _ DWORD *pcchOut);
// wrappers for the interface // wrappers for the interface
LWSTDAPI AssocQueryStringW(__in ASSOCF flags, __in ASSOCSTR str, __in LPCWSTR ps zAssoc, __in_opt LPCWSTR pszExtra, __out_ecount_opt(*pcchOut) LPWSTR pszOut, __i nout DWORD *pcchOut); LWSTDAPI AssocQueryStringW(_In_ ASSOCF flags, _In_ ASSOCSTR str, _In_ LPCWSTR ps zAssoc, _In_opt_ LPCWSTR pszExtra, _Out_writes_opt_(*pcchOut) LPWSTR pszOut, _In out_ DWORD *pcchOut);
#ifdef UNICODE #ifdef UNICODE
#define AssocQueryString AssocQueryStringW #define AssocQueryString AssocQueryStringW
#else #else
#define AssocQueryString AssocQueryStringA #define AssocQueryString AssocQueryStringA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI AssocQueryStringByKeyA(__in ASSOCF flags, __in ASSOCSTR str, __in HKEY LWSTDAPI AssocQueryStringByKeyA(_In_ ASSOCF flags, _In_ ASSOCSTR str, _In_ HKEY
hkAssoc, __in_opt LPCSTR pszExtra, __out_ecount_opt(*pcchOut) LPSTR pszOut, __in hkAssoc, _In_opt_ LPCSTR pszExtra, _Out_writes_opt_(*pcchOut) LPSTR pszOut, _Ino
out DWORD *pcchOut); ut_ DWORD *pcchOut);
LWSTDAPI AssocQueryStringByKeyW(__in ASSOCF flags, __in ASSOCSTR str, __in HKEY LWSTDAPI AssocQueryStringByKeyW(_In_ ASSOCF flags, _In_ ASSOCSTR str, _In_ HKEY
hkAssoc, __in_opt LPCWSTR pszExtra, __out_ecount_opt(*pcchOut) LPWSTR pszOut, __ hkAssoc, _In_opt_ LPCWSTR pszExtra, _Out_writes_opt_(*pcchOut) LPWSTR pszOut, _I
inout DWORD *pcchOut); nout_ DWORD *pcchOut);
#ifdef UNICODE #ifdef UNICODE
#define AssocQueryStringByKey AssocQueryStringByKeyW #define AssocQueryStringByKey AssocQueryStringByKeyW
#else #else
#define AssocQueryStringByKey AssocQueryStringByKeyA #define AssocQueryStringByKey AssocQueryStringByKeyA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI AssocQueryKeyA(__in ASSOCF flags, __in ASSOCKEY key, __in LPCSTR pszAss LWSTDAPI AssocQueryKeyA(_In_ ASSOCF flags, _In_ ASSOCKEY key, _In_ LPCSTR pszAss
oc, __in_opt LPCSTR pszExtra, __out HKEY *phkeyOut); oc, _In_opt_ LPCSTR pszExtra, _Out_ HKEY *phkeyOut);
LWSTDAPI AssocQueryKeyW(__in ASSOCF flags, __in ASSOCKEY key, __in LPCWSTR pszAs LWSTDAPI AssocQueryKeyW(_In_ ASSOCF flags, _In_ ASSOCKEY key, _In_ LPCWSTR pszAs
soc, __in_opt LPCWSTR pszExtra, __out HKEY *phkeyOut); soc, _In_opt_ LPCWSTR pszExtra, _Out_ HKEY *phkeyOut);
#ifdef UNICODE #ifdef UNICODE
#define AssocQueryKey AssocQueryKeyW #define AssocQueryKey AssocQueryKeyW
#else #else
#define AssocQueryKey AssocQueryKeyA #define AssocQueryKey AssocQueryKeyA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_IE >= 0x0601) #if (_WIN32_IE >= 0x0601)
// AssocIsDangerous() checks a file type to determine whether it is "Dangerous" // AssocIsDangerous() checks a file type to determine whether it is "Dangerous"
// this maps to the IE download dialog's forcing a prompt to open or save. // this maps to the IE download dialog's forcing a prompt to open or save.
// dangerous file types should be handled more carefully than other file ty pes. // dangerous file types should be handled more carefully than other file ty pes.
skipping to change at line 1696 skipping to change at line 1755
// Parameter: pszAssoc - type to check. may be an extension or progid. (".ex e" or "exefile" would both be valid) // Parameter: pszAssoc - type to check. may be an extension or progid. (".ex e" or "exefile" would both be valid)
// //
// Returns: TRUE if the file type is dangerous. // Returns: TRUE if the file type is dangerous.
// //
// NOTES: // NOTES:
// //
// this API first checks a hardcoded list of known dangerous types. // this API first checks a hardcoded list of known dangerous types.
// then it checks the editflags for the file type looking for the FTA_Alway sUnsafe bit. // then it checks the editflags for the file type looking for the FTA_Alway sUnsafe bit.
// then it checks Safer policies. // then it checks Safer policies.
// //
LWSTDAPI_(BOOL) AssocIsDangerous(LPCWSTR pszAssoc); LWSTDAPI_(BOOL) AssocIsDangerous(_In_ PCWSTR pszAssoc);
#endif // _WIN32_IE >= 0x0601 #endif // _WIN32_IE >= 0x0601
#if (_WIN32_IE >= _WIN32_IE_IE60SP2) #if (_WIN32_IE >= _WIN32_IE_IE60SP2)
LWSTDAPI AssocGetPerceivedType(__in LPCWSTR pszExt, __out PERCEIVED *ptype, __ou t PERCEIVEDFLAG *pflag, __out_opt LPWSTR *ppszType); LWSTDAPI AssocGetPerceivedType(_In_ PCWSTR pszExt, _Out_ PERCEIVED *ptype, _Out_ PERCEIVEDFLAG *pflag, _Outptr_opt_ PWSTR *ppszType);
#endif #endif
#endif // NO_SHLWAPI_REG #endif // NO_SHLWAPI_REG
#ifndef NO_SHLWAPI_STREAM #ifndef NO_SHLWAPI_STREAM
// //
//=============== Stream Routines =================================== //=============== Stream Routines ===================================
// //
// objidl.h // objidl.h
#ifndef __IStream_FWD_DEFINED__ #ifndef __IStream_FWD_DEFINED__
#define __IStream_FWD_DEFINED__ #define __IStream_FWD_DEFINED__
typedef interface IStream IStream; typedef interface IStream IStream;
#endif /* __IStream_FWD_DEFINED__ */ #endif /* __IStream_FWD_DEFINED__ */
LWSTDAPI_(IStream *) SHOpenRegStreamA(__in HKEY hkey, __in_opt LPCSTR pszSubkey, LWSTDAPI_(IStream *) SHOpenRegStreamA(_In_ HKEY hkey, _In_opt_ LPCSTR pszSubkey,
__in_opt LPCSTR pszValue, __in DWORD grfMode); _In_opt_ LPCSTR pszValue, _In_ DWORD grfMode);
LWSTDAPI_(IStream *) SHOpenRegStreamW(__in HKEY hkey, __in_opt LPCWSTR pszSubkey LWSTDAPI_(IStream *) SHOpenRegStreamW(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubkey
, __in_opt LPCWSTR pszValue, __in DWORD grfMode); , _In_opt_ LPCWSTR pszValue, _In_ DWORD grfMode);
#ifdef UNICODE #ifdef UNICODE
#define SHOpenRegStream SHOpenRegStreamW #define SHOpenRegStream SHOpenRegStreamW
#else #else
#define SHOpenRegStream SHOpenRegStreamA #define SHOpenRegStream SHOpenRegStreamA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(IStream *) SHOpenRegStream2A(__in HKEY hkey, __in_opt LPCSTR pszSubkey LWSTDAPI_(IStream *) SHOpenRegStream2A(_In_ HKEY hkey, _In_opt_ LPCSTR pszSubkey
, __in_opt LPCSTR pszValue, __in DWORD grfMode); , _In_opt_ LPCSTR pszValue, _In_ DWORD grfMode);
LWSTDAPI_(IStream *) SHOpenRegStream2W(__in HKEY hkey, __in_opt LPCWSTR pszSubke LWSTDAPI_(IStream *) SHOpenRegStream2W(_In_ HKEY hkey, _In_opt_ LPCWSTR pszSubke
y, __in_opt LPCWSTR pszValue, __in DWORD grfMode); y, _In_opt_ LPCWSTR pszValue, _In_ DWORD grfMode);
#ifdef UNICODE #ifdef UNICODE
#define SHOpenRegStream2 SHOpenRegStream2W #define SHOpenRegStream2 SHOpenRegStream2W
#else #else
#define SHOpenRegStream2 SHOpenRegStream2A #define SHOpenRegStream2 SHOpenRegStream2A
#endif // !UNICODE #endif // !UNICODE
// New code always wants new implementation... // New code always wants new implementation...
#undef SHOpenRegStream #undef SHOpenRegStream
#define SHOpenRegStream SHOpenRegStream2 #define SHOpenRegStream SHOpenRegStream2
LWSTDAPI SHCreateStreamOnFileA(__in LPCSTR pszFile, __in DWORD grfMode, __deref_ LWSTDAPI SHCreateStreamOnFileA(_In_ LPCSTR pszFile, _In_ DWORD grfMode, _Outptr_
out IStream **ppstm); IStream **ppstm);
LWSTDAPI SHCreateStreamOnFileW(__in LPCWSTR pszFile, __in DWORD grfMode, __deref LWSTDAPI SHCreateStreamOnFileW(_In_ LPCWSTR pszFile, _In_ DWORD grfMode, _Outptr
_out IStream **ppstm); _ IStream **ppstm);
#ifdef UNICODE #ifdef UNICODE
#define SHCreateStreamOnFile SHCreateStreamOnFileW #define SHCreateStreamOnFile SHCreateStreamOnFileW
#else #else
#define SHCreateStreamOnFile SHCreateStreamOnFileA #define SHCreateStreamOnFile SHCreateStreamOnFileA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_IE >= 0x0600) #if (_WIN32_IE >= 0x0600)
LWSTDAPI SHCreateStreamOnFileEx(__in LPCWSTR pszFile, __in DWORD grfMode, __in D WORD dwAttributes, __in BOOL fCreate, __in_opt IStream *pstmTemplate, __deref_ou t IStream **ppstm); LWSTDAPI SHCreateStreamOnFileEx(_In_ LPCWSTR pszFile, _In_ DWORD grfMode, _In_ D WORD dwAttributes, _In_ BOOL fCreate, _In_opt_ IStream *pstmTemplate, _Outptr_ I Stream **ppstm);
#endif // (_WIN32_IE >= 0x0600) #endif // (_WIN32_IE >= 0x0600)
#if (_WIN32_IE >= _WIN32_IE_IE501) LWSTDAPI_(IStream *) SHCreateMemStream(_In_reads_bytes_opt_(cbInit) const BYTE *
pInit, _In_ UINT cbInit);
LWSTDAPI_(IStream *) SHCreateMemStream(__in_bcount_opt(cbInit) const BYTE *pInit
, __in UINT cbInit);
#endif // (_WIN32_IE >= _WIN32_IE_IE501)
#endif // NO_SHLWAPI_STREAM #endif // NO_SHLWAPI_STREAM
#ifndef NO_SHLWAPI_HTTP #ifndef NO_SHLWAPI_HTTP
// //
//=============== HTTP helper Routines =================================== //=============== HTTP helper Routines ===================================
// //
#if (_WIN32_IE >= 0x0603) #if (_WIN32_IE >= 0x0603)
LWSTDAPI GetAcceptLanguagesA(__out_ecount_part(*pcch, *pcch) LPSTR psz, __inout LWSTDAPI GetAcceptLanguagesA(_Out_writes_to_(*pcchLanguages, *pcchLanguages) LPS
DWORD *pcch); TR pszLanguages, _Inout_ DWORD *pcchLanguages);
LWSTDAPI GetAcceptLanguagesW(__out_ecount_part(*pcch, *pcch) LPWSTR psz, __inout LWSTDAPI GetAcceptLanguagesW(_Out_writes_to_(*pcchLanguages, *pcchLanguages) LPW
DWORD *pcch); STR pszLanguages, _Inout_ DWORD *pcchLanguages);
#ifdef UNICODE #ifdef UNICODE
#define GetAcceptLanguages GetAcceptLanguagesW #define GetAcceptLanguages GetAcceptLanguagesW
#else #else
#define GetAcceptLanguages GetAcceptLanguagesA #define GetAcceptLanguages GetAcceptLanguagesA
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_IE >= 0x0603) #endif // (_WIN32_IE >= 0x0603)
#endif // NO_SHLWAPI_HTTP #endif // NO_SHLWAPI_HTTP
#if (_WIN32_IE < _WIN32_IE_IE70) && !defined(NO_SHLWAPI_STOPWATCH) #if (_WIN32_IE < _WIN32_IE_IE70) && !defined(NO_SHLWAPI_STOPWATCH)
skipping to change at line 1800 skipping to change at line 1855
#define SPMODE_MULTISTOP 0x00004000 #define SPMODE_MULTISTOP 0x00004000
#ifndef NO_ETW_TRACING #ifndef NO_ETW_TRACING
#define SPMODE_EVENTTRACE 0x00008000 // Event Tracing for Windows Enabled #define SPMODE_EVENTTRACE 0x00008000 // Event Tracing for Windows Enabled
#endif #endif
DWORD WINAPI StopWatchMode(void); DWORD WINAPI StopWatchMode(void);
DWORD WINAPI StopWatchFlush(void); DWORD WINAPI StopWatchFlush(void);
#endif // (_WIN32_IE < _WIN32_IE_IE70) && !defined(NO_SHLWAPI_STOPWATCH) #endif // (_WIN32_IE < _WIN32_IE_IE70) && !defined(NO_SHLWAPI_STOPWATCH)
#if (_WIN32_IE >= _WIN32_IE_IE501) LWSTDAPI_(void) IUnknown_Set(_Inout_ IUnknown ** ppunk, _In_opt_ IUnknown *
punk);
LWSTDAPI_(void) IUnknown_Set(__deref_inout IUnknown ** ppunk, __in_opt IUnkn LWSTDAPI_(void) IUnknown_AtomicRelease(_Inout_opt_ void ** ppunk);
own * punk); LWSTDAPI IUnknown_GetWindow(_In_ IUnknown* punk, _Out_ HWND* phwnd);
LWSTDAPI_(void) IUnknown_AtomicRelease(__deref_opt_inout void ** ppunk); LWSTDAPI IUnknown_SetSite(_In_ IUnknown *punk, _In_opt_ IUnknown *punkSite);
LWSTDAPI IUnknown_GetWindow(__in_opt IUnknown* punk, __out HWND* phwnd); LWSTDAPI IUnknown_GetSite(_In_ IUnknown *punk, _In_ REFIID riid, _Outptr_ vo
LWSTDAPI IUnknown_SetSite(__in IUnknown *punk, __in_opt IUnknown *punkSite); id **ppv);
LWSTDAPI IUnknown_GetSite(__in IUnknown *punk, __in REFIID riid, __deref_out LWSTDAPI IUnknown_QueryService(_In_opt_ IUnknown* punk, _In_ REFGUID guidSer
void **ppv); vice, _In_ REFIID riid, _COM_Outptr_ void ** ppvOut);
LWSTDAPI IUnknown_QueryService(__in IUnknown* punk, __in REFGUID guidService
, __in REFIID riid, __deref_out void ** ppvOut);
#endif // (_WIN32_IE >= _WIN32_IE_IE501)
#if (_WIN32_IE >= _WIN32_IE_IE501)
#if !defined(__cplusplus) && defined(COBJMACROS) #if !defined(__cplusplus) && defined(COBJMACROS)
#undef IStream_Read #undef IStream_Read
#undef IStream_Write #undef IStream_Write
#endif #endif
LWSTDAPI IStream_Read(__in IStream *pstm, __out_bcount_full(cb) void *pv, __in U LWSTDAPI IStream_Read(_In_ IStream *pstm, _Out_writes_bytes_all_(cb) void *pv, _
LONG cb); In_ ULONG cb);
LWSTDAPI IStream_Write(__in IStream *pstm, __in_bcount(cb) const void *pv, __in LWSTDAPI IStream_Write(_In_ IStream *pstm, _In_reads_bytes_(cb) const void *pv,
ULONG cb); _In_ ULONG cb);
LWSTDAPI IStream_Reset(__in IStream *pstm); LWSTDAPI IStream_Reset(_In_ IStream *pstm);
LWSTDAPI IStream_Size(__in IStream *pstm, __out ULARGE_INTEGER *pui); LWSTDAPI IStream_Size(_In_ IStream *pstm, _Out_ ULARGE_INTEGER *pui);
// ocidl.h // ocidl.h
#ifndef __IConnectionPoint_FWD_DEFINED__ #ifndef __IConnectionPoint_FWD_DEFINED__
#define __IConnectionPoint_FWD_DEFINED__ #define __IConnectionPoint_FWD_DEFINED__
typedef interface IConnectionPoint IConnectionPoint; typedef interface IConnectionPoint IConnectionPoint;
#endif /* __IConnectionPoint_FWD_DEFINED__ */ #endif /* __IConnectionPoint_FWD_DEFINED__ */
LWSTDAPI ConnectToConnectionPoint(__in_opt IUnknown* punk, __in REFIID riidEvent LWSTDAPI ConnectToConnectionPoint(_In_opt_ IUnknown* punk, _In_ REFIID riidEvent
, __in BOOL fConnect, __in IUnknown* punkTarget, __out DWORD* pdwCookie, __deref , BOOL fConnect, _In_ IUnknown* punkTarget, _Out_ DWORD* pdwCookie, _Outptr_opt_
_opt_out IConnectionPoint** ppcpOut); IConnectionPoint** ppcpOut);
#endif // (_WIN32_IE >= _WIN32_IE_IE501)
#if (_WIN32_IE >= _WIN32_IE_IE60) #if (NTDDI_VERSION >= NTDDI_VISTA)
LWSTDAPI IStream_ReadPidl(__in IStream *pstm, __deref_out PIDLIST_RELATIVE *ppid LWSTDAPI IStream_ReadPidl(_In_ IStream *pstm, _Outptr_ PIDLIST_RELATIVE *ppidlOu
lOut); t);
LWSTDAPI IStream_WritePidl(__in IStream *pstm, __in PCUIDLIST_RELATIVE pidlWrite LWSTDAPI IStream_WritePidl(_In_ IStream *pstm, _In_ PCUIDLIST_RELATIVE pidlWrite
); );
#endif // (_WIN32_IE >= _WIN32_IE_IE60) #endif // (NTDDI_VERSION >= NTDDI_VISTA)
#if (_WIN32_IE >= _WIN32_IE_IE70) #if (_WIN32_IE >= _WIN32_IE_IE70)
LWSTDAPI IStream_ReadStr(__in IStream *pstm, __deref_out PWSTR *ppsz); LWSTDAPI IStream_ReadStr(_In_ IStream *pstm, _Outptr_ PWSTR *ppsz);
LWSTDAPI IStream_WriteStr(__in IStream *pstm, __in PCWSTR psz); LWSTDAPI IStream_WriteStr(_In_ IStream *pstm, _In_ PCWSTR psz);
LWSTDAPI IStream_Copy(__in IStream *pstmFrom, __in IStream *pstmTo, DWORD cb); LWSTDAPI IStream_Copy(_In_ IStream *pstmFrom, _In_ IStream *pstmTo, DWORD cb);
#endif // (_WIN32_IE >= _WIN32_IE_IE70) #endif // (_WIN32_IE >= _WIN32_IE_IE70)
#if (_WIN32_IE >= 0x0600) #if (_WIN32_IE >= 0x0600)
#define SHGVSPB_PERUSER 0x00000001 // must have one of PERUSER or AL LUSERS #define SHGVSPB_PERUSER 0x00000001 // must have one of PERUSER or AL LUSERS
#define SHGVSPB_ALLUSERS 0x00000002 #define SHGVSPB_ALLUSERS 0x00000002
#define SHGVSPB_PERFOLDER 0x00000004 // must have one of PERFOLDER ALL FOLDERS or INHERIT #define SHGVSPB_PERFOLDER 0x00000004 // must have one of PERFOLDER ALL FOLDERS or INHERIT
#define SHGVSPB_ALLFOLDERS 0x00000008 #define SHGVSPB_ALLFOLDERS 0x00000008
#define SHGVSPB_INHERIT 0x00000010 #define SHGVSPB_INHERIT 0x00000010
#define SHGVSPB_ROAM 0x00000020 // modifies the above #define SHGVSPB_ROAM 0x00000020 // modifies the above
#define SHGVSPB_NOAUTODEFAULTS 0x80000000 // turns off read delegation to m ore general property bags #define SHGVSPB_NOAUTODEFAULTS 0x80000000 // turns off read delegation to m ore general property bags
#define SHGVSPB_FOLDER (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER) #define SHGVSPB_FOLDER (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER)
#define SHGVSPB_FOLDERNODEFAULTS (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER | SHGVS PB_NOAUTODEFAULTS) #define SHGVSPB_FOLDERNODEFAULTS (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER | SHGVS PB_NOAUTODEFAULTS)
#define SHGVSPB_USERDEFAULTS (SHGVSPB_PERUSER | SHGVSPB_ALLFOLDERS) #define SHGVSPB_USERDEFAULTS (SHGVSPB_PERUSER | SHGVSPB_ALLFOLDERS)
#define SHGVSPB_GLOBALDEFAULTS (SHGVSPB_ALLUSERS | SHGVSPB_ALLFOLDERS) #define SHGVSPB_GLOBALDEFAULTS (SHGVSPB_ALLUSERS | SHGVSPB_ALLFOLDERS)
LWSTDAPI SHGetViewStatePropertyBag(__in_opt PCIDLIST_ABSOLUTE pidl, __in_opt LPC WSTR pszBagName, __in DWORD dwFlags, __in REFIID riid, __deref_out void** ppv); LWSTDAPI SHGetViewStatePropertyBag(_In_opt_ PCIDLIST_ABSOLUTE pidl, _In_opt_ PCW STR pszBagName, DWORD dwFlags, _In_ REFIID riid, _Outptr_ void **ppv);
#endif // (_WIN32_IE >= 0x0600) #endif // (_WIN32_IE >= 0x0600)
// SHFormatDateTime flags // SHFormatDateTime flags
// (FDTF_SHORTDATE and FDTF_LONGDATE are mutually exclusive, as is // (FDTF_SHORTDATE and FDTF_LONGDATE are mutually exclusive, as is
// FDTF_SHORTIME and FDTF_LONGTIME.) // FDTF_SHORTIME and FDTF_LONGTIME.)
// //
#define FDTF_SHORTTIME 0x00000001 // eg, "7:48 PM" #define FDTF_SHORTTIME 0x00000001 // eg, "7:48 PM"
#define FDTF_SHORTDATE 0x00000002 // eg, "3/29/98" #define FDTF_SHORTDATE 0x00000002 // eg, "3/29/98"
#define FDTF_DEFAULT (FDTF_SHORTDATE | FDTF_SHORTTIME) // eg, "3/29/9 8 7:48 PM" #define FDTF_DEFAULT (FDTF_SHORTDATE | FDTF_SHORTTIME) // eg, "3/29/9 8 7:48 PM"
#define FDTF_LONGDATE 0x00000004 // eg, "Monday, March 29, 1998" #define FDTF_LONGDATE 0x00000004 // eg, "Monday, March 29, 1998"
#define FDTF_LONGTIME 0x00000008 // eg. "7:48:33 PM" #define FDTF_LONGTIME 0x00000008 // eg. "7:48:33 PM"
#define FDTF_RELATIVE 0x00000010 // uses "Yesterday", etc. if pos sible #define FDTF_RELATIVE 0x00000010 // uses "Yesterday", etc. if pos sible
#define FDTF_LTRDATE 0x00000100 // Left To Right reading order #define FDTF_LTRDATE 0x00000100 // Left To Right reading order
#define FDTF_RTLDATE 0x00000200 // Right To Left reading order #define FDTF_RTLDATE 0x00000200 // Right To Left reading order
#define FDTF_NOAUTOREADINGORDER 0x00000400 // Don't detect reading order au tomatically. Useful if you will be converting to Ansi and don't want Unicode rea ding order characters #define FDTF_NOAUTOREADINGORDER 0x00000400 // Don't detect reading order au tomatically. Useful if you will be converting to Ansi and don't want Unicode rea ding order characters
LWSTDAPI_(int) SHFormatDateTimeA(const FILETIME UNALIGNED * pft, __inout_opt DW LWSTDAPI_(int) SHFormatDateTimeA(_In_ const FILETIME UNALIGNED * pft, _Inout_op
ORD * pdwFlags, __out_ecount(cchBuf) LPSTR pszBuf, UINT cchBuf); t_ DWORD * pdwFlags, _Out_writes_(cchBuf) LPSTR pszBuf, UINT cchBuf);
LWSTDAPI_(int) SHFormatDateTimeW(const FILETIME UNALIGNED * pft, __inout_opt DW LWSTDAPI_(int) SHFormatDateTimeW(_In_ const FILETIME UNALIGNED * pft, _Inout_op
ORD * pdwFlags, __out_ecount(cchBuf) LPWSTR pszBuf, UINT cchBuf); t_ DWORD * pdwFlags, _Out_writes_(cchBuf) LPWSTR pszBuf, UINT cchBuf);
#ifdef UNICODE #ifdef UNICODE
#define SHFormatDateTime SHFormatDateTimeW #define SHFormatDateTime SHFormatDateTimeW
#else #else
#define SHFormatDateTime SHFormatDateTimeA #define SHFormatDateTime SHFormatDateTimeA
#endif // !UNICODE #endif // !UNICODE
#if (_WIN32_IE >= _WIN32_IE_IE501) _Success_(return > 0)
LWSTDAPI_(int) SHAnsiToUnicode(_In_ PCSTR pszSrc, _Out_writes_(cwchBuf) PWSTR p
__success(return > 0) wszDst, _In_ int cwchBuf);
LWSTDAPI_(int) SHAnsiToUnicode(LPCSTR pszSrc, __out_ecount(cwchBuf) LPWSTR pwsz _Success_(return > 0)
Dst, int cwchBuf); LWSTDAPI_(int) SHAnsiToAnsi(_In_ PCSTR pszSrc, _Out_writes_(cchBuf) PSTR pszDst
__success(return > 0) , _In_ int cchBuf);
LWSTDAPI_(int) SHAnsiToAnsi(LPCSTR pszSrc, __out_ecount(cchBuf) LPSTR pszDst, i _Success_(return > 0)
nt cchBuf); LWSTDAPI_(int) SHUnicodeToAnsi(_In_ PCWSTR pwszSrc, _Out_writes_(cchBuf) PSTR p
__success(return > 0) szDst, _In_ int cchBuf);
LWSTDAPI_(int) SHUnicodeToAnsi(LPCWSTR pwszSrc, __out_ecount(cchBuf) LPSTR pszD _Success_(return > 0)
st, int cchBuf); LWSTDAPI_(int) SHUnicodeToUnicode(_In_ PCWSTR pwzSrc, _Out_writes_(cwchBuf) PWS
__success(return > 0) TR pwzDst, _In_ int cwchBuf);
LWSTDAPI_(int) SHUnicodeToUnicode(LPCWSTR pwzSrc, __out_ecount(cwchBuf) LPWSTR
pwzDst, int cwchBuf);
// The return value from all SH<Type>To<Type> is the size of szDest including th e terminater. // The return value from all SH<Type>To<Type> is the size of szDest including th e terminater.
#ifdef UNICODE #ifdef UNICODE
#define SHTCharToUnicode(wzSrc, wzDest, cchSize) SHUnicodeToUnico de(wzSrc, wzDest, cchSize) #define SHTCharToUnicode(wzSrc, wzDest, cchSize) SHUnicodeToUnico de(wzSrc, wzDest, cchSize)
#define SHTCharToAnsi(wzSrc, szDest, cchSize) SHUnicodeToAnsi( wzSrc, szDest, cchSize) #define SHTCharToAnsi(wzSrc, szDest, cchSize) SHUnicodeToAnsi( wzSrc, szDest, cchSize)
#define SHUnicodeToTChar(wzSrc, wzDest, cchSize) SHUnicodeToUnico de(wzSrc, wzDest, cchSize) #define SHUnicodeToTChar(wzSrc, wzDest, cchSize) SHUnicodeToUnico de(wzSrc, wzDest, cchSize)
#define SHAnsiToTChar(szSrc, wzDest, cchSize) SHAnsiToUnicode( szSrc, wzDest, cchSize) #define SHAnsiToTChar(szSrc, wzDest, cchSize) SHAnsiToUnicode( szSrc, wzDest, cchSize)
#else // UNICODE #else // UNICODE
#define SHTCharToUnicode(szSrc, wzDest, cchSize) SHAnsiToUnicode( szSrc, wzDest, cchSize) #define SHTCharToUnicode(szSrc, wzDest, cchSize) SHAnsiToUnicode( szSrc, wzDest, cchSize)
#define SHTCharToAnsi(szSrc, szDest, cchSize) SHAnsiToAnsi(szS rc, szDest, cchSize) #define SHTCharToAnsi(szSrc, szDest, cchSize) SHAnsiToAnsi(szS rc, szDest, cchSize)
#define SHUnicodeToTChar(wzSrc, szDest, cchSize) SHUnicodeToAnsi( wzSrc, szDest, cchSize) #define SHUnicodeToTChar(wzSrc, szDest, cchSize) SHUnicodeToAnsi( wzSrc, szDest, cchSize)
#define SHAnsiToTChar(szSrc, szDest, cchSize) SHAnsiToAnsi(szS rc, szDest, cchSize) #define SHAnsiToTChar(szSrc, szDest, cchSize) SHAnsiToAnsi(szS rc, szDest, cchSize)
#endif // UNICODE #endif // UNICODE
#endif // (_WIN32_IE >= _WIN32_IE_IE501) LWSTDAPI_(int) SHMessageBoxCheckA(_In_opt_ HWND hwnd, _In_ LPCSTR pszText, _In_
LPCSTR pszCaption, UINT uType, int iDefault, _In_ LPCSTR pszRegVal);
#if (_WIN32_IE >= _WIN32_IE_IE501) LWSTDAPI_(int) SHMessageBoxCheckW(_In_opt_ HWND hwnd, _In_ LPCWSTR pszText, _In_
LPCWSTR pszCaption, UINT uType, int iDefault, _In_ LPCWSTR pszRegVal);
LWSTDAPI_(int) SHMessageBoxCheckA(HWND hwnd, LPCSTR pszText, LPCSTR pszCaption,
UINT uType, int iDefault, LPCSTR pszRegVal);
LWSTDAPI_(int) SHMessageBoxCheckW(HWND hwnd, LPCWSTR pszText, LPCWSTR pszCaption
, UINT uType, int iDefault, LPCWSTR pszRegVal);
#ifdef UNICODE #ifdef UNICODE
#define SHMessageBoxCheck SHMessageBoxCheckW #define SHMessageBoxCheck SHMessageBoxCheckW
#else #else
#define SHMessageBoxCheck SHMessageBoxCheckA #define SHMessageBoxCheck SHMessageBoxCheckA
#endif // !UNICODE #endif // !UNICODE
#endif // (_WIN32_IE >= _WIN32_IE_IE501)
#if (_WIN32_IE >= _WIN32_IE_IE501)
// Prevents hang do to hung window on broadcast // Prevents hang do to hung window on broadcast
LWSTDAPI_(LRESULT) SHSendMessageBroadcastA(__in UINT uMsg, __in WPARAM wParam, _ _in LPARAM lParam); LWSTDAPI_(LRESULT) SHSendMessageBroadcastA(_In_ UINT uMsg, _In_ WPARAM wParam, _ In_ LPARAM lParam);
// Prevents hang do to hung window on broadcast // Prevents hang do to hung window on broadcast
LWSTDAPI_(LRESULT) SHSendMessageBroadcastW(__in UINT uMsg, __in WPARAM wParam, _ _in LPARAM lParam); LWSTDAPI_(LRESULT) SHSendMessageBroadcastW(_In_ UINT uMsg, _In_ WPARAM wParam, _ In_ LPARAM lParam);
#ifdef UNICODE #ifdef UNICODE
#define SHSendMessageBroadcast SHSendMessageBroadcastW #define SHSendMessageBroadcast SHSendMessageBroadcastW
#else #else
#define SHSendMessageBroadcast SHSendMessageBroadcastA #define SHSendMessageBroadcast SHSendMessageBroadcastA
#endif // !UNICODE #endif // !UNICODE
LWSTDAPI_(CHAR) SHStripMneumonicA(__inout LPSTR pszMenu); LWSTDAPI_(CHAR) SHStripMneumonicA(_Inout_ LPSTR pszMenu);
LWSTDAPI_(WCHAR) SHStripMneumonicW(__inout LPWSTR pszMenu); LWSTDAPI_(WCHAR) SHStripMneumonicW(_Inout_ LPWSTR pszMenu);
#ifdef UNICODE #ifdef UNICODE
#define SHStripMneumonic SHStripMneumonicW #define SHStripMneumonic SHStripMneumonicW
#else #else
#define SHStripMneumonic SHStripMneumonicA #define SHStripMneumonic SHStripMneumonicA
#endif // !UNICODE #endif // !UNICODE
#ifndef NO_SHLWAPI_ISOS #ifndef NO_SHLWAPI_ISOS
// Returns TRUE/FALSE depending on question // Returns TRUE/FALSE depending on question
#define OS_WINDOWS 0 // Windows 9x vs. NT #define OS_WINDOWS 0 // Windows 9x vs. NT
skipping to change at line 1993 skipping to change at line 2030
#define OS_SMALLBUSINESSSERVER 32 // SBS Server #define OS_SMALLBUSINESSSERVER 32 // SBS Server
#define OS_TABLETPC 33 // Are we running on a TabletPC? #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_SERVERADMINUI 34 // Should defaults lean towards those preferred by server administrators?
#define OS_MEDIACENTER 35 // eHome Freestyle Project #define OS_MEDIACENTER 35 // eHome Freestyle Project
#define OS_APPLIANCE 36 // Windows .NET Appliance Server #define OS_APPLIANCE 36 // Windows .NET Appliance Server
LWSTDAPI_(BOOL) IsOS(DWORD dwOS); LWSTDAPI_(BOOL) IsOS(DWORD dwOS);
#endif // NO_SHLWAPI_ISOS #endif // NO_SHLWAPI_ISOS
#endif // (_WIN32_IE >= _WIN32_IE_IE501)
typedef enum typedef enum
{ {
GLOBALCOUNTER_SEARCHMANAGER, GLOBALCOUNTER_SEARCHMANAGER,
GLOBALCOUNTER_SEARCHOPTIONS, GLOBALCOUNTER_SEARCHOPTIONS,
GLOBALCOUNTER_FOLDERSETTINGSCHANGE, GLOBALCOUNTER_FOLDERSETTINGSCHANGE,
GLOBALCOUNTER_RATINGS, GLOBALCOUNTER_RATINGS,
GLOBALCOUNTER_APPROVEDSITES, GLOBALCOUNTER_APPROVEDSITES,
GLOBALCOUNTER_RESTRICTIONS, GLOBALCOUNTER_RESTRICTIONS,
GLOBALCOUNTER_SHELLSETTINGSCHANGED, GLOBALCOUNTER_SHELLSETTINGSCHANGED,
GLOBALCOUNTER_SYSTEMPIDLCHANGE, GLOBALCOUNTER_SYSTEMPIDLCHANGE,
skipping to change at line 2050 skipping to change at line 2085
__UNUSED_RECYCLE_WAS_GLOBALCOUNTER_RECYCLEGLOBALDIRTYCOUNT, __UNUSED_RECYCLE_WAS_GLOBALCOUNTER_RECYCLEGLOBALDIRTYCOUNT,
GLOBALCOUNTER_RECYCLEBINENUM, GLOBALCOUNTER_RECYCLEBINENUM,
GLOBALCOUNTER_RECYCLEBINCORRUPTED, GLOBALCOUNTER_RECYCLEBINCORRUPTED,
GLOBALCOUNTER_RATINGS_STATECOUNTER, GLOBALCOUNTER_RATINGS_STATECOUNTER,
GLOBALCOUNTER_PRIVATE_PROFILE_CACHE, GLOBALCOUNTER_PRIVATE_PROFILE_CACHE,
GLOBALCOUNTER_INTERNETTOOLBAR_LAYOUT, GLOBALCOUNTER_INTERNETTOOLBAR_LAYOUT,
GLOBALCOUNTER_FOLDERDEFINITION_CACHE, GLOBALCOUNTER_FOLDERDEFINITION_CACHE,
GLOBALCOUNTER_COMMONPLACES_LIST_CACHE, GLOBALCOUNTER_COMMONPLACES_LIST_CACHE,
GLOBALCOUNTER_PRIVATE_PROFILE_CACHE_MACHINEWIDE, GLOBALCOUNTER_PRIVATE_PROFILE_CACHE_MACHINEWIDE,
GLOBALCOUNTER_ASSOCCHANGED, // throttles reading of the registry value "Glo balAssocChangedCounter" from HKLM\Software\Microsoft\Windows\CurrentVersion\Expl orer GLOBALCOUNTER_ASSOCCHANGED, // throttles reading of the registry value "Glo balAssocChangedCounter" from HKLM\Software\Microsoft\Windows\CurrentVersion\Expl orer
#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)
GLOBALCOUNTER_SYNC_ENGINE_INFORMATION_CACHE_MACHINEWIDE,
#endif // (NTDDI_VERSION >= NTDDI_WINBLUE)
#endif // (NTDDI_VERSION >= NTDDI_WIN8)
GLOBALCOUNTER_MAXIMUMVALUE // should always be last value GLOBALCOUNTER_MAXIMUMVALUE // should always be last value
} SHGLOBALCOUNTER; } SHGLOBALCOUNTER;
#if (NTDDI_VERSION >= NTDDI_WIN7)
LWSTDAPI_(long) SHGlobalCounterGetValue(const SHGLOBALCOUNTER id); LWSTDAPI_(long) SHGlobalCounterGetValue(const SHGLOBALCOUNTER id);
LWSTDAPI_(long) SHGlobalCounterIncrement(const SHGLOBALCOUNTER id); LWSTDAPI_(long) SHGlobalCounterIncrement(const SHGLOBALCOUNTER id);
LWSTDAPI_(long) SHGlobalCounterDecrement(const SHGLOBALCOUNTER id); LWSTDAPI_(long) SHGlobalCounterDecrement(const SHGLOBALCOUNTER id);
#endif // (NTDDI_VERSION >= NTDDI_WIN7)
// Shared memory apis // Shared memory apis
#if (_WIN32_IE >= 0x0603) #if (_WIN32_IE >= 0x0603)
LWSTDAPI_(HANDLE) SHAllocShared(__in_bcount_opt(dwSize) const void *pvData, __ LWSTDAPI_(HANDLE) SHAllocShared(_In_reads_bytes_opt_(dwSize) const void *pvDat
in DWORD dwSize, __in DWORD dwProcessId); a, _In_ DWORD dwSize, _In_ DWORD dwProcessId);
LWSTDAPI_(BOOL) SHFreeShared(__in HANDLE hData, __in DWORD dwProcessId); LWSTDAPI_(BOOL) SHFreeShared(_In_ HANDLE hData, _In_ DWORD dwProcessId);
LWSTDAPI_(void *) SHLockShared(__in HANDLE hData, __in DWORD dwProcessId); LWSTDAPI_(void *) SHLockShared(_In_ HANDLE hData, _In_ DWORD dwProcessId);
LWSTDAPI_(BOOL) SHUnlockShared(__in_xcount("header-preceded") void *pvData); LWSTDAPI_(BOOL) SHUnlockShared(_In_reads_(_Inexpressible_("header-preceded")
) void *pvData);
#endif // _WIN32_IE >= 0x0603 #endif // _WIN32_IE >= 0x0603
#if (_WIN32_IE >= _WIN32_IE_IE501)
LWSTDAPI_(UINT) WhichPlatform(void); LWSTDAPI_(UINT) WhichPlatform(void);
// Return values of WhichPlatform // Return values of WhichPlatform
#define PLATFORM_UNKNOWN 0 #define PLATFORM_UNKNOWN 0
#define PLATFORM_IE3 1 // obsolete: use PLATFORM_BROWSERONLY #define PLATFORM_IE3 1 // obsolete: use PLATFORM_BROWSERONLY
#define PLATFORM_BROWSERONLY 1 // browser-only (no new shell) #define PLATFORM_BROWSERONLY 1 // browser-only (no new shell)
#define PLATFORM_INTEGRATED 2 // integrated shell #define PLATFORM_INTEGRATED 2 // integrated shell
//*** QueryInterface helpers //*** QueryInterface helpers
// NOTES // NOTES
skipping to change at line 2154 skipping to change at line 2198
#define QITABENTMULTI(Cthis, Ifoo, Iimpl) \ #define QITABENTMULTI(Cthis, Ifoo, Iimpl) \
{ (IID*) &IID_##Ifoo, OFFSETOFCLASS(Iimpl, Cthis) } { (IID*) &IID_##Ifoo, OFFSETOFCLASS(Iimpl, Cthis) }
#endif // __cplusplus #endif // __cplusplus
#define QITABENTMULTI2(Cthis, Ifoo, Iimpl) \ #define QITABENTMULTI2(Cthis, Ifoo, Iimpl) \
{ (IID*) &Ifoo, OFFSETOFCLASS(Iimpl, Cthis) } { (IID*) &Ifoo, OFFSETOFCLASS(Iimpl, Cthis) }
#define QITABENT(Cthis, Ifoo) QITABENTMULTI(Cthis, Ifoo, Ifoo) #define QITABENT(Cthis, Ifoo) QITABENTMULTI(Cthis, Ifoo, Ifoo)
STDAPI QISearch(__inout void* that, __in LPCQITAB pqit, __in REFIID riid, __dere STDAPI QISearch(_Inout_ void* that, _In_ LPCQITAB pqit, _In_ REFIID riid, _COM_O
f_out void **ppv); utptr_ void **ppv);
#endif // (_WIN32_IE >= _WIN32_IE_IE501)
#ifndef STATIC_CAST #ifndef STATIC_CAST
//*** STATIC_CAST -- 'portable' static_cast<> //*** STATIC_CAST -- 'portable' static_cast<>
// NOTES // NOTES
// do *not* use SAFE_CAST (see comment in OFFSETOFCLASS) // do *not* use SAFE_CAST (see comment in OFFSETOFCLASS)
#define STATIC_CAST(typ) static_cast<typ> #define STATIC_CAST(typ) static_cast<typ>
#ifndef _X86_ #ifndef _X86_
// assume only intel compiler (>=vc5) supports static_cast for now // 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 // we could key off of _MSC_VER >= 1100 but i'm not sure that will work
// //
skipping to change at line 2189 skipping to change at line 2231
#define OFFSETOFCLASS(base, derived) \ #define OFFSETOFCLASS(base, derived) \
((DWORD)(DWORD_PTR)(STATIC_CAST(base*)((derived*)8))-8) ((DWORD)(DWORD_PTR)(STATIC_CAST(base*)((derived*)8))-8)
#endif #endif
// Types for SHIsLowMemoryMachine // Types for SHIsLowMemoryMachine
#define ILMM_IE4 0 // 1997-era machine #define ILMM_IE4 0 // 1997-era machine
LWSTDAPI_(BOOL) SHIsLowMemoryMachine(DWORD dwType); LWSTDAPI_(BOOL) SHIsLowMemoryMachine(DWORD dwType);
// Menu Helpers // Menu Helpers
LWSTDAPI_(int) GetMenuPosFromID(HMENU hmenu, UINT id); LWSTDAPI_(int) GetMenuPosFromID(_In_ HMENU hmenu, UINT id);
LWSTDAPI SHGetInverseCMAP(__out_bcount(cbMap) BYTE *pbMap, ULONG cbMap);
#if (_WIN32_IE >= 0x0500) LWSTDAPI SHGetInverseCMAP(_Out_writes_bytes_(cbMap) BYTE *pbMap, ULONG cb Map);
// SHAutoComplete // SHAutoComplete
// hwndEdit - HWND of editbox, ComboBox or ComboBoxEx. // hwndEdit - HWND of editbox, ComboBox or ComboBoxEx.
// dwFlags - Flags to indicate what to AutoAppend or AutoSuggest for the ed itbox. // dwFlags - Flags to indicate what to AutoAppend or AutoSuggest for the ed itbox.
// //
// WARNING: // WARNING:
// Caller needs to have called CoInitialize() or OleInitialize() // Caller needs to have called CoInitialize() or OleInitialize()
// and cannot call CoUninit/OleUninit until after // and cannot call CoUninit/OleUninit until after
// WM_DESTROY on hwndEdit. // WM_DESTROY on hwndEdit.
// //
skipping to change at line 2223 skipping to change at line 2263
#define SHACF_FILESYS_DIRS 0x00000020 // Same as SHACF_FILESYS_ONL Y except it only includes directories, UNC servers, and UNC server shares. #define SHACF_FILESYS_DIRS 0x00000020 // Same as SHACF_FILESYS_ONL Y except it only includes directories, UNC servers, and UNC server shares.
#endif // (_WIN32_IE >= 0x0600) #endif // (_WIN32_IE >= 0x0600)
#if (_WIN32_IE >= _WIN32_IE_IE70) #if (_WIN32_IE >= _WIN32_IE_IE70)
#define SHACF_VIRTUAL_NAMESPACE 0x00000040 // Also include the virtual namespace #define SHACF_VIRTUAL_NAMESPACE 0x00000040 // Also include the virtual namespace
#endif // _WIN32_IE_IE70 #endif // _WIN32_IE_IE70
#define SHACF_AUTOSUGGEST_FORCE_ON 0x10000000 // Ignore the registry defau lt and force the feature on. #define SHACF_AUTOSUGGEST_FORCE_ON 0x10000000 // Ignore the registry defau lt and force the feature on.
#define SHACF_AUTOSUGGEST_FORCE_OFF 0x20000000 // Ignore the registry defau lt and force the feature off. #define SHACF_AUTOSUGGEST_FORCE_OFF 0x20000000 // Ignore the registry defau lt and force the feature off.
#define SHACF_AUTOAPPEND_FORCE_ON 0x40000000 // Ignore the registry defau lt and force the feature on. (Also know as AutoComplete) #define SHACF_AUTOAPPEND_FORCE_ON 0x40000000 // Ignore the registry defau lt and force the feature on. (Also know as AutoComplete)
#define SHACF_AUTOAPPEND_FORCE_OFF 0x80000000 // Ignore the registry defau lt and force the feature off. (Also know as AutoComplete) #define SHACF_AUTOAPPEND_FORCE_OFF 0x80000000 // Ignore the registry defau lt and force the feature off. (Also know as AutoComplete)
LWSTDAPI SHAutoComplete(HWND hwndEdit, DWORD dwFlags); LWSTDAPI SHAutoComplete(_In_ HWND hwndEdit, DWORD dwFlags);
#if (_WIN32_IE >= _WIN32_IE_IE60SP2) #if (_WIN32_IE >= _WIN32_IE_IE60SP2)
LWSTDAPI SHCreateThreadRef(__inout LONG *pcRef, __deref_out IUnknown **ppunk); LWSTDAPI SHCreateThreadRef(_Inout_ LONG *pcRef, _Outptr_ IUnknown **ppunk);
#endif // _WIN32_IE_IE60SP2 #endif // _WIN32_IE_IE60SP2
LWSTDAPI SHSetThreadRef(__in_opt IUnknown *punk); LWSTDAPI SHSetThreadRef(_In_opt_ IUnknown *punk);
LWSTDAPI SHGetThreadRef(__deref_out IUnknown **ppunk); LWSTDAPI SHGetThreadRef(_COM_Outptr_ IUnknown **ppunk);
LWSTDAPI_(BOOL) SHSkipJunction(__in_opt IBindCtx* pbc, __in const CLSID *pclsid) LWSTDAPI_(BOOL) SHSkipJunction(_In_opt_ IBindCtx* pbc, _In_ const CLSID *pclsid)
; ;
#endif // (_WIN32_IE >= 0x0500)
enum enum
{ {
CTF_INSIST = 0x00000001, // call pfnThreadProc synchronously if CreateThread() fails CTF_INSIST = 0x00000001, // call pfnThreadProc synchronously if CreateThread() fails
CTF_THREAD_REF = 0x00000002, // hold a reference to the creating thread CTF_THREAD_REF = 0x00000002, // hold a reference to the creating thread
CTF_PROCESS_REF = 0x00000004, // hold a reference to the creating process CTF_PROCESS_REF = 0x00000004, // hold a reference to the creating process
CTF_COINIT_STA = 0x00000008, // init COM as STA for the created t hread CTF_COINIT_STA = 0x00000008, // init COM as STA for the created t hread
CTF_COINIT = 0x00000008, // init COM as STA for the created t hread CTF_COINIT = 0x00000008, // init COM as STA for the created t hread
#if (_WIN32_IE >= _WIN32_IE_IE60) #if (_WIN32_IE >= _WIN32_IE_IE60)
CTF_FREELIBANDEXIT = 0x00000010, // hold a ref to the DLL and call Fr eeLibraryAndExitThread() when done CTF_FREELIBANDEXIT = 0x00000010, // hold a ref to the DLL and call Fr eeLibraryAndExitThread() when done
skipping to change at line 2262 skipping to change at line 2301
#endif // (NTDDI_VERSION >= NTDDI_VISTA) #endif // (NTDDI_VERSION >= NTDDI_VISTA)
#if (NTDDI_VERSION >= NTDDI_WIN7) #if (NTDDI_VERSION >= NTDDI_WIN7)
CTF_KEYBOARD_LOCALE = 0x00000400, // carry the keyboard locale from cr eating to created thread CTF_KEYBOARD_LOCALE = 0x00000400, // carry the keyboard locale from cr eating to created thread
CTF_OLEINITIALIZE = 0x00000800, // init OLE on the created thread (t his will also init COM as STA) CTF_OLEINITIALIZE = 0x00000800, // init OLE on the created thread (t his will also init COM as STA)
CTF_COINIT_MTA = 0x00001000, // init COM as MTA for the created t hread CTF_COINIT_MTA = 0x00001000, // init COM as MTA for the created t hread
CTF_NOADDREFLIB = 0x00002000, // this flag is the opposite of CTF_ FREELIBANDEXIT that is now implicit as of Vista CTF_NOADDREFLIB = 0x00002000, // this flag is the opposite of CTF_ FREELIBANDEXIT that is now implicit as of Vista
// this avoids the LoadLibrary/FreeL ibraryAndExitThread calls that result in contention for the loader lock // this avoids the LoadLibrary/FreeL ibraryAndExitThread calls that result in contention for the loader lock
// only use this when the thread bei ng created has some other means to ensure that the code // only use this when the thread bei ng created has some other means to ensure that the code
// of the thread proc will remain lo aded. This should not be used in the context of COM objects as those // of the thread proc will remain lo aded. This should not be used in the context of COM objects as those
// need to ensure that the DLL stays loaded as COM will unload DLLs // need to ensure that the DLL stays loaded as COM will unload DLLs
#endif // (NTDDI_VERSION >= NTDDI_WIN7) #endif // (NTDDI_VERSION >= NTDDI_WIN7)
}; };
typedef DWORD SHCT_FLAGS; // SHCreateThread flags values typedef DWORD SHCT_FLAGS; // SHCreateThread flags values
LWSTDAPI_(BOOL) SHCreateThread(__in LPTHREAD_START_ROUTINE pfnThreadProc, __in_o LWSTDAPI_(BOOL) SHCreateThread(_In_ LPTHREAD_START_ROUTINE pfnThreadProc, _In_op
pt void *pData, SHCT_FLAGS flags, __in_opt LPTHREAD_START_ROUTINE pfnCallback); t_ void *pData, _In_ SHCT_FLAGS flags, _In_opt_ LPTHREAD_START_ROUTINE pfnCallba
LWSTDAPI_(BOOL) SHCreateThreadWithHandle(__in LPTHREAD_START_ROUTINE pfnThreadPr ck);
oc, __in_opt void *pData, SHCT_FLAGS flags, __in_opt LPTHREAD_START_ROUTINE pfnC LWSTDAPI_(BOOL) SHCreateThreadWithHandle(_In_ LPTHREAD_START_ROUTINE pfnThreadPr
allback, __out_opt HANDLE *pHandle); oc, _In_opt_ void *pData, _In_ SHCT_FLAGS flags, _In_opt_ LPTHREAD_START_ROUTINE
pfnCallback, _Out_opt_ HANDLE *pHandle);
#if (NTDDI_VERSION >= NTDDI_WIN8)
LWSTDAPI_(void) SetProcessReference(_In_opt_ IUnknown *punk);
LWSTDAPI GetProcessReference(_COM_Outptr_ IUnknown **punk);
#endif // (NTDDI_VERSION >= NTDDI_WIN8)
#if (_WIN32_IE >= _WIN32_IE_IE60) #if (_WIN32_IE >= _WIN32_IE_IE60)
LWSTDAPI SHReleaseThreadRef(); // release a CTF_THREAD_REF reference earlier tha n the return of pfnThreadProc LWSTDAPI SHReleaseThreadRef(); // release a CTF_THREAD_REF reference earlier tha n the return of pfnThreadProc
#endif // _WIN32_IE_IE60 #endif // _WIN32_IE_IE60
#ifndef NO_SHLWAPI_GDI #ifndef NO_SHLWAPI_GDI
// //
//====== GDI helper functions ================================================ //====== GDI helper functions ================================================
// //
LWSTDAPI_(HPALETTE) SHCreateShellPalette(__in_opt HDC hdc); LWSTDAPI_(HPALETTE) SHCreateShellPalette(_In_opt_ HDC hdc);
#if (_WIN32_IE >= 0x0500)
LWSTDAPI_(void) ColorRGBToHLS(__in COLORREF clrRGB, __out WORD* pwHue, __out
WORD* pwLuminance, __out WORD* pwSaturation);
LWSTDAPI_(COLORREF) ColorHLSToRGB(__in WORD wHue, __in WORD wLuminance, __in WOR
D wSaturation);
LWSTDAPI_(COLORREF) ColorAdjustLuma(__in COLORREF clrRGB, int n, BOOL fScale);
#endif // _WIN32_IE >= 0x0500 LWSTDAPI_(void) ColorRGBToHLS(COLORREF clrRGB, _Out_ WORD* pwHue, _Out_ WORD
* pwLuminance, _Out_ WORD* pwSaturation);
LWSTDAPI_(COLORREF) ColorHLSToRGB(WORD wHue, WORD wLuminance, WORD wSaturation);
LWSTDAPI_(COLORREF) ColorAdjustLuma(COLORREF clrRGB, int n, BOOL fScale);
#endif // NO_SHLWAPI_GDI #endif // NO_SHLWAPI_GDI
// //
//====== DllGetVersion ======================================================= //====== DllGetVersion =======================================================
// //
typedef struct _DLLVERSIONINFO typedef struct _DLLVERSIONINFO
{ {
DWORD cbSize; DWORD cbSize;
DWORD dwMajorVersion; // Major version DWORD dwMajorVersion; // Major version
DWORD dwMinorVersion; // Minor version DWORD dwMinorVersion; // Minor version
DWORD dwBuildNumber; // Build number DWORD dwBuildNumber; // Build number
DWORD dwPlatformID; // DLLVER_PLATFORM_* DWORD dwPlatformID; // DLLVER_PLATFORM_*
} DLLVERSIONINFO; } DLLVERSIONINFO;
// Platform IDs for DLLVERSIONINFO // Platform IDs for DLLVERSIONINFO
#define DLLVER_PLATFORM_WINDOWS 0x00000001 // Windows 95 #define DLLVER_PLATFORM_WINDOWS 0x00000001 // Windows 95
#define DLLVER_PLATFORM_NT 0x00000002 // Windows NT #define DLLVER_PLATFORM_NT 0x00000002 // Windows NT
#if (_WIN32_IE >= 0x0501)
typedef struct _DLLVERSIONINFO2 typedef struct _DLLVERSIONINFO2
{ {
DLLVERSIONINFO info1; DLLVERSIONINFO info1;
DWORD dwFlags; // No flags currently defined DWORD dwFlags; // No flags currently defined
ULONGLONG ullVersion; // Encoded as: ULONGLONG ullVersion; // Encoded as:
// Major 0xFFFF 0000 0000 0000 // Major 0xFFFF 0000 0000 0000
// Minor 0x0000 FFFF 0000 0000 // Minor 0x0000 FFFF 0000 0000
// Build 0x0000 0000 FFFF 0000 // Build 0x0000 0000 FFFF 0000
// QFE 0x0000 0000 0000 FFFF // QFE 0x0000 0000 0000 FFFF
} DLLVERSIONINFO2; } DLLVERSIONINFO2;
#define DLLVER_MAJOR_MASK 0xFFFF000000000000 #define DLLVER_MAJOR_MASK 0xFFFF000000000000
#define DLLVER_MINOR_MASK 0x0000FFFF00000000 #define DLLVER_MINOR_MASK 0x0000FFFF00000000
#define DLLVER_BUILD_MASK 0x00000000FFFF0000 #define DLLVER_BUILD_MASK 0x00000000FFFF0000
#define DLLVER_QFE_MASK 0x000000000000FFFF #define DLLVER_QFE_MASK 0x000000000000FFFF
#endif
#define MAKEDLLVERULL(major, minor, build, qfe) \ #define MAKEDLLVERULL(major, minor, build, qfe) \
(((ULONGLONG)(major) << 48) | \ (((ULONGLONG)(major) << 48) | \
((ULONGLONG)(minor) << 32) | \ ((ULONGLONG)(minor) << 32) | \
((ULONGLONG)(build) << 16) | \ ((ULONGLONG)(build) << 16) | \
((ULONGLONG)( qfe) << 0)) ((ULONGLONG)( qfe) << 0))
// //
// The caller should always GetProcAddress("DllGetVersion"), not // The caller should always GetProcAddress("DllGetVersion"), not
// implicitly link to it. // implicitly link to it.
// //
typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *); typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *);
// DllInstall (to be implemented by self-installing DLLs) // DllInstall (to be implemented by self-installing DLLs)
STDAPI DllInstall(__in BOOL bInstall, __in LPCWSTR pszCmdLine); STDAPI DllInstall(BOOL bInstall, _In_opt_ PCWSTR pszCmdLine);
#if (_WIN32_IE >= 0x0602) #if (_WIN32_IE >= 0x0602)
// Function to see if Internet Explorer Enhanced Security Configuration is activ e for the current user // Function to see if Internet Explorer Enhanced Security Configuration is activ e for the current user
LWSTDAPI_(BOOL) IsInternetESCEnabled(); LWSTDAPI_(BOOL) IsInternetESCEnabled();
#endif // (_WIN32_IE >= 0x0602) #endif // (_WIN32_IE >= 0x0602)
#ifdef __cplusplus #ifdef __cplusplus
} }
#if defined(USE_STRICT_CONST) && !defined(NO_SHLWAPI_STRFCNS) #if defined(USE_STRICT_CONST) && !defined(NO_SHLWAPI_STRFCNS)
//============================================================================= //=============================================================================
// C++ versions to help detect "const" violations // C++ versions to help detect "const" violations
__inline LPSTR StrChrA(__in LPSTR lpStart, WORD wMatch) __inline PSTR StrChrA(_In_ PSTR pszStart, WORD wMatch)
{ {
return const_cast<LPSTR>(StrChrA(const_cast<LPCSTR>(lpStart), wMatch)); return const_cast<PSTR>(StrChrA(const_cast<PCSTR>(pszStart), wMatch));
} }
__inline LPWSTR StrChrW(__in LPWSTR lpStart, __in WCHAR wMatch) __inline PWSTR StrChrW(_In_ PWSTR pszStart, WCHAR wMatch)
{ {
return const_cast<LPWSTR>(StrChrW(const_cast<LPCWSTR>(lpStart), wMatch)); return const_cast<PWSTR>(StrChrW(const_cast<PCWSTR>(pszStart), wMatch));
} }
__inline LPSTR StrChrIA(__in LPSTR lpStart, WORD wMatch) __inline PSTR StrChrIA(_In_ PSTR pszStart, WORD wMatch)
{ {
return const_cast<LPSTR>(StrChrIA(const_cast<LPCSTR>(lpStart), wMatch)); return const_cast<PSTR>(StrChrIA(const_cast<PCSTR>(pszStart), wMatch));
} }
__inline LPWSTR StrChrIW(__in LPWSTR lpStart, __in WCHAR wMatch) __inline PWSTR StrChrIW(_In_ PWSTR pszStart, WCHAR wMatch)
{ {
return const_cast<LPWSTR>(StrChrIW(const_cast<LPCWSTR>(lpStart), wMatch)); return const_cast<PWSTR>(StrChrIW(const_cast<PCWSTR>(pszStart), wMatch));
} }
#if (_WIN32_IE >= _WIN32_IE_IE60) #if (_WIN32_IE >= _WIN32_IE_IE60)
__inline LPWSTR StrChrNW(__in LPWSTR lpStart, __in WCHAR wMatch, UINT cchMax) __inline PWSTR StrChrNW(_In_ PWSTR pszStart, WCHAR wMatch, UINT cchMax)
{ {
return const_cast<LPWSTR>(StrChrNW(const_cast<LPCWSTR>(lpStart), wMatch, cch Max)); return const_cast<PWSTR>(StrChrNW(const_cast<PCWSTR>(pszStart), wMatch, cchM ax));
} }
__inline LPWSTR StrChrNIW(__in LPWSTR lpStart, __in WCHAR wMatch, UINT cchMax) __inline PWSTR StrChrNIW(_In_ PWSTR pszStart, WCHAR wMatch, UINT cchMax)
{ {
return const_cast<LPWSTR>(StrChrNIW(const_cast<LPCWSTR>(lpStart), wMatch, cc hMax)); return const_cast<PWSTR>(StrChrNIW(const_cast<PCWSTR>(pszStart), wMatch, cch Max));
} }
#endif // _WIN32_IE_IE60 #endif // _WIN32_IE_IE60
__inline LPSTR StrPBrkA(__in LPSTR psz, __in LPCSTR pszSet) __inline PSTR StrPBrkA(_In_ PSTR psz, _In_ PCSTR pszSet)
{ {
return const_cast<LPSTR>(StrPBrkA(const_cast<LPCSTR>(psz), pszSet)); return const_cast<PSTR>(StrPBrkA(const_cast<PCSTR>(psz), pszSet));
} }
__inline LPWSTR StrPBrkW(__in LPWSTR psz, __in LPCWSTR pszSet) __inline PWSTR StrPBrkW(_In_ PWSTR psz, _In_ PCWSTR pszSet)
{ {
return const_cast<LPWSTR>(StrPBrkW(const_cast<LPCWSTR>(psz), pszSet)); return const_cast<PWSTR>(StrPBrkW(const_cast<PCWSTR>(psz), pszSet));
} }
__inline LPSTR StrRChrA(__in LPSTR lpStart, __in_opt LPCSTR lpEnd, __in WORD wMa tch) __inline PSTR StrRChrA(_In_ PSTR pszStart, _In_opt_ PCSTR pszEnd, WORD wMatch)
{ {
return const_cast<LPSTR>(StrRChrA(const_cast<LPCSTR>(lpStart), lpEnd, wMatch )); return const_cast<PSTR>(StrRChrA(const_cast<PCSTR>(pszStart), pszEnd, wMatch ));
} }
__inline LPWSTR StrRChrW(__in LPWSTR lpStart, __in_opt LPCWSTR lpEnd, __in WCHAR wMatch) __inline PWSTR StrRChrW(_In_ PWSTR pszStart, _In_opt_ PCWSTR pszEnd, WCHAR wMatc h)
{ {
return const_cast<LPWSTR>(StrRChrW(const_cast<LPCWSTR>(lpStart), lpEnd, wMat ch)); return const_cast<PWSTR>(StrRChrW(const_cast<PCWSTR>(pszStart), pszEnd, wMat ch));
} }
__inline LPSTR StrRChrIA(__in LPSTR lpStart, __in_opt LPCSTR lpEnd, __in WORD wM atch) __inline PSTR StrRChrIA(_In_ PSTR pszStart, _In_opt_ PCSTR pszEnd, WORD wMatch)
{ {
return const_cast<LPSTR>(StrRChrIA(const_cast<LPCSTR>(lpStart), lpEnd, wMatc h)); return const_cast<PSTR>(StrRChrIA(const_cast<PCSTR>(pszStart), pszEnd, wMatc h));
} }
__inline LPWSTR StrRChrIW(__in LPWSTR lpStart, __in_opt LPCWSTR lpEnd, __in WCHA R wMatch) __inline PWSTR StrRChrIW(_In_ PWSTR pszStart, _In_opt_ PCWSTR pszEnd, WCHAR wMat ch)
{ {
return const_cast<LPWSTR>(StrRChrIW(const_cast<LPCWSTR>(lpStart), lpEnd, wMa tch)); return const_cast<PWSTR>(StrRChrIW(const_cast<PCWSTR>(pszStart), pszEnd, wMa tch));
} }
__inline LPSTR StrRStrIA(__in LPSTR lpSource, __in_opt LPCSTR lpLast, __in LPCST R lpSrch) __inline PSTR StrRStrIA(_In_ PSTR pszSource, _In_opt_ PCSTR pszLast, _In_ PCSTR pszSrch)
{ {
return const_cast<LPSTR>(StrRStrIA(const_cast<LPCSTR>(lpSource), lpLast, lpS rch)); return const_cast<PSTR>(StrRStrIA(const_cast<PCSTR>(pszSource), pszLast, psz Srch));
} }
__inline LPWSTR StrRStrIW(__in LPWSTR lpSource, __in_opt LPCWSTR lpLast, __in LP CWSTR lpSrch) __inline PWSTR StrRStrIW(_In_ PWSTR pszSource, _In_opt_ PCWSTR pszLast, _In_ PCW STR pszSrch)
{ {
return const_cast<LPWSTR>(StrRStrIW(const_cast<LPCWSTR>(lpSource), lpLast, l pSrch)); return const_cast<PWSTR>(StrRStrIW(const_cast<PCWSTR>(pszSource), pszLast, p szSrch));
} }
__inline LPSTR StrStrA(__in LPSTR lpFirst, __in LPCSTR lpSrch) __inline PSTR StrStrA(_In_ PSTR pszFirst, _In_ PCSTR pszSrch)
{ {
return const_cast<LPSTR>(StrStrA(const_cast<LPCSTR>(lpFirst), lpSrch)); return const_cast<PSTR>(StrStrA(const_cast<PCSTR>(pszFirst), pszSrch));
} }
__inline LPWSTR StrStrW(__in LPWSTR lpFirst, __in LPCWSTR lpSrch) __inline PWSTR StrStrW(_In_ PWSTR pszFirst, _In_ PCWSTR pszSrch)
{ {
return const_cast<LPWSTR>(StrStrW(const_cast<LPCWSTR>(lpFirst), lpSrch)); return const_cast<PWSTR>(StrStrW(const_cast<PCWSTR>(pszFirst), pszSrch));
} }
__inline LPSTR StrStrIA(__in LPSTR lpFirst, __in LPCSTR lpSrch) __inline PSTR StrStrIA(_In_ PSTR pszFirst, _In_ PCSTR pszSrch)
{ {
return const_cast<LPSTR>(StrStrIA(const_cast<LPCSTR>(lpFirst), lpSrch)); return const_cast<PSTR>(StrStrIA(const_cast<PCSTR>(pszFirst), pszSrch));
} }
__inline LPWSTR StrStrIW(__in LPWSTR lpFirst, __in LPCWSTR lpSrch) __inline PWSTR StrStrIW(_In_ PWSTR pszFirst, _In_ PCWSTR pszSrch)
{ {
return const_cast<LPWSTR>(StrStrIW(const_cast<LPCWSTR>(lpFirst), lpSrch)); return const_cast<PWSTR>(StrStrIW(const_cast<PCWSTR>(pszFirst), pszSrch));
} }
#if (_WIN32_IE >= _WIN32_IE_IE60) #if (_WIN32_IE >= _WIN32_IE_IE60)
__inline LPWSTR StrStrNW(__in LPWSTR lpFirst, __in LPCWSTR lpSrch, __in UINT cch Max) __inline PWSTR StrStrNW(_In_ PWSTR pszFirst, _In_ PCWSTR pszSrch, UINT cchMax)
{ {
return const_cast<LPWSTR>(StrStrNW(const_cast<LPCWSTR>(lpFirst), lpSrch, cch Max)); return const_cast<PWSTR>(StrStrNW(const_cast<PCWSTR>(pszFirst), pszSrch, cch Max));
} }
__inline LPWSTR StrStrNIW(__in LPWSTR lpFirst, __in LPCWSTR lpSrch, __in UINT cc hMax) __inline PWSTR StrStrNIW(_In_ PWSTR pszFirst, _In_ PCWSTR pszSrch, UINT cchMax)
{ {
return const_cast<LPWSTR>(StrStrNIW(const_cast<LPCWSTR>(lpFirst), lpSrch, cc hMax)); return const_cast<PWSTR>(StrStrNIW(const_cast<PCWSTR>(pszFirst), pszSrch, cc hMax));
} }
#endif #endif
__inline LPSTR PathFindExtensionA(__in LPSTR pszPath) __inline PSTR PathFindExtensionA(_In_ PSTR pszPath)
{ {
return const_cast<LPSTR>(PathFindExtensionA(const_cast<LPCSTR>(pszPath))); return const_cast<PSTR>(PathFindExtensionA(const_cast<PCSTR>(pszPath)));
} }
__inline LPWSTR PathFindExtensionW(__in LPWSTR pszPath) __inline PWSTR PathFindExtensionW(_In_ PWSTR pszPath)
{ {
return const_cast<LPWSTR>(PathFindExtensionW(const_cast<LPCWSTR>(pszPath))); return const_cast<PWSTR>(PathFindExtensionW(const_cast<PCWSTR>(pszPath)));
} }
__inline LPSTR PathFindFileNameA(__in LPSTR pszPath) __inline PSTR PathFindFileNameA(_In_ PSTR pszPath)
{ {
return const_cast<LPSTR>(PathFindFileNameA(const_cast<LPCSTR>(pszPath))); return const_cast<PSTR>(PathFindFileNameA(const_cast<PCSTR>(pszPath)));
} }
__inline LPWSTR PathFindFileNameW(__in LPWSTR pszPath) __inline PWSTR PathFindFileNameW(_In_ PWSTR pszPath)
{ {
return const_cast<LPWSTR>(PathFindFileNameW(const_cast<LPCWSTR>(pszPath))); return const_cast<PWSTR>(PathFindFileNameW(const_cast<PCWSTR>(pszPath)));
} }
__inline LPSTR PathFindNextComponentA(__in LPSTR pszPath) __inline PSTR PathFindNextComponentA(_In_ PSTR pszPath)
{ {
return const_cast<LPSTR>(PathFindNextComponentA(const_cast<LPCSTR>(pszPath)) ); return const_cast<PSTR>(PathFindNextComponentA(const_cast<PCSTR>(pszPath)));
} }
__inline LPWSTR PathFindNextComponentW(__in LPWSTR pszPath) __inline PWSTR PathFindNextComponentW(_In_ PWSTR pszPath)
{ {
return const_cast<LPWSTR>(PathFindNextComponentW(const_cast<LPCWSTR>(pszPath ))); return const_cast<PWSTR>(PathFindNextComponentW(const_cast<PCWSTR>(pszPath)) );
} }
__inline LPSTR PathGetArgsA(__in LPSTR pszPath) __inline PSTR PathGetArgsA(_In_ PSTR pszPath)
{ {
return const_cast<LPSTR>(PathGetArgsA(const_cast<LPCSTR>(pszPath))); return const_cast<PSTR>(PathGetArgsA(const_cast<PCSTR>(pszPath)));
} }
__inline LPWSTR PathGetArgsW(__in LPWSTR pszPath) __inline PWSTR PathGetArgsW(_In_ PWSTR pszPath)
{ {
return const_cast<LPWSTR>(PathGetArgsW(const_cast<LPCWSTR>(pszPath))); return const_cast<PWSTR>(PathGetArgsW(const_cast<PCWSTR>(pszPath)));
} }
__inline LPSTR PathSkipRootA(__in LPSTR pszPath) __inline PSTR PathSkipRootA(_In_ PSTR pszPath)
{ {
return const_cast<LPSTR>(PathSkipRootA(const_cast<LPCSTR>(pszPath))); return const_cast<PSTR>(PathSkipRootA(const_cast<PCSTR>(pszPath)));
} }
__inline LPWSTR PathSkipRootW(__in LPWSTR pszPath) __inline PWSTR PathSkipRootW(_In_ PWSTR pszPath)
{ {
return const_cast<LPWSTR>(PathSkipRootW(const_cast<LPCWSTR>(pszPath))); return const_cast<PWSTR>(PathSkipRootW(const_cast<PCWSTR>(pszPath)));
} }
#endif #endif
#endif #endif
#if defined(DEPRECATE_SUPPORTED) #if defined(DEPRECATE_SUPPORTED)
#pragma warning(pop) #pragma warning(pop)
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
#include <poppack.h> #include <poppack.h>
#endif #endif
#endif #endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif // _INC_SHLWAPI #endif // _INC_SHLWAPI
 End of changes. 227 change blocks. 
806 lines changed or deleted 865 lines changed or added

This html diff was produced by rfcdiff 1.41.