Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4858 lines
205 KiB

  1. ;begin_both
  2. /*****************************************************************************\
  3. * *
  4. * shlwapi.h - Interface for the Windows light-weight utility APIs *
  5. * *
  6. * Version 1.0 *
  7. * *
  8. * Copyright (c) Microsoft Corporation. All rights reserved. *
  9. * *
  10. \*****************************************************************************/
  11. ;end_both
  12. #ifndef _INC_SHLWAPI
  13. #define _INC_SHLWAPI
  14. #ifndef _INC_SHLWAPIP ;internal
  15. #define _INC_SHLWAPIP ;internal
  16. ;begin_both
  17. #ifndef NOSHLWAPI
  18. #include <objbase.h>
  19. #include <shtypes.h>
  20. ;end_both
  21. #ifndef _WINRESRC_
  22. #ifndef _WIN32_IE
  23. #define _WIN32_IE 0x0501
  24. #else
  25. #if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)
  26. #error _WIN32_IE setting conflicts with _WIN32_WINNT setting
  27. #endif
  28. #endif
  29. #endif
  30. #ifdef UNIX
  31. typedef interface IInternetSecurityMgrSite IInternetSecurityMgrSite;
  32. typedef interface IInternetSecurityManager IInternetSecurityManager;
  33. typedef interface IInternetHostSecurityManager IInternetHostSecurityManager;
  34. #endif
  35. //
  36. // Define API decoration for direct importing of DLL references.
  37. //
  38. #ifndef WINSHLWAPI
  39. #if !defined(_SHLWAPI_)
  40. #define LWSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
  41. #define LWSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
  42. #define LWSTDAPIV EXTERN_C DECLSPEC_IMPORT HRESULT STDAPIVCALLTYPE
  43. #define LWSTDAPIV_(type) EXTERN_C DECLSPEC_IMPORT type STDAPIVCALLTYPE
  44. #else
  45. #define LWSTDAPI STDAPI
  46. #define LWSTDAPI_(type) STDAPI_(type)
  47. #define LWSTDAPIV STDAPIV
  48. #define LWSTDAPIV_(type) STDAPIV_(type)
  49. #endif
  50. #endif // WINSHLWAPI
  51. ;begin_both
  52. #ifdef _WIN32
  53. #include <pshpack8.h>
  54. #endif
  55. #ifdef __cplusplus
  56. extern "C" {
  57. #endif
  58. //
  59. // Users of this header may define any number of these constants to avoid
  60. // the definitions of each functional group.
  61. //
  62. // NO_SHLWAPI_STRFCNS String functions
  63. // NO_SHLWAPI_PATH Path functions
  64. // NO_SHLWAPI_REG Registry functions
  65. // NO_SHLWAPI_UALSTR Unaligned string functions ;internal
  66. // NO_SHLWAPI_STREAM Stream functions
  67. // NO_SHLWAPI_HTTP HTTP helper routines ;internal
  68. // NO_SHLWAPI_INTERNAL Other random internal things ;internal
  69. // NO_SHLWAPI_GDI GDI helper functions
  70. // NO_SHLWAPI_UNITHUNK Unicode wrapper functions ;internal
  71. // NO_SHLWAPI_TPS Thread Pool Services ;internal
  72. // NO_SHLWAPI_MLUI Multi Language UI functions ;internal
  73. #ifndef NO_SHLWAPI_STRFCNS
  74. //
  75. //=============== String Routines ===================================
  76. //
  77. ;end_both
  78. LWSTDAPI_(LPSTR) StrChrA(LPCSTR lpStart, WORD wMatch);
  79. LWSTDAPI_(LPWSTR) StrChrW(LPCWSTR lpStart, WCHAR wMatch);
  80. LWSTDAPI_(LPSTR) StrChrIA(LPCSTR lpStart, WORD wMatch);
  81. LWSTDAPI_(LPWSTR) StrChrIW(LPCWSTR lpStart, WCHAR wMatch);
  82. LWSTDAPI_(int) StrCmpNA(LPCSTR lpStr1, LPCSTR lpStr2, int nChar);
  83. LWSTDAPI_(int) StrCmpNW(LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar);
  84. LWSTDAPI_(int) StrCmpNIA(LPCSTR lpStr1, LPCSTR lpStr2, int nChar);
  85. LWSTDAPI_(int) StrCmpNIW(LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar);
  86. LWSTDAPI_(int) StrCSpnA(LPCSTR lpStr, LPCSTR lpSet);
  87. LWSTDAPI_(int) StrCSpnW(LPCWSTR lpStr, LPCWSTR lpSet);
  88. LWSTDAPI_(int) StrCSpnIA(LPCSTR lpStr, LPCSTR lpSet);
  89. LWSTDAPI_(int) StrCSpnIW(LPCWSTR lpStr, LPCWSTR lpSet);
  90. LWSTDAPI_(LPSTR) StrDupA(LPCSTR lpSrch);
  91. LWSTDAPI_(LPWSTR) StrDupW(LPCWSTR lpSrch);
  92. LWSTDAPI_(LPSTR) StrFormatByteSizeA(DWORD dw, LPSTR szBuf, UINT uiBufSize);
  93. LWSTDAPI_(LPSTR) StrFormatByteSize64A(LONGLONG qdw, LPSTR szBuf, UINT uiBufSize);
  94. LWSTDAPI_(LPWSTR) StrFormatByteSizeW(LONGLONG qdw, LPWSTR szBuf, UINT uiBufSize);
  95. LWSTDAPI_(LPWSTR) StrFormatKBSizeW(LONGLONG qdw, LPWSTR szBuf, UINT uiBufSize);
  96. LWSTDAPI_(LPSTR) StrFormatKBSizeA(LONGLONG qdw, LPSTR szBuf, UINT uiBufSize);
  97. LWSTDAPI_(int) StrFromTimeIntervalA(LPSTR pszOut, UINT cchMax, DWORD dwTimeMS, int digits);
  98. LWSTDAPI_(int) StrFromTimeIntervalW(LPWSTR pszOut, UINT cchMax, DWORD dwTimeMS, int digits);
  99. LWSTDAPI_(BOOL) StrIsIntlEqualA(BOOL fCaseSens, LPCSTR lpString1, LPCSTR lpString2, int nChar);
  100. LWSTDAPI_(BOOL) StrIsIntlEqualW(BOOL fCaseSens, LPCWSTR lpString1, LPCWSTR lpString2, int nChar);
  101. LWSTDAPI_(LPSTR) StrNCatA(LPSTR psz1, LPCSTR psz2, int cchMax);
  102. LWSTDAPI_(LPWSTR) StrNCatW(LPWSTR psz1, LPCWSTR psz2, int cchMax);
  103. LWSTDAPI_(LPSTR) StrPBrkA(LPCSTR psz, LPCSTR pszSet);
  104. LWSTDAPI_(LPWSTR) StrPBrkW(LPCWSTR psz, LPCWSTR pszSet);
  105. LWSTDAPI_(LPSTR) StrRChrA(LPCSTR lpStart, LPCSTR lpEnd, WORD wMatch);
  106. LWSTDAPI_(LPWSTR) StrRChrW(LPCWSTR lpStart, LPCWSTR lpEnd, WCHAR wMatch);
  107. LWSTDAPI_(LPSTR) StrRChrIA(LPCSTR lpStart, LPCSTR lpEnd, WORD wMatch);
  108. LWSTDAPI_(LPWSTR) StrRChrIW(LPCWSTR lpStart, LPCWSTR lpEnd, WCHAR wMatch);
  109. LWSTDAPI_(LPSTR) StrRStrIA(LPCSTR lpSource, LPCSTR lpLast, LPCSTR lpSrch);
  110. LWSTDAPI_(LPWSTR) StrRStrIW(LPCWSTR lpSource, LPCWSTR lpLast, LPCWSTR lpSrch);
  111. LWSTDAPI_(int) StrSpnA(LPCSTR psz, LPCSTR pszSet);
  112. LWSTDAPI_(int) StrSpnW(LPCWSTR psz, LPCWSTR pszSet);
  113. LWSTDAPI_(LPSTR) StrStrA(LPCSTR lpFirst, LPCSTR lpSrch);
  114. LWSTDAPI_(LPWSTR) StrStrW(LPCWSTR lpFirst, LPCWSTR lpSrch);
  115. LWSTDAPI_(LPSTR) StrStrIA(LPCSTR lpFirst, LPCSTR lpSrch);
  116. LWSTDAPI_(LPWSTR) StrStrIW(LPCWSTR lpFirst, LPCWSTR lpSrch);
  117. LWSTDAPI_(int) StrToIntA(LPCSTR lpSrc);
  118. LWSTDAPI_(int) StrToIntW(LPCWSTR lpSrc);
  119. LWSTDAPI_(BOOL) StrToIntExA(LPCSTR pszString, DWORD dwFlags, int * piRet);
  120. LWSTDAPI_(BOOL) StrToIntExW(LPCWSTR pszString, DWORD dwFlags, int * piRet);
  121. #if (_WIN32_IE >= 0x0600)
  122. LWSTDAPI_(BOOL) StrToInt64ExA(LPCSTR pszString, DWORD dwFlags, LONGLONG * pllRet);
  123. LWSTDAPI_(BOOL) StrToInt64ExW(LPCWSTR pszString, DWORD dwFlags, LONGLONG * pllRet);
  124. #endif
  125. LWSTDAPI_(BOOL) StrTrimA(LPSTR psz, LPCSTR pszTrimChars);
  126. LWSTDAPI_(BOOL) StrTrimW(LPWSTR psz, LPCWSTR pszTrimChars);
  127. LWSTDAPI_(LPWSTR) StrCatW(LPWSTR psz1, LPCWSTR psz2);
  128. LWSTDAPI_(int) StrCmpW(LPCWSTR psz1, LPCWSTR psz2);
  129. LWSTDAPI_(int) StrCmpIW(LPCWSTR psz1, LPCWSTR psz2);
  130. LWSTDAPI_(LPWSTR) StrCpyW(LPWSTR psz1, LPCWSTR psz2);
  131. LWSTDAPI_(LPWSTR) StrCpyNW(LPWSTR psz1, LPCWSTR psz2, int cchMax);
  132. ;begin_internal
  133. LWSTDAPI_(LPSTR) StrCpyNXA(LPSTR psz1, LPCSTR psz2, int cchMax);
  134. LWSTDAPI_(LPWSTR) StrCpyNXW(LPWSTR psz1, LPCWSTR psz2, int cchMax);
  135. ;end_internal
  136. LWSTDAPI_(LPWSTR) StrCatBuffW(LPWSTR pszDest, LPCWSTR pszSrc, int cchDestBuffSize);
  137. LWSTDAPI_(LPSTR) StrCatBuffA(LPSTR pszDest, LPCSTR pszSrc, int cchDestBuffSize);
  138. LWSTDAPI_(BOOL) ChrCmpIA(WORD w1, WORD w2);
  139. LWSTDAPI_(BOOL) ChrCmpIW(WCHAR w1, WCHAR w2);
  140. LWSTDAPI_(int) wvnsprintfA(LPSTR lpOut, int cchLimitIn, LPCSTR lpFmt, va_list arglist);
  141. LWSTDAPI_(int) wvnsprintfW(LPWSTR lpOut, int cchLimitIn, LPCWSTR lpFmt, va_list arglist);
  142. LWSTDAPIV_(int) wnsprintfA(LPSTR lpOut, int cchLimitIn, LPCSTR lpFmt, ...);
  143. LWSTDAPIV_(int) wnsprintfW(LPWSTR lpOut, int cchLimitIn, LPCWSTR lpFmt, ...);
  144. #define StrIntlEqNA( s1, s2, nChar) StrIsIntlEqualA( TRUE, s1, s2, nChar)
  145. #define StrIntlEqNW( s1, s2, nChar) StrIsIntlEqualW( TRUE, s1, s2, nChar)
  146. #define StrIntlEqNIA(s1, s2, nChar) StrIsIntlEqualA(FALSE, s1, s2, nChar)
  147. #define StrIntlEqNIW(s1, s2, nChar) StrIsIntlEqualW(FALSE, s1, s2, nChar)
  148. LWSTDAPI StrRetToStr%(STRRET *pstr, LPCITEMIDLIST pidl, LPTSTR% *ppsz);
  149. LWSTDAPI StrRetToBuf%(STRRET *pstr, LPCITEMIDLIST pidl, LPTSTR% pszBuf, UINT cchBuf);
  150. LWSTDAPI StrRetToBSTR(STRRET *pstr, LPCITEMIDLIST pidl, BSTR *pbstr);
  151. // helper to duplicate a string using the task allocator
  152. LWSTDAPI SHStrDup%(LPCTSTR% psz, WCHAR **ppwsz);
  153. LWSTDAPI_(int) StrCmpLogicalW(LPCWSTR psz1, LPCWSTR psz2);
  154. LWSTDAPI_(DWORD) StrCatChainW(LPWSTR pszDst, DWORD cchDst, DWORD ichAt, LPCWSTR pszSrc);
  155. LWSTDAPI SHLoadIndirectString(LPCWSTR pszSource, LPWSTR pszOutBuf, UINT cchOutBuf, void **ppvReserved);
  156. ;begin_internal
  157. #define ORD_SHLOADREGUISTRINGA 438
  158. #define ORD_SHLOADREGUISTRINGW 439
  159. LWSTDAPI SHLoadRegUIString%(HKEY hkey, LPCTSTR% pszValue, LPTSTR% pszOutBuf, UINT cchOutBuf);
  160. LWSTDAPI_(BOOL) IsCharCntrlW(WCHAR wch);
  161. LWSTDAPI_(BOOL) IsCharDigitW(WCHAR wch);
  162. LWSTDAPI_(BOOL) IsCharXDigitW(WCHAR wch);
  163. LWSTDAPI_(BOOL) IsCharSpaceW(WCHAR wch);
  164. LWSTDAPI_(BOOL) IsCharBlankW(WCHAR wch);
  165. LWSTDAPI_(BOOL) IsCharPunctW(WCHAR wch);
  166. LWSTDAPI_(BOOL) GetStringType3ExW( LPCWSTR, int, LPWORD );
  167. // StrCmp*C* - Compare strings using C runtime collation rules.
  168. // These functions are faster than the StrCmp family of functions
  169. // above and can be used when the character set of the strings is
  170. // known to be limited to seven ASCII character set.
  171. LWSTDAPI_(int) StrCmpNCA(LPCSTR lpStr1, LPCSTR lpStr2, int nChar);
  172. LWSTDAPI_(int) StrCmpNCW(LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar);
  173. LWSTDAPI_(int) StrCmpNICA(LPCSTR lpStr1, LPCSTR lpStr2, int nChar);
  174. LWSTDAPI_(int) StrCmpNICW(LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar);
  175. LWSTDAPI_(int) StrCmpCA(LPCSTR lpStr1, LPCSTR lpStr2);
  176. LWSTDAPI_(int) StrCmpCW(LPCWSTR lpStr1, LPCWSTR lpStr2);
  177. LWSTDAPI_(int) StrCmpICA(LPCSTR lpStr1, LPCSTR lpStr2);
  178. LWSTDAPI_(int) StrCmpICW(LPCWSTR lpStr1, LPCWSTR lpStr2);
  179. // This is a true-Unicode version of CompareString. It only supports
  180. // STRING_SORT, however. After better test coverage, it shall replace
  181. // the CompareString Unicode wrapper itself. In the mean time, we only
  182. // call this from the find dialog/OM method of Trident.
  183. LWSTDAPI_(int) CompareStringAltW( LCID lcid, DWORD dwFlags, LPCWSTR lpchA, int cchA, LPCWSTR lpchB, int cchB );
  184. ;end_internal
  185. #ifdef UNICODE
  186. #define StrChr StrChrW
  187. #define StrRChr StrRChrW
  188. #define StrChrI StrChrIW
  189. #define StrRChrI StrRChrIW
  190. #define StrCmpN StrCmpNW
  191. #define StrCmpNI StrCmpNIW
  192. #define StrStr StrStrW
  193. #define StrStrI StrStrIW
  194. #define StrDup StrDupW
  195. #define StrRStrI StrRStrIW
  196. #define StrCSpn StrCSpnW
  197. #define StrCSpnI StrCSpnIW
  198. #define StrSpn StrSpnW
  199. #define StrToInt StrToIntW
  200. #define StrPBrk StrPBrkW
  201. #define StrToIntEx StrToIntExW
  202. #if (_WIN32_IE >= 0x0600)
  203. #define StrToInt64Ex StrToInt64ExW
  204. #endif
  205. #define StrFromTimeInterval StrFromTimeIntervalW
  206. #define StrIntlEqN StrIntlEqNW
  207. #define StrIntlEqNI StrIntlEqNIW
  208. #define StrFormatByteSize StrFormatByteSizeW
  209. #define StrFormatByteSize64 StrFormatByteSizeW
  210. #define StrFormatKBSize StrFormatKBSizeW
  211. #define StrNCat StrNCatW
  212. #define StrTrim StrTrimW
  213. #define StrCatBuff StrCatBuffW
  214. #define ChrCmpI ChrCmpIW
  215. #define wvnsprintf wvnsprintfW
  216. #define wnsprintf wnsprintfW
  217. #define StrIsIntlEqual StrIsIntlEqualW
  218. ;begin_internal
  219. //
  220. // Macros for IsCharAlpha, IsCharAlphaNumeric, IsCharLower, IsCharUpper
  221. // are in winuser.h
  222. //
  223. //
  224. #define IsCharCntrl IsCharCntrlW
  225. #define IsCharDigit IsCharDigitW
  226. #define IsCharXDigit IsCharXDigitW
  227. #define IsCharSpace IsCharSpaceW
  228. #define IsCharBlank IsCharBlankW
  229. #define IsCharPunct IsCharPunctW
  230. #define GetStringType3Ex GetStringType3ExW
  231. ;end_internal
  232. #else
  233. #define StrChr StrChrA
  234. #define StrRChr StrRChrA
  235. #define StrChrI StrChrIA
  236. #define StrRChrI StrRChrIA
  237. #define StrCmpN StrCmpNA
  238. #define StrCmpNI StrCmpNIA
  239. #define StrStr StrStrA
  240. #define StrStrI StrStrIA
  241. #define StrDup StrDupA
  242. #define StrRStrI StrRStrIA
  243. #define StrCSpn StrCSpnA
  244. #define StrCSpnI StrCSpnIA
  245. #define StrSpn StrSpnA
  246. #define StrToInt StrToIntA
  247. #define StrPBrk StrPBrkA
  248. #define StrToIntEx StrToIntExA
  249. #if (_WIN32_IE >= 0x0600)
  250. #define StrToInt64Ex StrToInt64ExA
  251. #endif
  252. #define StrFromTimeInterval StrFromTimeIntervalA
  253. #define StrIntlEqN StrIntlEqNA
  254. #define StrIntlEqNI StrIntlEqNIA
  255. #define StrFormatByteSize StrFormatByteSizeA
  256. #define StrFormatByteSize64 StrFormatByteSize64A
  257. #define StrFormatKBSize StrFormatKBSizeA
  258. #define StrNCat StrNCatA
  259. #define StrTrim StrTrimA
  260. #define StrCatBuff StrCatBuffA
  261. #define ChrCmpI ChrCmpIA
  262. #define wvnsprintf wvnsprintfA
  263. #define wnsprintf wnsprintfA
  264. #define StrIsIntlEqual StrIsIntlEqualA
  265. #endif
  266. ;begin_internal
  267. #ifdef UNICODE
  268. #define StrCmpNC StrCmpNCW
  269. #define StrCmpNIC StrCmpNICW
  270. #define StrCmpC StrCmpCW
  271. #define StrCmpIC StrCmpICW
  272. #define StrCpyNX StrCpyNXW
  273. #else
  274. #define StrCmpNC StrCmpNCA
  275. #define StrCmpNIC StrCmpNICA
  276. #define StrCmpC StrCmpCA
  277. #define StrCmpIC StrCmpICA
  278. #define StrCpyNX StrCpyNXA
  279. #endif
  280. ;end_internal
  281. // Backward compatible to NT's non-standard naming (strictly
  282. // for comctl32)
  283. //
  284. LWSTDAPI_(BOOL) IntlStrEqWorkerA(BOOL fCaseSens, LPCSTR lpString1, LPCSTR lpString2, int nChar);
  285. LWSTDAPI_(BOOL) IntlStrEqWorkerW(BOOL fCaseSens, LPCWSTR lpString1, LPCWSTR lpString2, int nChar);
  286. #define IntlStrEqNA( s1, s2, nChar) IntlStrEqWorkerA( TRUE, s1, s2, nChar)
  287. #define IntlStrEqNW( s1, s2, nChar) IntlStrEqWorkerW( TRUE, s1, s2, nChar)
  288. #define IntlStrEqNIA(s1, s2, nChar) IntlStrEqWorkerA(FALSE, s1, s2, nChar)
  289. #define IntlStrEqNIW(s1, s2, nChar) IntlStrEqWorkerW(FALSE, s1, s2, nChar)
  290. #ifdef UNICODE
  291. #define IntlStrEqN IntlStrEqNW
  292. #define IntlStrEqNI IntlStrEqNIW
  293. #else
  294. #define IntlStrEqN IntlStrEqNA
  295. #define IntlStrEqNI IntlStrEqNIA
  296. #endif
  297. #define SZ_CONTENTTYPE_HTMLA "text/html"
  298. #define SZ_CONTENTTYPE_HTMLW L"text/html"
  299. #define SZ_CONTENTTYPE_CDFA "application/x-cdf"
  300. #define SZ_CONTENTTYPE_CDFW L"application/x-cdf"
  301. #ifdef UNICODE
  302. #define SZ_CONTENTTYPE_HTML SZ_CONTENTTYPE_HTMLW
  303. #define SZ_CONTENTTYPE_CDF SZ_CONTENTTYPE_CDFW
  304. #else
  305. #define SZ_CONTENTTYPE_HTML SZ_CONTENTTYPE_HTMLA
  306. #define SZ_CONTENTTYPE_CDF SZ_CONTENTTYPE_CDFA
  307. #endif
  308. #define PathIsHTMLFileA(pszPath) PathIsContentTypeA(pszPath, SZ_CONTENTTYPE_HTMLA)
  309. #define PathIsHTMLFileW(pszPath) PathIsContentTypeW(pszPath, SZ_CONTENTTYPE_HTMLW)
  310. // Flags for StrToIntEx
  311. #define STIF_DEFAULT 0x00000000L
  312. #define STIF_SUPPORT_HEX 0x00000001L
  313. #define StrCatA lstrcatA
  314. #define StrCmpA lstrcmpA
  315. #define StrCmpIA lstrcmpiA
  316. #define StrCpyA lstrcpyA
  317. #define StrCpyNA lstrcpynA
  318. #define StrToLong StrToInt
  319. #define StrNCmp StrCmpN
  320. #define StrNCmpI StrCmpNI
  321. #define StrNCpy StrCpyN
  322. #define StrCatN StrNCat
  323. #ifdef UNICODE
  324. #define StrCat StrCatW
  325. #define StrCmp StrCmpW
  326. #define StrCmpI StrCmpIW
  327. #define StrCpy StrCpyW
  328. #define StrCpyN StrCpyNW
  329. #define StrCatBuff StrCatBuffW
  330. #else
  331. #define StrCat lstrcatA
  332. #define StrCmp lstrcmpA
  333. #define StrCmpI lstrcmpiA
  334. #define StrCpy lstrcpyA
  335. #define StrCpyN lstrcpynA
  336. #define StrCatBuff StrCatBuffA
  337. #endif
  338. ;begin_both
  339. #endif // NO_SHLWAPI_STRFCNS
  340. ;end_both
  341. ;begin_both
  342. #ifndef NO_SHLWAPI_PATH
  343. //
  344. //=============== Path Routines ===================================
  345. //
  346. ;end_both
  347. LWSTDAPI_(LPTSTR%) PathAddBackslash%(LPTSTR% pszPath);
  348. LWSTDAPI_(BOOL) PathAddExtension%(LPTSTR% pszPath, LPCTSTR% pszExt);
  349. LWSTDAPI_(BOOL) PathAppendA(LPSTR pszPath, LPCSTR pMore);
  350. LWSTDAPI_(BOOL) PathAppendW(LPWSTR pszPath, LPCWSTR pMore);
  351. LWSTDAPI_(LPTSTR%) PathBuildRoot%(LPTSTR% pszRoot, int iDrive);
  352. LWSTDAPI_(BOOL) PathCanonicalizeA(LPSTR pszBuf, LPCSTR pszPath);
  353. LWSTDAPI_(BOOL) PathCanonicalizeW(LPWSTR pszBuf, LPCWSTR pszPath);
  354. LWSTDAPI_(LPTSTR%) PathCombine%(LPTSTR% pszDest, LPCTSTR% pszDir, LPCTSTR% pszFile);
  355. LWSTDAPI_(BOOL) PathCompactPathA(HDC hDC, LPSTR pszPath, UINT dx);
  356. LWSTDAPI_(BOOL) PathCompactPathW(HDC hDC, LPWSTR pszPath, UINT dx);
  357. LWSTDAPI_(BOOL) PathCompactPathExA(LPSTR pszOut, LPCSTR pszSrc, UINT cchMax, DWORD dwFlags);
  358. LWSTDAPI_(BOOL) PathCompactPathExW(LPWSTR pszOut, LPCWSTR pszSrc, UINT cchMax, DWORD dwFlags);
  359. LWSTDAPI_(int) PathCommonPrefixA(LPCSTR pszFile1, LPCSTR pszFile2, LPSTR achPath);
  360. LWSTDAPI_(int) PathCommonPrefixW(LPCWSTR pszFile1, LPCWSTR pszFile2, LPWSTR achPath);
  361. LWSTDAPI_(BOOL) PathFileExists%(LPCTSTR% pszPath);
  362. LWSTDAPI_(LPTSTR%) PathFindExtension%(LPCTSTR% pszPath);
  363. LWSTDAPI_(LPTSTR%) PathFindFileName%(LPCTSTR% pszPath);
  364. LWSTDAPI_(LPTSTR%) PathFindNextComponent%(LPCTSTR% pszPath);
  365. LWSTDAPI_(BOOL) PathFindOnPathA(LPSTR pszPath, LPCSTR * ppszOtherDirs);
  366. LWSTDAPI_(BOOL) PathFindOnPathW(LPWSTR pszPath, LPCWSTR * ppszOtherDirs);
  367. LWSTDAPI_(LPTSTR%) PathGetArgs%(LPCTSTR% pszPath);
  368. LWSTDAPI_(LPCTSTR%) PathFindSuffixArray%(LPCTSTR% pszPath, const LPCTSTR% *apszSuffix, int iArraySize);
  369. LWSTDAPI_(BOOL) PathIsLFNFileSpec%(LPCTSTR% lpName);
  370. LWSTDAPI_(UINT) PathGetCharTypeA(UCHAR ch);
  371. LWSTDAPI_(UINT) PathGetCharTypeW(WCHAR ch);
  372. // Return flags for PathGetCharType
  373. #define GCT_INVALID 0x0000
  374. #define GCT_LFNCHAR 0x0001
  375. #define GCT_SHORTCHAR 0x0002
  376. #define GCT_WILD 0x0004
  377. #define GCT_SEPARATOR 0x0008
  378. LWSTDAPI_(int) PathGetDriveNumber%(LPCTSTR% pszPath);
  379. LWSTDAPI_(BOOL) PathIsDirectory%(LPCTSTR% pszPath);
  380. LWSTDAPI_(BOOL) PathIsDirectoryEmpty%(LPCTSTR% pszPath);
  381. LWSTDAPI_(BOOL) PathIsFileSpec%(LPCTSTR% pszPath);
  382. LWSTDAPI_(BOOL) PathIsPrefix%(LPCTSTR% pszPrefix, LPCTSTR% pszPath);
  383. LWSTDAPI_(BOOL) PathIsRelative%(LPCTSTR% pszPath);
  384. LWSTDAPI_(BOOL) PathIsRoot%(LPCTSTR% pszPath);
  385. LWSTDAPI_(BOOL) PathIsSameRoot%(LPCTSTR% pszPath1, LPCTSTR% pszPath2);
  386. LWSTDAPI_(BOOL) PathIsUNC%(LPCTSTR% pszPath);
  387. LWSTDAPI_(BOOL) PathIsNetworkPath%(LPCTSTR% pszPath);
  388. LWSTDAPI_(BOOL) PathIsUNCServer%(LPCTSTR% pszPath);
  389. LWSTDAPI_(BOOL) PathIsUNCServerShare%(LPCTSTR% pszPath);
  390. LWSTDAPI_(BOOL) PathIsContentTypeA(LPCSTR pszPath, LPCSTR pszContentType);
  391. LWSTDAPI_(BOOL) PathIsContentTypeW(LPCWSTR pszPath, LPCWSTR pszContentType);
  392. LWSTDAPI_(BOOL) PathIsURL%(LPCTSTR% pszPath);
  393. LWSTDAPI_(BOOL) PathMakePrettyA(LPSTR pszPath);
  394. LWSTDAPI_(BOOL) PathMakePrettyW(LPWSTR pszPath);
  395. LWSTDAPI_(BOOL) PathMatchSpecA(LPCSTR pszFile, LPCSTR pszSpec);
  396. LWSTDAPI_(BOOL) PathMatchSpecW(LPCWSTR pszFile, LPCWSTR pszSpec);
  397. LWSTDAPI_(int) PathParseIconLocationA(LPSTR pszIconFile);
  398. LWSTDAPI_(int) PathParseIconLocationW(LPWSTR pszIconFile);
  399. LWSTDAPI_(void) PathQuoteSpacesA(LPSTR lpsz);
  400. LWSTDAPI_(void) PathQuoteSpacesW(LPWSTR lpsz);
  401. LWSTDAPI_(BOOL) PathRelativePathToA(LPSTR pszPath, LPCSTR pszFrom, DWORD dwAttrFrom, LPCSTR pszTo, DWORD dwAttrTo);
  402. LWSTDAPI_(BOOL) PathRelativePathToW(LPWSTR pszPath, LPCWSTR pszFrom, DWORD dwAttrFrom, LPCWSTR pszTo, DWORD dwAttrTo);
  403. LWSTDAPI_(void) PathRemoveArgsA(LPSTR pszPath);
  404. LWSTDAPI_(void) PathRemoveArgsW(LPWSTR pszPath);
  405. LWSTDAPI_(LPTSTR%) PathRemoveBackslash%(LPTSTR% pszPath);
  406. LWSTDAPI_(void) PathRemoveBlanksA(LPSTR pszPath);
  407. LWSTDAPI_(void) PathRemoveBlanksW(LPWSTR pszPath);
  408. LWSTDAPI_(void) PathRemoveExtensionA(LPSTR pszPath);
  409. LWSTDAPI_(void) PathRemoveExtensionW(LPWSTR pszPath);
  410. LWSTDAPI_(BOOL) PathRemoveFileSpecA(LPSTR pszPath);
  411. LWSTDAPI_(BOOL) PathRemoveFileSpecW(LPWSTR pszPath);
  412. LWSTDAPI_(BOOL) PathRenameExtensionA(LPSTR pszPath, LPCSTR pszExt);
  413. LWSTDAPI_(BOOL) PathRenameExtensionW(LPWSTR pszPath, LPCWSTR pszExt);
  414. LWSTDAPI_(BOOL) PathSearchAndQualifyA(LPCSTR pszPath, LPSTR pszBuf, UINT cchBuf);
  415. LWSTDAPI_(BOOL) PathSearchAndQualifyW(LPCWSTR pszPath, LPWSTR pszBuf, UINT cchBuf);
  416. LWSTDAPI_(void) PathSetDlgItemPathA(HWND hDlg, int id, LPCSTR pszPath);
  417. LWSTDAPI_(void) PathSetDlgItemPathW(HWND hDlg, int id, LPCWSTR pszPath);
  418. LWSTDAPI_(LPTSTR%) PathSkipRoot%(LPCTSTR% pszPath);
  419. LWSTDAPI_(void) PathStripPath%(LPTSTR% pszPath);
  420. LWSTDAPI_(BOOL) PathStripToRoot%(LPTSTR% pszPath);
  421. LWSTDAPI_(void) PathUnquoteSpacesA(LPSTR lpsz);
  422. LWSTDAPI_(void) PathUnquoteSpacesW(LPWSTR lpsz);
  423. LWSTDAPI_(BOOL) PathMakeSystemFolder%(LPCTSTR% pszPath);
  424. LWSTDAPI_(BOOL) PathUnmakeSystemFolder%(LPCTSTR% pszPath);
  425. LWSTDAPI_(BOOL) PathIsSystemFolder%(LPCTSTR% pszPath, DWORD dwAttrb);
  426. LWSTDAPI_(void) PathUndecorate%(LPTSTR% pszPath);
  427. LWSTDAPI_(BOOL) PathUnExpandEnvStrings%(LPCTSTR% pszPath, LPTSTR% pszBuf, UINT cchBuf);
  428. ;begin_internal
  429. #if (_WIN32_IE >= 0x0501)
  430. LWSTDAPI_(BOOL) PathUnExpandEnvStringsForUser%(HANDLE hToken, LPCTSTR% pszPath, LPTSTR% pszBuf, UINT cchBuf);
  431. LWSTDAPI_(void) PrettifyFileDescription%(LPTSTR pszDesc%, LPCTSTR% pszCutList);
  432. #endif // (_WIN32_IE >= 0x0501)
  433. #if defined(WINNT) && (_WIN32_IE >= 0x0550)
  434. //====== ACL helpers ==================================================
  435. //
  436. // shell struct to identify user/group for each ACE
  437. //
  438. typedef struct _SHELL_USER_SID
  439. {
  440. SID_IDENTIFIER_AUTHORITY sidAuthority;
  441. DWORD dwUserGroupID;
  442. DWORD dwUserID;
  443. } SHELL_USER_SID, *PSHELL_USER_SID;
  444. //
  445. // common SHELL_USER_SID's
  446. //
  447. // NOTE: you need to link to stocklib.lib to resolve these
  448. //
  449. extern const SHELL_USER_SID susCurrentUser; // the current user
  450. extern const SHELL_USER_SID susSystem; // the "SYSTEM" group
  451. extern const SHELL_USER_SID susAdministrators; // the "Administrators" group
  452. extern const SHELL_USER_SID susPowerUsers; // the "Power Users" group
  453. extern const SHELL_USER_SID susGuests; // the "Guests" group
  454. extern const SHELL_USER_SID susEveryone; // the "Everyone" group
  455. //
  456. // shell struct that is passed to GetShellSecurityDescriptor()
  457. //
  458. typedef struct _SHELL_USER_PERMISSION
  459. {
  460. SHELL_USER_SID susID; // identifies the user for whom you want to grant permissions to
  461. DWORD dwAccessType; // this is either ACCESS_ALLOWED_ACE_TYPE or ACCESS_DENIED_ACE_TYPE
  462. BOOL fInherit; // the permissions inheritable? (eg a directory or reg key and you want new children to inherit this permission)
  463. DWORD dwAccessMask; // access granted (eg FILE_LIST_CONTENTS, KEY_ALL_ACCESS, etc...)
  464. DWORD dwInheritMask; // mask used for inheritance, usually (OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE | INHERIT_ONLY_ACE)
  465. DWORD dwInheritAccessMask; // the inheritable access granted (eg GENERIC_ALL)
  466. } SHELL_USER_PERMISSION, *PSHELL_USER_PERMISSION;
  467. //
  468. // The GetShellSecurityDescriptor API takes an array of PSHELL_USER_PERMISSION's
  469. // and returns a PSECURITY_DESCRIPTOR based on those permission (an ACL is
  470. // contained in the PSECURITY_DESCRIPTOR).
  471. //
  472. // NOTE: The PSECURITY_DESCRIPTOR returned to the caller must be freed with LocalFree()
  473. // if it is non-null.
  474. //
  475. //
  476. // Parameters:
  477. // apUserPerm - Array of shell_user_permission structs that defines what type
  478. // of access various users are allowed
  479. //
  480. // cUserPerm - count of elements in apUserPerm.
  481. //
  482. // Returns:
  483. // SECURITY_DESCRIPTOR* or NULL if failed.
  484. //
  485. LWSTDAPI_(SECURITY_DESCRIPTOR*) GetShellSecurityDescriptor(PSHELL_USER_PERMISSION* apUserPerm, int cUserPerm);
  486. #endif // defined(WINNT) && (_WIN32_IE >= 0x0550)
  487. ;end_internal
  488. #ifdef UNICODE
  489. #define PathAppend PathAppendW
  490. #define PathCanonicalize PathCanonicalizeW
  491. #define PathCompactPath PathCompactPathW
  492. #define PathCompactPathEx PathCompactPathExW
  493. #define PathCommonPrefix PathCommonPrefixW
  494. #define PathFindOnPath PathFindOnPathW
  495. #define PathGetCharType PathGetCharTypeW
  496. #define PathIsContentType PathIsContentTypeW
  497. #define PathIsHTMLFile PathIsHTMLFileW
  498. #define PathMakePretty PathMakePrettyW
  499. #define PathMatchSpec PathMatchSpecW
  500. #define PathParseIconLocation PathParseIconLocationW
  501. #define PathQuoteSpaces PathQuoteSpacesW
  502. #define PathRelativePathTo PathRelativePathToW
  503. #define PathRemoveArgs PathRemoveArgsW
  504. #define PathRemoveBlanks PathRemoveBlanksW
  505. #define PathRemoveExtension PathRemoveExtensionW
  506. #define PathRemoveFileSpec PathRemoveFileSpecW
  507. #define PathRenameExtension PathRenameExtensionW
  508. #define PathSearchAndQualify PathSearchAndQualifyW
  509. #define PathSetDlgItemPath PathSetDlgItemPathW
  510. #define PathUnquoteSpaces PathUnquoteSpacesW
  511. #else
  512. #define PathAppend PathAppendA
  513. #define PathCanonicalize PathCanonicalizeA
  514. #define PathCompactPath PathCompactPathA
  515. #define PathCompactPathEx PathCompactPathExA
  516. #define PathCommonPrefix PathCommonPrefixA
  517. #define PathFindOnPath PathFindOnPathA
  518. #define PathGetCharType PathGetCharTypeA
  519. #define PathIsContentType PathIsContentTypeA
  520. #define PathIsHTMLFile PathIsHTMLFileA
  521. #define PathMakePretty PathMakePrettyA
  522. #define PathMatchSpec PathMatchSpecA
  523. #define PathParseIconLocation PathParseIconLocationA
  524. #define PathQuoteSpaces PathQuoteSpacesA
  525. #define PathRelativePathTo PathRelativePathToA
  526. #define PathRemoveArgs PathRemoveArgsA
  527. #define PathRemoveBlanks PathRemoveBlanksA
  528. #define PathRemoveExtension PathRemoveExtensionA
  529. #define PathRemoveFileSpec PathRemoveFileSpecA
  530. #define PathRenameExtension PathRenameExtensionA
  531. #define PathSearchAndQualify PathSearchAndQualifyA
  532. #define PathSetDlgItemPath PathSetDlgItemPathA
  533. #define PathUnquoteSpaces PathUnquoteSpacesA
  534. #endif
  535. typedef enum {
  536. URL_SCHEME_INVALID = -1,
  537. URL_SCHEME_UNKNOWN = 0,
  538. URL_SCHEME_FTP,
  539. URL_SCHEME_HTTP,
  540. URL_SCHEME_GOPHER,
  541. URL_SCHEME_MAILTO,
  542. URL_SCHEME_NEWS,
  543. URL_SCHEME_NNTP,
  544. URL_SCHEME_TELNET,
  545. URL_SCHEME_WAIS,
  546. URL_SCHEME_FILE,
  547. URL_SCHEME_MK,
  548. URL_SCHEME_HTTPS,
  549. URL_SCHEME_SHELL,
  550. URL_SCHEME_SNEWS,
  551. URL_SCHEME_LOCAL,
  552. URL_SCHEME_JAVASCRIPT,
  553. URL_SCHEME_VBSCRIPT,
  554. URL_SCHEME_ABOUT,
  555. URL_SCHEME_RES,
  556. URL_SCHEME_MSSHELLROOTED,
  557. URL_SCHEME_MSSHELLIDLIST,
  558. URL_SCHEME_MSHELP,
  559. URL_SCHEME_MAXVALUE
  560. } URL_SCHEME;
  561. typedef enum {
  562. URL_PART_NONE = 0,
  563. URL_PART_SCHEME = 1,
  564. URL_PART_HOSTNAME,
  565. URL_PART_USERNAME,
  566. URL_PART_PASSWORD,
  567. URL_PART_PORT,
  568. URL_PART_QUERY,
  569. } URL_PART;
  570. typedef enum {
  571. URLIS_URL,
  572. URLIS_OPAQUE,
  573. URLIS_NOHISTORY,
  574. URLIS_FILEURL,
  575. URLIS_APPLIABLE,
  576. URLIS_DIRECTORY,
  577. URLIS_HASQUERY,
  578. } URLIS;
  579. #define URL_UNESCAPE 0x10000000
  580. #define URL_ESCAPE_UNSAFE 0x20000000
  581. #define URL_PLUGGABLE_PROTOCOL 0x40000000
  582. #define URL_WININET_COMPATIBILITY 0x80000000
  583. #define URL_DONT_ESCAPE_EXTRA_INFO 0x02000000
  584. #define URL_DONT_UNESCAPE_EXTRA_INFO URL_DONT_ESCAPE_EXTRA_INFO
  585. #define URL_BROWSER_MODE URL_DONT_ESCAPE_EXTRA_INFO
  586. #define URL_ESCAPE_SPACES_ONLY 0x04000000
  587. #define URL_DONT_SIMPLIFY 0x08000000
  588. #define URL_NO_META URL_DONT_SIMPLIFY
  589. #define URL_UNESCAPE_INPLACE 0x00100000
  590. #define URL_CONVERT_IF_DOSPATH 0x00200000
  591. #define URL_UNESCAPE_HIGH_ANSI_ONLY 0x00400000
  592. #define URL_INTERNAL_PATH 0x00800000 // Will escape #'s in paths
  593. #define URL_FILE_USE_PATHURL 0x00010000
  594. #define URL_ESCAPE_PERCENT 0x00001000
  595. #define URL_ESCAPE_SEGMENT_ONLY 0x00002000 // Treat the entire URL param as one URL segment.
  596. #define URL_PARTFLAG_KEEPSCHEME 0x00000001
  597. #define URL_APPLY_DEFAULT 0x00000001
  598. #define URL_APPLY_GUESSSCHEME 0x00000002
  599. #define URL_APPLY_GUESSFILE 0x00000004
  600. #define URL_APPLY_FORCEAPPLY 0x00000008
  601. LWSTDAPI_(int) UrlCompareA(LPCSTR psz1, LPCSTR psz2, BOOL fIgnoreSlash);
  602. LWSTDAPI_(int) UrlCompareW(LPCWSTR psz1, LPCWSTR psz2, BOOL fIgnoreSlash);
  603. LWSTDAPI UrlCombineA(LPCSTR pszBase, LPCSTR pszRelative, LPSTR pszCombined, LPDWORD pcchCombined, DWORD dwFlags);
  604. LWSTDAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative, LPWSTR pszCombined, LPDWORD pcchCombined, DWORD dwFlags);
  605. LWSTDAPI UrlCanonicalizeA(LPCSTR pszUrl, LPSTR pszCanonicalized, LPDWORD pcchCanonicalized, DWORD dwFlags);
  606. LWSTDAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized, LPDWORD pcchCanonicalized, DWORD dwFlags);
  607. LWSTDAPI_(BOOL) UrlIsOpaqueA(LPCSTR pszURL);
  608. LWSTDAPI_(BOOL) UrlIsOpaqueW(LPCWSTR pszURL);
  609. LWSTDAPI_(BOOL) UrlIsNoHistoryA(LPCSTR pszURL);
  610. LWSTDAPI_(BOOL) UrlIsNoHistoryW(LPCWSTR pszURL);
  611. #define UrlIsFileUrlA(pszURL) UrlIsA(pszURL, URLIS_FILEURL)
  612. #define UrlIsFileUrlW(pszURL) UrlIsW(pszURL, URLIS_FILEURL)
  613. LWSTDAPI_(BOOL) UrlIsA(LPCSTR pszUrl, URLIS UrlIs);
  614. LWSTDAPI_(BOOL) UrlIsW(LPCWSTR pszUrl, URLIS UrlIs);
  615. LWSTDAPI_(LPCSTR) UrlGetLocationA(LPCSTR psz1);
  616. LWSTDAPI_(LPCWSTR) UrlGetLocationW(LPCWSTR psz1);
  617. LWSTDAPI UrlUnescapeA(LPSTR pszUrl, LPSTR pszUnescaped, LPDWORD pcchUnescaped, DWORD dwFlags);
  618. LWSTDAPI UrlUnescapeW(LPWSTR pszUrl, LPWSTR pszUnescaped, LPDWORD pcchUnescaped, DWORD dwFlags);
  619. LWSTDAPI UrlEscapeA(LPCSTR pszUrl, LPSTR pszEscaped, LPDWORD pcchEscaped, DWORD dwFlags);
  620. LWSTDAPI UrlEscapeW(LPCWSTR pszUrl, LPWSTR pszEscaped, LPDWORD pcchEscaped, DWORD dwFlags);
  621. LWSTDAPI UrlCreateFromPathA(LPCSTR pszPath, LPSTR pszUrl, LPDWORD pcchUrl, DWORD dwFlags);
  622. LWSTDAPI UrlCreateFromPathW(LPCWSTR pszPath, LPWSTR pszUrl, LPDWORD pcchUrl, DWORD dwFlags);
  623. LWSTDAPI PathCreateFromUrlA(LPCSTR pszUrl, LPSTR pszPath, LPDWORD pcchPath, DWORD dwFlags);
  624. LWSTDAPI PathCreateFromUrlW(LPCWSTR pszUrl, LPWSTR pszPath, LPDWORD pcchPath, DWORD dwFlags);
  625. LWSTDAPI UrlHashA(LPCSTR pszUrl, LPBYTE pbHash, DWORD cbHash);
  626. LWSTDAPI UrlHashW(LPCWSTR pszUrl, LPBYTE pbHash, DWORD cbHash);
  627. LWSTDAPI UrlGetPartW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, DWORD dwPart, DWORD dwFlags);
  628. LWSTDAPI UrlGetPartA(LPCSTR pszIn, LPSTR pszOut, LPDWORD pcchOut, DWORD dwPart, DWORD dwFlags);
  629. LWSTDAPI UrlApplySchemeA(LPCSTR pszIn, LPSTR pszOut, LPDWORD pcchOut, DWORD dwFlags);
  630. LWSTDAPI UrlApplySchemeW(LPCWSTR pszIn, LPWSTR pszOut, LPDWORD pcchOut, DWORD dwFlags);
  631. LWSTDAPI HashData(LPBYTE pbData, DWORD cbData, LPBYTE pbHash, DWORD cbHash);
  632. ;begin_internal
  633. LWSTDAPI UrlFixupW(LPCWSTR pszIn, LPWSTR pszOut, DWORD cchOut);
  634. // NTRAID:108139 akabir We need to move the components stuff from wininet.h to shlwapi.
  635. typedef WORD SHINTERNET_PORT;
  636. typedef SHINTERNET_PORT * LPSHINTERNET_PORT;
  637. //
  638. // SHINTERNET_SCHEME - enumerated URL scheme type
  639. //
  640. typedef enum {
  641. SHINTERNET_SCHEME_PARTIAL = -2,
  642. SHINTERNET_SCHEME_UNKNOWN = -1,
  643. SHINTERNET_SCHEME_DEFAULT = 0,
  644. SHINTERNET_SCHEME_FTP,
  645. SHINTERNET_SCHEME_GOPHER,
  646. SHINTERNET_SCHEME_HTTP,
  647. SHINTERNET_SCHEME_HTTPS,
  648. SHINTERNET_SCHEME_FILE,
  649. SHINTERNET_SCHEME_NEWS,
  650. SHINTERNET_SCHEME_MAILTO,
  651. SHINTERNET_SCHEME_SOCKS,
  652. SHINTERNET_SCHEME_JAVASCRIPT,
  653. SHINTERNET_SCHEME_VBSCRIPT,
  654. SHINTERNET_SCHEME_RES,
  655. SHINTERNET_SCHEME_FIRST = SHINTERNET_SCHEME_FTP,
  656. SHINTERNET_SCHEME_LAST = SHINTERNET_SCHEME_RES
  657. } SHINTERNET_SCHEME, * LPSHINTERNET_SCHEME;
  658. //
  659. // SHURL_COMPONENTS - the constituent parts of an URL. Used in InternetCrackUrl()
  660. // and InternetCreateUrl()
  661. //
  662. // For InternetCrackUrl(), if a pointer field and its corresponding length field
  663. // are both 0 then that component is not returned. If the pointer field is NULL
  664. // but the length field is not zero, then both the pointer and length fields are
  665. // returned if both pointer and corresponding length fields are non-zero then
  666. // the pointer field points to a buffer where the component is copied. The
  667. // component may be un-escaped, depending on dwFlags
  668. //
  669. // For InternetCreateUrl(), the pointer fields should be NULL if the component
  670. // is not required. If the corresponding length field is zero then the pointer
  671. // field is the address of a zero-terminated string. If the length field is not
  672. // zero then it is the string length of the corresponding pointer field
  673. //
  674. #pragma warning( disable : 4121 ) // disable alignment warning
  675. typedef struct {
  676. DWORD dwStructSize; // size of this structure. Used in version check
  677. LPTSTR% lpszScheme; // pointer to scheme name
  678. DWORD dwSchemeLength; // length of scheme name
  679. SHINTERNET_SCHEME nScheme; // enumerated scheme type (if known)
  680. LPTSTR% lpszHostName; // pointer to host name
  681. DWORD dwHostNameLength; // length of host name
  682. SHINTERNET_PORT nPort; // converted port number
  683. LPTSTR% lpszUserName; // pointer to user name
  684. DWORD dwUserNameLength; // length of user name
  685. LPTSTR% lpszPassword; // pointer to password
  686. DWORD dwPasswordLength; // length of password
  687. LPTSTR% lpszUrlPath; // pointer to URL-path
  688. DWORD dwUrlPathLength; // length of URL-path
  689. LPTSTR% lpszExtraInfo; // pointer to extra information (e.g. ?foo or #foo)
  690. DWORD dwExtraInfoLength; // length of extra information
  691. } SHURL_COMPONENTS%, * LPSHURL_COMPONENTS%;
  692. BOOL WINAPI UrlCrackW(LPCWSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, LPSHURL_COMPONENTSW lpUrlComponents);
  693. ;end_internal
  694. #ifdef UNICODE
  695. #define UrlCompare UrlCompareW
  696. #define UrlCombine UrlCombineW
  697. #define UrlCanonicalize UrlCanonicalizeW
  698. #define UrlIsOpaque UrlIsOpaqueW
  699. #define UrlIsFileUrl UrlIsFileUrlW
  700. #define UrlGetLocation UrlGetLocationW
  701. #define UrlUnescape UrlUnescapeW
  702. #define UrlEscape UrlEscapeW
  703. #define UrlCreateFromPath UrlCreateFromPathW
  704. #define PathCreateFromUrl PathCreateFromUrlW
  705. #define UrlHash UrlHashW
  706. #define UrlGetPart UrlGetPartW
  707. #define UrlApplyScheme UrlApplySchemeW
  708. #define UrlIs UrlIsW
  709. ;begin_internal
  710. #define UrlFixup UrlFixupW
  711. ;end_internal
  712. #else //!UNICODE
  713. #define UrlCompare UrlCompareA
  714. #define UrlCombine UrlCombineA
  715. #define UrlCanonicalize UrlCanonicalizeA
  716. #define UrlIsOpaque UrlIsOpaqueA
  717. #define UrlIsFileUrl UrlIsFileUrlA
  718. #define UrlGetLocation UrlGetLocationA
  719. #define UrlUnescape UrlUnescapeA
  720. #define UrlEscape UrlEscapeA
  721. #define UrlCreateFromPath UrlCreateFromPathA
  722. #define PathCreateFromUrl PathCreateFromUrlA
  723. #define UrlHash UrlHashA
  724. #define UrlGetPart UrlGetPartA
  725. #define UrlApplyScheme UrlApplySchemeA
  726. #define UrlIs UrlIsA
  727. ;begin_internal
  728. // no UrlFixupA
  729. ;end_internal
  730. #endif //UNICODE
  731. #define UrlEscapeSpaces(pszUrl, pszEscaped, pcchEscaped) UrlCanonicalize(pszUrl, pszEscaped, pcchEscaped, URL_ESCAPE_SPACES_ONLY |URL_DONT_ESCAPE_EXTRA_INFO )
  732. #define UrlUnescapeInPlace(pszUrl, dwFlags) UrlUnescape(pszUrl, NULL, NULL, dwFlags | URL_UNESCAPE_INPLACE)
  733. ;begin_internal
  734. //
  735. // Internal APIs which we're not yet sure whether to make public
  736. //
  737. // Private IHlinkFrame::Navigate flags related to history
  738. // This navigate should not go in the History ShellFolder
  739. #define SHHLNF_WRITENOHISTORY 0x08000000
  740. // This navigate should not automatically select History ShellFolder
  741. #define SHHLNF_NOAUTOSELECT 0x04000000
  742. // The order of these flags is important. See the source before
  743. // changing these.
  744. #define PFOPEX_NONE 0x00000000
  745. #define PFOPEX_PIF 0x00000001
  746. #define PFOPEX_COM 0x00000002
  747. #define PFOPEX_EXE 0x00000004
  748. #define PFOPEX_BAT 0x00000008
  749. #define PFOPEX_LNK 0x00000010
  750. #define PFOPEX_CMD 0x00000020
  751. #define PFOPEX_OPTIONAL 0x00000040 // Search only if Extension not present
  752. #define PFOPEX_DEFAULT (PFOPEX_CMD | PFOPEX_COM | PFOPEX_BAT | PFOPEX_PIF | PFOPEX_EXE | PFOPEX_LNK)
  753. LWSTDAPI_(BOOL) PathFileExistsDefExt%(LPTSTR% pszPath, UINT uFlags);
  754. LWSTDAPI_(BOOL) PathFindOnPathEx%(LPTSTR% pszPath, LPCTSTR% * ppszOtherDirs, UINT uFlags);
  755. LWSTDAPI_(LPCTSTR%) PathSkipLeadingSlashes%(LPCTSTR% pszURL);
  756. LWSTDAPI_(UINT) SHGetSystemWindowsDirectory%(LPTSTR% lpBuffer, UINT uSize);
  757. #if (_WIN32_IE >= 0x0501)
  758. //
  759. // These are functions that used to be duplicated in shell32, but have
  760. // be consolidated here. They are exported privately until someone decides
  761. // we really want to document them.
  762. //
  763. LWSTDAPI_(BOOL) PathFileExistsAndAttributes%(LPCTSTR% pszPath, OPTIONAL DWORD* pdwAttributes);
  764. LWSTDAPI_(BOOL) PathFileExistsDefExtAndAttributes%(LPTSTR% pszPath, UINT uFlags, DWORD *pdwAttribs);
  765. LWSTDAPI_(void) FixSlashesAndColon%(LPTSTR% pszPath);
  766. LWSTDAPI_(LPCTSTR%) NextPath%(LPCTSTR% lpPath, LPTSTR% szPath, int cchPath);
  767. LWSTDAPI_(LPTSTR%) CharUpperNoDBCS%(LPTSTR% psz);
  768. LWSTDAPI_(LPTSTR%) CharLowerNoDBCS%(LPTSTR% psz);
  769. //
  770. // flags for PathIsValidChar()
  771. //
  772. #define PIVC_ALLOW_QUESTIONMARK 0x00000001 // treat '?' as valid
  773. #define PIVC_ALLOW_STAR 0x00000002 // treat '*' as valid
  774. #define PIVC_ALLOW_DOT 0x00000004 // treat '.' as valid
  775. #define PIVC_ALLOW_SLASH 0x00000008 // treat '\\' as valid
  776. #define PIVC_ALLOW_COLON 0x00000010 // treat ':' as valid
  777. #define PIVC_ALLOW_SEMICOLON 0x00000020 // treat ';' as valid
  778. #define PIVC_ALLOW_COMMA 0x00000040 // treat ',' as valid
  779. #define PIVC_ALLOW_SPACE 0x00000080 // treat ' ' as valid
  780. #define PIVC_ALLOW_NONALPAHABETIC 0x00000100 // treat non-alphabetic exteneded chars as valid
  781. #define PIVC_ALLOW_QUOTE 0x00000200 // treat '"' as valid
  782. //
  783. // standard masks for PathIsValidChar()
  784. //
  785. #define PIVC_SFN_NAME (PIVC_ALLOW_DOT | PIVC_ALLOW_NONALPAHABETIC)
  786. #define PIVC_SFN_FULLPATH (PIVC_SFN_NAME | PIVC_ALLOW_COLON | PIVC_ALLOW_SLASH)
  787. #define PIVC_LFN_NAME (PIVC_ALLOW_DOT | PIVC_ALLOW_NONALPAHABETIC | PIVC_ALLOW_SEMICOLON | PIVC_ALLOW_COMMA | PIVC_ALLOW_SPACE)
  788. #define PIVC_LFN_FULLPATH (PIVC_LFN_NAME | PIVC_ALLOW_COLON | PIVC_ALLOW_SLASH)
  789. #define PIVC_SFN_FILESPEC (PIVC_SFN_FULLPATH | PIVC_ALLOW_STAR | PIVC_ALLOW_QUESTIONMARK)
  790. #define PIVC_LFN_FILESPEC (PIVC_LFN_FULLPATH | PIVC_ALLOW_STAR | PIVC_ALLOW_QUESTIONMARK)
  791. LWSTDAPI_(BOOL) PathIsValidCharA(UCHAR ch, DWORD dwFlags);
  792. LWSTDAPI_(BOOL) PathIsValidCharW(WCHAR ch, DWORD dwFlags);
  793. #ifdef UNICODE
  794. #define PathIsValidChar PathIsValidCharW
  795. #else
  796. #define PathIsValidChar PathIsValidCharA
  797. #endif // !UNICODE
  798. #endif // (_WIN32_IE >= 0x0501)
  799. // parsed URL information returned by ParseURL()
  800. //
  801. // Internet_CrackURL is the correct function for external components
  802. // to use. URL.DLL calls this function to do some work and the shell
  803. // uses this function as a leight-weight parsing function as well.
  804. typedef struct tagPARSEDURL% {
  805. DWORD cbSize;
  806. // Pointers into the buffer that was provided to ParseURL
  807. LPCTSTR% pszProtocol;
  808. UINT cchProtocol;
  809. LPCTSTR% pszSuffix;
  810. UINT cchSuffix;
  811. UINT nScheme; // One of URL_SCHEME_*
  812. } PARSEDURL%, * PPARSEDURL%;
  813. LWSTDAPI ParseURL%(LPCTSTR% pcszURL, PARSEDURL% * ppu);
  814. ;end_internal
  815. ;begin_both
  816. #endif // NO_SHLWAPI_PATH
  817. ;end_both
  818. ;begin_both
  819. #ifndef NO_SHLWAPI_REG
  820. //
  821. //=============== Registry Routines ===================================
  822. //
  823. ;end_both
  824. // SHDeleteEmptyKey mimics RegDeleteKey as it behaves on NT.
  825. // SHDeleteKey mimics RegDeleteKey as it behaves on Win95.
  826. LWSTDAPI_(DWORD) SHDeleteEmptyKey%(HKEY hkey, LPCTSTR% pszSubKey);
  827. LWSTDAPI_(DWORD) SHDeleteKey%(HKEY hkey, LPCTSTR% pszSubKey);
  828. LWSTDAPI_(HKEY) SHRegDuplicateHKey(HKEY hkey);
  829. ;begin_internal
  830. // BUGBUG (scotth): SHDeleteOrphanKey is the old name for SHDeleteEmptyKey.
  831. // This will be removed soon. SHDeleteOrphanKey already
  832. // maps to SHDeleteEmptyKey in the DLL exports.
  833. LWSTDAPI_(DWORD) SHDeleteOrphanKey%(HKEY hkey, LPCTSTR% pszSubKey);
  834. ;end_internal
  835. // These functions open the key, get/set/delete the value, then close
  836. // the key.
  837. LWSTDAPI_(DWORD) SHDeleteValue%(HKEY hkey, LPCTSTR% pszSubKey, LPCTSTR% pszValue);
  838. LWSTDAPI_(DWORD) SHGetValue%(HKEY hkey, LPCTSTR% pszSubKey, LPCTSTR% pszValue, DWORD *pdwType, void *pvData, DWORD *pcbData);
  839. LWSTDAPI_(DWORD) SHSetValue%(HKEY hkey, LPCTSTR% pszSubKey, LPCTSTR% pszValue, DWORD dwType, LPCVOID pvData, DWORD cbData);
  840. // These functions work just like RegQueryValueEx, except if the
  841. // data type is REG_EXPAND_SZ, then these will go ahead and expand
  842. // out the string. *pdwType will always be massaged to REG_SZ
  843. // if this happens. REG_SZ values are also guaranteed to be null
  844. // terminated.
  845. LWSTDAPI_(DWORD) SHQueryValueEx%(HKEY hkey, LPCTSTR% pszValue, DWORD *pdwReserved, DWORD *pdwType, void *pvData, DWORD *pcbData);
  846. // Enumeration functions support.
  847. LWSTDAPI_(LONG) SHEnumKeyExA(HKEY hkey, DWORD dwIndex, LPSTR pszName, LPDWORD pcchName);
  848. LWSTDAPI_(LONG) SHEnumKeyExW(HKEY hkey, DWORD dwIndex, LPWSTR pszName, LPDWORD pcchName);
  849. LWSTDAPI_(LONG) SHEnumValueA(HKEY hkey, DWORD dwIndex, LPSTR pszValueName, LPDWORD pcchValueName, LPDWORD pdwType, void *pvData, LPDWORD pcbData);
  850. LWSTDAPI_(LONG) SHEnumValueW(HKEY hkey, DWORD dwIndex, LPWSTR pszValueName, LPDWORD pcchValueName, LPDWORD pdwType, void *pvData, LPDWORD pcbData);
  851. LWSTDAPI_(LONG) SHQueryInfoKeyA(HKEY hkey, LPDWORD pcSubKeys, LPDWORD pcchMaxSubKeyLen, LPDWORD pcValues, LPDWORD pcchMaxValueNameLen);
  852. LWSTDAPI_(LONG) SHQueryInfoKeyW(HKEY hkey, LPDWORD pcSubKeys, LPDWORD pcchMaxSubKeyLen, LPDWORD pcValues, LPDWORD pcchMaxValueNameLen);
  853. // recursive key copy
  854. LWSTDAPI_(DWORD) SHCopyKeyA(HKEY hkeySrc, LPCSTR szSrcSubKey, HKEY hkeyDest, DWORD fReserved);
  855. LWSTDAPI_(DWORD) SHCopyKeyW(HKEY hkeySrc, LPCWSTR wszSrcSubKey, HKEY hkeyDest, DWORD fReserved);
  856. // Getting and setting file system paths with environment variables
  857. LWSTDAPI_(DWORD) SHRegGetPathA(HKEY hKey, LPCSTR pcszSubKey, LPCSTR pcszValue, LPSTR pszPath, DWORD dwFlags);
  858. LWSTDAPI_(DWORD) SHRegGetPathW(HKEY hKey, LPCWSTR pcszSubKey, LPCWSTR pcszValue, LPWSTR pszPath, DWORD dwFlags);
  859. LWSTDAPI_(DWORD) SHRegSetPathA(HKEY hKey, LPCSTR pcszSubKey, LPCSTR pcszValue, LPCSTR pcszPath, DWORD dwFlags);
  860. LWSTDAPI_(DWORD) SHRegSetPathW(HKEY hKey, LPCWSTR pcszSubKey, LPCWSTR pcszValue, LPCWSTR pcszPath, DWORD dwFlags);
  861. #ifdef UNICODE
  862. #define SHEnumKeyEx SHEnumKeyExW
  863. #define SHEnumValue SHEnumValueW
  864. #define SHQueryInfoKey SHQueryInfoKeyW
  865. #define SHCopyKey SHCopyKeyW
  866. #define SHRegGetPath SHRegGetPathW
  867. #define SHRegSetPath SHRegSetPathW
  868. #else
  869. #define SHEnumKeyEx SHEnumKeyExA
  870. #define SHEnumValue SHEnumValueA
  871. #define SHQueryInfoKey SHQueryInfoKeyA
  872. #define SHCopyKey SHCopyKeyA
  873. #define SHRegGetPath SHRegGetPathA
  874. #define SHRegSetPath SHRegSetPathA
  875. #endif
  876. //////////////////////////////////////////////
  877. // User Specific Registry Access Functions
  878. //////////////////////////////////////////////
  879. //
  880. // Type definitions.
  881. //
  882. typedef enum
  883. {
  884. SHREGDEL_DEFAULT = 0x00000000, // Delete's HKCU, or HKLM if HKCU is not found.
  885. SHREGDEL_HKCU = 0x00000001, // Delete HKCU only
  886. SHREGDEL_HKLM = 0x00000010, // Delete HKLM only.
  887. SHREGDEL_BOTH = 0x00000011, // Delete both HKCU and HKLM.
  888. } SHREGDEL_FLAGS;
  889. typedef enum
  890. {
  891. SHREGENUM_DEFAULT = 0x00000000, // Enumerates HKCU or HKLM if not found.
  892. SHREGENUM_HKCU = 0x00000001, // Enumerates HKCU only
  893. SHREGENUM_HKLM = 0x00000010, // Enumerates HKLM only.
  894. SHREGENUM_BOTH = 0x00000011, // Enumerates both HKCU and HKLM without duplicates.
  895. // This option is NYI.
  896. } SHREGENUM_FLAGS;
  897. #define SHREGSET_HKCU 0x00000001 // Write to HKCU if empty.
  898. #define SHREGSET_FORCE_HKCU 0x00000002 // Write to HKCU.
  899. #define SHREGSET_HKLM 0x00000004 // Write to HKLM if empty.
  900. #define SHREGSET_FORCE_HKLM 0x00000008 // Write to HKLM.
  901. #define SHREGSET_DEFAULT (SHREGSET_FORCE_HKCU | SHREGSET_HKLM) // Default is SHREGSET_FORCE_HKCU | SHREGSET_HKLM.
  902. typedef HANDLE HUSKEY; // HUSKEY is a Handle to a User Specific KEY.
  903. typedef HUSKEY *PHUSKEY;
  904. LWSTDAPI_(LONG) SHRegCreateUSKeyA(LPCSTR pszPath, REGSAM samDesired, HUSKEY hRelativeUSKey, PHUSKEY phNewUSKey, DWORD dwFlags);
  905. LWSTDAPI_(LONG) SHRegCreateUSKeyW(LPCWSTR pwzPath, REGSAM samDesired, HUSKEY hRelativeUSKey, PHUSKEY phNewUSKey, DWORD dwFlags);
  906. LWSTDAPI_(LONG) SHRegOpenUSKeyA(LPCSTR pszPath, REGSAM samDesired, HUSKEY hRelativeUSKey, PHUSKEY phNewUSKey, BOOL fIgnoreHKCU);
  907. LWSTDAPI_(LONG) SHRegOpenUSKeyW(LPCWSTR pwzPath, REGSAM samDesired, HUSKEY hRelativeUSKey, PHUSKEY phNewUSKey, BOOL fIgnoreHKCU);
  908. LWSTDAPI_(LONG) SHRegQueryUSValueA(HUSKEY hUSKey, LPCSTR pszValue, LPDWORD pdwType, void *pvData, LPDWORD pcbData, BOOL fIgnoreHKCU, void *pvDefaultData, DWORD dwDefaultDataSize);
  909. LWSTDAPI_(LONG) SHRegQueryUSValueW(HUSKEY hUSKey, LPCWSTR pwzValue, LPDWORD pdwType, void *pvData, LPDWORD pcbData, BOOL fIgnoreHKCU, void *pvDefaultData, DWORD dwDefaultDataSize);
  910. LWSTDAPI_(LONG) SHRegWriteUSValueA(HUSKEY hUSKey, LPCSTR pszValue, DWORD dwType, const void *pvData, DWORD cbData, DWORD dwFlags);
  911. LWSTDAPI_(LONG) SHRegWriteUSValueW(HUSKEY hUSKey, LPCWSTR pwzValue, DWORD dwType, const void *pvData, DWORD cbData, DWORD dwFlags);
  912. LWSTDAPI_(LONG) SHRegDeleteUSValueA(HUSKEY hUSKey, LPCSTR pszValue, SHREGDEL_FLAGS delRegFlags);
  913. LWSTDAPI_(LONG) SHRegDeleteEmptyUSKeyW(HUSKEY hUSKey, LPCWSTR pwzSubKey, SHREGDEL_FLAGS delRegFlags);
  914. LWSTDAPI_(LONG) SHRegDeleteEmptyUSKeyA(HUSKEY hUSKey, LPCSTR pszSubKey, SHREGDEL_FLAGS delRegFlags);
  915. LWSTDAPI_(LONG) SHRegDeleteUSValueW(HUSKEY hUSKey, LPCWSTR pwzValue, SHREGDEL_FLAGS delRegFlags);
  916. LWSTDAPI_(LONG) SHRegEnumUSKeyA(HUSKEY hUSKey, DWORD dwIndex, LPSTR pszName, LPDWORD pcchName, SHREGENUM_FLAGS enumRegFlags);
  917. LWSTDAPI_(LONG) SHRegEnumUSKeyW(HUSKEY hUSKey, DWORD dwIndex, LPWSTR pwzName, LPDWORD pcchName, SHREGENUM_FLAGS enumRegFlags);
  918. LWSTDAPI_(LONG) SHRegEnumUSValueA(HUSKEY hUSkey, DWORD dwIndex, LPSTR pszValueName, LPDWORD pcchValueName, LPDWORD pdwType, void *pvData, LPDWORD pcbData, SHREGENUM_FLAGS enumRegFlags);
  919. LWSTDAPI_(LONG) SHRegEnumUSValueW(HUSKEY hUSkey, DWORD dwIndex, LPWSTR pszValueName, LPDWORD pcchValueName, LPDWORD pdwType, void *pvData, LPDWORD pcbData, SHREGENUM_FLAGS enumRegFlags);
  920. LWSTDAPI_(LONG) SHRegQueryInfoUSKeyA(HUSKEY hUSKey, LPDWORD pcSubKeys, LPDWORD pcchMaxSubKeyLen, LPDWORD pcValues, LPDWORD pcchMaxValueNameLen, SHREGENUM_FLAGS enumRegFlags);
  921. LWSTDAPI_(LONG) SHRegQueryInfoUSKeyW(HUSKEY hUSKey, LPDWORD pcSubKeys, LPDWORD pcchMaxSubKeyLen, LPDWORD pcValues, LPDWORD pcchMaxValueNameLen, SHREGENUM_FLAGS enumRegFlags);
  922. LWSTDAPI_(LONG) SHRegCloseUSKey(HUSKEY hUSKey);
  923. // These calls are equal to an SHRegOpenUSKey, SHRegQueryUSValue, and then a SHRegCloseUSKey.
  924. LWSTDAPI_(LONG) SHRegGetUSValueA(LPCSTR pszSubKey, LPCSTR pszValue, LPDWORD pdwType, void * pvData, LPDWORD pcbData, BOOL fIgnoreHKCU, void *pvDefaultData, DWORD dwDefaultDataSize);
  925. LWSTDAPI_(LONG) SHRegGetUSValueW(LPCWSTR pwzSubKey, LPCWSTR pwzValue, LPDWORD pdwType, void * pvData, LPDWORD pcbData, BOOL fIgnoreHKCU, void *pvDefaultData, DWORD dwDefaultDataSize);
  926. LWSTDAPI_(LONG) SHRegSetUSValueA(LPCSTR pszSubKey, LPCSTR pszValue, DWORD dwType, const void *pvData, DWORD cbData, DWORD dwFlags);
  927. LWSTDAPI_(LONG) SHRegSetUSValueW(LPCWSTR pwzSubKey, LPCWSTR pwzValue, DWORD dwType, const void *pvData, DWORD cbData, DWORD dwFlags);
  928. LWSTDAPI_(int) SHRegGetIntW(HKEY hk, LPCWSTR pwzKey, int iDefault);
  929. #ifdef UNICODE
  930. #define SHRegCreateUSKey SHRegCreateUSKeyW
  931. #define SHRegOpenUSKey SHRegOpenUSKeyW
  932. #define SHRegQueryUSValue SHRegQueryUSValueW
  933. #define SHRegWriteUSValue SHRegWriteUSValueW
  934. #define SHRegDeleteUSValue SHRegDeleteUSValueW
  935. #define SHRegDeleteEmptyUSKey SHRegDeleteEmptyUSKeyW
  936. #define SHRegEnumUSKey SHRegEnumUSKeyW
  937. #define SHRegEnumUSValue SHRegEnumUSValueW
  938. #define SHRegQueryInfoUSKey SHRegQueryInfoUSKeyW
  939. #define SHRegGetUSValue SHRegGetUSValueW
  940. #define SHRegSetUSValue SHRegSetUSValueW
  941. #define SHRegGetInt SHRegGetIntW
  942. #else
  943. #define SHRegCreateUSKey SHRegCreateUSKeyA
  944. #define SHRegOpenUSKey SHRegOpenUSKeyA
  945. #define SHRegQueryUSValue SHRegQueryUSValueA
  946. #define SHRegWriteUSValue SHRegWriteUSValueA
  947. #define SHRegDeleteUSValue SHRegDeleteUSValueA
  948. #define SHRegDeleteEmptyUSKey SHRegDeleteEmptyUSKeyA
  949. #define SHRegEnumUSKey SHRegEnumUSKeyA
  950. #define SHRegEnumUSValue SHRegEnumUSValueA
  951. #define SHRegQueryInfoUSKey SHRegQueryInfoUSKeyA
  952. #define SHRegGetUSValue SHRegGetUSValueA
  953. #define SHRegSetUSValue SHRegSetUSValueA
  954. #endif
  955. LWSTDAPI_(BOOL) SHRegGetBoolUSValueA(LPCSTR pszSubKey, LPCSTR pszValue, BOOL fIgnoreHKCU, BOOL fDefault);
  956. LWSTDAPI_(BOOL) SHRegGetBoolUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, BOOL fIgnoreHKCU, BOOL fDefault);
  957. #ifdef UNICODE
  958. #define SHRegGetBoolUSValue SHRegGetBoolUSValueW
  959. #else
  960. #define SHRegGetBoolUSValue SHRegGetBoolUSValueA
  961. #endif
  962. //
  963. // Association APIs
  964. //
  965. // these APIs are to assist in accessing the data in HKCR
  966. // getting the Command strings and exe paths
  967. // for different verbs and extensions are simplified this way
  968. //
  969. enum {
  970. ASSOCF_INIT_NOREMAPCLSID = 0x00000001, // do not remap clsids to progids
  971. ASSOCF_INIT_BYEXENAME = 0x00000002, // executable is being passed in
  972. ASSOCF_OPEN_BYEXENAME = 0x00000002, // executable is being passed in
  973. ASSOCF_INIT_DEFAULTTOSTAR = 0x00000004, // treat "*" as the BaseClass
  974. ASSOCF_INIT_DEFAULTTOFOLDER = 0x00000008, // treat "Folder" as the BaseClass
  975. ASSOCF_NOUSERSETTINGS = 0x00000010, // dont use HKCU
  976. ASSOCF_NOTRUNCATE = 0x00000020, // dont truncate the return string
  977. ASSOCF_VERIFY = 0x00000040, // verify data is accurate (DISK HITS)
  978. ASSOCF_REMAPRUNDLL = 0x00000080, // actually gets info about rundlls target if applicable
  979. ASSOCF_NOFIXUPS = 0x00000100, // attempt to fix errors if found
  980. ASSOCF_IGNOREBASECLASS = 0x00000200, // dont recurse into the baseclass
  981. };
  982. typedef DWORD ASSOCF;
  983. typedef enum {
  984. ASSOCSTR_COMMAND = 1, // shell\verb\command string
  985. ASSOCSTR_EXECUTABLE, // the executable part of command string
  986. ASSOCSTR_FRIENDLYDOCNAME, // friendly name of the document type
  987. ASSOCSTR_FRIENDLYAPPNAME, // friendly name of executable
  988. ASSOCSTR_NOOPEN, // noopen value
  989. ASSOCSTR_SHELLNEWVALUE, // query values under the shellnew key
  990. ASSOCSTR_DDECOMMAND, // template for DDE commands
  991. ASSOCSTR_DDEIFEXEC, // DDECOMMAND to use if just create a process
  992. ASSOCSTR_DDEAPPLICATION, // Application name in DDE broadcast
  993. ASSOCSTR_DDETOPIC, // Topic Name in DDE broadcast
  994. ASSOCSTR_INFOTIP, // info tip for an item, or list of properties to create info tip from
  995. ASSOCSTR_QUICKTIP, // same as ASSOCSTR_INFOTIP, except, this list contains only quickly retrievable properties
  996. ASSOCSTR_TILEINFO, // similar to ASSOCSTR_INFOTIP - lists important properties for tileview
  997. ASSOCSTR_CONTENTTYPE, // MIME Content type
  998. ASSOCSTR_DEFAULTICON, // Default icon source
  999. ASSOCSTR_SHELLEXTENSION, // Guid string pointing to the Shellex\Shellextensionhandler value.
  1000. ASSOCSTR_MAX // last item in enum...
  1001. } ASSOCSTR;
  1002. typedef enum {
  1003. ASSOCKEY_SHELLEXECCLASS = 1, // the key that should be passed to ShellExec(hkeyClass)
  1004. ASSOCKEY_APP, // the "Application" key for the association
  1005. ASSOCKEY_CLASS, // the progid or class key
  1006. ASSOCKEY_BASECLASS, // the BaseClass key
  1007. ASSOCKEY_MAX // last item in enum...
  1008. } ASSOCKEY;
  1009. typedef enum {
  1010. ASSOCDATA_MSIDESCRIPTOR = 1, // Component Descriptor to pass to MSI APIs
  1011. ASSOCDATA_NOACTIVATEHANDLER, // restrict attempts to activate window
  1012. ASSOCDATA_QUERYCLASSSTORE, // should check with the NT Class Store
  1013. ASSOCDATA_HASPERUSERASSOC, // defaults to user specified association
  1014. ASSOCDATA_EDITFLAGS, // Edit flags.
  1015. ASSOCDATA_VALUE, // use pszExtra as the Value name
  1016. ASSOCDATA_MAX
  1017. } ASSOCDATA;
  1018. typedef enum {
  1019. ASSOCENUM_NONE
  1020. } ASSOCENUM;
  1021. #undef INTERFACE
  1022. #define INTERFACE IQueryAssociations
  1023. DECLARE_INTERFACE_( IQueryAssociations, IUnknown )
  1024. {
  1025. // IUnknown methods
  1026. STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
  1027. STDMETHOD_(ULONG, AddRef) ( THIS ) PURE;
  1028. STDMETHOD_(ULONG, Release) ( THIS ) PURE;
  1029. // IQueryAssociations methods
  1030. STDMETHOD (Init)(THIS_ ASSOCF flags, LPCWSTR pszAssoc, HKEY hkProgid, HWND hwnd) PURE;
  1031. STDMETHOD (GetString)(THIS_ ASSOCF flags, ASSOCSTR str, LPCWSTR pszExtra, LPWSTR pszOut, DWORD *pcchOut) PURE;
  1032. STDMETHOD (GetKey)(THIS_ ASSOCF flags, ASSOCKEY key, LPCWSTR pszExtra, HKEY *phkeyOut) PURE;
  1033. STDMETHOD (GetData)(THIS_ ASSOCF flags, ASSOCDATA data, LPCWSTR pszExtra, LPVOID pvOut, DWORD *pcbOut) PURE;
  1034. STDMETHOD (GetEnum)(THIS_ ASSOCF flags, ASSOCENUM assocenum, LPCWSTR pszExtra, REFIID riid, LPVOID *ppvOut) PURE;
  1035. };
  1036. ;begin_internal
  1037. typedef struct tagAssocDDEExec
  1038. {
  1039. LPCWSTR pszDDEExec;
  1040. LPCWSTR pszApplication;
  1041. LPCWSTR pszTopic;
  1042. BOOL fNoActivateHandler;
  1043. } ASSOCDDEEXEC;
  1044. typedef struct tagAssocVerb
  1045. {
  1046. LPCWSTR pszVerb;
  1047. LPCWSTR pszTitle;
  1048. LPCWSTR pszFriendlyAppName;
  1049. LPCWSTR pszApplication;
  1050. LPCWSTR pszParams;
  1051. ASSOCDDEEXEC *pDDEExec;
  1052. } ASSOCVERB;
  1053. typedef struct tagAssocShell
  1054. {
  1055. ASSOCVERB *rgVerbs;
  1056. DWORD cVerbs;
  1057. DWORD iDefaultVerb;
  1058. } ASSOCSHELL;
  1059. typedef struct tagAssocProgid
  1060. {
  1061. DWORD cbSize;
  1062. LPCWSTR pszProgid;
  1063. LPCWSTR pszFriendlyDocName;
  1064. LPCWSTR pszDefaultIcon;
  1065. ASSOCSHELL *pShellKey;
  1066. LPCWSTR pszExtensions;
  1067. } ASSOCPROGID;
  1068. typedef struct tagAssocApp
  1069. {
  1070. DWORD cbSize;
  1071. LPCWSTR pszFriendlyAppName;
  1072. ASSOCSHELL *pShellKey;
  1073. } ASSOCAPP;
  1074. enum {
  1075. ASSOCMAKEF_VERIFY = 0x00000040, // verify data is accurate (DISK HITS)
  1076. ASSOCMAKEF_USEEXPAND = 0x00000200, // strings have environment vars and need REG_EXPAND_SZ
  1077. ASSOCMAKEF_SUBSTENV = 0x00000400, // attempt to use std env if they match...
  1078. ASSOCMAKEF_VOLATILE = 0x00000800, // the progid will not persist between sessions
  1079. ASSOCMAKEF_DELETE = 0x00002000, // remove this association if possible
  1080. };
  1081. typedef DWORD ASSOCMAKEF;
  1082. LWSTDAPI AssocMakeProgid(ASSOCMAKEF flags, LPCWSTR pszApplication, ASSOCPROGID *pProgid, HKEY *phkProgid);
  1083. LWSTDAPI AssocMakeApp(ASSOCMAKEF flags, LPCWSTR pszApplication, ASSOCAPP *pApp, HKEY *phkApp);
  1084. LWSTDAPI AssocMakeApplicationByKey%(ASSOCMAKEF flags, HKEY hkAssoc, LPCTSTR% pszVerb);
  1085. LWSTDAPI AssocMakeFileExtsToApplication%(ASSOCMAKEF flags, LPCTSTR% pszExt, LPCTSTR% pszApplication);
  1086. LWSTDAPI AssocCopyVerbs(HKEY hkSrc, HKEY hkDst);
  1087. ;end_internal
  1088. LWSTDAPI AssocCreate(CLSID clsid, REFIID riid, LPVOID *ppv);
  1089. // wrappers for the interface
  1090. LWSTDAPI AssocQueryString%(ASSOCF flags, ASSOCSTR str, LPCTSTR% pszAssoc, LPCTSTR% pszExtra, LPTSTR% pszOut, DWORD *pcchOut);
  1091. LWSTDAPI AssocQueryStringByKey%(ASSOCF flags, ASSOCSTR str, HKEY hkAssoc, LPCTSTR% pszExtra, LPTSTR% pszOut, DWORD *pcchOut);
  1092. LWSTDAPI AssocQueryKey%(ASSOCF flags, ASSOCKEY key, LPCTSTR% pszAssoc, LPCTSTR% pszExtra, HKEY *phkeyOut);
  1093. // AssocIsDangerous() checks a file type to determine whether it is "Dangerous"
  1094. // this maps to the IE download dialog's forcing a prompt to open or save.
  1095. // dangerous file types should be handled more carefully than other file types.
  1096. //
  1097. // Parameter: pszAssoc - type to check. may be an extension or progid. (".exe" or "exefile" would both be valid)
  1098. //
  1099. // Returns: TRUE if the file type is dangerous.
  1100. //
  1101. // NOTES:
  1102. //
  1103. // this API first checks a hardcoded list of known dangerous types.
  1104. // then it checks the editflags for the file type looking for the FTA_AlwaysUnsafe bit.
  1105. // then it checks Safer policies.
  1106. //
  1107. LWSTDAPI_(BOOL) AssocIsDangerous(LPCWSTR pszAssoc);
  1108. ;begin_internal
  1109. typedef enum _SHELLKEY
  1110. {
  1111. SKROOT_HKCU = 0x00000001, // internal to the function
  1112. SKROOT_HKLM = 0x00000002, // internal to the function
  1113. SKROOT_MASK = 0x0000000F, // internal to the function
  1114. SKPATH_EXPLORER = 0x00000000, // internal to the function
  1115. SKPATH_SHELL = 0x00000010, // internal to the function
  1116. SKPATH_SHELLNOROAM = 0x00000020, // internal to the function
  1117. SKPATH_CLASSES = 0x00000030, // internal to the function
  1118. SKPATH_MASK = 0x00000FF0, // internal to the function
  1119. SKSUB_NONE = 0x00000000, // internal to the function
  1120. SKSUB_LOCALIZEDNAMES = 0x00001000, // internal to the function
  1121. SKSUB_HANDLERS = 0x00002000, // internal to the function
  1122. SKSUB_ASSOCIATIONS = 0x00003000, // internal to the function
  1123. SKSUB_VOLATILE = 0x00004000, // internal to the function
  1124. SKSUB_MUICACHE = 0x00005000, // internal to the function
  1125. SKSUB_FILEEXTS = 0x00006000, // internal to the function
  1126. SKSUB_MASK = 0x000FF000, // internal to the function
  1127. SHELLKEY_HKCU_EXPLORER = SKROOT_HKCU | SKPATH_EXPLORER | SKSUB_NONE,
  1128. SHELLKEY_HKLM_EXPLORER = SKROOT_HKLM | SKPATH_EXPLORER | SKSUB_NONE,
  1129. SHELLKEY_HKCU_SHELL = SKROOT_HKCU | SKPATH_SHELL | SKSUB_NONE,
  1130. SHELLKEY_HKLM_SHELL = SKROOT_HKLM | SKPATH_SHELL | SKSUB_NONE,
  1131. SHELLKEY_HKCU_SHELLNOROAM = SKROOT_HKCU | SKPATH_SHELLNOROAM | SKSUB_NONE,
  1132. SHELLKEY_HKCULM_SHELL = SHELLKEY_HKCU_SHELLNOROAM,
  1133. SHELLKEY_HKCULM_CLASSES = SKROOT_HKCU | SKPATH_CLASSES | SKSUB_NONE,
  1134. SHELLKEY_HKCU_LOCALIZEDNAMES = SKROOT_HKCU | SKPATH_SHELL | SKSUB_LOCALIZEDNAMES,
  1135. SHELLKEY_HKCULM_HANDLERS = SKROOT_HKCU | SKPATH_SHELLNOROAM | SKSUB_HANDLERS,
  1136. SHELLKEY_HKCULM_ASSOCIATIONS = SKROOT_HKCU | SKPATH_SHELLNOROAM | SKSUB_ASSOCIATIONS,
  1137. SHELLKEY_HKCULM_VOLATILE = SKROOT_HKCU | SKPATH_SHELLNOROAM | SKSUB_VOLATILE,
  1138. SHELLKEY_HKCULM_MUICACHE = SKROOT_HKCU | SKPATH_SHELLNOROAM | SKSUB_MUICACHE,
  1139. SHELLKEY_HKCU_FILEEXTS = SKROOT_HKCU | SKPATH_EXPLORER | SKSUB_FILEEXTS,
  1140. SHELLKEY_HKCULM_HANDLERS_RO = SHELLKEY_HKCULM_HANDLERS, // deprecated
  1141. SHELLKEY_HKCULM_HANDLERS_RW = SHELLKEY_HKCULM_HANDLERS, // deprecated
  1142. SHELLKEY_HKCULM_ASSOCIATIONS_RO = SHELLKEY_HKCULM_ASSOCIATIONS, // deprecated
  1143. SHELLKEY_HKCULM_ASSOCIATIONS_RW = SHELLKEY_HKCULM_ASSOCIATIONS, // deprecated
  1144. SHELLKEY_HKCULM_RO = SHELLKEY_HKCU_SHELLNOROAM, // deprecated
  1145. SHELLKEY_HKCULM_RW = SHELLKEY_HKCU_SHELLNOROAM, // deprecated
  1146. } SHELLKEY;
  1147. LWSTDAPI_(HKEY) SHGetShellKey(SHELLKEY sk, LPCWSTR pszSubKey, BOOL fCreateSub);
  1148. LWSTDAPI SKGetValue%(SHELLKEY sk, LPCTSTR% pszSubKey, LPCTSTR% pszValue, DWORD *pdwType, void *pvData, DWORD *pcbData);
  1149. LWSTDAPI SKSetValue%(SHELLKEY sk, LPCTSTR% pszSubKey, LPCTSTR% pszValue, DWORD dwType, LPCVOID pvData, DWORD cbData);
  1150. LWSTDAPI SKDeleteValue%(SHELLKEY sk, LPCTSTR% pszSubKey, LPCTSTR% pszValue);
  1151. LWSTDAPI SKAllocValue%(SHELLKEY sk, LPCTSTR% pszSubKey, LPCTSTR% pszValue, DWORD *pdwType, void **pvData, DWORD *pcbData);
  1152. LWSTDAPI QuerySourceCreateFromKey(HKEY hk, PCWSTR pszSub, BOOL fCreate, REFIID riid, void **ppv);
  1153. ;end_internal
  1154. ;begin_both
  1155. #endif // NO_SHLWAPI_REG
  1156. ;end_both
  1157. ;begin_internal
  1158. #ifndef NO_SHLWAPI_UALSTR
  1159. #include <uastrfnc.h>
  1160. #endif // NO_SHLWAPI_UALSTR
  1161. ;end_internal
  1162. ;begin_both
  1163. #ifndef NO_SHLWAPI_STREAM
  1164. //
  1165. //=============== Stream Routines ===================================
  1166. //
  1167. ;end_both
  1168. ;begin_internal
  1169. //
  1170. // We must say "struct IStream" instead of "IStream" in case we are
  1171. // #include'd before <ole2.h>.
  1172. //
  1173. ;end_internal
  1174. LWSTDAPI_(struct IStream *) SHOpenRegStream%(HKEY hkey, LPCTSTR% pszSubkey, LPCTSTR% pszValue, DWORD grfMode);
  1175. LWSTDAPI_(struct IStream *) SHOpenRegStream2%(HKEY hkey, LPCTSTR% pszSubkey, LPCTSTR% pszValue, DWORD grfMode);
  1176. // New code always wants new implementation...
  1177. #undef SHOpenRegStream
  1178. #define SHOpenRegStream SHOpenRegStream2
  1179. LWSTDAPI SHCreateStreamOnFile%(LPCTSTR% pszFile, DWORD grfMode, struct IStream **ppstm);
  1180. #if (_WIN32_IE >= 0x0600)
  1181. ;begin_internal
  1182. LWSTDAPI MapWin32ErrorToSTG(HRESULT hrIn);
  1183. LWSTDAPI ModeToCreateFileFlags(DWORD grfMode, BOOL fCreate, DWORD *pdwDesiredAccess, DWORD *pdwShareMode, DWORD *pdwCreationDisposition);
  1184. // SHConvertGraphicsFile Description:
  1185. // pszFile: The source file name to convert. The file can be a JPEG, GIF, PNG, TIFF, BMP, EMF, WMF, or ICO filetype.
  1186. // pszDestFile: This is the destination file that will be created. The extension will determine type of
  1187. // format for the destiation file. If this file already exists, the function will fail with
  1188. // HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS) unless the flag SHCGF_REPLACEFILE is specified.
  1189. // Return value: S_OK if the destination file was able to be created, otherwise an HRESULT error.
  1190. //
  1191. // NOTE: This is currently internal because: 1) we are using a temporary GDI+ interface, 2)
  1192. // we can't fix any bugs we find (since they are in GDI+), and 3) it's best if GDI+ owns
  1193. // the public version of this interface. GDI+ is working on version 1 of their API for
  1194. // whistler. They don't have time to create this API, make it public, and support it
  1195. // until version 2, which will be after whistler.
  1196. //
  1197. // dwFlags:
  1198. #define SHCGF_NONE 0x00000000 // Normal behavior
  1199. #define SHCGF_REPLACEFILE 0x00000001 // If pszDestFile already exists, delete it.
  1200. LWSTDAPI SHConvertGraphicsFile(IN LPCWSTR pszFile, IN LPCWSTR pszDestFile, IN DWORD dwFlags);
  1201. ;end_internal
  1202. LWSTDAPI SHCreateStreamOnFileEx(LPCWSTR pszFile, DWORD grfMode, DWORD dwAttributes, BOOL fCreate, struct IStream * pstmTemplate, struct IStream **ppstm);
  1203. #endif // (_WIN32_IE >= 0x0600)
  1204. ;begin_internal
  1205. LWSTDAPI_(struct IStream *) SHCreateMemStream(LPBYTE pInit, UINT cbInit);
  1206. // SHCreateStreamWrapper creates an IStream that spans multiple IStream implementations.
  1207. // NOTE: STGM_READ is the only mode currently supported
  1208. LWSTDAPI SHCreateStreamWrapper(IStream *aStreams[], UINT cStreams, DWORD grfMode, IStream **ppstm);
  1209. // These functions read, write, and maintain a list of DATABLOCK_HEADERs.
  1210. // Blocks can be of any size (cbSize) and they are added, found, and removed
  1211. // by dwSignature. Each block is guranteed to be aligned on a DWORD boundary
  1212. // in memory. The stream format is identical to Windows 95 and NT 4
  1213. // CShellLink's "EXP" data format (with one bug fix: stream data is NULL
  1214. // terminated on write...)
  1215. //
  1216. // SHReadDataBlocks and SHAddDataBlock will allocate your pdbList for you.
  1217. //
  1218. // SHFindDataBlock returns a pointer into the pdbList.
  1219. //
  1220. // SHAddDataBlock and SHRemoveDataBlock return TRUE if ppdbList modified.
  1221. //
  1222. /*
  1223. * Temporary definition because the definition doesn't show up until shlobj.w.
  1224. */
  1225. #define LPDATABLOCK_HEADER struct tagDATABLOCKHEADER *
  1226. #define LPDBLIST struct tagDATABLOCKHEADER *
  1227. LWSTDAPI SHWriteDataBlockList(struct IStream* pstm, LPDBLIST pdbList);
  1228. LWSTDAPI SHReadDataBlockList(struct IStream* pstm, LPDBLIST * ppdbList);
  1229. LWSTDAPI_(void) SHFreeDataBlockList(LPDBLIST pdbList);
  1230. LWSTDAPI_(BOOL) SHAddDataBlock(LPDBLIST * ppdbList, LPDATABLOCK_HEADER pdb);
  1231. LWSTDAPI_(BOOL) SHRemoveDataBlock(LPDBLIST * ppdbList, DWORD dwSignature);
  1232. LWSTDAPI_(void *) SHFindDataBlock(LPDBLIST pdbList, DWORD dwSignature);
  1233. #undef LPDATABLOCK_HEADER
  1234. #undef LPDBLIST
  1235. // FUNCTION: SHCheckDiskForMedia
  1236. //
  1237. // hwnd - NULL means no UI will be displayed. Non-NULL means
  1238. // punkEnableModless - Make caller modal during UI. (OPTIONAL)
  1239. // pszPath - Path that needs verification.
  1240. // wFunc - Type of operation (FO_MOVE, FO_COPY, FO_DELETE, FO_RENAME - shellapi.h)
  1241. //
  1242. // NOTE: USE NT5's SHPathPrepareForWrite() instead, it's MUCH MUCH BETTER.
  1243. LWSTDAPI_(BOOL) SHCheckDiskForMediaA(HWND hwnd, IUnknown * punkEnableModless, LPCSTR pszPath, UINT wFunc);
  1244. LWSTDAPI_(BOOL) SHCheckDiskForMediaW(HWND hwnd, IUnknown * punkEnableModless, LPCWSTR pwzPath, UINT wFunc);
  1245. #ifdef UNICODE
  1246. #define SHCheckDiskForMedia SHCheckDiskForMediaW
  1247. #else
  1248. #define SHCheckDiskForMedia SHCheckDiskForMediaA
  1249. #endif
  1250. ;end_internal
  1251. ;begin_both
  1252. #endif // NO_SHLWAPI_STREAM
  1253. ;end_both
  1254. ;begin_internal
  1255. #ifndef NO_SHLWAPI_MLUI
  1256. //
  1257. //=============== Multi Language UI Routines ===================================
  1258. //
  1259. ;end_internal
  1260. ;begin_internal
  1261. #define ORD_SHGETWEBFOLDERFILEPATHA 440
  1262. #define ORD_SHGETWEBFOLDERFILEPATHW 441
  1263. LWSTDAPI SHGetWebFolderFilePath%(LPCTSTR% pszFileName, LPTSTR% pszMUIPath, UINT cchMUIPath);
  1264. // Use MLLoadLibrary to get the ML-resource file. This function tags the file so
  1265. // all standard shlwapi wrap functions automatically get ML-behavior.
  1266. //
  1267. #define ORD_MLLOADLIBRARYA 377
  1268. #define ORD_MLLOADLIBRARYW 378
  1269. LWSTDAPI_(HINSTANCE) MLLoadLibrary%(LPCTSTR% lpLibFileName, HMODULE hModule, DWORD dwCrossCodePage);
  1270. LWSTDAPI_(BOOL) MLFreeLibrary(HMODULE hModule);
  1271. #define ML_NO_CROSSCODEPAGE 0
  1272. #define ML_CROSSCODEPAGE_NT 1
  1273. #define ML_CROSSCODEPAGE 2
  1274. #define ML_SHELL_LANGUAGE 4
  1275. #define ML_CROSSCODEPAGE_MASK 7
  1276. // If you are a global distributable a-la comctl32 that doesn't follow the IE5
  1277. // PlugUI resource layout, then load your own hinstance and poke it into shlwapi
  1278. // using these functions:
  1279. //
  1280. LWSTDAPI MLSetMLHInstance(HINSTANCE hInst, LANGID lidUI);
  1281. LWSTDAPI MLClearMLHInstance(HINSTANCE hInst);
  1282. // Of course you need to know what UI language to use:
  1283. //
  1284. #define ORD_MLGETUILANGUAGE 376
  1285. LWSTDAPI_(LANGID) MLGetUILanguage(void);
  1286. // Super internal and you probably don't need this one, but comctl32 does
  1287. // some font munging in PlugUI cases on your apps behalf:
  1288. //
  1289. LWSTDAPI_(BOOL) MLIsMLHInstance(HINSTANCE hInst);
  1290. LWSTDAPI_(HRESULT) MLBuildResURL%(LPCTSTR% szLibFile, HMODULE hModule, DWORD dwCrossCodePage, LPCTSTR% szResourceName, LPTSTR% pszResURL, int nBufSize);
  1291. #define ORD_MLWINHELPA 395
  1292. #define ORD_MLWINHELPW 397
  1293. LWSTDAPI_(BOOL) MLWinHelp%(HWND hWndCaller, LPCTSTR% lpszHelp, UINT uCommand, DWORD_PTR dwData);
  1294. #define ORD_MLHTMLHELPA 396
  1295. #define ORD_MLHTMLHELPW 398
  1296. LWSTDAPI_(HWND) MLHtmlHelp%(HWND hWndCaller, LPCTSTR% pszFile, UINT uCommand, DWORD_PTR dwData, DWORD dwCrossCodePage);
  1297. ;end_internal
  1298. ;begin_internal
  1299. #endif // NO_SHLWAPI_MLUI
  1300. ;end_internal
  1301. ;begin_internal
  1302. #ifndef NO_SHLWAPI_HTTP
  1303. //
  1304. //=============== HTTP helper Routines ===================================
  1305. // The calling thread must have called CoInitialize() before using this
  1306. // function - it will create a format enumerator and associate it as a
  1307. // property with the IShellBrowser passed in, so that it will be reused.
  1308. //
  1309. ;begin_internal
  1310. //
  1311. // We must say "struct IWhatever" instead of "IWhatever" in case we are
  1312. // #include'd before <ole2.h>.
  1313. //
  1314. ;end_internal
  1315. LWSTDAPI RegisterDefaultAcceptHeaders(struct IBindCtx* pbc, struct IShellBrowser* psb);
  1316. LWSTDAPI RunRegCommand(HWND hwnd, HKEY hkey, LPCWSTR pszKey);
  1317. LWSTDAPI RunIndirectRegCommand(HWND hwnd, HKEY hkey, LPCWSTR pszKey, LPCWSTR pszVerb);
  1318. LWSTDAPI SHRunIndirectRegClientCommand(HWND hwnd, LPCWSTR pszClient);
  1319. LWSTDAPI GetAcceptLanguagesA(LPSTR psz, LPDWORD pcch);
  1320. LWSTDAPI GetAcceptLanguagesW(LPWSTR pwz, LPDWORD pcch);
  1321. #ifdef UNICODE
  1322. #define GetAcceptLanguages GetAcceptLanguagesW
  1323. #else
  1324. #define GetAcceptLanguages GetAcceptLanguagesA
  1325. #endif
  1326. #endif // NO_SHLWAPI_HTTP
  1327. ;end_internal
  1328. ;begin_internal
  1329. LWSTDAPI_(HWND) SHHtmlHelpOnDemandW(HWND hwnd, LPCWSTR pszFile, UINT uCommand, DWORD_PTR dwData, DWORD dwCrossCodePage, BOOL bUseML);
  1330. LWSTDAPI_(HWND) SHHtmlHelpOnDemandA(HWND hwnd, LPCSTR pszFile, UINT uCommand, DWORD_PTR dwData, DWORD dwCrossCodePage, BOOL bUseML);
  1331. LWSTDAPI_(BOOL) SHWinHelpOnDemandW(HWND hwnd, LPCWSTR pszFile, UINT uCommand, DWORD_PTR dwData, BOOL bUseML);
  1332. LWSTDAPI_(BOOL) SHWinHelpOnDemandA(HWND hwnd, LPCSTR pszFile, UINT uCommand, DWORD_PTR dwData, BOOL bUseML);
  1333. LWSTDAPI_(BOOL) WINAPI Shell_GetCachedImageIndexWrapW(LPCWSTR pszIconPath, int iIconIndex, UINT uIconFlags);
  1334. LWSTDAPI_(BOOL) WINAPI Shell_GetCachedImageIndexWrapA(LPCSTR pszIconPath, int iIconIndex, UINT uIconFlags);
  1335. #ifdef UNICODE
  1336. #define SHHtmlHelpOnDemand SHHtmlHelpOnDemandW
  1337. #define SHWinHelpOnDemand SHWinHelpOnDemandW
  1338. #define Shell_GetCachedImageIndexWrap Shell_GetCachedImageIndexWrapW
  1339. #else
  1340. #define SHHtmlHelpOnDemand SHHtmlHelpOnDemandA
  1341. #define SHWinHelpOnDemand SHWinHelpOnDemandA
  1342. #define Shell_GetCachedImageIndexWrap Shell_GetCachedImageIndexWrapA
  1343. #endif
  1344. ;end_internal
  1345. ;begin_internal
  1346. #ifndef NO_SHLWAPI_STOPWATCH
  1347. //
  1348. //=============== Performance timing macros and prototypes ================
  1349. // StopWatch performance mode flags used in dwFlags param in API's and in Mode key at
  1350. // HKLM\software\microsoft\windows\currentversion\explorer\performance
  1351. // NOTE: low word is used for the mode, high word is used to change the default painter timer interval.
  1352. // If we need more mode bits then we'll need a new reg key for paint timer
  1353. #define SPMODE_SHELL 0x00000001
  1354. #define SPMODE_DEBUGOUT 0x00000002
  1355. #define SPMODE_TEST 0x00000004
  1356. #define SPMODE_BROWSER 0x00000008
  1357. #define SPMODE_FLUSH 0x00000010
  1358. #define SPMODE_EVENT 0x00000020
  1359. #define SPMODE_JAVA 0x00000040
  1360. #define SPMODE_FORMATTEXT 0x00000080
  1361. #define SPMODE_PROFILE 0x00000100
  1362. #define SPMODE_DEBUGBREAK 0x00000200
  1363. #define SPMODE_MSGTRACE 0x00000400
  1364. #define SPMODE_PERFTAGS 0x00000800
  1365. #define SPMODE_MEMWATCH 0x00001000
  1366. #define SPMODE_DBMON 0x00002000
  1367. #define SPMODE_MARS 0x00004000
  1368. #ifndef NO_ETW_TRACING
  1369. #define SPMODE_EVENTTRACE 0x00008000 // Event Tracing for Windows Enabled
  1370. #endif
  1371. #define SPMODE_RESERVED 0xffff0000
  1372. #ifndef NO_ETW_TRACING
  1373. #define SPMODES (SPMODE_SHELL | SPMODE_BROWSER | SPMODE_JAVA | SPMODE_MSGTRACE | SPMODE_MEMWATCH | SPMODE_DBMON | SPMODE_MARS | SPMODE_EVENTTRACE)
  1374. #else
  1375. #define SPMODES (SPMODE_SHELL | SPMODE_BROWSER | SPMODE_JAVA | SPMODE_MSGTRACE | SPMODE_MEMWATCH | SPMODE_DBMON | SPMODE_MARS)
  1376. #endif
  1377. #ifndef NO_ETW_TRACING
  1378. // Event tracing capability enabled by setting the mode to SPMODE_EVENTTRACE and
  1379. // selecting the part of the shell to trace in the "EventTrace" Value in the
  1380. // following key:
  1381. // HKLM\software\microsoft\windows\currentversion\explorer\performance
  1382. // BROWSER TRACING
  1383. // Do not use with SPMODE_BROWSER. If SPMODE_EVENT is used, the
  1384. // STOPWATCH_STOP_EVENT will be signaled when a web page is done loading.
  1385. #define SPTRACE_BROWSER 0x00000001
  1386. // Used to turn on/off browser event tracing. Setting the registry key enables
  1387. // event tracing use, but doesn't turn it on.
  1388. // {5576F62E-4142-45a8-9516-262A510C13F0}
  1389. DEFINE_GUID(c_BrowserControlGuid,
  1390. 0x5576f62e,
  1391. 0x4142,
  1392. 0x45a8,
  1393. 0x95, 0x16, 0x26, 0x2a, 0x51, 0xc, 0x13, 0xf0);
  1394. // Maps to the structure sent to ETW. ETW definition in
  1395. // \nt\sdktools\trace\tracedmp\mofdata.guid
  1396. // {2B992163-736F-4a68-9153-95BC5F34D884}
  1397. DEFINE_GUID(c_BrowserTraceGuid,
  1398. 0x2b992163,
  1399. 0x736f,
  1400. 0x4a68,
  1401. 0x91, 0x53, 0x95, 0xbc, 0x5f, 0x34, 0xd8, 0x84);
  1402. // BROWSING EVENTS
  1403. // See \nt\sdktools\trace\tracedmp\mofdata.guid
  1404. // The page load starts with a user keystroke message
  1405. #define EVENT_TRACE_TYPE_BROWSE_USERINPUTRET 10
  1406. #define EVENT_TRACE_TYPE_BROWSE_USERINPUTBACK 11
  1407. #define EVENT_TRACE_TYPE_BROWSE_USERINPUTLBUT 12
  1408. #define EVENT_TRACE_TYPE_BROWSE_USERINPUTNEXT 13
  1409. #define EVENT_TRACE_TYPE_BROWSE_USERINPUTPRIOR 14
  1410. #define EVENT_TRACE_TYPE_BROWSE_STARTFRAME 16
  1411. #define EVENT_TRACE_TYPE_BROWSE_LOADEDPARSED 18
  1412. #define EVENT_TRACE_TYPE_BROWSE_LAYOUT 19
  1413. #define EVENT_TRACE_TYPE_BROWSE_LAYOUTTASK 20
  1414. #define EVENT_TRACE_TYPE_BROWSE_PAINT 21
  1415. // Url the user types into the address bar.
  1416. #define EVENT_TRACE_TYPE_BROWSE_ADDRESS 22
  1417. #endif
  1418. // StopWatch node types used in memory log to identify the type of node
  1419. #define EMPTY_NODE 0x0
  1420. #define START_NODE 0x1
  1421. #define LAP_NODE 0x2
  1422. #define STOP_NODE 0x3
  1423. #define OUT_OF_NODES 0x4
  1424. // StopWatch timing ids used to identify the type of timing being performed
  1425. #define SWID_STARTUP 0x0
  1426. #define SWID_FRAME 0x1
  1427. #define SWID_COPY 0x2
  1428. #define SWID_TREE 0x3
  1429. #define SWID_BROWSER_FRAME 0x4
  1430. #define SWID_JAVA_APP 0x5
  1431. #define SWID_MENU 0x6
  1432. #define SWID_BITBUCKET 0x7
  1433. #define SWID_EXPLBAR 0x8
  1434. #define SWID_MSGDISPATCH 0x9
  1435. #define SWID_TRACEMSG 0xa
  1436. #define SWID_DBMON_DLLLOAD 0xb
  1437. #define SWID_DBMON_EXCEPTION 0xc
  1438. #define SWID_THUMBVW_CACHEREAD 0xd
  1439. #define SWID_THUMBVW_EXTRACT 0xe
  1440. #define SWID_THUMBVW_CACHEWRITE 0xf
  1441. #define SWID_THUMBVW_FETCH 0x10
  1442. #define SWID_THUMBVW_INIT 0x11
  1443. #define SWID_MASK_BROWSER_STOPBTN 0x8000000 // identifies BROWSER_FRAME stop caused by stop button
  1444. #define SWID_MASKS SWID_MASK_BROWSER_STOPBTN // add any SWID_MASK_* defines here
  1445. #define SWID(dwId) (dwId & (~SWID_MASKS))
  1446. // The following StopWatch messages are used to drive the timer msg handler. The timer proc is used
  1447. // as a means of delaying while watching paint messages. If the defined number of timer ticks has
  1448. // passed without getting any paint messages, then we mark the time of the last paint message we've
  1449. // saved as the stop time.
  1450. #define SWMSG_PAINT 1 // paint message rcvd
  1451. #define SWMSG_TIMER 2 // timer tick
  1452. #define SWMSG_CREATE 3 // init handler and create timer
  1453. #define SWMSG_STATUS 4 // get status of whether timing is active or not
  1454. #define ID_STOPWATCH_TIMER 0xabcd // Timer id
  1455. // Stopwatch defaults
  1456. #define STOPWATCH_MAX_NODES 100
  1457. #define STOPWATCH_DEFAULT_PAINT_INTERVAL 1000
  1458. #define STOPWATCH_DEFAULT_MAX_DISPATCH_TIME 150
  1459. #define STOPWATCH_DEFAULT_MAX_MSG_TIME 1000
  1460. #define STOPWATCH_DEFAULT_MAX_MSG_INTERVAL 50
  1461. #define STOPWATCH_DEFAULT_CLASSNAMES TEXT("Internet Explorer_Server") TEXT("\0") TEXT("SHELLDLL_DefView") TEXT("\0") TEXT("SysListView32") TEXT("\0\0")
  1462. #define MEMWATCH_DEFAULT_PAGES 512
  1463. #define MEMWATCH_DEFAULT_TIME 1000
  1464. #define MEMWATCH_DEFAULT_FLAGS 0
  1465. #ifdef UNICODE
  1466. #define StopWatch StopWatchW
  1467. #define StopWatchEx StopWatchExW
  1468. #else
  1469. #define StopWatch StopWatchA
  1470. #define StopWatchEx StopWatchExA
  1471. #endif
  1472. #define StopWatch_Start(dwId, pszDesc, dwFlags) StopWatch(dwId, pszDesc, START_NODE, dwFlags, 0)
  1473. #define StopWatch_Lap(dwId, pszDesc, dwFlags) StopWatch(dwId, pszDesc, LAP_NODE, dwFlags, 0)
  1474. #define StopWatch_Stop(dwId, pszDesc, dwFlags) StopWatch(dwId, pszDesc, STOP_NODE, dwFlags, 0)
  1475. #define StopWatch_StartTimed(dwId, pszDesc, dwFlags, dwCount) StopWatch(dwId, pszDesc, START_NODE, dwFlags, dwCount)
  1476. #define StopWatch_LapTimed(dwId, pszDesc, dwFlags, dwCount) StopWatch(dwId, pszDesc, LAP_NODE, dwFlags, dwCount)
  1477. #define StopWatch_StopTimed(dwId, pszDesc, dwFlags, dwCount) StopWatch(dwId, pszDesc, STOP_NODE, dwFlags, dwCount)
  1478. #define StopWatch_StartEx(dwId, pszDesc, dwFlags, dwCookie) StopWatchEx(dwId, pszDesc, START_NODE, dwFlags, 0, dwCookie)
  1479. #define StopWatch_LapEx(dwId, pszDesc, dwFlags, dwCookie) StopWatchEx(dwId, pszDesc, LAP_NODE, dwFlags, 0, dwCookie)
  1480. #define StopWatch_StopEx(dwId, pszDesc, dwFlags, dwCookie) StopWatchEx(dwId, pszDesc, STOP_NODE, dwFlags, 0, dwCookie)
  1481. #define StopWatch_StartTimedEx(dwId, pszDesc, dwFlags, dwCount, dwCookie) StopWatchEx(dwId, pszDesc, START_NODE, dwFlags, dwCount, dwCookie)
  1482. #define StopWatch_LapTimedEx(dwId, pszDesc, dwFlags, dwCount, dwCookie) StopWatchEx(dwId, pszDesc, LAP_NODE, dwFlags, dwCount, dwCookie)
  1483. #define StopWatch_StopTimedEx(dwId, pszDesc, dwFlags, dwCount, dwCookie) StopWatchEx(dwId, pszDesc, STOP_NODE, dwFlags, dwCount, dwCookie)
  1484. VOID InitStopWatchMode(VOID);
  1485. // EXPORTED FUNCTIONS
  1486. DWORD WINAPI StopWatchW(DWORD dwId, LPCWSTR pszDesc, DWORD dwType, DWORD dwFlags, DWORD dwCount);
  1487. DWORD WINAPI StopWatchA(DWORD dwId, LPCSTR pszDesc, DWORD dwType, DWORD dwFlags, DWORD dwCount);
  1488. DWORD WINAPI StopWatchExW(DWORD dwId, LPCWSTR pszDesc, DWORD dwType, DWORD dwFlags, DWORD dwCount, DWORD dwUniqueId);
  1489. DWORD WINAPI StopWatchExA(DWORD dwId, LPCSTR pszDesc, DWORD dwType, DWORD dwFlags, DWORD dwCount, DWORD dwUniqueId);
  1490. DWORD WINAPI StopWatchMode(VOID);
  1491. DWORD WINAPI StopWatchFlush(VOID);
  1492. BOOL WINAPI StopWatch_TimerHandler(HWND hwnd, UINT uInc, DWORD dwFlag, MSG *pmsg);
  1493. VOID WINAPI StopWatch_CheckMsg(HWND hwnd, MSG msg, LPCSTR lpStr);
  1494. VOID WINAPI StopWatch_MarkFrameStart(LPCSTR lpExplStr);
  1495. VOID WINAPI StopWatch_MarkSameFrameStart(HWND hwnd);
  1496. VOID WINAPI StopWatch_MarkJavaStop(LPCSTR lpStringToSend, HWND hwnd, BOOL fChType);
  1497. DWORD WINAPI GetPerfTime(VOID);
  1498. VOID WINAPI StopWatch_SetMsgLastLocation(DWORD dwLast);
  1499. DWORD WINAPI StopWatch_DispatchTime(BOOL fStartTime, MSG msg, DWORD dwStart);
  1500. #ifndef NO_ETW_TRACING
  1501. VOID WINAPI EventTraceHandler(UCHAR uchEventType, PVOID pvData);
  1502. #endif
  1503. extern DWORD g_dwStopWatchMode;
  1504. //
  1505. //=============== End Performance timing macros and prototypes ================
  1506. #endif //#ifndef NO_SHLWAPI_STOPWATCH
  1507. ;end_internal
  1508. ;begin_internal
  1509. #ifndef NO_SHLWAPI_INTERNAL
  1510. //
  1511. //=============== Internal helper routines ===================================
  1512. //
  1513. // Declare some OLE interfaces we need to refer to and which aren't
  1514. // already defined in objbase.h
  1515. //
  1516. #ifndef RC_INVOKED /* { rc doesn't like these long symbol names */
  1517. #ifndef __IOleCommandTarget_FWD_DEFINED__
  1518. #define __IOleCommandTarget_FWD_DEFINED__
  1519. typedef struct IOleCommandTarget IOleCommandTarget;
  1520. #endif /* __IOleCommandTarget_FWD_DEFINED__ */
  1521. #ifndef __IDropTarget_FWD_DEFINED__
  1522. #define __IDropTarget_FWD_DEFINED__
  1523. typedef struct IDropTarget IDropTarget;
  1524. #endif /* __IDropTarget_FWD_DEFINED__ */
  1525. #ifndef __IPropertyBag_FWD_DEFINED__
  1526. #define __IPropertyBag_FWD_DEFINED__
  1527. typedef struct IPropertyBag IPropertyBag;
  1528. #endif /* __IPropertyBag_FWD_DEFINED__ */
  1529. #ifndef __IConnectionPoint_FWD_DEFINED__
  1530. #define __IConnectionPoint_FWD_DEFINED__
  1531. typedef struct IConnectionPoint IConnectionPoint;
  1532. #endif /* __IConnectionPoint_FWD_DEFINED__ */
  1533. #ifdef __cplusplus
  1534. extern "C++" {
  1535. template <typename T>
  1536. void IUnknown_SafeReleaseAndNullPtr(T *& p)
  1537. {
  1538. if (p)
  1539. {
  1540. T *pTemp = p;
  1541. p = NULL;
  1542. pTemp->Release();
  1543. }
  1544. }
  1545. }
  1546. #endif // __cplusplus
  1547. LWSTDAPI_(void) IUnknown_AtomicRelease(void ** ppunk);
  1548. LWSTDAPI_(BOOL) SHIsSameObject(IUnknown* punk1, IUnknown* punk2);
  1549. LWSTDAPI IUnknown_GetWindow(IUnknown* punk, HWND* phwnd);
  1550. LWSTDAPI IUnknown_SetOwner(IUnknown* punk, IUnknown* punkOwner);
  1551. LWSTDAPI IUnknown_SetSite(IUnknown *punk, IUnknown *punkSite);
  1552. LWSTDAPI IUnknown_GetSite(IUnknown *punk, REFIID riid, void **ppvOut);
  1553. LWSTDAPI IUnknown_EnableModeless(IUnknown * punk, BOOL fEnabled);
  1554. LWSTDAPI IUnknown_GetClassID(IUnknown *punk, CLSID *pclsid);
  1555. LWSTDAPI IUnknown_QueryService(IUnknown* punk, REFGUID guidService, REFIID riid, void ** ppvOut);
  1556. LWSTDAPI IUnknown_QueryServiceForWebBrowserApp(IUnknown* punk, REFIID riid, void **ppvOut);
  1557. LWSTDAPI IUnknown_QueryServiceExec(IUnknown* punk, REFGUID guidService, const GUID *guid,
  1558. DWORD cmdID, DWORD cmdParam, VARIANT* pvarargIn, VARIANT* pvarargOut);
  1559. LWSTDAPI IUnknown_ShowBrowserBar(IUnknown* punk, REFCLSID clsidBrowserBar, BOOL fShow);
  1560. LWSTDAPI IUnknown_HandleIRestrict(IUnknown * punk, const GUID * pguidID, DWORD dwRestrictAction, VARIANT * pvarArgs, DWORD * pdwRestrictionResult);
  1561. LWSTDAPI IUnknown_OnFocusOCS(IUnknown *punk, BOOL fGotFocus);
  1562. LWSTDAPI IUnknown_TranslateAcceleratorOCS(IUnknown *punk, LPMSG lpMsg, DWORD grfMods);
  1563. LWSTDAPI_(void) IUnknown_Set(IUnknown ** ppunk, IUnknown * punk);
  1564. LWSTDAPI IUnknown_ProfferService(IUnknown *punkSite,
  1565. REFGUID sidWhat, IServiceProvider *punkService,
  1566. DWORD *pdwCookie);
  1567. LWSTDAPI IUnknown_QueryServicePropertyBag(IUnknown* punk, DWORD dwFlags, REFIID riid, void ** ppvOut);
  1568. LWSTDAPI IUnknown_TranslateAcceleratorIO(IUnknown* punk, LPMSG lpMsg);
  1569. LWSTDAPI IUnknown_UIActivateIO(IUnknown *punk, BOOL fActivate, LPMSG lpMsg);
  1570. LWSTDAPI IUnknown_OnFocusChangeIS(IUnknown *punk, IUnknown *punkSrc, BOOL fSetFocus);
  1571. LWSTDAPI IUnknown_HasFocusIO(IUnknown *punk);
  1572. LWSTDAPI SHWeakQueryInterface(IUnknown *punkOuter, IUnknown *punkTarget, REFIID riid, void **ppvOut);
  1573. LWSTDAPI_(void) SHWeakReleaseInterface(IUnknown *punkOuter, IUnknown **ppunk);
  1574. #define IUnknown_EnableModless IUnknown_EnableModeless
  1575. // Helper macros for the Weak interface functions.
  1576. #define SHQueryInnerInterface SHWeakQueryInterface
  1577. #define SHReleaseInnerInterface SHWeakReleaseInterface
  1578. #define SHReleaseOuterInterface SHWeakReleaseInterface
  1579. __inline HRESULT SHQueryOuterInterface(IUnknown *punkOuter, REFIID riid, void **ppvOut)
  1580. {
  1581. return SHWeakQueryInterface(punkOuter, punkOuter, riid, ppvOut);
  1582. }
  1583. #if (_WIN32_IE >= 0x0600)
  1584. // App compat-aware CoCreateInstance
  1585. LWSTDAPI SHCoCreateInstanceAC(REFCLSID rclsid,
  1586. IUnknown *punkOuter, DWORD dwClsCtx,
  1587. REFIID riid, void **ppvOut);
  1588. #endif // (_WIN32_IE >= 0x0600)
  1589. #if defined(__IOleAutomationTypes_INTERFACE_DEFINED__) && \
  1590. defined(__IOleCommandTarget_INTERFACE_DEFINED__)
  1591. LWSTDAPI IUnknown_QueryStatus(IUnknown *punk, const GUID *pguidCmdGroup, ULONG cCmds, OLECMD rgCmds[], OLECMDTEXT *pcmdtext);
  1592. LWSTDAPI IUnknown_Exec(IUnknown* punk, const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANTARG *pvarargIn, VARIANTARG *pvarargOut);
  1593. // Some of the many connection point helper functions available in
  1594. // connect.cpp. We export only the ones people actually use. If
  1595. // you need a helper function, maybe it's already in connect.cpp
  1596. // and merely needs to be exported.
  1597. LWSTDAPI SHPackDispParamsV(DISPPARAMS * pdispparams, VARIANTARG *rgvt,
  1598. UINT cArgs, va_list arglist);
  1599. LWSTDAPIV SHPackDispParams(DISPPARAMS * pdispparams, VARIANTARG *rgvt,
  1600. UINT cArgs, ...);
  1601. typedef HRESULT (CALLBACK *SHINVOKECALLBACK)(IDispatch *pdisp, struct SHINVOKEPARAMS *pinv);
  1602. #include <pshpack1.h>
  1603. typedef struct SHINVOKEPARAMS {
  1604. UINT flags; // mandatory
  1605. DISPID dispidMember; // mandatory
  1606. const IID*piid; // IPFL_USEDEFAULTS will fill this in
  1607. LCID lcid; // IPFL_USEDEFAULTS will fill this in
  1608. WORD wFlags; // IPFL_USEDEFAULTS will fill this in
  1609. DISPPARAMS * pdispparams; // mandatory, may be NULL
  1610. VARIANT * pvarResult; // IPFL_USEDEFAULTS will fill this in
  1611. EXCEPINFO * pexcepinfo; // IPFL_USEDEFAULTS will fill this in
  1612. UINT * puArgErr; // IPFL_USEDEFAULTS will fill this in
  1613. SHINVOKECALLBACK Callback; // required if IPFL_USECALLBACK
  1614. } SHINVOKEPARAMS, *LPSHINVOKEPARAMS;
  1615. #include <poppack.h> /* Return to byte packing */
  1616. #define IPFL_USECALLBACK 0x0001
  1617. #define IPFL_USEDEFAULTS 0x0002
  1618. #if 0 // These functions not yet needed
  1619. LWSTDAPI IConnectionPoint_InvokeIndirect(IConnectionPoint *pcp,
  1620. SHINVOKEPARAMS *pinv);
  1621. #endif
  1622. LWSTDAPI IConnectionPoint_InvokeWithCancel(IConnectionPoint *pcp,
  1623. DISPID dispidMember, DISPPARAMS * pdispparams,
  1624. LPBOOL pfCancel, LPVOID *ppvCancel);
  1625. LWSTDAPI IConnectionPoint_SimpleInvoke(IConnectionPoint *pcp,
  1626. DISPID dispidMember, DISPPARAMS * pdispparams);
  1627. #if 0 // These functions not yet needed
  1628. LWSTDAPI IConnectionPoint_InvokeParamV(IConnectionPoint *pcp,
  1629. DISPID dispidMember, VARIANTARG *rgvarg,
  1630. UINT cArgs, va_list ap);
  1631. LWSTDAPIV IConnectionPoint_InvokeParam(IConnectionPoint *pcp,
  1632. DISPID dispidMember, VARIANTARG *rgvarg, UINT cArgs, ...)
  1633. #endif
  1634. LWSTDAPI IConnectionPoint_OnChanged(IConnectionPoint *pcp, DISPID dispid);
  1635. #if 0 // These functions not yet needed
  1636. LWSTDAPI IUnknown_FindConnectionPoint(IUnknown *punk,
  1637. REFIID riidCP, IConnectionPoint **pcpOut);
  1638. #endif
  1639. LWSTDAPI IUnknown_CPContainerInvokeIndirect(IUnknown *punk, REFIID riidCP,
  1640. SHINVOKEPARAMS *pinv);
  1641. LWSTDAPIV IUnknown_CPContainerInvokeParam(IUnknown *punk, REFIID riidCP,
  1642. DISPID dispidMember, VARIANTARG *rgvarg, UINT cArgs, ...);
  1643. LWSTDAPI IUnknown_CPContainerOnChanged(IUnknown *punk, DISPID dispid);
  1644. #endif /* IOleAutomationTypes && IOleCommandTarget */
  1645. #endif /* } !RC_INVOKED */
  1646. LWSTDAPI IStream_Read(IStream *pstm, void *pv, ULONG cb);
  1647. LWSTDAPI IStream_Write(IStream *pstm, const void *pv, ULONG cb);
  1648. LWSTDAPI IStream_Reset(IStream *pstm);
  1649. LWSTDAPI IStream_Size(IStream *pstm, ULARGE_INTEGER *pui);
  1650. LWSTDAPI IStream_WritePidl(IStream *pstm, LPCITEMIDLIST pidlWrite);
  1651. LWSTDAPI IStream_ReadPidl(IStream *pstm, LPITEMIDLIST *ppidlOut);
  1652. LWSTDAPI_(BOOL) SHIsEmptyStream(IStream* pstm);
  1653. LWSTDAPI SHSimulateDrop(IDropTarget *pdrop, IDataObject *pdtobj, DWORD grfKeyState,
  1654. const POINTL *ppt, DWORD *pdwEffect);
  1655. LWSTDAPI SHLoadFromPropertyBag(IUnknown* punk, IPropertyBag* ppg);
  1656. LWSTDAPI ConnectToConnectionPoint(IUnknown* punkThis, REFIID riidEvent, BOOL fConnect, IUnknown* punkTarget, DWORD* pdwCookie, IConnectionPoint** ppcpOut);
  1657. LWSTDAPI SHCreatePropertyBagOnRegKey(HKEY hk, LPCWSTR pszSubKey, DWORD grfMode, REFIID riid, void **ppv);
  1658. LWSTDAPI SHCreatePropertyBagOnProfileSection(LPCWSTR pszFile, LPCWSTR pszSection, DWORD grfMode, REFIID riid, void **ppv);
  1659. LWSTDAPI SHCreatePropertyBagOnMemory(DWORD grfMode, REFIID riid, void **ppv);
  1660. LWSTDAPI SHPropertyBag_ReadType(IPropertyBag* ppb, LPCWSTR pszPropName, VARIANT* pv, VARTYPE vt);
  1661. LWSTDAPI SHPropertyBag_ReadStr(IPropertyBag* ppb, LPCWSTR pwzPropName, LPWSTR psz, int cch);
  1662. LWSTDAPI SHPropertyBag_ReadBSTR(IPropertyBag *ppb, LPCWSTR pwzPropName, BSTR* pbstr);
  1663. LWSTDAPI SHPropertyBag_WriteStr(IPropertyBag* ppb, LPCWSTR pwzPropName, LPCWSTR psz);
  1664. LWSTDAPI SHPropertyBag_ReadInt(IPropertyBag* ppb, LPCWSTR pwzPropName, INT* piResult);
  1665. LWSTDAPI SHPropertyBag_WriteInt(IPropertyBag* ppb, LPCWSTR pwzPropName, INT iValue);
  1666. LWSTDAPI SHPropertyBag_ReadSHORT(IPropertyBag* ppb, LPCWSTR pwzPropName, SHORT* psh);
  1667. LWSTDAPI SHPropertyBag_WriteSHORT(IPropertyBag* ppb, LPCWSTR pwzPropName, SHORT sh);
  1668. LWSTDAPI SHPropertyBag_ReadLONG(IPropertyBag* ppb, LPCWSTR pwzPropName, LONG* pl);
  1669. LWSTDAPI SHPropertyBag_WriteLONG(IPropertyBag* ppb, LPCWSTR pwzPropName, LONG l);
  1670. LWSTDAPI SHPropertyBag_ReadDWORD(IPropertyBag* ppb, LPCWSTR pwzPropName, DWORD* pdw);
  1671. LWSTDAPI SHPropertyBag_WriteDWORD(IPropertyBag* ppb, LPCWSTR pwzPropName, DWORD dw);
  1672. LWSTDAPI SHPropertyBag_ReadBOOL(IPropertyBag* ppb, LPCWSTR pwzPropName, BOOL* pfResult);
  1673. LWSTDAPI SHPropertyBag_WriteBOOL(IPropertyBag* ppb, LPCWSTR pwzPropName, BOOL fValue);
  1674. LWSTDAPI SHPropertyBag_ReadGUID(IPropertyBag* ppb, LPCWSTR pwzPropName, GUID* pguid);
  1675. LWSTDAPI SHPropertyBag_WriteGUID(IPropertyBag* ppb, LPCWSTR pwzPropName, const GUID* pguid);
  1676. LWSTDAPI SHPropertyBag_ReadPIDL(IPropertyBag *ppb, LPCWSTR pwzPropName, LPITEMIDLIST* ppidl);
  1677. LWSTDAPI SHPropertyBag_WritePIDL(IPropertyBag *ppb, LPCWSTR pwzPropName, LPCITEMIDLIST pidl);
  1678. LWSTDAPI SHPropertyBag_ReadPOINTL(IPropertyBag* ppb, LPCWSTR pwzPropName, POINTL* ppt);
  1679. LWSTDAPI SHPropertyBag_WritePOINTL(IPropertyBag* ppb, LPCWSTR pwzPropName, const POINTL* ppt);
  1680. LWSTDAPI SHPropertyBag_ReadPOINTS(IPropertyBag* ppb, LPCWSTR pwzPropName, POINTS* ppt);
  1681. LWSTDAPI SHPropertyBag_WritePOINTS(IPropertyBag* ppb, LPCWSTR pwzPropName, const POINTS* ppt);
  1682. LWSTDAPI SHPropertyBag_ReadRECTL(IPropertyBag* ppb, LPCWSTR pwzPropName, RECTL* prc);
  1683. LWSTDAPI SHPropertyBag_WriteRECTL(IPropertyBag* ppb, LPCWSTR pwzPropName, const RECTL* prc);
  1684. LWSTDAPI SHPropertyBag_ReadStream(IPropertyBag* ppb, LPCWSTR pwzPropName, IStream** ppstm);
  1685. LWSTDAPI SHPropertyBag_WriteStream(IPropertyBag* ppb, LPCWSTR pwzPropName, IStream* pstm);
  1686. LWSTDAPI SHPropertyBag_Delete(IPropertyBag* ppb, LPCWSTR pszPropName);
  1687. // Doc'ed for DOJ compliance
  1688. ;end_internal
  1689. #define SHGVSPB_PERUSER 0x00000001 // must have one of PERUSER or ALLUSERS
  1690. #define SHGVSPB_ALLUSERS 0x00000002
  1691. #define SHGVSPB_PERFOLDER 0x00000004 // must have one of PERFOLDER ALLFOLDERS or INHERIT
  1692. #define SHGVSPB_ALLFOLDERS 0x00000008
  1693. #define SHGVSPB_INHERIT 0x00000010
  1694. #define SHGVSPB_ROAM 0x00000020 // modifies the above
  1695. #define SHGVSPB_NOAUTODEFAULTS 0x80000000 // turns off read delegation to more general property bags
  1696. #define SHGVSPB_FOLDER (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER)
  1697. #define SHGVSPB_FOLDERNODEFAULTS (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER | SHGVSPB_NOAUTODEFAULTS)
  1698. #define SHGVSPB_USERDEFAULTS (SHGVSPB_PERUSER | SHGVSPB_ALLFOLDERS)
  1699. #define SHGVSPB_GLOBALDEAFAULTS (SHGVSPB_ALLUSERS | SHGVSPB_ALLFOLDERS)
  1700. LWSTDAPI SHGetViewStatePropertyBag(LPCITEMIDLIST pidl, LPCWSTR pszBagName, DWORD dwFlags, REFIID riid, void** ppv);
  1701. ;begin_internal
  1702. LWSTDAPI_(ULONG) SHGetPerScreenResName(WCHAR* pszRes, ULONG cch, DWORD dwVersion);
  1703. //
  1704. // SH(Get/Set)IniStringUTF7
  1705. //
  1706. // These are just like Get/WriteProfileString except that if the KeyName
  1707. // begins with SZ_CANBEUNICODE, we will use SHGetIniString instead of
  1708. // the profile functions. (The SZ_CANBEUNICODE will be stripped off
  1709. // before calling SHGetIniString.) This allows us to stash unicode
  1710. // strings into INI files (which are ASCII) by encoding them as UTF7.
  1711. //
  1712. // In other words, SHGetIniStringUTF7("Settings", SZ_CANBEUNICODE "Name", ...)
  1713. // will read from section "Settings", key name "Name", but will also
  1714. // look at the UTF7-encoded version stashed in the "Settings.W" section.
  1715. //
  1716. #define CH_CANBEUNICODEW L'@'
  1717. LWSTDAPI_(DWORD) SHGetIniStringUTF7W(LPCWSTR lpSection, LPCWSTR lpKey, LPWSTR lpBuf, DWORD nSize, LPCWSTR lpFile);
  1718. LWSTDAPI_(BOOL) SHSetIniStringUTF7W(LPCWSTR lpSection, LPCWSTR lpKey, LPCWSTR lpString, LPCWSTR lpFile);
  1719. #ifdef UNICODE
  1720. #define SZ_CANBEUNICODE TEXT("@")
  1721. #define SHSetIniStringUTF7 SHSetIniStringUTF7W
  1722. #define SHGetIniStringUTF7 SHGetIniStringUTF7W
  1723. #else
  1724. #define SZ_CANBEUNICODE TEXT("")
  1725. #define SHGetIniStringUTF7(lpSection, lpKey, lpBuf, nSize, lpFile) \
  1726. GetPrivateProfileStringA(lpSection, lpKey, "", lpBuf, nSize, lpFile)
  1727. #define SHSetIniStringUTF7 WritePrivateProfileStringA
  1728. #endif
  1729. /*
  1730. * Like PrivateProfileString except that UNICODE strings are encoded so they
  1731. * will successfully round-trip.
  1732. */
  1733. LWSTDAPI_(DWORD) SHGetIniStringW(LPCWSTR lpSection, LPCWSTR lpKey, LPWSTR lpBuf, DWORD nSize, LPCWSTR lpFile);
  1734. #define SHGetIniStringA(lpSection, lpKey, lpBuf, nSize, lpFile) \
  1735. GetPrivateProfileStringA(lpSection, lpKey, "", lpBuf, nSize, lpFile)
  1736. LWSTDAPI_(BOOL) SHSetIniStringW(LPCWSTR lpSection, LPCWSTR lpKey, LPCWSTR lpString, LPCWSTR lpFile);
  1737. #define SHSetIniStringA WritePrivateProfileStringA
  1738. LWSTDAPI CreateURLFileContentsW(LPCWSTR pwszUrl, LPSTR *ppszOut);
  1739. LWSTDAPI CreateURLFileContentsA(LPCSTR pszUrl, LPSTR *ppszOut);
  1740. #ifdef UNICODE
  1741. #define SHGetIniString SHGetIniStringW
  1742. #define SHSetIniString SHSetIniStringW
  1743. #define CreateURLFileContents CreateURLFileContentsW
  1744. #else
  1745. #define SHGetIniString SHGetIniStringA
  1746. #define SHSetIniString SHSetIniStringA
  1747. #define CreateURLFileContents CreateURLFileContentsA
  1748. #endif // UNICODE
  1749. #define ISHGDN2_CANREMOVEFORPARSING 0x0001
  1750. LWSTDAPI IShellFolder_GetDisplayNameOf(struct IShellFolder *psf,
  1751. LPCITEMIDLIST pidl, DWORD uFlags, STRRET *pstr, DWORD dwFlags2);
  1752. LWSTDAPI IShellFolder_ParseDisplayName(struct IShellFolder *psf, HWND hwnd,
  1753. struct IBindCtx *pbc, LPWSTR pszDisplayName, ULONG *pchEaten,
  1754. LPITEMIDLIST *ppidl, ULONG *pdwAttributes);
  1755. LWSTDAPI IShellFolder_CompareIDs(struct IShellFolder *psf, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
  1756. LWSTDAPI IShellFolder_EnumObjects(struct IShellFolder *psf, HWND hwnd,
  1757. DWORD grfFlags, struct IEnumIDList **ppenumIDList);
  1758. LWSTDAPI_(BOOL) SHIsExpandableFolder(struct IShellFolder *psf, LPCITEMIDLIST pidl);
  1759. LWSTDAPI IContextMenu_Invoke(struct IContextMenu* pcm, HWND hwndOwner, LPCSTR pVerb, UINT fFlags);
  1760. #ifdef UNICODE
  1761. // SHTruncateString takes a BUFFER SIZE, so subtract 1 to properly null terminate.
  1762. //
  1763. #define SHTruncateString(wzStr, cch) ((cch) ? ((wzStr)[cch-1]=L'\0', (cch-1)) : 0)
  1764. #else
  1765. LWSTDAPI_(int) SHTruncateString(CHAR *sz, int cchBufferSize);
  1766. #endif // UNICODE
  1767. // SHFormatDateTime flags
  1768. // (FDTF_SHORTDATE and FDTF_LONGDATE are mutually exclusive, as is
  1769. // FDTF_SHORTIME and FDTF_LONGTIME.)
  1770. //
  1771. #define FDTF_SHORTTIME 0x00000001 // eg, "7:48 PM"
  1772. #define FDTF_SHORTDATE 0x00000002 // eg, "3/29/98"
  1773. #define FDTF_DEFAULT (FDTF_SHORTDATE | FDTF_SHORTTIME) // eg, "3/29/98 7:48 PM"
  1774. #define FDTF_LONGDATE 0x00000004 // eg, "Monday, March 29, 1998"
  1775. #define FDTF_LONGTIME 0x00000008 // eg. "7:48:33 PM"
  1776. #define FDTF_RELATIVE 0x00000010 // uses "Yesterday", etc. if possible
  1777. #define FDTF_LTRDATE 0x00000100 // Left To Right reading order
  1778. #define FDTF_RTLDATE 0x00000200 // Right To Left reading order
  1779. LWSTDAPI_(int) SHFormatDateTime%(const FILETIME UNALIGNED * pft, DWORD * pdwFlags, LPTSTR% pszBuf, UINT cchBuf);
  1780. LWSTDAPI_(SECURITY_ATTRIBUTES*) CreateAllAccessSecurityAttributes(SECURITY_ATTRIBUTES* psa, SECURITY_DESCRIPTOR* psd, PACL *ppacl);
  1781. LWSTDAPI_(int) SHAnsiToUnicode(LPCSTR pszSrc, LPWSTR pwszDst, int cwchBuf);
  1782. LWSTDAPI_(int) SHAnsiToUnicodeCP(UINT uiCP, LPCSTR pszSrc, LPWSTR pwszDst, int cwchBuf);
  1783. LWSTDAPI_(int) SHAnsiToAnsi(LPCSTR pszSrc, LPSTR pszDst, int cchBuf);
  1784. LWSTDAPI_(int) SHUnicodeToAnsi(LPCWSTR pwszSrc, LPSTR pszDst, int cchBuf);
  1785. LWSTDAPI_(int) SHUnicodeToAnsiCP(UINT uiCP, LPCWSTR pwszSrc, LPSTR pszDst, int cchBuf);
  1786. LWSTDAPI_(int) SHUnicodeToUnicode(LPCWSTR pwzSrc, LPWSTR pwzDst, int cwchBuf);
  1787. LWSTDAPI_(BOOL) DoesStringRoundTripA(LPCSTR pwszIn, LPSTR pszOut, UINT cchOut);
  1788. LWSTDAPI_(BOOL) DoesStringRoundTripW(LPCWSTR pwszIn, LPSTR pszOut, UINT cchOut);
  1789. #ifdef UNICODE
  1790. #define DoesStringRoundTrip DoesStringRoundTripW
  1791. #else
  1792. #define DoesStringRoundTrip DoesStringRoundTripA
  1793. #endif
  1794. // The return value from all SH<Type>To<Type> is the size of szDest including the terminater.
  1795. #ifdef UNICODE
  1796. #define SHTCharToUnicode(wzSrc, wzDest, cchSize) SHUnicodeToUnicode(wzSrc, wzDest, cchSize)
  1797. #define SHTCharToUnicodeCP(uiCP, wzSrc, wzDest, cchSize) SHUnicodeToUnicode(wzSrc, wzDest, cchSize)
  1798. #define SHTCharToAnsi(wzSrc, szDest, cchSize) SHUnicodeToAnsi(wzSrc, szDest, cchSize)
  1799. #define SHTCharToAnsiCP(uiCP, wzSrc, szDest, cchSize) SHUnicodeToAnsiCP(uiCP, wzSrc, szDest, cchSize)
  1800. #define SHUnicodeToTChar(wzSrc, wzDest, cchSize) SHUnicodeToUnicode(wzSrc, wzDest, cchSize)
  1801. #define SHUnicodeToTCharCP(uiCP, wzSrc, wzDest, cchSize) SHUnicodeToUnicode(wzSrc, wzDest, cchSize)
  1802. #define SHAnsiToTChar(szSrc, wzDest, cchSize) SHAnsiToUnicode(szSrc, wzDest, cchSize)
  1803. #define SHAnsiToTCharCP(uiCP, szSrc, wzDest, cchSize) SHAnsiToUnicodeCP(uiCP, szSrc, wzDest, cchSize)
  1804. #define SHOtherToTChar(szSrc, szDest, cchSize) SHAnsiToUnicode(szSrc, szDest, cchSize)
  1805. #define SHTCharToOther(szSrc, szDest, cchSize) SHUnicodeToAnsi(szSrc, szDest, cchSize)
  1806. #else // UNICODE
  1807. #define SHTCharToUnicode(szSrc, wzDest, cchSize) SHAnsiToUnicode(szSrc, wzDest, cchSize)
  1808. #define SHTCharToUnicodeCP(uiCP, szSrc, wzDest, cchSize) SHAnsiToUnicodeCP(uiCP, szSrc, wzDest, cchSize)
  1809. #define SHTCharToAnsi(szSrc, szDest, cchSize) SHAnsiToAnsi(szSrc, szDest, cchSize)
  1810. #define SHTCharToAnsiCP(uiCP, szSrc, szDest, cchSize) SHAnsiToAnsi(szSrc, szDest, cchSize)
  1811. #define SHUnicodeToTChar(wzSrc, szDest, cchSize) SHUnicodeToAnsi(wzSrc, szDest, cchSize)
  1812. #define SHUnicodeToTCharCP(uiCP, wzSrc, szDest, cchSize) SHUnicodeToAnsiCP(uiCP, wzSrc, szDest, cchSize)
  1813. #define SHAnsiToTChar(szSrc, szDest, cchSize) SHAnsiToAnsi(szSrc, szDest, cchSize)
  1814. #define SHAnsiToTCharCP(uiCP, szSrc, szDest, cchSize) SHAnsiToAnsi(szSrc, szDest, cchSize)
  1815. #define SHOtherToTChar(szSrc, szDest, cchSize) SHUnicodeToAnsi(szSrc, szDest, cchSize)
  1816. #define SHTCharToOther(szSrc, szDest, cchSize) SHAnsiToUnicode(szSrc, szDest, cchSize)
  1817. #endif // UNICODE
  1818. // Internal HRESULT-to-help-topic mapping structure
  1819. typedef struct _tagHRESULTHELPMAPPING
  1820. {
  1821. HRESULT hr;
  1822. LPCSTR szHelpFile;
  1823. LPCSTR szHelpTopic;
  1824. } HRESULTHELPMAPPING;
  1825. LWSTDAPI_(BOOL) SHRegisterClassA(const WNDCLASSA* pwc);
  1826. LWSTDAPI_(BOOL) SHRegisterClassW(const WNDCLASSW* pwc);
  1827. LWSTDAPI_(void) SHUnregisterClassesA(HINSTANCE hinst, const LPCSTR *rgpszClasses, UINT cpsz);
  1828. LWSTDAPI_(void) SHUnregisterClassesW(HINSTANCE hinst, const LPCWSTR *rgpszClasses, UINT cpsz);
  1829. LWSTDAPI_(int) SHMessageBoxHelpW(HWND hwnd, LPCWSTR pszText, LPCWSTR pszCaption, UINT uType, HRESULT hrErr, HRESULTHELPMAPPING* prghhm, DWORD chhm);
  1830. LWSTDAPI_(int) SHMessageBoxHelpA(HWND hwnd, LPCSTR pszText, LPCSTR pszCaption, UINT uType, HRESULT hrErr, HRESULTHELPMAPPING* prghhm, DWORD chhm);
  1831. LWSTDAPI_(int) SHMessageBoxCheckW(HWND hwnd, LPCWSTR pszText, LPCWSTR pszCaption, UINT uType, int iDefault, LPCWSTR pszRegVal);
  1832. LWSTDAPI_(int) SHMessageBoxCheckA(HWND hwnd, LPCSTR pszText, LPCSTR pszCaption, UINT uType, int iDefault, LPCSTR pszRegVal);
  1833. LWSTDAPI_(void) SHRestrictedMessageBox(HWND hwnd);
  1834. LWSTDAPI_(HMENU) SHGetMenuFromID(HMENU hmMain, UINT uID);
  1835. LWSTDAPI_(int) SHMenuIndexFromID(HMENU hm, UINT id);
  1836. LWSTDAPI_(void) SHRemoveDefaultDialogFont(HWND hDlg);
  1837. LWSTDAPI_(void) SHSetDefaultDialogFont(HWND hDlg, int idCtl);
  1838. LWSTDAPI_(void) SHRemoveAllSubMenus(HMENU hmenu);
  1839. LWSTDAPI_(void) SHEnableMenuItem(HMENU hmenu, UINT id, BOOL fEnable);
  1840. LWSTDAPI_(void) SHCheckMenuItem(HMENU hmenu, UINT id, BOOL fChecked);
  1841. LWSTDAPI_(DWORD) SHSetWindowBits(HWND hWnd, int iWhich, DWORD dwBits, DWORD dwValue);
  1842. LWSTDAPI_(HMENU) SHLoadMenuPopup(HINSTANCE hinst, UINT id);
  1843. #define SPM_POST 0x0000
  1844. #define SPM_SEND 0x0001
  1845. #define SPM_ONELEVEL 0x0002 // default: send to all descendants including grandkids, etc.
  1846. LWSTDAPI_(void) SHPropagateMessage(HWND hwndParent, UINT uMsg, WPARAM wParam, LPARAM lParam, int iFlags);
  1847. LWSTDAPI_(void) SHSetParentHwnd(HWND hwnd, HWND hwndParent);
  1848. LWSTDAPI_(UINT) SHGetCurColorRes();
  1849. LWSTDAPI_(DWORD) SHWaitForSendMessageThread(HANDLE hThread, DWORD dwTimeout);
  1850. LWSTDAPI SHWaitForCOMSendMessageThread(HANDLE hThread, DWORD dwTimeout);
  1851. LWSTDAPI_(BOOL) SHVerbExistsNA(LPCSTR szExtension, LPCSTR pszVerb, LPSTR pszCommand, DWORD cchCommand);
  1852. LWSTDAPI_(void) SHFillRectClr(HDC hdc, LPRECT prc, COLORREF clr);
  1853. LWSTDAPI_(int) SHSearchMapInt(const int *src, const int *dst, int cnt, int val);
  1854. LWSTDAPI_(CHAR) SHStripMneumonicA(LPSTR pszMenu);
  1855. LWSTDAPI_(WCHAR) SHStripMneumonicW(LPWSTR pszMenu);
  1856. LWSTDAPI SHIsChildOrSelf(HWND hwndParent, HWND hwnd);
  1857. LWSTDAPI_(DWORD) SHGetValueGoodBootA(HKEY hkeyParent, LPCSTR pcszSubKey,
  1858. LPCSTR pcszValue, PDWORD pdwValueType,
  1859. PBYTE pbyteBuf, PDWORD pdwcbBufLen);
  1860. LWSTDAPI_(DWORD) SHGetValueGoodBootW(HKEY hkeyParent, LPCWSTR pcwzSubKey,
  1861. LPCWSTR pcwzValue, PDWORD pdwValueType,
  1862. PBYTE pbyteBuf, PDWORD pdwcbBufLen);
  1863. LWSTDAPI_(LRESULT) SHDefWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  1864. LWSTDAPI_(BOOL) SHGetFileDescription%(LPCTSTR% pszPath, LPCTSTR% pszVersionKeyIn, LPCTSTR% pszCutListIn, LPTSTR% pszDesc, UINT *pcchDesc);
  1865. LWSTDAPI_(int) SHMessageBoxCheckEx%(HWND hwnd, HINSTANCE hinst, LPCTSTR% pszTemplateName, DLGPROC pDlgProc, LPVOID pData, int iDefault, LPCTSTR% pszRegVal);
  1866. #define IDC_MESSAGEBOXCHECKEX 0x1202
  1867. // Prevents shell hang do to hung window on broadcast
  1868. LWSTDAPI_(LRESULT) SHSendMessageBroadcast%(UINT uMsg, WPARAM wParam, LPARAM lParam);
  1869. #ifdef UNICODE
  1870. #define SHGetValueGoodBoot SHGetValueGoodBootW
  1871. #define SHStripMneumonic SHStripMneumonicW
  1872. #define SHMessageBoxHelp SHMessageBoxHelpW
  1873. #define SHMessageBoxCheck SHMessageBoxCheckW
  1874. #define SHRegisterClass SHRegisterClassW
  1875. #define SHUnregisterClasses SHUnregisterClassesW
  1876. #define SHSendMessageBroadcast SHSendMessageBroadcastW
  1877. #else // UNICODE
  1878. #define SHGetValueGoodBoot SHGetValueGoodBootA
  1879. #define SHStripMneumonic SHStripMneumonicA
  1880. #define SHMessageBoxHelp SHMessageBoxHelpA
  1881. #define SHMessageBoxCheck SHMessageBoxCheckA
  1882. #define SHRegisterClass SHRegisterClassA
  1883. #define SHUnregisterClasses SHUnregisterClassesA
  1884. #define SHSendMessageBroadcast SHSendMessageBroadcastA
  1885. #endif // UNICODE
  1886. // old IsOS() flags -- don't use these
  1887. // we have to keep them public since we shipped them in win2k ;internal
  1888. #define OS_MEMPHIS OS_WIN98ORGREATER // don't use this
  1889. #define OS_MEMPHIS_GOLD OS_WIN98_GOLD // don't use this
  1890. #define OS_WIN95GOLD OS_WIN95_GOLD
  1891. #define OS_WIN2000EMBED OS_EMBEDDED
  1892. #define OS_WIN2000 OS_WIN2000ORGREATER // lame, but IsOS(WIN2000) meant >= win2k
  1893. #define OS_WIN95 OS_WIN95ORGREATER // lame, but IsOS(WIN95) meant >= win95
  1894. #define OS_NT4 OS_NT4ORGREATER // lame, but IsOS(NT4) meant >= NT4
  1895. #define OS_NT5 OS_WIN2000ORGREATER // lame, but IsOS(NT5) meant >= wink2
  1896. #define OS_WIN98 OS_WIN98ORGREATER // lame, but IsOS(OS_WIN98) meant >= win98
  1897. #define OS_MILLENNIUM OS_MILLENNIUMORGREATER // lame, but IsOS(OS_MILLENNIUM) meant >= winMe
  1898. // end old flags
  1899. // Returns TRUE/FALSE depending on question
  1900. #define OS_WINDOWS 0 // windows vs. NT
  1901. #define OS_NT 1 // windows vs. NT
  1902. #define OS_WIN95ORGREATER 2 // Win95 or greater
  1903. #define OS_NT4ORGREATER 3 // NT4 or greater
  1904. // don't use (used to be OS_NT5) 4 // this flag is redundant w/ OS_WIN2000ORGREATER, use that instead ;internal
  1905. #define OS_WIN98ORGREATER 5 // Win98 or greater
  1906. #define OS_WIN98_GOLD 6 // Win98 Gold (Version 4.10 build 1998)
  1907. #define OS_WIN2000ORGREATER 7 // Some derivative of Win2000
  1908. ;begin_internal
  1909. // NOTE: these flags are bogus, they check explicitly for (dwMajorVersion == 5) so they will fail when majorversion is bumped to 6
  1910. // !!! DO NOT USE THESE FLAGS !!!
  1911. #define OS_WIN2000PRO 8 // Windows 2000 Professional (Workstation)
  1912. #define OS_WIN2000SERVER 9 // Windows 2000 Server
  1913. #define OS_WIN2000ADVSERVER 10 // Windows 2000 Advanced Server
  1914. #define OS_WIN2000DATACENTER 11 // Windows 2000 Data Center Server
  1915. #define OS_WIN2000TERMINAL 12 // Windows 2000 Terminal Server in "Application Server" mode (now simply called "Terminal Server")
  1916. // END bogus flags
  1917. ;end_internal
  1918. #define OS_EMBEDDED 13 // Embedded Windows Edition
  1919. #define OS_TERMINALCLIENT 14 // Windows Terminal Client (eg user is comming in via tsclient)
  1920. #define OS_TERMINALREMOTEADMIN 15 // Terminal Server in "Remote Administration" mode
  1921. #define OS_WIN95_GOLD 16 // Windows 95 Gold (Version 4.0 Build 1995)
  1922. #define OS_MILLENNIUMORGREATER 17 // Windows Millennium (Version 5.0)
  1923. // BUGBUG - when were these added?? We didn't ship win2k w/ these, right?
  1924. #define OS_WHISTLERORGREATER 18 // Whistler or greater
  1925. #define OS_PERSONAL 19 // Personal (eg NOT Professional, Server, Advanced Server, or Datacenter)
  1926. #if (_WIN32_IE >= 0x0600)
  1927. #define OS_PROFESSIONAL 20 // Professional (aka Workstation; eg NOT Server, Advanced Server, or Datacenter)
  1928. #define OS_DATACENTER 21 // Datacenter (eg NOT Server, Advanced Server, Professional, or Personal)
  1929. #define OS_ADVSERVER 22 // Advanced Server (eg NOT Datacenter, Server, Professional, or Personal)
  1930. #define OS_SERVER 23 // Server (eg NOT Datacenter, Advanced Server, Professional, or Personal)
  1931. #define OS_TERMINALSERVER 24 // Terminal Server - server running in what used to be called "Application Server" mode (now simply called "Terminal Server")
  1932. // OS_TERMINALREMOTEADMIN 15 // Terminal Server - server running in "Remote Administration" mode
  1933. #define OS_PERSONALTERMINALSERVER 25 // Personal Terminal Server - per/pro machine running in single user TS mode
  1934. #define OS_FASTUSERSWITCHING 26 // Fast User Switching
  1935. #define OS_FRIENDLYLOGONUI 27 // New friendly logon UI
  1936. #define OS_DOMAINMEMBER 28 // Is this machine a member of a domain (eg NOT a workgroup)
  1937. #define OS_ANYSERVER 29 // is this machine any type of server? (eg datacenter or advanced server or server)?
  1938. #define OS_WOW6432 30 // Is this process a 32-bit process running on an 64-bit platform?
  1939. #define OS_TABLETPC 33 // Are we running on a TabletPC?
  1940. #define OS_MEDIACENTER 35 // eHome Freestyle Project
  1941. #endif // _WIN32_IE >= 0x0600
  1942. LWSTDAPI_(BOOL) IsOS(DWORD dwOS);
  1943. ///// BEGIN Private CommandTarget helpers
  1944. //*** IOleCommandTarget helpers {
  1945. //*** octd -- OleCT direction
  1946. // NOTES
  1947. // used both as a return value from IsXxxForward, and as an iUpDown
  1948. // param for MayXxxForward.
  1949. enum octd {
  1950. // do *not* change these values; we rely upon all 3 of:
  1951. // - sign +/-
  1952. // - powers of 2
  1953. // - (?) broadcast > down
  1954. OCTD_DOWN=+1,
  1955. OCTD_DOWNBROADCAST=+2,
  1956. OCTD_UP=-1
  1957. };
  1958. #ifndef RC_INVOKED /* { rc doesn't like these long symbol names */
  1959. #ifdef __IOleCommandTarget_INTERFACE_DEFINED__
  1960. HRESULT IsQSForward(const GUID *pguidCmdGroup, int cCmds, OLECMD rgCmds[]);
  1961. // WARNING: note the hoaky cast of nCmdID to a struct ptr
  1962. #define IsExecForward(pguidCmdGroup, nCmdID) \
  1963. IsQSForward(pguidCmdGroup, 1, (OLECMD *) &nCmdID)
  1964. HRESULT MayQSForward(IUnknown *punk, int iUpDown, const GUID *pguidCmdGroup,
  1965. ULONG cCmds, OLECMD rgCmds[], OLECMDTEXT *pcmdtext);
  1966. HRESULT MayExecForward(IUnknown *punk, int iUpDown, const GUID *pguidCmdGroup,
  1967. DWORD nCmdID, DWORD nCmdexecopt, VARIANTARG *pvarargIn, VARIANTARG *pvarargOut);
  1968. #endif //__IOleCommandTarget_INTERFACE_DEFINED__
  1969. #endif /* } !RC_INVOKED */
  1970. // }
  1971. ///// end
  1972. typedef struct _FDSA {
  1973. // cItem *must* be at beginning of struct for GetItemCount() to work
  1974. int cItem; // # elements
  1975. void * aItem; // data for elements (either static or dynamic)
  1976. int cItemAlloc; // # of elements currently alloc'ed (>= cItem)
  1977. int cItemGrow:8; // # of elements to grow cItemAlloc by
  1978. int cbItem:8; // sizeof element
  1979. DWORD fAllocated:1; // 1:overflowed from static to dynamic array
  1980. DWORD unused:15;
  1981. } FDSA, *PFDSA;
  1982. LWSTDAPI_(BOOL) FDSA_Initialize(int cbItem, int cItemGrow, PFDSA pfdsa, void * aItemStatic, int cItemStatic);
  1983. LWSTDAPI_(BOOL) FDSA_Destroy(PFDSA pfdsa);
  1984. LWSTDAPI_(int) FDSA_InsertItem(PFDSA pfdsa, int index, void * pitem);
  1985. LWSTDAPI_(BOOL) FDSA_DeleteItem(PFDSA pfdsa, int index);
  1986. #define FDSA_AppendItem(pfdsa, pitem) FDSA_InsertItem(pfdsa, DA_LAST, pitem)
  1987. #define FDSA_GetItemPtr(pfdsa, i, type) (&(((type *)((pfdsa)->aItem))[(i)]))
  1988. #define FDSA_GetItemCount(hdsa) (*(int *)(hdsa))
  1989. #if defined( __LPGUID_DEFINED__ )
  1990. // Copied from OLE source code
  1991. // format for string form of GUID is:
  1992. // ????{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}
  1993. #define GUIDSTR_MAX (1+ 8 + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 12 + 1 + 1)
  1994. LWSTDAPI_(BOOL) GUIDFromString%(LPCTSTR% psz, LPGUID pguid);
  1995. #endif
  1996. #ifdef _REFGUID_DEFINED
  1997. LWSTDAPI_(int) SHStringFromGUID%(UNALIGNED REFGUID rguid, LPTSTR% psz, int cchMax);
  1998. LWSTDAPI SHRegGetCLSIDKey%(UNALIGNED REFGUID rguid, LPCTSTR% lpszSubKey, BOOL fUserSpecific, BOOL fCreate, HKEY *phkey);
  1999. LWSTDAPI_(HANDLE) SHGlobalCounterCreate(REFGUID rguid);
  2000. LWSTDAPI_(HANDLE) SHGlobalCounterCreateNamed%(LPCTSTR% szName, LONG lInitialValue);
  2001. LWSTDAPI_(long) SHGlobalCounterGetValue(HANDLE hCounter);
  2002. LWSTDAPI_(long) SHGlobalCounterIncrement(HANDLE hCounter);
  2003. LWSTDAPI_(long) SHGlobalCounterDecrement(HANDLE hCounter);
  2004. #define SHGlobalCounterDestroy CloseHandle
  2005. #endif
  2006. // WNDPROCs are thunked by user to send ANSI/UNICODE messages (ex: WM_WININICHANGE)
  2007. // so providing a W version that automatically thunks to the A version
  2008. // is dangerous. but we do it anyway. if a caller needs to work on both win95 and NT
  2009. // it needs to be aware that on win95 the W version actually calls the A version.
  2010. // thus all worker windows on win95 are ANSI. this should rarely affect worker wndprocs
  2011. // because they are internal, and the messages are usually custom. but system messages
  2012. // like WM_WININICHANGE, and the WM_DDE* messages will be changed accordingly
  2013. HWND SHCreateWorkerWindowA(WNDPROC pfnWndProc, HWND hwndParent, DWORD dwExStyle, DWORD dwFlags, HMENU hmenu, void * p);
  2014. HWND SHCreateWorkerWindowW(WNDPROC pfnWndProc, HWND hwndParent, DWORD dwExStyle, DWORD dwFlags, HMENU hmenu, void * p);
  2015. #ifdef UNICODE
  2016. #define SHCreateWorkerWindow SHCreateWorkerWindowW
  2017. #else
  2018. #define SHCreateWorkerWindow SHCreateWorkerWindowA
  2019. #endif
  2020. BOOL SHAboutInfoA(LPSTR lpszInfo, DWORD cchSize);
  2021. BOOL SHAboutInfoW(LPWSTR lpszInfo, DWORD cchSize);
  2022. #ifdef UNICODE
  2023. #define SHAboutInfo SHAboutInfoW
  2024. #else
  2025. #define SHAboutInfo SHAboutInfoA
  2026. #endif
  2027. // Types for SHIsLowMemoryMachine
  2028. #define ILMM_IE4 0 // 1997-style machine
  2029. LWSTDAPI_(BOOL) SHIsLowMemoryMachine(DWORD dwType);
  2030. LWSTDAPI_(HINSTANCE) SHPinDllOfCLSID(const CLSID *pclsid);
  2031. // Menu Helpers
  2032. LWSTDAPI_(int) GetMenuPosFromID(HMENU hmenu, UINT id);
  2033. LWSTDAPI SHGetInverseCMAP(BYTE *pbMap, ULONG cbMap);
  2034. //
  2035. // Shared memory apis
  2036. //
  2037. LWSTDAPI_(HANDLE) SHAllocShared(const void *pvData, DWORD dwSize, DWORD dwProcessId);
  2038. LWSTDAPI_(BOOL) SHFreeShared(HANDLE hData,DWORD dwProcessId);
  2039. LWSTDAPI_(void *) SHLockShared(HANDLE hData, DWORD dwProcessId);
  2040. LWSTDAPI_(void *) SHLockSharedEx(HANDLE hData, DWORD dwProcessId, BOOL fForWriting);
  2041. LWSTDAPI_(BOOL) SHUnlockShared(void *pvData);
  2042. LWSTDAPI_(HANDLE) SHMapHandle(HANDLE h, DWORD dwProcSrc, DWORD dwProcDest, DWORD dwDesiredAccess, DWORD dwFlags);
  2043. //
  2044. // Shared memory structs
  2045. //
  2046. #define MAPHEAD_SIG 0xbaff1aff
  2047. typedef struct _shmapheader {
  2048. DWORD dwSize;
  2049. DWORD dwSig;
  2050. DWORD dwSrcId;
  2051. DWORD dwDstId;
  2052. } SHMAPHEADER; // NOTE: should always be QUADWORD alignment
  2053. #ifdef UNIX
  2054. #include <urlmon.h>
  2055. #endif /* UNIX */
  2056. //
  2057. // Zone Security APIs
  2058. //
  2059. LWSTDAPI ZoneCheckPathA(LPCSTR pszPath, DWORD dwActionType, DWORD dwFlags, IInternetSecurityMgrSite * pisms);
  2060. LWSTDAPI ZoneCheckPathW(LPCWSTR pwzPath, DWORD dwActionType, DWORD dwFlags, IInternetSecurityMgrSite * pisms);
  2061. LWSTDAPI ZoneCheckUrlA(LPCSTR pszUrl, DWORD dwActionType, DWORD dwFlags, IInternetSecurityMgrSite * pisms);
  2062. LWSTDAPI ZoneCheckUrlW(LPCWSTR pwzUrl, DWORD dwActionType, DWORD dwFlags, IInternetSecurityMgrSite * pisms);
  2063. LWSTDAPI ZoneCheckUrlExA(LPCSTR pszUrl, DWORD * pdwPolicy, DWORD dwPolicySize, DWORD * pdwContext, DWORD dwContextSize, DWORD dwActionType, DWORD dwFlags, IInternetSecurityMgrSite * pisms);
  2064. LWSTDAPI ZoneCheckUrlExW(LPCWSTR pwzUrl, DWORD * pdwPolicy, DWORD dwPolicySize, DWORD * pdwContext, DWORD dwContextSize, DWORD dwActionType, DWORD dwFlags, IInternetSecurityMgrSite * pisms);
  2065. LWSTDAPI ZoneCheckUrlExCacheA(LPCSTR pszUrl, DWORD * pdwPolicy, DWORD dwPolicySize, DWORD * pdwContext, DWORD dwContextSize,
  2066. DWORD dwActionType, DWORD dwFlags, IInternetSecurityMgrSite * pisms, IInternetSecurityManager ** ppismCache);
  2067. LWSTDAPI ZoneCheckUrlExCacheW(LPCWSTR pwzUrl, DWORD * pdwPolicy, DWORD dwPolicySize, DWORD * pdwContext, DWORD dwContextSize,
  2068. DWORD dwActionType, DWORD dwFlags, IInternetSecurityMgrSite * pisms, IInternetSecurityManager ** ppismCache);
  2069. LWSTDAPI ZoneCheckHost(IInternetHostSecurityManager * pihsm, DWORD dwActionType, DWORD dwFlags);
  2070. LWSTDAPI ZoneCheckHostEx(IInternetHostSecurityManager * pihsm, DWORD * pdwPolicy, DWORD dwPolicySize, DWORD * pdwContext,
  2071. DWORD dwContextSize, DWORD dwActionType, DWORD dwFlags);
  2072. LWSTDAPI_(int) ZoneComputePaneSize(HWND hwndStatus);
  2073. LWSTDAPI_(void) ZoneConfigureW(HWND hwnd, LPCWSTR pwszUrl);
  2074. #ifdef UNICODE
  2075. #define ZoneCheckUrl ZoneCheckUrlW
  2076. #define ZoneCheckPath ZoneCheckPathW
  2077. #define ZoneCheckUrlEx ZoneCheckUrlExW
  2078. #define ZoneCheckUrlExCache ZoneCheckUrlExCacheW
  2079. #else // UNICODE
  2080. #define ZoneCheckUrl ZoneCheckUrlA
  2081. #define ZoneCheckPath ZoneCheckPathA
  2082. #define ZoneCheckUrlEx ZoneCheckUrlExA
  2083. #define ZoneCheckUrlExCache ZoneCheckUrlExCacheA
  2084. #endif // UNICODE
  2085. LWSTDAPI SHRegisterValidateTemplate(LPCWSTR pwzTemplate, DWORD dwFlags);
  2086. // Flags for SHRegisterValidateTemplate
  2087. #define SHRVT_REGISTER 0x00000001
  2088. #define SHRVT_VALIDATE 0x00000002
  2089. #define SHRVT_PROMPTUSER 0x00000004
  2090. #define SHRVT_REGISTERIFPROMPTOK 0x00000008
  2091. #define SHRVT_ALLOW_INTRANET 0x00000010
  2092. #define SHRVT_VALID 0x0000001f
  2093. BOOL RegisterGlobalHotkeyW(WORD wOldHotkey, WORD wNewHotkey,LPCWSTR pcwszPath);
  2094. BOOL RegisterGlobalHotkeyA(WORD wOldHotkey, WORD wNewHotkey,LPCSTR pcszPath);
  2095. LWSTDAPI_(UINT) WhichPlatform(void);
  2096. // Return values of WhichPlatform
  2097. #define PLATFORM_UNKNOWN 0
  2098. #define PLATFORM_IE3 1 // obsolete: use PLATFORM_BROWSERONLY
  2099. #define PLATFORM_BROWSERONLY 1 // browser-only (no new shell)
  2100. #define PLATFORM_INTEGRATED 2 // integrated shell
  2101. #ifdef UNICODE
  2102. #define RegisterGlobalHotkey RegisterGlobalHotkeyW
  2103. #else // UNICODE
  2104. #define RegisterGlobalHotkey RegisterGlobalHotkeyA
  2105. #endif // UNICODE
  2106. // qistub {
  2107. //*** QueryInterface helpers
  2108. // NOTES
  2109. // ATL has a fancier version of this. if we need to extend ours, we
  2110. // should probably just switch to ATL's rather than reinvent.
  2111. // EXAMPLE
  2112. // Cfoo::QI(REFIID riid, void **ppv)
  2113. // {
  2114. // // (the IID_xxx comments make grep'ing work!)
  2115. // static const QITAB qit = {
  2116. // QITABENT(Cfoo, Iiface1), // IID_Iiface1
  2117. // ...
  2118. // QITABENT(Cfoo, IifaceN), // IID_IifaceN
  2119. // { 0 }, // n.b. don't forget the 0
  2120. // };
  2121. //
  2122. // // n.b. make sure you don't cast 'this'
  2123. // hr = QISearch(this, qit, riid, ppv);
  2124. // if (FAILED(hr))
  2125. // hr = SUPER::QI(riid, ppv);
  2126. // // custom code could be added here for FAILED() case
  2127. // return hr;
  2128. // }
  2129. typedef struct
  2130. {
  2131. const IID * piid;
  2132. int dwOffset;
  2133. } QITAB, *LPQITAB;
  2134. typedef const QITAB *LPCQITAB;
  2135. #define QITABENTMULTI(Cthis, Ifoo, Iimpl) \
  2136. { (IID*) &IID_##Ifoo, OFFSETOFCLASS(Iimpl, Cthis) }
  2137. #define QITABENTMULTI2(Cthis, Ifoo, Iimpl) \
  2138. { (IID*) &Ifoo, OFFSETOFCLASS(Iimpl, Cthis) }
  2139. #define QITABENT(Cthis, Ifoo) QITABENTMULTI(Cthis, Ifoo, Ifoo)
  2140. STDAPI QISearch(void* that, LPCQITAB pqit, REFIID riid, void **ppv);
  2141. #ifndef STATIC_CAST
  2142. //*** STATIC_CAST -- 'portable' static_cast<>
  2143. // NOTES
  2144. // do *not* use SAFE_CAST (see comment in OFFSETOFCLASS)
  2145. #define STATIC_CAST(typ) static_cast<typ>
  2146. #ifndef _X86_
  2147. // assume only intel compiler (>=vc5) supports static_cast for now
  2148. // we could key off of _MSC_VER >= 1100 but i'm not sure that will work
  2149. //
  2150. // a straight cast will give the correct result but no error checking,
  2151. // so we'll have to catch errors on intel.
  2152. #undef STATIC_CAST
  2153. #define STATIC_CAST(typ) (typ)
  2154. #endif
  2155. #endif
  2156. #ifndef OFFSETOFCLASS
  2157. //*** OFFSETOFCLASS -- (stolen from ATL)
  2158. // we use STATIC_CAST not SAFE_CAST because the compiler gets confused
  2159. // (it doesn't constant-fold the ,-op in SAFE_CAST so we end up generating
  2160. // code for the table!)
  2161. #define OFFSETOFCLASS(base, derived) \
  2162. ((DWORD)(DWORD_PTR)(STATIC_CAST(base*)((derived*)8))-8)
  2163. #endif
  2164. // } qistub
  2165. #if (_WIN32_IE >= 0x0500)
  2166. // SHRestrictionLookup
  2167. typedef struct
  2168. {
  2169. INT iFlag;
  2170. LPCWSTR pszKey;
  2171. LPCWSTR pszValue;
  2172. } SHRESTRICTIONITEMS;
  2173. LWSTDAPI_(DWORD) SHRestrictionLookup(INT iFlag, LPCWSTR pszBaseKey,
  2174. const SHRESTRICTIONITEMS *pRestrictions,
  2175. DWORD* rdwRestrictionItemValues);
  2176. LWSTDAPI_(DWORD) SHGetRestriction(LPCWSTR pszBaseKey, LPCWSTR pszGroup, LPCWSTR pszSubKey);
  2177. typedef INT_PTR (CALLBACK* SHDLGPROC)(void *lpData, HWND, UINT, WPARAM, LPARAM);
  2178. LWSTDAPI_(INT_PTR) SHDialogBox(HINSTANCE hInstance, LPCWSTR lpTemplateName,
  2179. HWND hwndParent, SHDLGPROC lpDlgFunc, void*lpData);
  2180. LWSTDAPI SHInvokeDefaultCommand(HWND hwnd, struct IShellFolder* psf, LPCITEMIDLIST pidl);
  2181. LWSTDAPI SHInvokeCommand(HWND hwnd, struct IShellFolder* psf, LPCITEMIDLIST pidl, LPCSTR lpVerb);
  2182. LWSTDAPI SHInvokeCommandOnContextMenu(HWND hwnd, struct IUnknown* punk, struct IContextMenu *pcm, DWORD fMask, LPCSTR lpVerb);
  2183. LWSTDAPI SHInvokeCommandsOnContextMenu(HWND hwnd, struct IUnknown* punk, struct IContextMenu *pcm, DWORD fMask, const LPCSTR rgszVerbs[], UINT cVerbs);
  2184. LWSTDAPI SHForwardContextMenuMsg(struct IContextMenu* pcm, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* plResult, BOOL fAllowICM2);
  2185. LWSTDAPI IUnknown_DoContextMenuPopup(struct IUnknown *punkSite, struct IContextMenu* pcm, UINT fFlags, POINT pt);
  2186. #endif // _WIN32_IE >= 0x0500
  2187. //============= Internal Routines that are always to be built ================
  2188. LWSTDAPI_(DWORD)
  2189. GetLongPathNameWrapW(
  2190. LPCWSTR lpszShortPath,
  2191. LPWSTR lpszLongPath,
  2192. DWORD cchBuffer);
  2193. LWSTDAPI_(DWORD)
  2194. GetLongPathNameWrapA(
  2195. LPCSTR lpszShortPath,
  2196. LPSTR lpszLongPath,
  2197. DWORD cchBuffer);
  2198. #ifdef UNICODE
  2199. #define GetLongPathNameWrap GetLongPathNameWrapW
  2200. #else
  2201. #define GetLongPathNameWrap GetLongPathNameWrapA
  2202. #endif //UNICODE
  2203. //=============== Unicode Wrapper Routines ===================================
  2204. #if (_WIN32_IE >= 0x0500) && !defined(NO_SHLWAPI_UNITHUNK)
  2205. //
  2206. // There are two styles of usage for the wrap functions.
  2207. //
  2208. // * Explicit wrapping.
  2209. //
  2210. // If you explicitly call GetPropWrap (for example), then
  2211. // your UNICODE build will call the wrapper function, and your ANSI
  2212. // build will call the normal ANSI API directly.
  2213. //
  2214. // Calls to GetProp, GetPropW, and GetPropA still go
  2215. // directly to the underlying system DLL that implements them.
  2216. //
  2217. // This lets you select which calls to UNICODE APIs should get
  2218. // wrapped and which should go straight through to the OS
  2219. // (and most likely fail on Win95).
  2220. //
  2221. // * Automatic wrapping.
  2222. //
  2223. // If you #include <w95wraps.h>, then when you call GetProp,
  2224. // your UNICODE build will call the wrapper function, and your ANSI
  2225. // ANSI build will call the normal ANSI API directly.
  2226. //
  2227. // This lets you just call the UNICODE APIs normally throughout
  2228. // your code, and the wrappers will do their best.
  2229. //
  2230. // Here's a table explaining what you get under the various scenarios.
  2231. //
  2232. // You Get
  2233. // <w95wraps.h> <w95wraps.h>
  2234. // You Write UNICODE ANSI UNICODE ANSI
  2235. // ============ ============ ============ ============ ============
  2236. // GetProp GetPropW GetPropA GetPropWrapW GetPropA
  2237. // GetPropWrap GetPropWrapW GetPropA GetPropWrapW GetPropA
  2238. //
  2239. // GetPropW GetPropW GetPropW GetPropWrapW GetPropWrapW
  2240. // GetPropA GetPropA GetPropA GetPropA GetPropA
  2241. // GetPropWrapW GetPropWrapW GetPropWrapW GetPropWrapW GetPropWrapW
  2242. // GetPropWrapA GetPropA GetPropA GetPropA GetPropA
  2243. //
  2244. // Final quirk: If you are running on a non-x86 platform, then the
  2245. // wrap functions are forwarded to the unwrapped functions, since
  2246. // the only OS that runs on non-x86 is NT.
  2247. //
  2248. // Before using the wrapper functions, see the warnings at the top of
  2249. // <w95wraps.h> to make sure you understand the consequences.
  2250. //
  2251. LWSTDAPI_(BOOL) IsCharAlphaWrapW(IN WCHAR ch);
  2252. LWSTDAPI_(BOOL) IsCharUpperWrapW(IN WCHAR ch);
  2253. LWSTDAPI_(BOOL) IsCharLowerWrapW(IN WCHAR ch);
  2254. LWSTDAPI_(BOOL) IsCharAlphaNumericWrapW(IN WCHAR ch);
  2255. LWSTDAPI_(BOOL)
  2256. AppendMenuWrapW(
  2257. IN HMENU hMenu,
  2258. IN UINT uFlags,
  2259. IN UINT_PTR uIDNewItem,
  2260. IN LPCWSTR lpNewItem
  2261. );
  2262. LWSTDAPI_(LRESULT)
  2263. CallWindowProcWrapW(
  2264. WNDPROC lpPrevWndFunc,
  2265. HWND hWnd,
  2266. UINT Msg,
  2267. WPARAM wParam,
  2268. LPARAM lParam);
  2269. #ifdef POST_IE5_BETA
  2270. LWSTDAPI_(BOOL) CallMsgFilterWrapW(LPMSG lpMsg, int nCode);
  2271. #endif
  2272. LWSTDAPI_(LPWSTR) CharLowerWrapW( LPWSTR pch );
  2273. LWSTDAPI_(DWORD) CharLowerBuffWrapW( LPWSTR pch, DWORD cchLength );
  2274. LWSTDAPI_(LPWSTR) CharNextWrapW(LPCWSTR lpszCurrent);
  2275. LWSTDAPI_(LPWSTR) CharPrevWrapW(LPCWSTR lpszStart, LPCWSTR lpszCurrent);
  2276. LWSTDAPI_(BOOL) CharToOemWrapW(LPCWSTR lpszSrc, LPSTR lpszDst);
  2277. LWSTDAPI_(LPWSTR) CharUpperWrapW( LPWSTR pch );
  2278. LWSTDAPI_(DWORD) CharUpperBuffWrapW( LPWSTR pch, DWORD cchLength );
  2279. LWSTDAPI_(HRESULT) CLSIDFromStringWrap(LPOLESTR lpsz, LPCLSID pclsid);
  2280. LWSTDAPI_(HRESULT) CLSIDFromProgIDWrap(LPCOLESTR lpszProgID, LPCLSID lpclsid);
  2281. LWSTDAPI_(int)
  2282. CompareStringWrapW(
  2283. LCID Locale,
  2284. DWORD dwCmpFlags,
  2285. LPCWSTR lpString1,
  2286. int cchCount1,
  2287. LPCWSTR lpString2,
  2288. int cchCount2);
  2289. LWSTDAPI_(int)
  2290. CopyAcceleratorTableWrapW(
  2291. HACCEL hAccelSrc,
  2292. LPACCEL lpAccelDst,
  2293. int cAccelEntries);
  2294. LWSTDAPI_(HACCEL)
  2295. CreateAcceleratorTableWrapW(LPACCEL lpAccel, int cEntries);
  2296. LWSTDAPI_(HDC)
  2297. CreateDCWrapW(
  2298. LPCWSTR lpszDriver,
  2299. LPCWSTR lpszDevice,
  2300. LPCWSTR lpszOutput,
  2301. CONST DEVMODEW * lpInitData);
  2302. LWSTDAPI_(BOOL)
  2303. CreateDirectoryWrapW(
  2304. LPCWSTR lpPathName,
  2305. LPSECURITY_ATTRIBUTES lpSecurityAttributes);
  2306. LWSTDAPI_(HANDLE)
  2307. CreateEventWrapW(
  2308. LPSECURITY_ATTRIBUTES lpEventAttributes,
  2309. BOOL bManualReset,
  2310. BOOL bInitialState,
  2311. LPCWSTR lpName);
  2312. LWSTDAPI_(HANDLE)
  2313. CreateFileWrapW(
  2314. LPCWSTR lpFileName,
  2315. DWORD dwDesiredAccess,
  2316. DWORD dwShareMode,
  2317. LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  2318. DWORD dwCreationDisposition,
  2319. DWORD dwFlagsAndAttributes,
  2320. HANDLE hTemplateFile);
  2321. LWSTDAPI_(HFONT)
  2322. CreateFontIndirectWrapW(CONST LOGFONTW * plfw);
  2323. LWSTDAPI_(HDC)
  2324. CreateICWrapW(
  2325. LPCWSTR lpszDriver,
  2326. LPCWSTR lpszDevice,
  2327. LPCWSTR lpszOutput,
  2328. CONST DEVMODEW * lpInitData);
  2329. LWSTDAPI_(HWND)
  2330. CreateWindowExWrapW(
  2331. DWORD dwExStyle,
  2332. LPCWSTR lpClassName,
  2333. LPCWSTR lpWindowName,
  2334. DWORD dwStyle,
  2335. int X,
  2336. int Y,
  2337. int nWidth,
  2338. int nHeight,
  2339. HWND hWndParent,
  2340. HMENU hMenu,
  2341. HINSTANCE hInstance,
  2342. void * lpParam);
  2343. LWSTDAPI_(LRESULT)
  2344. DefWindowProcWrapW(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
  2345. LWSTDAPI_(BOOL) DeleteFileWrapW(LPCWSTR pwsz);
  2346. LWSTDAPI_(LRESULT)
  2347. DispatchMessageWrapW(CONST MSG * lpMsg);
  2348. LWSTDAPI_(int)
  2349. DrawTextWrapW(
  2350. HDC hDC,
  2351. LPCWSTR lpString,
  2352. int nCount,
  2353. LPRECT lpRect,
  2354. UINT uFormat);
  2355. LWSTDAPI_(int)
  2356. EnumFontFamiliesWrapW(
  2357. HDC hdc,
  2358. LPCWSTR lpszFamily,
  2359. FONTENUMPROCW lpEnumFontProc,
  2360. LPARAM lParam);
  2361. LWSTDAPI_(int)
  2362. EnumFontFamiliesExWrapW(
  2363. HDC hdc,
  2364. LPLOGFONTW lplfw,
  2365. FONTENUMPROCW lpEnumFontProc,
  2366. LPARAM lParam,
  2367. DWORD dwFlags );
  2368. LWSTDAPI_(BOOL)
  2369. EnumResourceNamesWrapW(
  2370. HINSTANCE hModule,
  2371. LPCWSTR lpType,
  2372. ENUMRESNAMEPROCW lpEnumFunc,
  2373. LONG_PTR lParam);
  2374. LWSTDAPI_(BOOL)
  2375. ExtTextOutWrapW(
  2376. HDC hdc,
  2377. int x,
  2378. int y,
  2379. UINT fuOptions,
  2380. CONST RECT * lprc,
  2381. LPCWSTR lpString,
  2382. UINT nCount,
  2383. CONST INT * lpDx);
  2384. LWSTDAPI_(HANDLE)
  2385. FindFirstFileWrapW(
  2386. LPCWSTR lpFileName,
  2387. LPWIN32_FIND_DATAW pwszFd);
  2388. LWSTDAPI_(HRSRC)
  2389. FindResourceWrapW(HINSTANCE hModule, LPCWSTR lpName, LPCWSTR lpType);
  2390. LWSTDAPI_(HWND)
  2391. FindWindowWrapW(LPCWSTR lpClassName, LPCWSTR lpWindowName);
  2392. LWSTDAPI_(DWORD)
  2393. FormatMessageWrapW(
  2394. DWORD dwFlags,
  2395. LPCVOID lpSource,
  2396. DWORD dwMessageId,
  2397. DWORD dwLanguageId,
  2398. LPWSTR lpBuffer,
  2399. DWORD nSize,
  2400. va_list * Arguments);
  2401. LWSTDAPI_(BOOL)
  2402. GetClassInfoWrapW(HINSTANCE hModule, LPCWSTR lpClassName, LPWNDCLASSW lpWndClassW);
  2403. LWSTDAPI_(DWORD)
  2404. GetClassLongWrapW(HWND hWnd, int nIndex);
  2405. LWSTDAPI_(int)
  2406. GetClassNameWrapW(HWND hWnd, LPWSTR lpClassName, int nMaxCount);
  2407. LWSTDAPI_(int)
  2408. GetClipboardFormatNameWrapW(UINT format, LPWSTR lpFormatName, int cchFormatName);
  2409. LWSTDAPI_(DWORD)
  2410. GetCurrentDirectoryWrapW(DWORD nBufferLength, LPWSTR lpBuffer);
  2411. LWSTDAPI_(UINT)
  2412. GetDlgItemTextWrapW(
  2413. HWND hWndDlg,
  2414. int idControl,
  2415. LPWSTR lpsz,
  2416. int cchMax);
  2417. LWSTDAPI_(DWORD)
  2418. GetFileAttributesWrapW(LPCWSTR lpFileName);
  2419. // Cannot be LWSTDAPI because winver.h declares the function as STDAPI and not DLLIMPORT
  2420. STDAPI_(BOOL)
  2421. GetFileVersionInfoWrapW(LPWSTR pwzFilename, DWORD dwHandle, DWORD dwLen, LPVOID lpData);
  2422. // Cannot be LWSTDAPI because winver.h declares the function as STDAPI and not DLLIMPORT
  2423. STDAPI_(DWORD)
  2424. GetFileVersionInfoSizeWrapW(LPWSTR pwzFilename, LPDWORD lpdwHandle);
  2425. LWSTDAPI_(DWORD)
  2426. GetFullPathNameWrapW( LPCWSTR lpFileName,
  2427. DWORD nBufferLength,
  2428. LPWSTR lpBuffer,
  2429. LPWSTR *lpFilePart);
  2430. LWSTDAPI_(int)
  2431. GetLocaleInfoWrapW(LCID Locale, LCTYPE LCType, LPWSTR lpsz, int cchData);
  2432. LWSTDAPI_(int)
  2433. GetMenuStringWrapW(
  2434. HMENU hMenu,
  2435. UINT uIDItem,
  2436. LPWSTR lpString,
  2437. int nMaxCount,
  2438. UINT uFlag);
  2439. LWSTDAPI_(BOOL)
  2440. GetMessageWrapW(
  2441. LPMSG lpMsg,
  2442. HWND hWnd,
  2443. UINT wMsgFilterMin,
  2444. UINT wMsgFilterMax);
  2445. LWSTDAPI_(DWORD)
  2446. GetModuleFileNameWrapW(HINSTANCE hModule, LPWSTR pwszFilename, DWORD nSize);
  2447. LWSTDAPI_(UINT)
  2448. GetSystemDirectoryWrapW(LPWSTR lpBuffer, UINT uSize);
  2449. LWSTDAPI_(DWORD)
  2450. GetEnvironmentVariableWrapW(LPCWSTR lpName, LPWSTR lpBuffer, DWORD nSize);
  2451. LWSTDAPI_(DWORD)
  2452. SearchPathWrapW(
  2453. LPCWSTR lpPathName,
  2454. LPCWSTR lpFileName,
  2455. LPCWSTR lpExtension,
  2456. DWORD cchReturnBuffer,
  2457. LPWSTR lpReturnBuffer,
  2458. LPWSTR * plpfilePart);
  2459. LWSTDAPI_(HMODULE)
  2460. GetModuleHandleWrapW(LPCWSTR lpModuleName);
  2461. LWSTDAPI_(int)
  2462. GetObjectWrapW(HGDIOBJ hgdiObj, int cbBuffer, void *lpvObj);
  2463. LWSTDAPI_(UINT)
  2464. GetPrivateProfileIntWrapW(
  2465. LPCWSTR lpAppName,
  2466. LPCWSTR lpKeyName,
  2467. INT nDefault,
  2468. LPCWSTR lpFileName);
  2469. LWSTDAPI_(DWORD)
  2470. GetProfileStringWrapW(
  2471. LPCWSTR lpAppName,
  2472. LPCWSTR lpKeyName,
  2473. LPCWSTR lpDefault,
  2474. LPWSTR lpBuffer,
  2475. DWORD dwBuffersize);
  2476. LWSTDAPI_(HANDLE)
  2477. GetPropWrapW(HWND hWnd, LPCWSTR lpString);
  2478. LWSTDAPI_(ATOM)
  2479. GlobalAddAtomWrapW(LPCWSTR lpAtomName);
  2480. LWSTDAPI_(ATOM)
  2481. GlobalFindAtomWrapW(LPCWSTR lpAtomName);
  2482. LWSTDAPI_(DWORD)
  2483. GetShortPathNameWrapW(
  2484. LPCWSTR lpszLongPath,
  2485. LPWSTR lpszShortPath,
  2486. DWORD cchBuffer);
  2487. LWSTDAPI_(BOOL)
  2488. GetStringTypeExWrapW(LCID lcid, DWORD dwInfoType, LPCWSTR lpSrcStr, int cchSrc, LPWORD lpCharType);
  2489. LWSTDAPI_(UINT)
  2490. GetTempFileNameWrapW(
  2491. LPCWSTR lpPathName,
  2492. LPCWSTR lpPrefixString,
  2493. UINT uUnique,
  2494. LPWSTR lpTempFileName);
  2495. LWSTDAPI_(DWORD)
  2496. GetTempPathWrapW(DWORD nBufferLength, LPWSTR lpBuffer);
  2497. LWSTDAPI_(BOOL)
  2498. GetTextExtentPoint32WrapW(
  2499. HDC hdc,
  2500. LPCWSTR pwsz,
  2501. int cb,
  2502. LPSIZE pSize);
  2503. LWSTDAPI_(int)
  2504. GetTextFaceWrapW(
  2505. HDC hdc,
  2506. int cch,
  2507. LPWSTR lpFaceName);
  2508. LWSTDAPI_(BOOL)
  2509. GetTextMetricsWrapW(HDC hdc, LPTEXTMETRICW lptm);
  2510. LWSTDAPI_(BOOL)
  2511. GetUserNameWrapW(LPWSTR lpUserName, LPDWORD lpcchName);
  2512. LWSTDAPI_(LONG)
  2513. GetWindowLongWrapW(HWND hWnd, int nIndex);
  2514. LWSTDAPI_(int)
  2515. GetWindowTextWrapW(HWND hWnd, LPWSTR lpString, int nMaxCount);
  2516. LWSTDAPI_(int)
  2517. GetWindowTextLengthWrapW(HWND hWnd);
  2518. LWSTDAPI_(UINT)
  2519. GetWindowsDirectoryWrapW(LPWSTR lpWinPath, UINT cch);
  2520. LWSTDAPI_(BOOL)
  2521. InsertMenuWrapW(
  2522. HMENU hMenu,
  2523. UINT uPosition,
  2524. UINT uFlags,
  2525. UINT_PTR uIDNewItem,
  2526. LPCWSTR lpNewItem);
  2527. LWSTDAPI_(BOOL)
  2528. IsDialogMessageWrapW(HWND hWndDlg, LPMSG lpMsg);
  2529. LWSTDAPI_(HACCEL)
  2530. LoadAcceleratorsWrapW(HINSTANCE hInstance, LPCWSTR lpTableName);
  2531. LWSTDAPI_(HBITMAP)
  2532. LoadBitmapWrapW(HINSTANCE hInstance, LPCWSTR lpBitmapName);
  2533. LWSTDAPI_(HCURSOR)
  2534. LoadCursorWrapW(HINSTANCE hInstance, LPCWSTR lpCursorName);
  2535. LWSTDAPI_(HICON)
  2536. LoadIconWrapW(HINSTANCE hInstance, LPCWSTR lpIconName);
  2537. LWSTDAPI_(HANDLE)
  2538. LoadImageWrapA(
  2539. HINSTANCE hInstance,
  2540. LPCSTR lpName,
  2541. UINT uType,
  2542. int cxDesired,
  2543. int cyDesired,
  2544. UINT fuLoad);
  2545. LWSTDAPI_(HANDLE)
  2546. LoadImageWrapW(
  2547. HINSTANCE hInstance,
  2548. LPCWSTR lpName,
  2549. UINT uType,
  2550. int cxDesired,
  2551. int cyDesired,
  2552. UINT fuLoad);
  2553. LWSTDAPI_(HINSTANCE)
  2554. LoadLibraryExWrapW(
  2555. LPCWSTR lpLibFileName,
  2556. HANDLE hFile,
  2557. DWORD dwFlags);
  2558. LWSTDAPI_(HMENU)
  2559. LoadMenuWrapW(HINSTANCE hInstance, LPCWSTR lpMenuName);
  2560. LWSTDAPI_(int)
  2561. LoadStringWrapW(HINSTANCE hInstance, UINT uID, LPWSTR lpBuffer, int nBufferMax);
  2562. #ifndef UNIX
  2563. LWSTDAPI_(BOOL)
  2564. MessageBoxIndirectWrapW(CONST MSGBOXPARAMSW *pmbp);
  2565. #else
  2566. LWSTDAPI_(int)
  2567. MessageBoxIndirectWrapW(LPMSGBOXPARAMSW pmbp);
  2568. #endif /* UNIX */
  2569. LWSTDAPI_(BOOL)
  2570. ModifyMenuWrapW(
  2571. HMENU hMenu,
  2572. UINT uPosition,
  2573. UINT uFlags,
  2574. UINT_PTR uIDNewItem,
  2575. LPCWSTR lpNewItem);
  2576. LWSTDAPI_(BOOL)
  2577. GetCharWidth32WrapW(
  2578. HDC hdc,
  2579. UINT iFirstChar,
  2580. UINT iLastChar,
  2581. LPINT lpBuffer);
  2582. LWSTDAPI_(DWORD)
  2583. GetCharacterPlacementWrapW(
  2584. HDC hdc, // handle to device context
  2585. LPCWSTR lpString, // pointer to string
  2586. int nCount, // number of characters in string
  2587. int nMaxExtent, // maximum extent for displayed string
  2588. LPGCP_RESULTSW lpResults, // pointer to buffer for placement result
  2589. DWORD dwFlags // placement flags
  2590. );
  2591. LWSTDAPI_(BOOL)
  2592. CopyFileWrapW(LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName, BOOL bFailIfExists);
  2593. LWSTDAPI_(BOOL)
  2594. MoveFileWrapW(LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName);
  2595. LWSTDAPI_(BOOL)
  2596. OemToCharWrapW(LPCSTR lpszSrc, LPWSTR lpszDst);
  2597. LWSTDAPI_(HANDLE)
  2598. OpenEventWrapW(
  2599. DWORD fdwAccess,
  2600. BOOL fInherit,
  2601. LPCWSTR lpszEventName);
  2602. LWSTDAPI_(void)
  2603. OutputDebugStringWrapW(LPCWSTR lpOutputString);
  2604. LWSTDAPI_(BOOL)
  2605. PeekMessageWrapW(
  2606. LPMSG lpMsg,
  2607. HWND hWnd,
  2608. UINT wMsgFilterMin,
  2609. UINT wMsgFilterMax,
  2610. UINT wRemoveMsg);
  2611. LWSTDAPI_(BOOL)
  2612. PlaySoundWrapW(
  2613. LPCWSTR pszSound,
  2614. HMODULE hmod,
  2615. DWORD fdwSound);
  2616. LWSTDAPI_(BOOL)
  2617. PostMessageWrapW(
  2618. HWND hWnd,
  2619. UINT Msg,
  2620. WPARAM wParam,
  2621. LPARAM lParam);
  2622. LWSTDAPI_(BOOL)
  2623. PostThreadMessageWrapW(
  2624. DWORD idThread,
  2625. UINT Msg,
  2626. WPARAM wParam,
  2627. LPARAM lParam);
  2628. LWSTDAPI_(LONG)
  2629. RegCreateKeyWrapW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult);
  2630. LWSTDAPI_(LONG)
  2631. RegCreateKeyExWrapW(HKEY hKey, LPCWSTR lpSubKey, DWORD Reserved, LPWSTR lpClass, DWORD dwOptions, REGSAM samDesired, LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, LPDWORD lpdwDisposition);
  2632. LWSTDAPI_(LONG)
  2633. RegDeleteKeyWrapW(HKEY hKey, LPCWSTR pwszSubKey);
  2634. LWSTDAPI_(LONG)
  2635. RegDeleteValueWrapW(HKEY hKey, LPCWSTR pwszSubKey);
  2636. LWSTDAPI_(LONG)
  2637. RegEnumKeyWrapW(
  2638. HKEY hKey,
  2639. DWORD dwIndex,
  2640. LPWSTR lpName,
  2641. DWORD cbName);
  2642. LWSTDAPI_(LONG)
  2643. RegEnumKeyExWrapW(
  2644. HKEY hKey,
  2645. DWORD dwIndex,
  2646. LPWSTR lpName,
  2647. LPDWORD lpcbName,
  2648. LPDWORD lpReserved,
  2649. LPWSTR lpClass,
  2650. LPDWORD lpcbClass,
  2651. PFILETIME lpftLastWriteTime);
  2652. LWSTDAPI_(LONG)
  2653. RegOpenKeyWrapW(HKEY hKey, LPCWSTR pwszSubKey, PHKEY phkResult);
  2654. LWSTDAPI_(LONG)
  2655. RegOpenKeyExWrapW(
  2656. HKEY hKey,
  2657. LPCWSTR lpSubKey,
  2658. DWORD ulOptions,
  2659. REGSAM samDesired,
  2660. PHKEY phkResult);
  2661. LWSTDAPI_(LONG)
  2662. RegQueryInfoKeyWrapW(
  2663. HKEY hKey,
  2664. LPWSTR lpClass,
  2665. LPDWORD lpcbClass,
  2666. LPDWORD lpReserved,
  2667. LPDWORD lpcSubKeys,
  2668. LPDWORD lpcbMaxSubKeyLen,
  2669. LPDWORD lpcbMaxClassLen,
  2670. LPDWORD lpcValues,
  2671. LPDWORD lpcbMaxValueNameLen,
  2672. LPDWORD lpcbMaxValueLen,
  2673. LPDWORD lpcbSecurityDescriptor,
  2674. PFILETIME lpftLastWriteTime);
  2675. LWSTDAPI_(LONG)
  2676. RegQueryValueWrapW(
  2677. HKEY hKey,
  2678. LPCWSTR pwszSubKey,
  2679. LPWSTR pwszValue,
  2680. PLONG lpcbValue);
  2681. LWSTDAPI_(LONG)
  2682. RegQueryValueExWrapW(
  2683. HKEY hKey,
  2684. LPCWSTR lpValueName,
  2685. LPDWORD lpReserved,
  2686. LPDWORD lpType,
  2687. LPBYTE lpData,
  2688. LPDWORD lpcbData);
  2689. LWSTDAPI_(LONG)
  2690. RegSetValueWrapW(
  2691. HKEY hKey,
  2692. LPCWSTR lpSubKey,
  2693. DWORD dwType,
  2694. LPCWSTR lpData,
  2695. DWORD cbData);
  2696. LWSTDAPI_(LONG)
  2697. RegSetValueExWrapW(
  2698. HKEY hKey,
  2699. LPCWSTR lpValueName,
  2700. DWORD Reserved,
  2701. DWORD dwType,
  2702. CONST BYTE* lpData,
  2703. DWORD cbData);
  2704. LWSTDAPI_(ATOM)
  2705. RegisterClassWrapW(CONST WNDCLASSW * lpWndClass);
  2706. LWSTDAPI_(UINT)
  2707. RegisterClipboardFormatWrapW(LPCWSTR lpString);
  2708. LWSTDAPI_(UINT)
  2709. RegisterWindowMessageWrapW(LPCWSTR lpString);
  2710. LWSTDAPI_(BOOL)
  2711. RemoveDirectoryWrapW(LPCWSTR lpszDir);
  2712. LWSTDAPI_(HANDLE)
  2713. RemovePropWrapW(
  2714. HWND hWnd,
  2715. LPCWSTR lpString);
  2716. LWSTDAPI_(LRESULT)
  2717. SendDlgItemMessageWrapW(
  2718. HWND hDlg,
  2719. int nIDDlgItem,
  2720. UINT Msg,
  2721. WPARAM wParam,
  2722. LPARAM lParam);
  2723. LWSTDAPI_(LRESULT)
  2724. SendMessageWrapW(
  2725. HWND hWnd,
  2726. UINT Msg,
  2727. WPARAM wParam,
  2728. LPARAM lParam);
  2729. LWSTDAPI_(LRESULT)
  2730. SendMessageTimeoutWrapW(
  2731. HWND hWnd,
  2732. UINT Msg,
  2733. WPARAM wParam,
  2734. LPARAM lParam,
  2735. UINT uFlags,
  2736. UINT uTimeout,
  2737. PULONG_PTR lpdwResult);
  2738. LWSTDAPI_(BOOL)
  2739. SetCurrentDirectoryWrapW(LPCWSTR lpszCurDir);
  2740. LWSTDAPI_(BOOL)
  2741. SetDlgItemTextWrapW(HWND hDlg, int nIDDlgItem, LPCWSTR lpString);
  2742. LWSTDAPI_(BOOL)
  2743. SetMenuItemInfoWrapW(
  2744. HMENU hMenu,
  2745. UINT uItem,
  2746. BOOL fByPosition,
  2747. LPCMENUITEMINFOW lpmiiW);
  2748. LWSTDAPI_(BOOL)
  2749. SetPropWrapW(
  2750. HWND hWnd,
  2751. LPCWSTR lpString,
  2752. HANDLE hData);
  2753. LWSTDAPI_(LONG)
  2754. SetWindowLongWrapW(HWND hWnd, int nIndex, LONG dwNewLong);
  2755. LWSTDAPI_(HHOOK)
  2756. SetWindowsHookExWrapW(
  2757. int idHook,
  2758. HOOKPROC lpfn,
  2759. HINSTANCE hmod,
  2760. DWORD dwThreadId);
  2761. LWSTDAPI_(int)
  2762. StartDocWrapW( HDC hDC, const DOCINFOW * lpdi );
  2763. LWSTDAPI_(BOOL)
  2764. SystemParametersInfoWrapW(
  2765. UINT uiAction,
  2766. UINT uiParam,
  2767. void *pvParam,
  2768. UINT fWinIni);
  2769. LWSTDAPI_(BOOL)
  2770. TrackPopupMenuWrap(HMENU hMenu, UINT uFlags, int x, int y, int nReserved, HWND hWnd, CONST RECT *prcRect);
  2771. LWSTDAPI_(BOOL)
  2772. TrackPopupMenuExWrap(HMENU hMenu, UINT uFlags, int x, int y, HWND hWnd, LPTPMPARAMS lptpm);
  2773. LWSTDAPI_(int)
  2774. TranslateAcceleratorWrapW(HWND hWnd, HACCEL hAccTable, LPMSG lpMsg);
  2775. LWSTDAPI_(BOOL)
  2776. UnregisterClassWrapW(LPCWSTR lpClassName, HINSTANCE hInstance);
  2777. // Cannot be LWSTDAPI because winver.h declares the function as STDAPI and not DLLIMPORT
  2778. STDAPI_(BOOL)
  2779. VerQueryValueWrapW(const LPVOID pBlock, LPWSTR pwzSubBlock, LPVOID *ppBuffer, PUINT puLen);
  2780. LWSTDAPI_(SHORT)
  2781. VkKeyScanWrapW(WCHAR ch);
  2782. LWSTDAPI_(BOOL)
  2783. WinHelpWrapW(HWND hwnd, LPCWSTR szFile, UINT uCmd, DWORD_PTR dwData);
  2784. LWSTDAPI_(int)
  2785. wvsprintfWrapW(LPWSTR pwszOut, LPCWSTR pwszFormat, va_list arglist);
  2786. // Cannot be LWSTDAPI because winnetp.h declares the function as STDAPI and not DLLIMPORT
  2787. STDAPI_(DWORD) WNetRestoreConnectionWrapW(IN HWND hwndParent, IN LPCWSTR pwzDevice);
  2788. // Cannot be LWSTDAPI because winnetwk.h declares the function as STDAPI and not DLLIMPORT
  2789. STDAPI_(DWORD) WNetGetLastErrorWrapW(OUT LPDWORD pdwError, OUT LPWSTR pwzErrorBuf, IN DWORD cchErrorBufSize, OUT LPWSTR pwzNameBuf, IN DWORD cchNameBufSize);
  2790. LWSTDAPI_(int) DrawTextExWrapW(HDC hdc, LPWSTR pwzText, int cchText, LPRECT lprc, UINT dwDTFormat, LPDRAWTEXTPARAMS lpDTParams);
  2791. LWSTDAPI_(BOOL) GetMenuItemInfoWrapW(HMENU hMenu, UINT uItem, BOOL fByPosition, LPMENUITEMINFOW pmiiW);
  2792. LWSTDAPI_(BOOL) InsertMenuItemWrapW(HMENU hMenu, UINT uItem, BOOL fByPosition, LPCMENUITEMINFOW pmiiW);
  2793. LWSTDAPI_(HFONT) CreateFontWrapW(int nHeight, int nWidth, int nEscapement, int nOrientation, int fnWeight, DWORD fdwItalic, DWORD fdwUnderline,
  2794. DWORD fdwStrikeOut, DWORD fdwCharSet, DWORD fdwOutputPrecision, DWORD fdwClipPrecision,
  2795. DWORD fdwQuality, DWORD fdwPitchAndFamily, LPCWSTR lpszFace);
  2796. LWSTDAPI_(HDC) CreateMetaFileWrapW(LPCWSTR pwzFile);
  2797. LWSTDAPI_(HANDLE) CreateMutexWrapW(LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner, LPCWSTR pwzName);
  2798. LWSTDAPI_(DWORD) ExpandEnvironmentStringsWrapW(LPCWSTR pwszSrc, LPWSTR pwszDst, DWORD cchSize);
  2799. LWSTDAPI_(DWORD) SHExpandEnvironmentStrings%(LPCTSTR% pszSrc, LPTSTR% pszDst, DWORD cchSize);
  2800. LWSTDAPI_(DWORD) SHExpandEnvironmentStringsForUser%(HANDLE hToken, LPCTSTR% pszSrc, LPTSTR% pszDst, DWORD cchSize);
  2801. LWSTDAPI_(HANDLE) CreateSemaphoreWrapW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCWSTR pwzName);
  2802. LWSTDAPI_(BOOL) IsBadStringPtrWrapW(LPCWSTR pwzString, UINT_PTR ucchMax);
  2803. LWSTDAPI_(HINSTANCE) LoadLibraryWrapW(LPCWSTR pwzLibFileName);
  2804. LWSTDAPI_(int) GetTimeFormatWrapW(LCID Locale, DWORD dwFlags, CONST SYSTEMTIME * lpTime, LPCWSTR pwzFormat, LPWSTR pwzTimeStr, int cchTime);
  2805. LWSTDAPI_(int) GetDateFormatWrapW(LCID Locale, DWORD dwFlags, CONST SYSTEMTIME * lpDate, LPCWSTR pwzFormat, LPWSTR pwzDateStr, int cchDate);
  2806. LWSTDAPI_(DWORD) GetPrivateProfileStringWrapW(LPCWSTR pwzAppName, LPCWSTR pwzKeyName, LPCWSTR pwzDefault, LPWSTR pwzReturnedString, DWORD cchSize, LPCWSTR pwzFileName);
  2807. LWSTDAPI_(BOOL) WritePrivateProfileStringWrapW(LPCWSTR pwzAppName, LPCWSTR pwzKeyName, LPCWSTR pwzString, LPCWSTR pwzFileName);
  2808. #ifndef SHFILEINFO_DEFINED
  2809. #define SHFILEINFO_DEFINED
  2810. /*
  2811. * The SHGetFileInfo API provides an easy way to get attributes
  2812. * for a file given a pathname.
  2813. *
  2814. * PARAMETERS
  2815. *
  2816. * pszPath file name to get info about
  2817. * dwFileAttributes file attribs, only used with SHGFI_USEFILEATTRIBUTES
  2818. * psfi place to return file info
  2819. * cbFileInfo size of structure
  2820. * uFlags flags
  2821. *
  2822. * RETURN
  2823. * TRUE if things worked
  2824. */
  2825. typedef struct _SHFILEINFO%
  2826. {
  2827. HICON hIcon; // out: icon
  2828. int iIcon; // out: icon index
  2829. DWORD dwAttributes; // out: SFGAO_ flags
  2830. TCHAR% szDisplayName[MAX_PATH]; // out: display name (or path)
  2831. TCHAR% szTypeName[80]; // out: type name
  2832. } SHFILEINFO%;
  2833. // NOTE: This is also in shellapi.h. Please keep in synch.
  2834. #endif // !SHFILEINFO_DEFINED
  2835. LWSTDAPI_(DWORD_PTR) SHGetFileInfoWrapW(LPCWSTR pwzPath, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags);
  2836. LWSTDAPI_(ATOM) RegisterClassExWrapW(CONST WNDCLASSEXW *pwcx);
  2837. LWSTDAPI_(BOOL) GetClassInfoExWrapW(HINSTANCE hinst, LPCWSTR pwzClass, LPWNDCLASSEXW lpwcx);
  2838. // This allows us to be included either before or after shellapi.h
  2839. #ifdef STRICT
  2840. LWSTDAPI_(UINT) DragQueryFileWrapW(struct HDROP__*,UINT,LPWSTR,UINT);
  2841. #else
  2842. LWSTDAPI_(UINT) DragQueryFileWrapW(HANDLE,UINT,LPWSTR,UINT);
  2843. #endif
  2844. LWSTDAPI_(HWND) FindWindowExWrapW(HWND hwndParent, HWND hwndChildAfter, LPCWSTR pwzClassName, LPCWSTR pwzWindowName);
  2845. LWSTDAPI_(LPITEMIDLIST) SHBrowseForFolderWrapW(struct _browseinfoW * pbiW);
  2846. LWSTDAPI_(BOOL) SHGetPathFromIDListWrapW(LPCITEMIDLIST pidl, LPWSTR pwzPath);
  2847. LWSTDAPI_(BOOL) SHGetNewLinkInfoWrapW(LPCWSTR pszpdlLinkTo, LPCWSTR pszDir, LPWSTR pszName, BOOL *pfMustCopy, UINT uFlags);
  2848. LWSTDAPI SHDefExtractIconWrapW(LPCWSTR pszIconFile, int iIndex, UINT uFlags, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
  2849. LWSTDAPI_(BOOL) GetUserNameWrapW(LPWSTR pszBuffer, LPDWORD pcch);
  2850. LWSTDAPI_(LONG) RegEnumValueWrapW(HKEY hkey, DWORD dwIndex, LPWSTR lpValueName, LPDWORD lpcbValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData);
  2851. LWSTDAPI_(BOOL) WritePrivateProfileStructWrapW(LPCWSTR lpszSection, LPCWSTR lpszKey, LPVOID lpStruct, UINT uSizeStruct, LPCWSTR szFile);
  2852. LWSTDAPI_(BOOL) GetPrivateProfileStructWrapW(LPCWSTR lpszSection, LPCWSTR lpszKey, LPVOID lpStruct, UINT uSizeStruct, LPCWSTR szFile);
  2853. LWSTDAPI_(BOOL) CreateProcessWrapW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes,
  2854. LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory,
  2855. LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation);
  2856. LWSTDAPI_(HICON) ExtractIconWrapW(HINSTANCE hInst, LPCWSTR lpszExeFileName, UINT nIconIndex);
  2857. #ifndef WIN32_LEAN_AND_MEAN
  2858. // Cannot be LWSTDAPI because ddeml.h declares the function as STDAPI and not DLLIMPORT
  2859. STDAPI_(UINT) DdeInitializeWrapW(LPDWORD pidInst, PFNCALLBACK pfnCallback, DWORD afCmd, DWORD ulRes);
  2860. STDAPI_(HSZ) DdeCreateStringHandleWrapW(DWORD idInst, LPCWSTR psz, int iCodePage);
  2861. STDAPI_(DWORD) DdeQueryStringWrapW(DWORD idInst, HSZ hsz, LPWSTR psz, DWORD cchMax, int iCodePage);
  2862. LWSTDAPI_(BOOL) GetSaveFileNameWrapW(LPOPENFILENAMEW lpofn);
  2863. LWSTDAPI_(BOOL) GetOpenFileNameWrapW(LPOPENFILENAMEW lpofn);
  2864. LWSTDAPI_(BOOL) PrintDlgWrapW(LPPRINTDLGW lppd);
  2865. LWSTDAPI_(BOOL) PageSetupDlgWrapW(LPPAGESETUPDLGW lppsd);
  2866. #endif
  2867. LWSTDAPI_(void) SHChangeNotifyWrap(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2);
  2868. LWSTDAPI_(void) SHFlushSFCacheWrap(void);
  2869. LWSTDAPI_(BOOL) ShellExecuteExWrapW(struct _SHELLEXECUTEINFOW * pExecInfoW);
  2870. LWSTDAPI_(int) SHFileOperationWrapW(struct _SHFILEOPSTRUCTW * pFileOpW);
  2871. LWSTDAPI_(UINT) ExtractIconExWrapW(LPCWSTR pwzFile, int nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons);
  2872. LWSTDAPI_(BOOL) SetFileAttributesWrapW(LPCWSTR pwzFile, DWORD dwFileAttributes);
  2873. LWSTDAPI_(int) GetNumberFormatWrapW(LCID Locale, DWORD dwFlags, LPCWSTR pwzValue, CONST NUMBERFMTW * pFormatW, LPWSTR pwzNumberStr, int cchNumber);
  2874. LWSTDAPI_(int) MessageBoxWrapW(HWND hwnd, LPCWSTR pwzText, LPCWSTR pwzCaption, UINT uType);
  2875. LWSTDAPI_(BOOL) FindNextFileWrapW(HANDLE hSearchHandle, LPWIN32_FIND_DATAW pFindFileDataW);
  2876. #ifdef UNICODE
  2877. #define IsCharAlphaWrap IsCharAlphaWrapW
  2878. #define IsCharUpperWrap IsCharUpperWrapW
  2879. #define IsCharLowerWrap IsCharLowerWrapW
  2880. #define IsCharAlphaNumericWrap IsCharAlphaNumericWrapW
  2881. #define AppendMenuWrap AppendMenuWrapW
  2882. #ifdef POST_IE5_BETA
  2883. #define CallMsgFilterWrap CallMsgFilterWrapW
  2884. #endif
  2885. #define CallWindowProcWrap CallWindowProcWrapW
  2886. #define CharLowerWrap CharLowerWrapW
  2887. #define CharLowerBuffWrap CharLowerBuffWrapW
  2888. #define CharNextWrap CharNextWrapW
  2889. #define CharPrevWrap CharPrevWrapW
  2890. #define CharToOemWrap CharToOemWrapW
  2891. #define CharUpperWrap CharUpperWrapW
  2892. #define CharUpperBuffWrap CharUpperBuffWrapW
  2893. #define CompareStringWrap CompareStringWrapW
  2894. #define CopyAcceleratorTableWrap CopyAcceleratorTableWrapW
  2895. #define CreateAcceleratorTableWrap CreateAcceleratorTableWrapW
  2896. #define CreateDCWrap CreateDCWrapW
  2897. #define CreateDirectoryWrap CreateDirectoryWrapW
  2898. #define CreateEventWrap CreateEventWrapW
  2899. #define CreateFontWrap CreateFontWrapW
  2900. #define CreateFileWrap CreateFileWrapW
  2901. #define CreateFontIndirectWrap CreateFontIndirectWrapW
  2902. #define CreateICWrap CreateICWrapW
  2903. #define CreateMetaFileWrap CreateMetaFileWrapW
  2904. #define CreateMutexWrap CreateMutexWrapW
  2905. #define CreateSemaphoreWrap CreateSemaphoreWrapW
  2906. #define CreateWindowExWrap CreateWindowExWrapW
  2907. #define DefWindowProcWrap DefWindowProcWrapW
  2908. #define DeleteFileWrap DeleteFileWrapW
  2909. #define DispatchMessageWrap DispatchMessageWrapW
  2910. #define DrawTextExWrap DrawTextExWrapW
  2911. #define DrawTextWrap DrawTextWrapW
  2912. #define EnumFontFamiliesWrap EnumFontFamiliesWrapW
  2913. #define EnumFontFamiliesExWrap EnumFontFamiliesExWrapW
  2914. #define EnumResourceNamesWrap EnumResourceNamesWrapW
  2915. #define ExpandEnvironmentStringsWrap ExpandEnvironmentStringsWrapW
  2916. #define ExtractIconExWrap ExtractIconExWrapW
  2917. #define ExtTextOutWrap ExtTextOutW
  2918. #define FindFirstFileWrap FindFirstFileWrapW
  2919. #define FindNextFileWrap FindNextFileWrapW
  2920. #define FindResourceWrap FindResourceWrapW
  2921. #define FindWindowWrap FindWindowWrapW
  2922. #define FindWindowExWrap FindWindowExWrapW
  2923. #define FormatMessageWrap FormatMessageWrapW
  2924. #define GetClassInfoWrap GetClassInfoWrapW
  2925. #define GetClassInfoExWrap GetClassInfoExWrapW
  2926. #define GetClassLongWrap GetClassLongWrapW
  2927. #define GetClassNameWrap GetClassNameWrapW
  2928. #define GetClipboardFormatNameWrap GetClipboardFormatNameWrapW
  2929. #define GetCurrentDirectoryWrap GetCurrentDirectoryWrapW
  2930. #define GetDlgItemTextWrap GetDlgItemTextWrapW
  2931. #define GetFileAttributesWrap GetFileAttributesWrapW
  2932. #define GetFullPathNameWrap GetFullPathNameWrapW
  2933. #define GetLocaleInfoWrap GetLocaleInfoWrapW
  2934. #define GetMenuItemInfoWrap GetMenuItemInfoWrapW
  2935. #define GetMenuStringWrap GetMenuStringWrapW
  2936. #define GetMessageWrap GetMessageWrapW
  2937. #define GetModuleFileNameWrap GetModuleFileNameWrapW
  2938. #define GetNumberFormatWrap GetNumberFormatWrapW
  2939. #define GetSystemDirectoryWrap GetSystemDirectoryWrapW
  2940. #define GetEnvironmentVariableWrap GetEnvironmentVariableWrapW
  2941. #define GetModuleHandleWrap GetModuleHandleWrapW
  2942. #define GetObjectWrap GetObjectWrapW
  2943. #define GetPrivateProfileIntWrap GetPrivateProfileIntWrapW
  2944. #define GetProfileStringWrap GetProfileStringWrapW
  2945. #define GetPrivateProfileStringWrap GetPrivateProfileStringWrapW
  2946. #define WritePrivateProfileStringWrap WritePrivateProfileStringWrapW
  2947. #define GetPropWrap GetPropWrapW
  2948. #define GetStringTypeExWrap GetStringTypeExWrapW
  2949. #define GetTempFileNameWrap GetTempFileNameWrapW
  2950. #define GetTempPathWrap GetTempPathWrapW
  2951. #define GetTextExtentPoint32Wrap GetTextExtentPoint32WrapW
  2952. #define GetTextFaceWrap GetTextFaceWrapW
  2953. #define GetTextMetricsWrap GetTextMetricsWrapW
  2954. #define GetTimeFormatWrap GetTimeFormatWrapW
  2955. #define GetDateFormatWrap GetDateFormatWrapW
  2956. #define GetUserNameWrap GetUserNameWrapW
  2957. #define GetWindowLongWrap GetWindowLongWrapW
  2958. #define GetWindowTextWrap GetWindowTextWrapW
  2959. #define GetWindowTextLengthWrap GetWindowTextLengthWrapW
  2960. #define GetWindowsDirectoryWrap GetWindowsDirectoryWrapW
  2961. #define InsertMenuItemWrap InsertMenuItemWrapW
  2962. #define InsertMenuWrap InsertMenuWrapW
  2963. #define IsBadStringPtrWrap IsBadStringPtrWrapW
  2964. #define IsDialogMessageWrap IsDialogMessageWrapW
  2965. #define LoadAcceleratorsWrap LoadAcceleratorsWrapW
  2966. #define LoadBitmapWrap LoadBitmapWrapW
  2967. #define LoadCursorWrap LoadCursorWrapW
  2968. #define LoadIconWrap LoadIconWrapW
  2969. #define LoadImageWrap LoadImageWrapW
  2970. #define LoadLibraryWrap LoadLibraryWrapW
  2971. #define LoadLibraryExWrap LoadLibraryExWrapW
  2972. #define LoadMenuWrap LoadMenuWrapW
  2973. #define LoadStringWrap LoadStringWrapW
  2974. #define MessageBoxIndirectWrap MessageBoxIndirectWrapW
  2975. #define MessageBoxWrap MessageBoxWrapW
  2976. #define ModifyMenuWrap ModifyMenuWrapW
  2977. #define GetCharWidth32Wrap GetCharWidth32WrapW
  2978. #define GetCharacterPlacementWrap GetCharacterPlacementWrapW
  2979. #define CopyFileWrap CopyFileWrapW
  2980. #define MoveFileWrap MoveFileWrapW
  2981. #define OemToCharWrap OemToCharWrapW
  2982. #define OutputDebugStringWrap OutputDebugStringWrapW
  2983. #define PeekMessageWrap PeekMessageWrapW
  2984. #define PostMessageWrap PostMessageWrapW
  2985. #define PostThreadMessageWrap PostThreadMessageWrapW
  2986. #define RegCreateKeyWrap RegCreateKeyWrapW
  2987. #define RegCreateKeyExWrap RegCreateKeyExWrapW
  2988. #define RegDeleteKeyWrap RegDeleteKeyWrapW
  2989. #define RegDeleteValueWrap RegDeleteValueWrapW
  2990. #define RegEnumKeyWrap RegEnumKeyWrapW
  2991. #define RegEnumKeyExWrap RegEnumKeyExWrapW
  2992. #define RegOpenKeyWrap RegOpenKeyWrapW
  2993. #define RegOpenKeyExWrap RegOpenKeyExWrapW
  2994. #define RegQueryInfoKeyWrap RegQueryInfoKeyWrapW
  2995. #define RegQueryValueWrap RegQueryValueWrapW
  2996. #define RegQueryValueExWrap RegQueryValueExWrapW
  2997. #define RegSetValueWrap RegSetValueWrapW
  2998. #define RegSetValueExWrap RegSetValueExWrapW
  2999. #define RegisterClassWrap RegisterClassWrapW
  3000. #define RegisterClassExWrap RegisterClassExWrapW
  3001. #define RegisterClipboardFormatWrap RegisterClipboardFormatWrapW
  3002. #define RegisterWindowMessageWrap RegisterWindowMessageWrapW
  3003. #define RemovePropWrap RemovePropWrapW
  3004. #define SearchPathWrap SearchPathWrapW
  3005. #define SendDlgItemMessageWrap SendDlgItemMessageWrapW
  3006. #define SendMessageWrap SendMessageWrapW
  3007. #define SendMessageTimeoutWrap SendMessageTimeoutWrapW
  3008. #define SetCurrentDirectoryWrap SetCurrentDirectoryWrapW
  3009. #define SetDlgItemTextWrap SetDlgItemTextWrapW
  3010. #define SetMenuItemInfoWrap SetMenuItemInfoWrapW
  3011. #define SetPropWrap SetPropWrapW
  3012. #define SetFileAttributesWrap SetFileAttributesWrapW
  3013. #define SetWindowLongWrap SetWindowLongWrapW
  3014. #define SetWindowsHookExWrap SetWindowsHookExWrapW
  3015. #define SHBrowseForFolderWrap SHBrowseForFolderWrapW
  3016. #define ShellExecuteExWrap ShellExecuteExWrapW
  3017. #define SHFileOperationWrap SHFileOperationWrapW
  3018. #define SHGetFileInfoWrap SHGetFileInfoWrapW
  3019. #define SHGetPathFromIDListWrap SHGetPathFromIDListWrapW
  3020. #define StartDocWrap StartDocWrapW
  3021. #define SystemParametersInfoWrap SystemParametersInfoWrapW
  3022. #define TranslateAcceleratorWrap TranslateAcceleratorWrapW
  3023. #define UnregisterClassWrap UnregisterClassWrapW
  3024. #define VkKeyScanWrap VkKeyScanWrapW
  3025. #define WinHelpWrap WinHelpWrapW
  3026. #define WNetRestoreConnectionWrap WNetRestoreConnectionWrapW
  3027. #define WNetGetLastErrorWrap WNetGetLastErrorWrapW
  3028. #define wvsprintfWrap wvsprintfWrapW
  3029. #define CreateFontWrap CreateFontWrapW
  3030. #define DrawTextExWrap DrawTextExWrapW
  3031. #define GetMenuItemInfoWrap GetMenuItemInfoWrapW
  3032. #define SetMenuItemInfoWrap SetMenuItemInfoWrapW
  3033. #define InsertMenuItemWrap InsertMenuItemWrapW
  3034. #define DragQueryFileWrap DragQueryFileWrapW
  3035. #else
  3036. #define IsCharAlphaWrap IsCharAlphaA
  3037. #define IsCharUpperWrap IsCharUpperA
  3038. #define IsCharLowerWrap IsCharLowerA
  3039. #define IsCharAlphaNumericWrap IsCharAlphaNumericA
  3040. #define AppendMenuWrap AppendMenuA
  3041. #ifdef POST_IE5_BETA
  3042. #define CallMsgFilterWrap CallMsgFilterA
  3043. #endif
  3044. #define CallWindowProcWrap CallWindowProcA
  3045. #define CharLowerWrap CharLowerA
  3046. #define CharLowerBuffWrap CharLowerBuffA
  3047. #define CharNextWrap CharNextA
  3048. #define CharPrevWrap CharPrevA
  3049. #define CharToOemWrap CharToOemA
  3050. #define CharUpperWrap CharUpperA
  3051. #define CharUpperBuffWrap CharUpperBuffA
  3052. #define CompareStringWrap CompareStringA
  3053. #define CopyAcceleratorTableWrap CopyAcceleratorTableA
  3054. #define CreateAcceleratorTableWrap CreateAcceleratorTableA
  3055. #define CreateDCWrap CreateDCA
  3056. #define CreateDirectoryWrap CreateDirectoryA
  3057. #define CreateEventWrap CreateEventA
  3058. #define CreateFontWrap CreateFontA
  3059. #define CreateFileWrap CreateFileA
  3060. #define CreateFontIndirectWrap CreateFontIndirectA
  3061. #define CreateICWrap CreateICA
  3062. #define CreateMetaFileWrap CreateMetaFileA
  3063. #define CreateMutexWrap CreateMutexA
  3064. #define CreateSemaphoreWrap CreateSemaphoreA
  3065. #define CreateWindowExWrap CreateWindowExA
  3066. #define DefWindowProcWrap DefWindowProcA
  3067. #define DeleteFileWrap DeleteFileA
  3068. #define DispatchMessageWrap DispatchMessageA
  3069. #define DrawTextExWrap DrawTextExA
  3070. #define DrawTextWrap DrawTextA
  3071. #define EnumFontFamiliesWrap EnumFontFamiliesA
  3072. #define EnumFontFamiliesExWrap EnumFontFamiliesExA
  3073. #define EnumResourceNamesWrap EnumResourceNamesA
  3074. #define ExpandEnvironmentStringsWrap ExpandEnvironmentStringsA
  3075. #define ExtractIconExWrap ExtractIconExA
  3076. #define ExtTextOutWrap ExtTextOutA
  3077. #define FindFirstFileWrap FindFirstFileA
  3078. #define FindResourceWrap FindResourceA
  3079. #define FindNextFileWrap FindNextFileA
  3080. #define FindWindowWrap FindWindowA
  3081. #define FindWindowExWrap FindWindowExA
  3082. #define FormatMessageWrap FormatMessageA
  3083. #define GetClassInfoWrap GetClassInfoA
  3084. #define GetClassInfoExWrap GetClassInfoExA
  3085. #define GetClassLongWrap GetClassLongA
  3086. #define GetClassNameWrap GetClassNameA
  3087. #define GetClipboardFormatNameWrap GetClipboardFormatNameA
  3088. #define GetCurrentDirectoryWrap GetCurrentDirectoryA
  3089. #define GetDlgItemTextWrap GetDlgItemTextA
  3090. #define GetFileAttributesWrap GetFileAttributesA
  3091. #define GetFullPathNameWrap GetFullPathNameA
  3092. #define GetLocaleInfoWrap GetLocaleInfoA
  3093. #define GetMenuItemInfoWrap GetMenuItemInfoA
  3094. #define GetMenuStringWrap GetMenuStringA
  3095. #define GetMessageWrap GetMessageA
  3096. #define GetModuleFileNameWrap GetModuleFileNameA
  3097. #define GetNumberFormatWrap GetNumberFormatA
  3098. #define GetPrivateProfileStringWrap GetPrivateProfileStringA
  3099. #define WritePrivateProfileStringWrap WritePrivateProfileStringA
  3100. #define GetSystemDirectoryWrap GetSystemDirectoryA
  3101. #define GetEnvironmentVariableWrap GetEnvironmentVariableA
  3102. #define SearchPathWrap SearchPathA
  3103. #define GetModuleHandleWrap GetModuleHandleA
  3104. #define GetObjectWrap GetObjectA
  3105. #define GetPrivateProfileIntWrap GetPrivateProfileIntA
  3106. #define GetProfileStringWrap GetProfileStringA
  3107. #define GetPropWrap GetPropA
  3108. #define GetStringTypeExWrap GetStringTypeExA
  3109. #define GetTempFileNameWrap GetTempFileNameA
  3110. #define GetTempPathWrap GetTempPathA
  3111. #define GetTextExtentPoint32Wrap GetTextExtentPoint32A
  3112. #define GetTextFaceWrap GetTextFaceA
  3113. #define GetTextMetricsWrap GetTextMetricsA
  3114. #define GetTimeFormatWrap GetTimeFormatA
  3115. #define GetDateFormatWrap GetDateFormatA
  3116. #define GetUserNameWrap GetUserNameA
  3117. #define GetWindowLongWrap GetWindowLongA
  3118. #define GetWindowTextWrap GetWindowTextA
  3119. #define GetWindowTextLengthWrap GetWindowTextLengthA
  3120. #define GetWindowsDirectoryWrap GetWindowsDirectoryA
  3121. #define InsertMenuItemWrap InsertMenuItemA
  3122. #define InsertMenuWrap InsertMenuA
  3123. #define IsBadStringPtrWrap IsBadStringPtrA
  3124. #define IsDialogMessageWrap IsDialogMessageA
  3125. #define LoadAcceleratorsWrap LoadAcceleratorsA
  3126. #define LoadBitmapWrap LoadBitmapA
  3127. #define LoadCursorWrap LoadCursorA
  3128. #define LoadIconWrap LoadIconA
  3129. #define LoadImageWrap LoadImageWrapA
  3130. #define LoadLibraryWrap LoadLibraryA
  3131. #define LoadLibraryExWrap LoadLibraryExA
  3132. #define LoadMenuWrap LoadMenuA
  3133. #define LoadStringWrap LoadStringA
  3134. #define MessageBoxIndirectWrap MessageBoxIndirectA
  3135. #define MessageBoxWrap MessageBoxA
  3136. #define ModifyMenuWrap ModifyMenuA
  3137. #define GetCharWidth32Wrap GetCharWidth32A
  3138. #define GetCharacterPlacementWrap GetCharacterPlacementA
  3139. #define CopyFileWrap CopyFileA
  3140. #define MoveFileWrap MoveFileA
  3141. #define OemToCharWrap OemToCharA
  3142. #define OutputDebugStringWrap OutputDebugStringA
  3143. #define PeekMessageWrap PeekMessageA
  3144. #define PostMessageWrap PostMessageA
  3145. #define PostThreadMessageWrap PostThreadMessageA
  3146. #define RegCreateKeyWrap RegCreateKeyA
  3147. #define RegCreateKeyExWrap RegCreateKeyExA
  3148. #define RegDeleteKeyWrap RegDeleteKeyA
  3149. #define RegDeleteValueWrap RegDeleteValueA
  3150. #define RegEnumKeyWrap RegEnumKeyA
  3151. #define RegEnumKeyExWrap RegEnumKeyExA
  3152. #define RegOpenKeyWrap RegOpenKeyA
  3153. #define RegOpenKeyExWrap RegOpenKeyExA
  3154. #define RegQueryInfoKeyWrap RegQueryInfoKeyA
  3155. #define RegQueryValueWrap RegQueryValueA
  3156. #define RegQueryValueExWrap RegQueryValueExA
  3157. #define RegSetValueWrap RegSetValueA
  3158. #define RegSetValueExWrap RegSetValueExA
  3159. #define RegisterClassWrap RegisterClassA
  3160. #define RegisterClassExWrap RegisterClassExA
  3161. #define RegisterClipboardFormatWrap RegisterClipboardFormatA
  3162. #define RegisterWindowMessageWrap RegisterWindowMessageA
  3163. #define RemovePropWrap RemovePropA
  3164. #define SendDlgItemMessageWrap SendDlgItemMessageA
  3165. #define SendMessageWrap SendMessageA
  3166. #define SendMessageTimeoutWrap SendMessageTimeoutA
  3167. #define SetCurrentDirectoryWrap SetCurrentDirectoryA
  3168. #define SetDlgItemTextWrap SetDlgItemTextA
  3169. #define SetMenuItemInfoWrap SetMenuItemInfoA
  3170. #define SetPropWrap SetPropA
  3171. #define SetWindowLongWrap SetWindowLongA
  3172. #define SHBrowseForFolderWrap SHBrowseForFolderA
  3173. #define ShellExecuteExWrap ShellExecuteExA
  3174. #define SHFileOperationWrap SHFileOperationA
  3175. #define SHGetFileInfoWrap SHGetFileInfoA
  3176. #define SHGetPathFromIDListWrap SHGetPathFromIDListA
  3177. #define SetFileAttributesWrap SetFileAttributesA
  3178. #define SetWindowsHookExWrap SetWindowsHookExA
  3179. #define StartDocWrap StartDocA
  3180. #define SystemParametersInfoWrap SystemParametersInfoA
  3181. #define TranslateAcceleratorWrap TranslateAcceleratorA
  3182. #define UnregisterClassWrap UnregisterClassA
  3183. #define VkKeyScanWrap VkKeyScanA
  3184. #define WinHelpWrap WinHelpA
  3185. #define WNetRestoreConnectionWrap WNetRestoreConnectionA
  3186. #define WNetGetLastErrorWrap WNetGetLastErrorA
  3187. #define wvsprintfWrap wvsprintfA
  3188. #define CreateFontWrap CreateFontA
  3189. #define DrawTextExWrap DrawTextExA
  3190. #define GetMenuItemInfoWrap GetMenuItemInfoA
  3191. #define SetMenuItemInfoWrap SetMenuItemInfoA
  3192. #define InsertMenuItemWrap InsertMenuItemA
  3193. #define DragQueryFileWrap DragQueryFileA
  3194. #endif
  3195. #endif // (_WIN32_IE >= 0x0500) && !defined(NO_SHLWAPI_UNITHUNK)
  3196. #if defined(UNIX) && defined(NO_SHLWAPI_UNITHUNK)
  3197. #define SHFlushSFCacheWrap()
  3198. #ifdef UNICODE
  3199. #define IsCharAlphaWrapW IsCharAlphaW
  3200. #define IsCharUpperWrapW IsCharUpperW
  3201. #define IsCharLowerWrapW IsCharLowerW
  3202. #define IsCharAlphaNumericWrapW IsCharAlphaNumericW
  3203. #define AppendMenuWrapW AppendMenuW
  3204. #ifdef POST_IE5_BETA
  3205. #define CallMsgFilterWrapW CallMsgFilterW
  3206. #endif
  3207. #define CallWindowProcWrapW CallWindowProcW
  3208. #define CharLowerWrapW CharLowerW
  3209. #define CharLowerBuffWrapW CharLowerBuffW
  3210. #define CharNextWrapW CharNextW
  3211. #define CharPrevWrapW CharPrevW
  3212. #define CharToOemWrapW CharToOemW
  3213. #define CharUpperWrapW CharUpperW
  3214. #define CharUpperBuffWrapW CharUpperBuffW
  3215. #define CompareStringWrapW CompareStringW
  3216. #define CopyAcceleratorTableWrapW CopyAcceleratorTableW
  3217. #define CreateAcceleratorTableWrapW CreateAcceleratorTableW
  3218. #define CreateDCWrapW CreateDCW
  3219. #define CreateDirectoryWrapW CreateDirectoryW
  3220. #define CreateEventWrapW CreateEventW
  3221. #define CreateFontWrapW CreateFontW
  3222. #define CreateFileWrapW CreateFileW
  3223. #define CreateFontIndirectWrapW CreateFontIndirectW
  3224. #define CreateICWrapW CreateICW
  3225. #define CreateMetaFileWrapW CreateMetaFileW
  3226. #define CreateMutexWrapW CreateMutexW
  3227. #define CreateSemaphoreWrapW CreateSemaphoreW
  3228. #define CreateWindowExWrapW CreateWindowExW
  3229. #define DefWindowProcWrapW DefWindowProcW
  3230. #define DeleteFileWrapW DeleteFileW
  3231. #define DispatchMessageWrapW DispatchMessageW
  3232. #define DrawTextExWrapW DrawTextExW
  3233. #define DrawTextWrapW DrawTextW
  3234. #define EnumFontFamiliesWrapW EnumFontFamiliesW
  3235. #define EnumFontFamiliesExWrapW EnumFontFamiliesExW
  3236. #define EnumResourceNamesWrapW EnumResourceNamesW
  3237. #define ExpandEnvironmentStringsWrapW ExpandEnvironmentStringsW
  3238. #define ExtractIconExWrapW ExtractIconExW
  3239. #define ExtTextOutWrapW ExtTextOutW
  3240. #define FindFirstFileWrapW FindFirstFileW
  3241. #define FindNextFileWrapW FindNextFileW
  3242. #define FindResourceWrapW FindResourceW
  3243. #define FindWindowWrapW FindWindowW
  3244. #define FindWindowExWrapW FindWindowExW
  3245. #define FormatMessageWrapW FormatMessageW
  3246. #define GetClassInfoWrapW GetClassInfoW
  3247. #define GetClassInfoExWrapW GetClassInfoExW
  3248. #define GetClassLongWrapW GetClassLongW
  3249. #define GetClassNameWrapW GetClassNameW
  3250. #define GetClipboardFormatNameWrapW GetClipboardFormatNameW
  3251. #define GetCurrentDirectoryWrapW GetCurrentDirectoryW
  3252. #define GetDlgItemTextWrapW GetDlgItemTextW
  3253. #define GetFileAttributesWrapW GetFileAttributesW
  3254. #define GetFullPathNameWrapW GetFullPathNameW
  3255. #define GetLocaleInfoWrapW GetLocaleInfoW
  3256. #define GetMenuStringWrapW GetMenuStringW
  3257. #define GetMessageWrapW GetMessageW
  3258. #define GetModuleFileNameWrapW GetModuleFileNameW
  3259. #define GetNumberFormatWrapW GetNumberFormatW
  3260. #define GetSystemDirectoryWrapW GetSystemDirectoryW
  3261. #define GetModuleHandleWrapW GetModuleHandleW
  3262. #define GetObjectWrapW GetObjectW
  3263. #define GetPrivateProfileIntWrapW GetPrivateProfileIntW
  3264. #define GetProfileStringWrapW GetProfileStringW
  3265. #define GetPrivateProfileStringWrapW GetPrivateProfileStringW
  3266. #define WritePrivateProfileStringWrapW WritePrivateProfileStringW
  3267. #define GetPropWrapW GetPropW
  3268. #define GetStringTypeExWrapW GetStringTypeExW
  3269. #define GetTempFileNameWrapW GetTempFileNameW
  3270. #define GetTempPathWrapW GetTempPathW
  3271. #define GetTextExtentPoint32WrapW GetTextExtentPoint32W
  3272. #define GetTextFaceWrapW GetTextFaceW
  3273. #define GetTextMetricsWrapW GetTextMetricsW
  3274. #define GetTimeFormatWrapW GetTimeFormatW
  3275. #define GetDateFormatWrapW GetDateFormatW
  3276. #define GetUserNameWrapW GetUserNameW
  3277. #define GetWindowLongWrapW GetWindowLongW
  3278. #define GetWindowTextWrapW GetWindowTextW
  3279. #define GetWindowTextLengthWrapW GetWindowTextLengthW
  3280. #define GetWindowsDirectoryWrapW GetWindowsDirectoryW
  3281. #define InsertMenuItemWrapW InsertMenuItemW
  3282. #define InsertMenuWrapW InsertMenuW
  3283. #define IsBadStringPtrWrapW IsBadStringPtrW
  3284. #define IsDialogMessageWrapW IsDialogMessageW
  3285. #define LoadAcceleratorsWrapW LoadAcceleratorsW
  3286. #define LoadBitmapWrapW LoadBitmapW
  3287. #define LoadCursorWrapW LoadCursorW
  3288. #define LoadIconWrapW LoadIconW
  3289. #define LoadImageWrapW LoadImageW
  3290. #define LoadLibraryWrapW LoadLibraryW
  3291. #define LoadLibraryExWrapW LoadLibraryExW
  3292. #define LoadMenuWrapW LoadMenuW
  3293. #define LoadStringWrapW LoadStringW
  3294. #define MessageBoxIndirectWrapW MessageBoxIndirectW
  3295. #define MessageBoxWrapW MessageBoxW
  3296. #define ModifyMenuWrapW ModifyMenuW
  3297. #define GetCharWidth32WrapW GetCharWidth32W
  3298. #define GetCharacterPlacementWrapW GetCharacterPlacementW
  3299. #define CopyFileWrapW CopyFileW
  3300. #define MoveFileWrapW MoveFileW
  3301. #define OemToCharWrapW OemToCharW
  3302. #define OutputDebugStringWrapW OutputDebugStringW
  3303. #define PeekMessageWrapW PeekMessageW
  3304. #define PostMessageWrapW PostMessageW
  3305. #define PostThreadMessageWrapW PostThreadMessageW
  3306. #define RegCreateKeyWrapW RegCreateKeyW
  3307. #define RegCreateKeyExWrapW RegCreateKeyExW
  3308. #define RegDeleteKeyWrapW RegDeleteKeyW
  3309. #define RegDeleteValueWrapW RegDeleteValueW
  3310. #define RegEnumKeyWrapW RegEnumKeyW
  3311. #define RegEnumKeyExWrapW RegEnumKeyExW
  3312. #define RegOpenKeyWrapW RegOpenKeyW
  3313. #define RegOpenKeyExWrapW RegOpenKeyExW
  3314. #define RegQueryInfoKeyWrapW RegQueryInfoKeyW
  3315. #define RegQueryValueWrapW RegQueryValueW
  3316. #define RegQueryValueExWrapW RegQueryValueExW
  3317. #define RegSetValueWrapW RegSetValueW
  3318. #define RegSetValueExWrapW RegSetValueExW
  3319. #define RegisterClassWrapW RegisterClassW
  3320. #define RegisterClassExWrapW RegisterClassExW
  3321. #define RegisterClipboardFormatWrapWRegisterClipboardFormatW
  3322. #define RegisterWindowMessageWrapW RegisterWindowMessageW
  3323. #define RemovePropWrapW RemovePropW
  3324. #define SearchPathWrapW SearchPathW
  3325. #define SendDlgItemMessageWrapW SendDlgItemMessageW
  3326. #define SendMessageWrapW SendMessageW
  3327. #define SetCurrentDirectoryWrapW SetCurrentDirectoryW
  3328. #define SetDlgItemTextWrapW SetDlgItemTextW
  3329. #define SetMenuItemInfoWrapW SetMenuItemInfoW
  3330. #define SetPropWrapW SetPropW
  3331. #define SetFileAttributesWrapW SetFileAttributesW
  3332. #define SetWindowLongWrapW SetWindowLongW
  3333. #define SetWindowsHookExWrapW SetWindowsHookExW
  3334. #define SHBrowseForFolderWrapW SHBrowseForFolderW
  3335. #define ShellExecuteExWrapW ShellExecuteExW
  3336. #define SHFileOperationWrapW SHFileOperationW
  3337. #define SHGetFileInfoWrapW SHGetFileInfoW
  3338. #define SHGetPathFromIDListWrapW SHGetPathFromIDListW
  3339. #define StartDocWrapW StartDocW
  3340. #define SystemParametersInfoWrapW SystemParametersInfoW
  3341. #define TranslateAcceleratorWrapW TranslateAcceleratorW
  3342. #define UnregisterClassWrapW UnregisterClassW
  3343. #define VkKeyScanWrapW VkKeyScanW
  3344. #define WinHelpWrapW WinHelpW
  3345. #define WNetRestoreConnectionWrapW WNetRestoreConnectionW
  3346. #define WNetGetLastErrorWrapW WNetGetLastErrorW
  3347. #define wvsprintfWrapW wvsprintfW
  3348. #define CreateFontWrapW CreateFontW
  3349. #define DrawTextExWrapW DrawTextExW
  3350. #define SetMenuItemInfoWrapW SetMenuItemInfoW
  3351. #define InsertMenuItemWrapW InsertMenuItemW
  3352. #define DragQueryFileWrapW DragQueryFileW
  3353. #define IsCharAlphaWrap IsCharAlphaW
  3354. #define IsCharUpperWrap IsCharUpperW
  3355. #define IsCharLowerWrap IsCharLowerW
  3356. #define IsCharAlphaNumericWrap IsCharAlphaNumericW
  3357. #define AppendMenuWrap AppendMenuW
  3358. #ifdef POST_IE5_BETA
  3359. #define CallMsgFilterWrap CallMsgFilterW
  3360. #endif
  3361. #define CallWindowProcWrap CallWindowProcW
  3362. #define CharLowerWrap CharLowerW
  3363. #define CharLowerBuffWrap CharLowerBuffW
  3364. #define CharNextWrap CharNextW
  3365. #define CharPrevWrap CharPrevW
  3366. #define CharToOemWrap CharToOemW
  3367. #define CharUpperWrap CharUpperW
  3368. #define CharUpperBuffWrap CharUpperBuffW
  3369. #define CompareStringWrap CompareStringW
  3370. #define CopyAcceleratorTableWrap CopyAcceleratorTableW
  3371. #define CreateAcceleratorTableWrap CreateAcceleratorTableW
  3372. #define CreateDCWrap CreateDCW
  3373. #define CreateDirectoryWrap CreateDirectoryW
  3374. #define CreateEventWrap CreateEventW
  3375. #define CreateFontWrap CreateFontW
  3376. #define CreateFileWrap CreateFileW
  3377. #define CreateFontIndirectWrap CreateFontIndirectW
  3378. #define CreateICWrap CreateICW
  3379. #define CreateMetaFileWrap CreateMetaFileW
  3380. #define CreateMutexWrap CreateMutexW
  3381. #define CreateSemaphoreWrap CreateSemaphoreW
  3382. #define CreateWindowExWrap CreateWindowExW
  3383. #define DefWindowProcWrap DefWindowProcW
  3384. #define DeleteFileWrap DeleteFileW
  3385. #define DispatchMessageWrap DispatchMessageW
  3386. #define DrawTextExWrap DrawTextExW
  3387. #define DrawTextWrap DrawTextW
  3388. #define EnumFontFamiliesWrap EnumFontFamiliesW
  3389. #define EnumFontFamiliesExWrap EnumFontFamiliesExW
  3390. #define EnumResourceNamesWrap EnumResourceNamesW
  3391. #define ExpandEnvironmentStringsWrap ExpandEnvironmentStringsW
  3392. #define ExtractIconExWrap ExtractIconExW
  3393. #define ExtTextOutWrap ExtTextOutW
  3394. #define FindFirstFileWrap FindFirstFileW
  3395. #define FindNextFileWrap FindNextFileW
  3396. #define FindResourceWrap FindResourceW
  3397. #define FindWindowWrap FindWindowW
  3398. #define FindWindowExWrap FindWindowExW
  3399. #define FormatMessageWrap FormatMessageW
  3400. #define GetClassInfoWrap GetClassInfoW
  3401. #define GetClassInfoExWrap GetClassInfoExW
  3402. #define GetClassLongWrap GetClassLongW
  3403. #define GetClassNameWrap GetClassNameW
  3404. #define GetClipboardFormatNameWrap GetClipboardFormatNameW
  3405. #define GetCurrentDirectoryWrap GetCurrentDirectoryW
  3406. #define GetDlgItemTextWrap GetDlgItemTextW
  3407. #define GetFileAttributesWrap GetFileAttributesW
  3408. #define GetFullPathNameWrap GetFullPathNameW
  3409. #define GetLocaleInfoWrap GetLocaleInfoW
  3410. #define GetMenuItemInfoWrap GetMenuItemInfoWrapW
  3411. #define GetMenuStringWrap GetMenuStringW
  3412. #define GetMessageWrap GetMessageW
  3413. #define GetModuleFileNameWrap GetModuleFileNameW
  3414. #define GetNumberFormatWrap GetNumberFormatW
  3415. #define GetSystemDirectoryWrap GetSystemDirectoryW
  3416. #define GetModuleHandleWrap GetModuleHandleW
  3417. #define GetObjectWrap GetObjectW
  3418. #define GetPrivateProfileIntWrap GetPrivateProfileIntW
  3419. #define GetProfileStringWrap GetProfileStringW
  3420. #define GetPrivateProfileStringWrap GetPrivateProfileStringW
  3421. #define WritePrivateProfileStringWrap WritePrivateProfileStringW
  3422. #define GetPropWrap GetPropW
  3423. #define GetStringTypeExWrap GetStringTypeExW
  3424. #define GetTempFileNameWrap GetTempFileNameW
  3425. #define GetTempPathWrap GetTempPathW
  3426. #define GetTextExtentPoint32Wrap GetTextExtentPoint32W
  3427. #define GetTextFaceWrap GetTextFaceW
  3428. #define GetTextMetricsWrap GetTextMetricsW
  3429. #define GetTimeFormatWrap GetTimeFormatW
  3430. #define GetDateFormatWrap GetDateFormatW
  3431. #define GetUserNameWrap GetUserNameW
  3432. #define GetWindowLongWrap GetWindowLongW
  3433. #define GetWindowTextWrap GetWindowTextW
  3434. #define GetWindowTextLengthWrap GetWindowTextLengthW
  3435. #define GetWindowsDirectoryWrap GetWindowsDirectoryW
  3436. #define InsertMenuItemWrap InsertMenuItemW
  3437. #define InsertMenuWrap InsertMenuW
  3438. #define IsBadStringPtrWrap IsBadStringPtrW
  3439. #define IsDialogMessageWrap IsDialogMessageW
  3440. #define LoadAcceleratorsWrap LoadAcceleratorsW
  3441. #define LoadBitmapWrap LoadBitmapW
  3442. #define LoadCursorWrap LoadCursorW
  3443. #define LoadIconWrap LoadIconW
  3444. #define LoadImageWrap LoadImageW
  3445. #define LoadLibraryWrap LoadLibraryW
  3446. #define LoadLibraryExWrap LoadLibraryExW
  3447. #define LoadMenuWrap LoadMenuW
  3448. #define LoadStringWrap LoadStringW
  3449. #define MessageBoxIndirectWrap MessageBoxIndirectW
  3450. #define MessageBoxWrap MessageBoxW
  3451. #define ModifyMenuWrap ModifyMenuW
  3452. #define GetCharWidth32Wrap GetCharWidth32W
  3453. #define GetCharacterPlacementWrap GetCharacterPlacementW
  3454. #define CopyFileWrap CopyFileW
  3455. #define MoveFileWrap MoveFileW
  3456. #define OemToCharWrap OemToCharW
  3457. #define OutputDebugStringWrap OutputDebugStringW
  3458. #define PeekMessageWrap PeekMessageW
  3459. #define PostMessageWrap PostMessageW
  3460. #define PostThreadMessageWrap PostThreadMessageW
  3461. #define RegCreateKeyWrap RegCreateKeyW
  3462. #define RegCreateKeyExWrap RegCreateKeyExW
  3463. #define RegDeleteKeyWrap RegDeleteKeyW
  3464. #define RegDeleteValueWrap RegDeleteValueW
  3465. #define RegEnumKeyWrap RegEnumKeyW
  3466. #define RegEnumKeyExWrap RegEnumKeyExW
  3467. #define RegOpenKeyWrap RegOpenKeyW
  3468. #define RegOpenKeyExWrap RegOpenKeyExW
  3469. #define RegQueryInfoKeyWrap RegQueryInfoKeyW
  3470. #define RegQueryValueWrap RegQueryValueW
  3471. #define RegQueryValueExWrap RegQueryValueExW
  3472. #define RegSetValueWrap RegSetValueW
  3473. #define RegSetValueExWrap RegSetValueExW
  3474. #define RegisterClassWrap RegisterClassW
  3475. #define RegisterClassExWrap RegisterClassExW
  3476. #define RegisterClipboardFormatWrap RegisterClipboardFormatW
  3477. #define RegisterWindowMessageWrap RegisterWindowMessageW
  3478. #define RemovePropWrap RemovePropW
  3479. #define SearchPathWrap SearchPathW
  3480. #define SendDlgItemMessageWrap SendDlgItemMessageW
  3481. #define SendMessageWrap SendMessageW
  3482. #define SetCurrentDirectoryWrap SetCurrentDirectoryW
  3483. #define SetDlgItemTextWrap SetDlgItemTextW
  3484. #define SetMenuItemInfoWrap SetMenuItemInfoW
  3485. #define SetPropWrap SetPropW
  3486. #define SetFileAttributesWrap SetFileAttributesW
  3487. #define SetWindowLongWrap SetWindowLongW
  3488. #define SetWindowsHookExWrap SetWindowsHookExW
  3489. #define SHBrowseForFolderWrap SHBrowseForFolderW
  3490. #define ShellExecuteExWrap ShellExecuteExW
  3491. #define SHFileOperationWrap SHFileOperationW
  3492. #define SHGetFileInfoWrap SHGetFileInfoW
  3493. #define SHGetPathFromIDListWrap SHGetPathFromIDListW
  3494. #define StartDocWrap StartDocW
  3495. #define SystemParametersInfoWrap SystemParametersInfoW
  3496. #define TranslateAcceleratorWrap TranslateAcceleratorW
  3497. #define UnregisterClassWrap UnregisterClassW
  3498. #define VkKeyScanWrap VkKeyScanW
  3499. #define WinHelpWrap WinHelpW
  3500. #define WNetRestoreConnectionWrap WNetRestoreConnectionW
  3501. #define WNetGetLastErrorWrap WNetGetLastErrorW
  3502. #define wvsprintfWrap wvsprintfW
  3503. #define CreateFontWrap CreateFontW
  3504. #define DrawTextExWrap DrawTextExW
  3505. #define GetMenuItemInfoWrap GetMenuItemInfoWrapW
  3506. #define SetMenuItemInfoWrap SetMenuItemInfoW
  3507. #define InsertMenuItemWrap InsertMenuItemW
  3508. #define DragQueryFileWrap DragQueryFileW
  3509. #else
  3510. #define IsCharAlphaWrap IsCharAlphaA
  3511. #define IsCharUpperWrap IsCharUpperA
  3512. #define IsCharLowerWrap IsCharLowerA
  3513. #define IsCharAlphaNumericWrap IsCharAlphaNumericA
  3514. #define AppendMenuWrap AppendMenuA
  3515. #ifdef POST_IE5_BETA
  3516. #define CallMsgFilterWrap CallMsgFilterA
  3517. #endif
  3518. #define CallWindowProcWrap CallWindowProcA
  3519. #define CharLowerWrap CharLowerA
  3520. #define CharLowerBuffWrap CharLowerBuffA
  3521. #define CharNextWrap CharNextA
  3522. #define CharPrevWrap CharPrevA
  3523. #define CharToOemWrap CharToOemA
  3524. #define CharUpperWrap CharUpperA
  3525. #define CharUpperBuffWrap CharUpperBuffA
  3526. #define CompareStringWrap CompareStringA
  3527. #define CopyAcceleratorTableWrap CopyAcceleratorTableA
  3528. #define CreateAcceleratorTableWrap CreateAcceleratorTableA
  3529. #define CreateDCWrap CreateDCA
  3530. #define CreateDirectoryWrap CreateDirectoryA
  3531. #define CreateEventWrap CreateEventA
  3532. #define CreateFontWrap CreateFontA
  3533. #define CreateFileWrap CreateFileA
  3534. #define CreateFontIndirectWrap CreateFontIndirectA
  3535. #define CreateICWrap CreateICA
  3536. #define CreateMetaFileWrap CreateMetaFileA
  3537. #define CreateMutexWrap CreateMutexA
  3538. #define CreateSemaphoreWrap CreateSemaphoreA
  3539. #define CreateWindowExWrap CreateWindowExA
  3540. #define DefWindowProcWrap DefWindowProcA
  3541. #define DeleteFileWrap DeleteFileA
  3542. #define DispatchMessageWrap DispatchMessageA
  3543. #define DrawTextExWrap DrawTextExA
  3544. #define DrawTextWrap DrawTextA
  3545. #define EnumFontFamiliesWrap EnumFontFamiliesA
  3546. #define EnumFontFamiliesExWrap EnumFontFamiliesExA
  3547. #define EnumResourceNamesWrap EnumResourceNamesA
  3548. #define ExpandEnvironmentStringsWrap ExpandEnvironmentStringsA
  3549. #define ExtractIconExWrap ExtractIconExA
  3550. #define ExtTextOutWrap ExtTextOutA
  3551. #define FindFirstFileWrap FindFirstFileA
  3552. #define FindResourceWrap FindResourceA
  3553. #define FindNextFileWrap FindNextFileA
  3554. #define FindWindowWrap FindWindowA
  3555. #define FindWindowExWrap FindWindowExA
  3556. #define FormatMessageWrap FormatMessageA
  3557. #define GetClassInfoWrap GetClassInfoA
  3558. #define GetClassInfoExWrap GetClassInfoExA
  3559. #define GetClassLongWrap GetClassLongA
  3560. #define GetClassNameWrap GetClassNameA
  3561. #define GetClipboardFormatNameWrap GetClipboardFormatNameA
  3562. #define GetCurrentDirectoryWrap GetCurrentDirectoryA
  3563. #define GetDlgItemTextWrap GetDlgItemTextA
  3564. #define GetFileAttributesWrap GetFileAttributesA
  3565. #define GetFullPathNameWrap GetFullPathNameA
  3566. #define GetLocaleInfoWrap GetLocaleInfoA
  3567. #define GetMenuItemInfoWrap GetMenuItemInfoA
  3568. #define GetMenuStringWrap GetMenuStringA
  3569. #define GetMessageWrap GetMessageA
  3570. #define GetModuleFileNameWrap GetModuleFileNameA
  3571. #define GetNumberFormatWrap GetNumberFormatA
  3572. #define GetPrivateProfileStringWrap GetPrivateProfileStringA
  3573. #define WritePrivateProfileStringWrap WritePrivateProfileStringA
  3574. #define GetSystemDirectoryWrap GetSystemDirectoryA
  3575. #define SearchPathWrap SearchPathA
  3576. #define GetModuleHandleWrap GetModuleHandleA
  3577. #define GetObjectWrap GetObjectA
  3578. #define GetPrivateProfileIntWrap GetPrivateProfileIntA
  3579. #define GetProfileStringWrap GetProfileStringA
  3580. #define GetPropWrap GetPropA
  3581. #define GetStringTypeExWrap GetStringTypeExA
  3582. #define GetTempFileNameWrap GetTempFileNameA
  3583. #define GetTempPathWrap GetTempPathA
  3584. #define GetTextExtentPoint32Wrap GetTextExtentPoint32A
  3585. #define GetTextFaceWrap GetTextFaceA
  3586. #define GetTextMetricsWrap GetTextMetricsA
  3587. #define GetTimeFormatWrap GetTimeFormatA
  3588. #define GetDateFormatWrap GetDateFormatA
  3589. #define GetUserNameWrap GetUserNameA
  3590. #define GetWindowLongWrap GetWindowLongA
  3591. #define GetWindowTextWrap GetWindowTextA
  3592. #define GetWindowTextLengthWrap GetWindowTextLengthA
  3593. #define GetWindowsDirectoryWrap GetWindowsDirectoryA
  3594. #define InsertMenuItemWrap InsertMenuItemA
  3595. #define InsertMenuWrap InsertMenuA
  3596. #define IsBadStringPtrWrap IsBadStringPtrA
  3597. #define IsDialogMessageWrap IsDialogMessageA
  3598. #define LoadAcceleratorsWrap LoadAcceleratorsA
  3599. #define LoadBitmapWrap LoadBitmapA
  3600. #define LoadCursorWrap LoadCursorA
  3601. #define LoadIconWrap LoadIconA
  3602. #define LoadImageWrap LoadImageWrapA
  3603. #define LoadLibraryWrap LoadLibraryA
  3604. #define LoadLibraryExWrap LoadLibraryExA
  3605. #define LoadMenuWrap LoadMenuA
  3606. #define LoadStringWrap LoadStringA
  3607. #define MessageBoxIndirectWrap MessageBoxIndirectA
  3608. #define MessageBoxWrap MessageBoxA
  3609. #define ModifyMenuWrap ModifyMenuA
  3610. #define GetCharWidth32Wrap GetCharWidth32A
  3611. #define GetCharacterPlacementWrap GetCharacterPlacementA
  3612. #define CopyFileWrap CopyFileA
  3613. #define MoveFileWrap MoveFileA
  3614. #define OemToCharWrap OemToCharA
  3615. #define OutputDebugStringWrap OutputDebugStringA
  3616. #define PeekMessageWrap PeekMessageA
  3617. #define PostMessageWrap PostMessageA
  3618. #define PostThreadMessageWrap PostThreadMessageA
  3619. #define RegCreateKeyWrap RegCreateKeyA
  3620. #define RegCreateKeyExWrap RegCreateKeyExA
  3621. #define RegDeleteKeyWrap RegDeleteKeyA
  3622. #define RegDeleteValueWrap RegDeleteValueA
  3623. #define RegEnumKeyWrap RegEnumKeyA
  3624. #define RegEnumKeyExWrap RegEnumKeyExA
  3625. #define RegOpenKeyWrap RegOpenKeyA
  3626. #define RegOpenKeyExWrap RegOpenKeyExA
  3627. #define RegQueryInfoKeyWrap RegQueryInfoKeyA
  3628. #define RegQueryValueWrap RegQueryValueA
  3629. #define RegQueryValueExWrap RegQueryValueExA
  3630. #define RegSetValueWrap RegSetValueA
  3631. #define RegSetValueExWrap RegSetValueExA
  3632. #define RegisterClassWrap RegisterClassA
  3633. #define RegisterClassExWrap RegisterClassExA
  3634. #define RegisterClipboardFormatWrap RegisterClipboardFormatA
  3635. #define RegisterWindowMessageWrap RegisterWindowMessageA
  3636. #define RemovePropWrap RemovePropA
  3637. #define SendDlgItemMessageWrap SendDlgItemMessageA
  3638. #define SendMessageWrap SendMessageA
  3639. #define SetCurrentDirectoryWrap SetCurrentDirectoryA
  3640. #define SetDlgItemTextWrap SetDlgItemTextA
  3641. #define SetMenuItemInfoWrap SetMenuItemInfoA
  3642. #define SetPropWrap SetPropA
  3643. #define SetWindowLongWrap SetWindowLongA
  3644. #define SHBrowseForFolderWrap SHBrowseForFolderA
  3645. #define ShellExecuteExWrap ShellExecuteExA
  3646. #define SHFileOperationWrap SHFileOperationA
  3647. #define SHGetFileInfoWrap SHGetFileInfoA
  3648. #define SHGetPathFromIDListWrap SHGetPathFromIDListA
  3649. #define SetFileAttributesWrap SetFileAttributesA
  3650. #define SetWindowsHookExWrap SetWindowsHookExA
  3651. #define StartDocWrap StartDocA
  3652. #define SystemParametersInfoWrap SystemParametersInfoA
  3653. #define TranslateAcceleratorWrap TranslateAcceleratorA
  3654. #define UnregisterClassWrap UnregisterClassA
  3655. #define VkKeyScanWrap VkKeyScanA
  3656. #define WinHelpWrap WinHelpA
  3657. #define WNetRestoreConnectionWrap WNetRestoreConnectionA
  3658. #define WNetGetLastErrorWrap WNetGetLastErrorA
  3659. #define wvsprintfWrap wvsprintfA
  3660. #define CreateFontWrap CreateFontA
  3661. #define DrawTextExWrap DrawTextExA
  3662. #define GetMenuItemInfoWrap GetMenuItemInfoA
  3663. #define SetMenuItemInfoWrap SetMenuItemInfoA
  3664. #define InsertMenuItemWrap InsertMenuItemA
  3665. #define DragQueryFileWrap DragQueryFileA
  3666. #endif
  3667. #endif // defined(UNIX) && defined(NO_SHLWAPI_UNITHUNK)
  3668. // Some functions are used to wrap unicode win95 functions AND to provide ML wrappers,
  3669. // so they are needed unless BOTH NO_SHLWAPI_UNITHUNG and NO_SHLWAPI_MLUI are defined
  3670. //
  3671. #if (_WIN32_IE >= 0x0500) && (!defined(NO_SHLWAPI_UNITHUNK) || !defined(NO_SHLWAPI_MLUI))
  3672. LWSTDAPI_(HWND)
  3673. CreateDialogIndirectParamWrapW(
  3674. HINSTANCE hInstance,
  3675. LPCDLGTEMPLATEW hDialogTemplate,
  3676. HWND hWndParent,
  3677. DLGPROC lpDialogFunc,
  3678. LPARAM dwInitParam);
  3679. LWSTDAPI_(HWND)
  3680. CreateDialogParamWrapW(
  3681. HINSTANCE hInstance,
  3682. LPCWSTR lpTemplateName,
  3683. HWND hWndParent,
  3684. DLGPROC lpDialogFunc,
  3685. LPARAM dwInitParam);
  3686. LWSTDAPI_(INT_PTR)
  3687. DialogBoxIndirectParamWrapW(
  3688. HINSTANCE hInstance,
  3689. LPCDLGTEMPLATEW hDialogTemplate,
  3690. HWND hWndParent,
  3691. DLGPROC lpDialogFunc,
  3692. LPARAM dwInitParam);
  3693. LWSTDAPI_(INT_PTR)
  3694. DialogBoxParamWrapW(
  3695. HINSTANCE hInstance,
  3696. LPCWSTR lpszTemplate,
  3697. HWND hWndParent,
  3698. DLGPROC lpDialogFunc,
  3699. LPARAM dwInitParam);
  3700. LWSTDAPI_(BOOL) SetWindowTextWrapW(HWND hWnd, LPCWSTR lpString);
  3701. LWSTDAPI_(BOOL) DeleteMenuWrap(HMENU hMenu, UINT uPosition, UINT uFlags);
  3702. LWSTDAPI_(BOOL) DestroyMenuWrap(HMENU hMenu);
  3703. #ifdef UNICODE
  3704. #define CreateDialogIndirectParamWrap CreateDialogIndirectParamWrapW
  3705. #define CreateDialogParamWrap CreateDialogParamWrapW
  3706. #define DialogBoxIndirectParamWrap DialogBoxIndirectParamWrapW
  3707. #define DialogBoxParamWrap DialogBoxParamWrapW
  3708. #define SetWindowTextWrap SetWindowTextWrapW
  3709. #else
  3710. #define CreateDialogIndirectParamWrap CreateDialogIndirectParamA
  3711. #define CreateDialogParamWrap CreateDialogParamA
  3712. #define DialogBoxIndirectParamWrap DialogBoxIndirectParamA
  3713. #define DialogBoxParamWrap DialogBoxParamA
  3714. #define SetWindowTextWrap SetWindowTextA
  3715. #endif // UNICODE
  3716. #endif // (_WIN32_IE >= 0x0500) && !defined(NO_SHLWAPI_UNITHUNK) && !defined (NO_SHLWAPI_MLUI)
  3717. //=============== Thread Pool Services ===================================
  3718. #if (_WIN32_IE >= 0x0500) && !defined(NO_SHLWAPI_TPS)
  3719. //
  3720. // SHLWAPIP versions of KERNEL32 Thread Pool Services APIs
  3721. //
  3722. typedef void (NTAPI * WAITORTIMERCALLBACKFUNC)(void *, BOOLEAN);
  3723. typedef void (NTAPI * WORKERCALLBACKFUNC)(void *); // BUGBUG - why declare this?
  3724. typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK;
  3725. LWSTDAPI_(HANDLE)
  3726. SHRegisterWaitForSingleObject(
  3727. IN HANDLE hObject,
  3728. IN WAITORTIMERCALLBACKFUNC pfnCallback,
  3729. IN LPVOID pContext,
  3730. IN DWORD dwMilliseconds,
  3731. IN LPCSTR lpszLibrary OPTIONAL,
  3732. IN DWORD dwFlags
  3733. );
  3734. //
  3735. // flags for SHRegisterWaitForSingleObject (keep separate from other TPS flags)
  3736. //
  3737. //
  3738. // SRWSO_NOREMOVE - if set, the handle is not to be removed from the list once
  3739. // signalled. Intended for use with auto-reset events that the caller wants to
  3740. // keep until unregistered
  3741. //
  3742. #define SRWSO_NOREMOVE 0x00000100
  3743. #define SRWSO_VALID_FLAGS (SRWSO_NOREMOVE)
  3744. #define SRWSO_INVALID_FLAGS (~SRWSO_VALID_FLAGS)
  3745. LWSTDAPI_(BOOL)
  3746. SHUnregisterWait(
  3747. IN HANDLE hWait
  3748. );
  3749. typedef struct {
  3750. DWORD dwStructSize;
  3751. DWORD dwMinimumWorkerThreads;
  3752. DWORD dwMaximumWorkerThreads;
  3753. DWORD dwMaximumWorkerQueueDepth;
  3754. DWORD dwWorkerThreadIdleTimeout;
  3755. DWORD dwWorkerThreadCreationDelta;
  3756. DWORD dwMinimumIoWorkerThreads;
  3757. DWORD dwMaximumIoWorkerThreads;
  3758. DWORD dwMaximumIoWorkerQueueDepth;
  3759. DWORD dwIoWorkerThreadCreationDelta;
  3760. } SH_THREAD_POOL_LIMITS, *PSH_THREAD_POOL_LIMITS;
  3761. LWSTDAPI_(BOOL)
  3762. SHSetThreadPoolLimits(
  3763. IN PSH_THREAD_POOL_LIMITS pLimits
  3764. );
  3765. LWSTDAPI_(BOOL)
  3766. SHTerminateThreadPool(
  3767. VOID
  3768. );
  3769. LWSTDAPI_(BOOL)
  3770. SHQueueUserWorkItem(
  3771. IN LPTHREAD_START_ROUTINE pfnCallback,
  3772. IN LPVOID pContext,
  3773. IN LONG lPriority,
  3774. IN DWORD_PTR dwTag,
  3775. OUT DWORD_PTR * pdwId OPTIONAL,
  3776. IN LPCSTR pszModule OPTIONAL,
  3777. IN DWORD dwFlags
  3778. );
  3779. LWSTDAPI_(DWORD)
  3780. SHCancelUserWorkItems(
  3781. IN DWORD_PTR dwTagOrId,
  3782. IN BOOL bTag
  3783. );
  3784. LWSTDAPI_(HANDLE)
  3785. SHCreateTimerQueue(
  3786. VOID
  3787. );
  3788. LWSTDAPI_(BOOL)
  3789. SHDeleteTimerQueue(
  3790. IN HANDLE hQueue
  3791. );
  3792. LWSTDAPI_(HANDLE)
  3793. SHSetTimerQueueTimer(
  3794. IN HANDLE hQueue,
  3795. IN WAITORTIMERCALLBACK pfnCallback,
  3796. IN LPVOID pContext,
  3797. IN DWORD dwDueTime,
  3798. IN DWORD dwPeriod,
  3799. IN LPCSTR lpszLibrary OPTIONAL,
  3800. IN DWORD dwFlags
  3801. );
  3802. LWSTDAPI_(BOOL)
  3803. SHChangeTimerQueueTimer(
  3804. IN HANDLE hQueue,
  3805. IN HANDLE hTimer,
  3806. IN DWORD dwDueTime,
  3807. IN DWORD dwPeriod
  3808. );
  3809. LWSTDAPI_(BOOL)
  3810. SHCancelTimerQueueTimer(
  3811. IN HANDLE hQueue,
  3812. IN HANDLE hTimer
  3813. );
  3814. //
  3815. // Thread Pool Services flags
  3816. //
  3817. //
  3818. // TPS_EXECUTEIO - execute in I/O thread (via APC). Default is non-IO thread
  3819. //
  3820. #define TPS_EXECUTEIO 0x00000001
  3821. //
  3822. // TPS_TAGGEDITEM - the dwTag parameter is meaningful
  3823. //
  3824. #define TPS_TAGGEDITEM 0x00000002
  3825. //
  3826. // TPS_DEMANDTHREAD - always create a new thread if none currently available.
  3827. // Used in situations where immediate response required
  3828. //
  3829. #define TPS_DEMANDTHREAD 0x00000004
  3830. //
  3831. // TPS_LONGEXECTIME - the work item will take relatively long time to execute.
  3832. // Used as management hint to TPS
  3833. //
  3834. #define TPS_LONGEXECTIME 0x00000008
  3835. //
  3836. // TPS_RESERVED_FLAGS - mask of bits reserved for internal use
  3837. //
  3838. #define TPS_RESERVED_FLAGS 0xFF000000
  3839. #define TPS_VALID_FLAGS (TPS_EXECUTEIO \
  3840. | TPS_TAGGEDITEM \
  3841. | TPS_DEMANDTHREAD \
  3842. | TPS_LONGEXECTIME \
  3843. )
  3844. #define TPS_INVALID_FLAGS (~TPS_VALID_FLAGS)
  3845. #endif // (_WIN32_IE >= 0x0500) && !defined(NO_SHLWAPI_TPS)
  3846. //
  3847. // Private MIME helper functions used by shdocvw & shell32
  3848. //
  3849. #if (_WIN32_IE >= 0x0500)
  3850. LWSTDAPI_(BOOL) GetMIMETypeSubKeyA(LPCSTR pszMIMEType, LPSTR pszBuf, UINT cchBuf);
  3851. LWSTDAPI_(BOOL) GetMIMETypeSubKeyW(LPCWSTR pszMIMEType, LPWSTR pszBuf, UINT cchBuf);
  3852. LWSTDAPI_(BOOL) RegisterMIMETypeForExtensionA(LPCSTR pcszExtension, LPCSTR pcszMIMEContentType);
  3853. LWSTDAPI_(BOOL) RegisterMIMETypeForExtensionW(LPCWSTR pcszExtension, LPCWSTR pcszMIMEContentType);
  3854. LWSTDAPI_(BOOL) UnregisterMIMETypeForExtensionA(LPCSTR pcszExtension);
  3855. LWSTDAPI_(BOOL) UnregisterMIMETypeForExtensionW(LPCWSTR pcszExtension);
  3856. LWSTDAPI_(BOOL) RegisterExtensionForMIMETypeA(LPCSTR pcszExtension, LPCSTR pcszMIMEContentType);
  3857. LWSTDAPI_(BOOL) RegisterExtensionForMIMETypeW(LPCWSTR pcszExtension, LPCWSTR pcszMIMEContentType);
  3858. LWSTDAPI_(BOOL) UnregisterExtensionForMIMETypeA(LPCSTR pcszMIMEContentType);
  3859. LWSTDAPI_(BOOL) UnregisterExtensionForMIMETypeW(LPCWSTR pcszMIMEContentType);
  3860. LWSTDAPI_(BOOL) MIME_GetExtensionA(LPCSTR pcszMIMEType, LPSTR pszExtensionBuf, UINT ucExtensionBufLen);
  3861. LWSTDAPI_(BOOL) MIME_GetExtensionW(LPCWSTR pcszMIMEType, LPWSTR pszExtensionBuf, UINT ucExtensionBufLen);
  3862. #ifdef UNICODE
  3863. #define GetMIMETypeSubKey GetMIMETypeSubKeyW
  3864. #define RegisterMIMETypeForExtension RegisterMIMETypeForExtensionW
  3865. #define UnregisterMIMETypeForExtension UnregisterMIMETypeForExtensionW
  3866. #define RegisterExtensionForMIMEType RegisterExtensionForMIMETypeW
  3867. #define UnregisterExtensionForMIMEType UnregisterExtensionForMIMETypeW
  3868. #define MIME_GetExtension MIME_GetExtensionW
  3869. #else
  3870. #define GetMIMETypeSubKey GetMIMETypeSubKeyA
  3871. #define RegisterMIMETypeForExtension RegisterMIMETypeForExtensionA
  3872. #define UnregisterMIMETypeForExtension UnregisterMIMETypeForExtensionA
  3873. #define RegisterExtensionForMIMEType RegisterExtensionForMIMETypeA
  3874. #define UnregisterExtensionForMIMEType UnregisterExtensionForMIMETypeA
  3875. #define MIME_GetExtension MIME_GetExtensionA
  3876. #endif
  3877. // Options for SHGetMachineInfo
  3878. //
  3879. // Note that GMI_DOCKSTATE is unreliable for ACPI laptops.
  3880. //
  3881. #define GMI_DOCKSTATE 0x0000
  3882. // Return values for SHGetMachineInfo(GMI_DOCKSTATE)
  3883. #define GMID_NOTDOCKABLE 0 // Cannot be docked
  3884. #define GMID_UNDOCKED 1 // Is undocked
  3885. #define GMID_DOCKED 2 // Is docked
  3886. //
  3887. // GMI_BATTERYSTATE reports on the presence and status of non-UPS
  3888. // batteries.
  3889. //
  3890. #define GMI_BATTERYSTATE 0x0001
  3891. // Return value for SHGetMachineInfo(GMI_BATTERYSTATE) is a bitmask
  3892. #define GMIB_HASBATTERY 0x0001 // Can run on batteries
  3893. #define GMIB_ONBATTERY 0x0002 // Is now on batteries
  3894. //
  3895. // WARNING! DANGER! EVIL!
  3896. //
  3897. // GMI_LAPTOP is not perfect. It can be fooled by particular hardware
  3898. // configurations. You are much better off asking specifically why you
  3899. // care about laptops and use one of the above GMI values instead. For
  3900. // example, if you want to scale back some intensive operation so you
  3901. // don't drain the battery, use GMI_BATTERYSTATE instead.
  3902. //
  3903. #define GMI_LAPTOP 0x0002 // Returns nonzero if might be a laptop
  3904. #if (_WIN32_IE >= 0x0501)
  3905. //
  3906. // GMI_TSCLIENT tells you whether you are running as a Terminal Server
  3907. // client and should disable your animations.
  3908. //
  3909. #define GMI_TSCLIENT 0x0003 // Returns nonzero if TS client
  3910. #endif // (_WIN32_IE >= 0x0501)
  3911. LWSTDAPI_(DWORD_PTR) SHGetMachineInfo(UINT gmi);
  3912. // support InterlockedCompareExchange() on Win95
  3913. LWSTDAPI_(void *) SHInterlockedCompareExchange(void **ppDest, void *pExch, void *pComp);
  3914. #if !defined(_X86_)
  3915. // Win95 doesn't run on Alpha/UNIX so we can use the OS function directly
  3916. // Use a #define instead of a forwarder because it's an intrinsic on most
  3917. // compilers.
  3918. #define SHInterlockedCompareExchange InterlockedCompareExchangePointer
  3919. #endif
  3920. LWSTDAPI_(BOOL) SHMirrorIcon(HICON* phiconSmall, HICON* phiconLarge);
  3921. #endif // (_WIN32_IE >= 0x0500)
  3922. // Raw Accelerator Table API
  3923. //
  3924. // Allows an accelerator table grep without having to invoke ::TranslateAccelerator.
  3925. // Useful for dealing with parent-child window accelerator conflicts.
  3926. //
  3927. // HANDLE SHLoadRawAccelerators( HINSTANCE hInst, LPCTSTR lpTableName );
  3928. // Loads the raw accelerator table.
  3929. // hInst Module instance containing the accelerator resource.
  3930. // lpTableName Names the accelerator table resource to load.
  3931. // The return value is a handle that can be passed to a SHQueryRawAcceleratorXXX function.
  3932. // When the handle is no longer required, it should be freed with LocalFree().
  3933. LWSTDAPI_(HANDLE) SHLoadRawAccelerators ( HINSTANCE hInst, LPCTSTR lpTableName );
  3934. // BOOL SHQueryRawAccelerator ( HANDLE hcaAcc, IN BYTE fVirtMask, IN BYTE fVirt, IN WPARAM wKey, OUT OPTIONAL UINT* puCmdID );
  3935. // Queries the raw accelererator table for the specified key
  3936. // hcaAcc Handle returned from SHLoadRawAccelerators().
  3937. // fVirtMask Relevant accelerator flags (any combo of FALT|FCONTROL|FNOINVERT|FSHIFT|FVIRTKEY)
  3938. // fVirt Accelerator flags to test (any combo of FALT|FCONTROL|FNOINVERT|FSHIFT|FVIRTKEY).
  3939. // wKey Accelerator key. This can either be a virtual key (FVIRTKEY) or an ASCII char code.
  3940. // puCmdID Optional address to receive command identifier for the accelerator entry if
  3941. // the key is in the table.
  3942. // Returns nonzero if the key is in the accelerator table; otherwise 0.
  3943. LWSTDAPI_(BOOL) SHQueryRawAccelerator ( HANDLE hcaAcc, IN BYTE fVirtMask, IN BYTE fVirt, IN WPARAM wKey, OUT OPTIONAL UINT* puCmdID );
  3944. // BOOL SHQueryRawAcceleratorMsg( HANDLE hcaAcc, MSG* pmsg, OUT OPTIONAL UINT* puCmdID );
  3945. // Determines whether the specified message is an accelerator message mapping to
  3946. // an entry in the raw accelerator table.
  3947. // hcaAcc Handle returned from SHLoadRawAccelerators().
  3948. // pmsg Address of the message to test.
  3949. // puCmdID Optional address to receive command identifier for the accelerator entry if
  3950. // the message maps to an accelerator in the table.
  3951. // Returns nonzero if the message is a WM_KEYUP or WM_KEYDOWN and the key is in
  3952. // the accelerator table; otherwise 0.
  3953. LWSTDAPI_(BOOL) SHQueryRawAcceleratorMsg( HANDLE hcaAcc, MSG* pmsg, OUT OPTIONAL UINT* puCmdID );
  3954. //
  3955. //
  3956. LWSTDAPI_(BOOL) SHBoolSystemParametersInfo(UINT uiAction, DWORD *pdwParam);
  3957. LWSTDAPI_(BOOL) SHAreIconsEqual(HICON hIcon1, HICON hIcon2);
  3958. //
  3959. //====== End Internal functions ===============================================
  3960. //
  3961. #endif // NO_SHLWAPI_INTERNAL
  3962. ;end_internal
  3963. #if (_WIN32_IE >= 0x0500)
  3964. // SHAutoComplete
  3965. // hwndEdit - HWND of editbox, ComboBox or ComboBoxEx.
  3966. // dwFlags - Flags to indicate what to AutoAppend or AutoSuggest for the editbox.
  3967. //
  3968. // WARNING:
  3969. // Caller needs to have called CoInitialize() or OleInitialize()
  3970. // and cannot call CoUninit/OleUninit until after
  3971. // WM_DESTROY on hwndEdit.
  3972. //
  3973. // dwFlags values:
  3974. #define SHACF_DEFAULT 0x00000000 // Currently (SHACF_FILESYSTEM | SHACF_URLALL)
  3975. #define SHACF_FILESYSTEM 0x00000001 // This includes the File System as well as the rest of the shell (Desktop\My Computer\Control Panel\)
  3976. #define SHACF_URLALL (SHACF_URLHISTORY | SHACF_URLMRU)
  3977. #define SHACF_URLHISTORY 0x00000002 // URLs in the User's History
  3978. #define SHACF_URLMRU 0x00000004 // URLs in the User's Recently Used list.
  3979. #define SHACF_USETAB 0x00000008 // Use the tab to move thru the autocomplete possibilities instead of to the next dialog/window control.
  3980. #define SHACF_FILESYS_ONLY 0x00000010 // This includes the File System
  3981. #if (_WIN32_IE >= 0x0600)
  3982. #define SHACF_FILESYS_DIRS 0x00000020 // Same as SHACF_FILESYS_ONLY except it only includes directories, UNC servers, and UNC server shares.
  3983. #endif // (_WIN32_IE >= 0x0600)
  3984. #define SHACF_AUTOSUGGEST_FORCE_ON 0x10000000 // Ignore the registry default and force the feature on.
  3985. #define SHACF_AUTOSUGGEST_FORCE_OFF 0x20000000 // Ignore the registry default and force the feature off.
  3986. #define SHACF_AUTOAPPEND_FORCE_ON 0x40000000 // Ignore the registry default and force the feature on. (Also know as AutoComplete)
  3987. #define SHACF_AUTOAPPEND_FORCE_OFF 0x80000000 // Ignore the registry default and force the feature off. (Also know as AutoComplete)
  3988. LWSTDAPI SHAutoComplete(HWND hwndEdit, DWORD dwFlags);
  3989. LWSTDAPI SHSetThreadRef(IUnknown *punk);
  3990. LWSTDAPI SHGetThreadRef(IUnknown **ppunk);
  3991. LWSTDAPI_(BOOL) SHSkipJunction(struct IBindCtx* pbc, const CLSID *pclsid);
  3992. #endif // (_WIN32_IE >= 0x0500)
  3993. #define CTF_INSIST 0x00000001 // SHCreateThread() dwFlags - call pfnThreadProc synchronously if CreateThread() fails
  3994. #define CTF_THREAD_REF 0x00000002 // hold a reference to the creating thread
  3995. #define CTF_PROCESS_REF 0x00000004 // hold a reference to the creating process
  3996. #define CTF_COINIT 0x00000008 // init COM for the created thread
  3997. #define CTF_FREELIBANDEXIT 0x00000010 // hold a ref to the DLL and call FreeLibraryAndExitThread() when done
  3998. #define CTF_REF_COUNTED 0x00000020 // thread supports ref counting via SHGetThreadRef() or CTF_THREAD_REF so that child threads can keep this thread alive
  3999. #define CTF_WAIT_ALLOWCOM 0x00000040 // while waiting for pfnCallback, allow COM marshaling to the blocked calling thread
  4000. LWSTDAPI_(BOOL) SHCreateThread(LPTHREAD_START_ROUTINE pfnThreadProc, void *pData, DWORD dwFlags, LPTHREAD_START_ROUTINE pfnCallback);
  4001. LWSTDAPI SHReleaseThreadRef(); // release a CTF_THREAD_REF reference earlier than the return of pfnThreadProc
  4002. #ifndef NO_SHLWAPI_GDI
  4003. //
  4004. //====== GDI helper functions ================================================
  4005. //
  4006. LWSTDAPI_(HPALETTE) SHCreateShellPalette(HDC hdc);
  4007. #if (_WIN32_IE >= 0x0500)
  4008. LWSTDAPI_(void) ColorRGBToHLS(COLORREF clrRGB, WORD* pwHue, WORD* pwLuminance, WORD* pwSaturation);
  4009. LWSTDAPI_(COLORREF) ColorHLSToRGB(WORD wHue, WORD wLuminance, WORD wSaturation);
  4010. LWSTDAPI_(COLORREF) ColorAdjustLuma(COLORREF clrRGB, int n, BOOL fScale);
  4011. ;begin_internal
  4012. #ifdef NOTYET // BUGBUG (scotth): once this is implemented, make this public
  4013. // SHGetCommonResourceID
  4014. //
  4015. // (use MAKEINTRESOURCE on the following IDs)
  4016. // These values are indexes into an internal table. Be careful. ;internal
  4017. #define SHGCR_BITMAP_WINDOWS_LOGO MAKEINTRESOURCE(1)
  4018. #define SHGCR_AVI_FLASHLIGHT MAKEINTRESOURCE(2)
  4019. #define SHGCR_AVI_FINDFILE MAKEINTRESOURCE(3)
  4020. #define SHGCR_AVI_FINDCOMPUTER MAKEINTRESOURCE(4)
  4021. #define SHGCR_AVI_FILEMOVE MAKEINTRESOURCE(5)
  4022. #define SHGCR_AVI_FILECOPY MAKEINTRESOURCE(6)
  4023. #define SHGCR_AVI_FILEDELETE MAKEINTRESOURCE(7)
  4024. #define SHGCR_AVI_EMPTYWASTEBASKET MAKEINTRESOURCE(8)
  4025. #define SHGCR_AVI_FILEREALDELETE MAKEINTRESOURCE(9) // Bypass Recycle Bin
  4026. #define SHGCR_AVI_DOWNLOAD MAKEINTRESOURCE(10)
  4027. LWSTDAPI SHGetCommonResourceIDA(IN LPCSTR pszID, IN DWORD dwRes, OUT HMODULE * phmod, OUT UINT * pnID);
  4028. LWSTDAPI SHGetCommonResourceIDA(IN LPCSTR pszID, IN DWORD dwRes, OUT HMODULE * phmod, OUT UINT * pnID);
  4029. #ifdef UNICODE
  4030. #define SHGetCommonResourceID SHGetCommonResourceIDW
  4031. #else
  4032. #define SHGetCommonResourceID SHGetCommonResourceIDW
  4033. #endif
  4034. #endif // NOTYET
  4035. ;end_internal
  4036. #endif // _WIN32_IE >= 0x0500
  4037. #endif // NO_SHLWAPI_GDI
  4038. //
  4039. //====== DllGetVersion =======================================================
  4040. //
  4041. typedef struct _DLLVERSIONINFO
  4042. {
  4043. DWORD cbSize;
  4044. DWORD dwMajorVersion; // Major version
  4045. DWORD dwMinorVersion; // Minor version
  4046. DWORD dwBuildNumber; // Build number
  4047. DWORD dwPlatformID; // DLLVER_PLATFORM_*
  4048. } DLLVERSIONINFO;
  4049. // Platform IDs for DLLVERSIONINFO
  4050. #define DLLVER_PLATFORM_WINDOWS 0x00000001 // Windows 95
  4051. #define DLLVER_PLATFORM_NT 0x00000002 // Windows NT
  4052. #if (_WIN32_IE >= 0x0501)
  4053. typedef struct _DLLVERSIONINFO2
  4054. {
  4055. DLLVERSIONINFO info1;
  4056. // dwFlags is really for alignment purposes ;Internal
  4057. DWORD dwFlags; // No flags currently defined
  4058. ULONGLONG ullVersion; // Encoded as:
  4059. // Major 0xFFFF 0000 0000 0000
  4060. // Minor 0x0000 FFFF 0000 0000
  4061. // Build 0x0000 0000 FFFF 0000
  4062. // QFE 0x0000 0000 0000 FFFF
  4063. } DLLVERSIONINFO2;
  4064. #define DLLVER_MAJOR_MASK 0xFFFF000000000000
  4065. #define DLLVER_MINOR_MASK 0x0000FFFF00000000
  4066. #define DLLVER_BUILD_MASK 0x00000000FFFF0000
  4067. #define DLLVER_QFE_MASK 0x000000000000FFFF
  4068. #endif
  4069. #define MAKEDLLVERULL(major, minor, build, qfe) \
  4070. (((ULONGLONG)(major) << 48) | \
  4071. ((ULONGLONG)(minor) << 32) | \
  4072. ((ULONGLONG)(build) << 16) | \
  4073. ((ULONGLONG)( qfe) << 0))
  4074. //
  4075. // The caller should always GetProcAddress("DllGetVersion"), not
  4076. // implicitly link to it.
  4077. //
  4078. typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *);
  4079. // DllInstall (to be implemented by self-installing DLLs)
  4080. STDAPI DllInstall(BOOL bInstall, LPCWSTR pszCmdLine);
  4081. ;begin_internal
  4082. #if (_WIN32_IE >= 0x0501)
  4083. //
  4084. // ======== SHGetAppCompatFlags ================================================
  4085. //
  4086. //===========================================================================
  4087. // Shell Application Compatability flags
  4088. // SHGetAppCompatFlags flags
  4089. #define ACF_NONE 0x00000000
  4090. #define ACF_CONTEXTMENU 0x00000001
  4091. #define ACF_CORELINTERNETENUM 0x00000004 // corel suite 8 has this same problem as suite 7 but does not have context menu one so need new bit
  4092. #define ACF_OLDCREATEVIEWWND 0x00000004 // PowerDesk relies on CreateViewWindow returning S_OK
  4093. #define ACF_WIN95DEFVIEW 0x00000004 // for apps that depend on win95 defview behavior
  4094. #define ACF_DOCOBJECT 0x00000002
  4095. #define ACF_FLUSHNOWAITALWAYS 0x00000001
  4096. #define ACF_MYCOMPUTERFIRST 0x00000008 // MyComp must be first item on the desktop
  4097. #define ACF_OLDREGITEMGDN 0x00000010 // Win95-compatible GetDisplayNameOf on regitems
  4098. #define ACF_LOADCOLUMNHANDLER 0x00000040 // Dont delay load column handler.
  4099. #define ACF_ANSI 0x00000080 // For Apps that Pass in ANSI Strings
  4100. #define ACF_STRIPFOLDERBIT 0x00000100 // nuke the folder GAO in file dialog (for folder shortcuts, zip & cab files)
  4101. #define ACF_WIN95SHLEXEC 0x00000200 // dont use DDEWAIT when thunking to ShellExecEx()
  4102. #define ACF_STAROFFICE5PRINTER 0x00000400 // special return values from printer folder GAO
  4103. #define ACF_NOVALIDATEFSIDS 0x00000800 // FS pidls should not be validated.
  4104. #define ACF_FILEOPENNEEDSEXT 0x00001000 // Need to show extensioin in the name box of the open file common dialog
  4105. #define ACF_WIN95BINDTOOBJECT 0x00002000 // Win95 BindToObject behavior dependencies
  4106. #define ACF_IGNOREENUMRESET 0x00004000 // App relies on IEnumIDList::Reset returning E_NOTIMPL
  4107. #define ACF_ANSIDISPLAYNAMES 0x00010000 // calling process requires the ISF::GDN in ansi
  4108. #define ACF_FILEOPENBOGUSCTRLID 0x00020000 // Requires that the toolbar in fileopen have ctrl ID == ID_OK
  4109. #define ACF_FORCELFNIDLIST 0x00040000 // forces no AltName in the FS pidls (for apps that read directly from the pidl)
  4110. #define ACF_APPISOFFICE 0x01000000 // calling app is office (95, 97, 2000, ++)
  4111. #define ACF_KNOWPERPROCESS 0x80000000 // We know the per process flags already.
  4112. // The flags that are per-process
  4113. #define ACF_PERPROCESSFLAGS (ACF_CONTEXTMENU | ACF_CORELINTERNETENUM | ACF_OLDCREATEVIEWWND | ACF_WIN95DEFVIEW | \
  4114. ACF_DOCOBJECT | ACF_FLUSHNOWAITALWAYS | ACF_MYCOMPUTERFIRST | ACF_OLDREGITEMGDN | \
  4115. ACF_LOADCOLUMNHANDLER | ACF_ANSI | ACF_WIN95SHLEXEC | ACF_STAROFFICE5PRINTER | \
  4116. ACF_NOVALIDATEFSIDS | ACF_FILEOPENNEEDSEXT | ACF_WIN95BINDTOOBJECT | \
  4117. ACF_IGNOREENUMRESET | ACF_ANSIDISPLAYNAMES | ACF_FILEOPENBOGUSCTRLID | ACF_FORCELFNIDLIST)
  4118. // Flags that are per caller
  4119. #define ACF_PERCALLFLAGS (ACF_APPISOFFICE | ACF_STRIPFOLDERBIT)
  4120. LWSTDAPI_(DWORD) SHGetAppCompatFlags (DWORD dwFlagsNeeded);
  4121. enum {
  4122. OBJCOMPATF_OTNEEDSSFCACHE = 0x00000001,
  4123. OBJCOMPATF_NO_WEBVIEW = 0x00000002,
  4124. OBJCOMPATF_UNBINDABLE = 0x00000004,
  4125. OBJCOMPATF_PINDLL = 0x00000008,
  4126. OBJCOMPATF_NEEDSFILESYSANCESTOR = 0x00000010,
  4127. OBJCOMPATF_NOTAFILESYSTEM = 0x00000020,
  4128. OBJCOMPATF_CTXMENU_NOVERBS = 0x00000040,
  4129. OBJCOMPATF_CTXMENU_LIMITEDQI = 0x00000080,
  4130. OBJCOMPATF_COCREATESHELLFOLDERONLY = 0x00000100,
  4131. OBJCOMPATF_NEEDSSTORAGEANCESTOR = 0x00000200,
  4132. OBJCOMPATF_NOLEGACYWEBVIEW = 0x00000400,
  4133. OBJCOMPATF_BLOCKSHELLSERVICEOBJECT = 0x00000800,
  4134. } ;
  4135. typedef DWORD OBJCOMPATFLAGS;
  4136. LWSTDAPI_(OBJCOMPATFLAGS) SHGetObjectCompatFlags(IUnknown *punk, const CLSID *pclsid);
  4137. #endif // (_WIN32_IE >= 0x0501)
  4138. #if (_WIN32_IE >= 0x0560)
  4139. LWSTDAPI_(UINT) GetUIVersion();
  4140. #endif // (_WIN32_IE >= 0x0560)
  4141. ;end_internal
  4142. ;begin_both
  4143. #ifdef __cplusplus
  4144. }
  4145. #endif
  4146. #ifdef _WIN32
  4147. #include <poppack.h>
  4148. #endif
  4149. #endif
  4150. ;end_both
  4151. #endif // _INC_SHLWAPIP ;internal
  4152. #endif // _INC_SHLWAPI