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.

4082 lines
168 KiB

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