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.

1330 lines
23 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993 - 1993.
  5. //
  6. // File: widewrap.h
  7. //
  8. // Contents: Wrapper functions for Win32c API used by 32-bit OLE 2
  9. //
  10. // History: 12-27-93 ErikGav Created
  11. // 06-14-94 KentCe Various Chicago build fixes.
  12. //
  13. //----------------------------------------------------------------------------
  14. #ifndef _WIDEWRAP_H_
  15. #define _WIDEWRAP_H_
  16. #include <objbase.h>
  17. #include <commctrl.h>
  18. #include <shellapi.h>
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. #ifdef _UNICODE // temporary so can turn of files not yet converted
  23. void InitCommonLib(BOOL fUnicode);
  24. void UnInitCommonLib(void);
  25. BOOL WideWrapIsUnicode();
  26. BOOL
  27. GetUserTextualSid(
  28. LPTSTR TextualSid, // buffer for Textual representaion of Sid
  29. LPDWORD cchSidSize // required/provided TextualSid buffersize
  30. );
  31. #undef WNDCLASS
  32. #define WNDCLASS WNDCLASSW
  33. #define WNDCLASST WNDCLASSA
  34. #undef STARTUPINFO
  35. #define STARTUPINFO STARTUPINFOW
  36. #undef WIN32_FIND_DATA
  37. #define WIN32_FIND_DATA WIN32_FIND_DATAW
  38. int AnsiToUnicodeOem(LPWSTR pwsz, LPCSTR sz, LONG cb);
  39. int LoadStringX( HINSTANCE hInstance,UINT uID, LPWSTR lpBuffer,int nBufferMax);
  40. #undef LoadString
  41. #define LoadString LoadStringX
  42. HANDLE
  43. WINAPI
  44. CreateFileX(
  45. LPCWSTR lpFileName,
  46. DWORD dwDesiredAccess,
  47. DWORD dwShareMode,
  48. LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  49. DWORD dwCreationDisposition,
  50. DWORD dwFlagsAndAttributes,
  51. HANDLE hTemplateFile
  52. );
  53. #undef CreateFile
  54. #define CreateFile CreateFileX
  55. #define CreateFileT CreateFileA
  56. BOOL
  57. WINAPI
  58. ExpandEnvironmentStringsX(
  59. LPCWSTR lpSrc,
  60. LPWSTR lpDst,
  61. DWORD nSize
  62. );
  63. #undef ExpandEnvironmentStrings
  64. #define ExpandEnvironmentStrings ExpandEnvironmentStringsX
  65. #define ExpandEnvironmentStringsT ExpandEnvironmentStringsA
  66. BOOL
  67. WINAPI
  68. DeleteFileX(
  69. LPCWSTR lpFileName
  70. );
  71. #undef DeleteFile
  72. #define DeleteFile DeleteFileX
  73. #define DeleteFileT DeleteFileA
  74. UINT
  75. WINAPI
  76. RegisterClipboardFormatX(
  77. LPCWSTR lpszFormat);
  78. #undef RegisterClipboardFormat
  79. #define RegisterClipboardFormat RegisterClipboardFormatX
  80. #define RegisterClipboardFormatT RegisterClipboardFormatA
  81. int
  82. WINAPI
  83. GetClipboardFormatNameX(
  84. UINT format,
  85. LPWSTR lpszFormatName,
  86. int cchMaxCount);
  87. #undef GetClipboardFormatName
  88. #define GetClipboardFormatName GetClipboardFormatNameX
  89. #define GetClipboardFormatNameT GetClipboardFormatNameA
  90. LONG
  91. APIENTRY
  92. RegOpenKeyX (
  93. HKEY hKey,
  94. LPCWSTR lpSubKey,
  95. PHKEY phkResult
  96. );
  97. #undef RegOpenKey
  98. #define RegOpenKey RegOpenKeyX
  99. #define RegOpenKeyT RegOpenKeyA
  100. LONG
  101. APIENTRY
  102. RegQueryValueX (
  103. HKEY hKey,
  104. LPCWSTR lpSubKey,
  105. LPWSTR lpValue,
  106. PLONG lpcbValue
  107. );
  108. #undef RegQueryValue
  109. #define RegQueryValue RegQueryValueX
  110. #define RegQueryValueT RegQueryValueA
  111. LONG
  112. APIENTRY
  113. RegSetValueX (
  114. HKEY hKey,
  115. LPCWSTR lpSubKey,
  116. DWORD dwType,
  117. LPCWSTR lpData,
  118. DWORD cbData
  119. );
  120. #undef RegSetValue
  121. #define RegSetValue RegSetValueX
  122. #define RegSetValueT RegSetValueA
  123. LONG
  124. APIENTRY
  125. RegDeleteValueX (
  126. HKEY hKey,
  127. LPCWSTR lpValueName
  128. );
  129. #undef RegDeleteValue
  130. #define RegDeleteValue RegDeleteValueX
  131. LONG
  132. APIENTRY
  133. RegSetValueExX(
  134. HKEY hKey,
  135. LPCWSTR lpValueName,
  136. DWORD Reserved,
  137. DWORD dwType,
  138. CONST BYTE* lpData,
  139. DWORD cbData
  140. );
  141. #undef RegSetValueEx
  142. #define RegSetValueEx RegSetValueExX
  143. LONG
  144. APIENTRY
  145. RegCreateKeyExXp(
  146. HKEY hKey,
  147. LPCWSTR lpSubKey,
  148. DWORD Reserved,
  149. LPWSTR lpClass,
  150. DWORD dwOptions,
  151. REGSAM samDesired,
  152. LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  153. PHKEY phkResult,
  154. LPDWORD lpdwDisposition,
  155. BOOL fSetSecurity);
  156. LONG
  157. APIENTRY
  158. RegCreateKeyExX(
  159. HKEY hKey,
  160. LPCWSTR lpSubKey,
  161. DWORD Reserved,
  162. LPWSTR lpClass,
  163. DWORD dwOptions,
  164. REGSAM samDesired,
  165. LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  166. PHKEY phkResult,
  167. LPDWORD lpdwDisposition
  168. );
  169. #undef RegCreateKeyEx
  170. #define RegCreateKeyEx RegCreateKeyExX
  171. UINT
  172. WINAPI
  173. RegisterWindowMessageX(
  174. LPCWSTR lpString);
  175. #undef RegisterWindowMessage
  176. #define RegisterWindowMessage RegisterWindowMessageX
  177. #define RegisterWindowMessageT RegisterWindowMessageA
  178. LONG
  179. APIENTRY
  180. RegOpenKeyExXp(
  181. HKEY hKey,
  182. LPCWSTR lpSubKey,
  183. DWORD ulOptions,
  184. REGSAM samDesired,
  185. PHKEY phkResult,
  186. BOOL fSetSecurity);
  187. LONG
  188. APIENTRY
  189. RegOpenKeyExX (
  190. HKEY hKey,
  191. LPCWSTR lpSubKey,
  192. DWORD ulOptions,
  193. REGSAM samDesired,
  194. PHKEY phkResult
  195. );
  196. #undef RegOpenKeyEx
  197. #define RegOpenKeyEx RegOpenKeyExX
  198. #define RegOpenKeyExT RegOpenKeyExA
  199. LONG
  200. APIENTRY
  201. RegQueryValueExX (
  202. HKEY hKey,
  203. LPCWSTR lpValueName,
  204. LPDWORD lpReserved,
  205. LPDWORD lpType,
  206. LPBYTE lpData,
  207. LPDWORD lpcbData
  208. );
  209. #undef RegQueryValueEx
  210. #define RegQueryValueEx RegQueryValueExX
  211. #define RegQueryValueExT RegQueryValueExA
  212. BOOL GetUserNameX(
  213. LPWSTR lpBuffer,
  214. LPDWORD nSize
  215. );
  216. #undef GetUserName
  217. #define GetUserName GetUserNameX
  218. HWND
  219. WINAPI
  220. CreateWindowExX(
  221. DWORD dwExStyle,
  222. LPCWSTR lpClassName,
  223. LPCWSTR lpWindowName,
  224. DWORD dwStyle,
  225. int X,
  226. int Y,
  227. int nWidth,
  228. int nHeight,
  229. HWND hWndParent ,
  230. HMENU hMenu,
  231. HINSTANCE hInstance,
  232. LPVOID lpParam);
  233. #undef CreateWindowEx
  234. #define CreateWindowEx CreateWindowExX
  235. #define CreateWindowExT CreateWindowExA
  236. HWND WINAPI CreateDialogParamX(
  237. HINSTANCE hInstance,
  238. LPCWSTR lpTemplateName,
  239. HWND hWndParent,
  240. DLGPROC lpDialogFunc,
  241. LPARAM dwInitParam
  242. );
  243. #undef CreateDialogParam
  244. #define CreateDialogParam CreateDialogParamX
  245. INT_PTR
  246. WINAPI
  247. DialogBoxParamX(
  248. HINSTANCE hInstance,
  249. LPCWSTR lpTemplateName,
  250. HWND hWndParent,
  251. DLGPROC lpDialogFunc,
  252. LPARAM dwInitParam);
  253. #undef DialogBoxParam
  254. #define DialogBoxParam DialogBoxParamX
  255. ATOM
  256. WINAPI
  257. RegisterClassX(
  258. CONST WNDCLASSW *lpWndClass);
  259. #undef RegisterClass
  260. #define RegisterClass RegisterClassX
  261. #define RegisterClassT RegisterClassA
  262. BOOL
  263. WINAPI
  264. UnregisterClassX(
  265. LPCWSTR lpClassName,
  266. HINSTANCE hInstance);
  267. #undef UnregisterClass
  268. #define UnregisterClass UnregisterClassX
  269. #define UnregisterClassT UnregisterClassA
  270. #ifndef _M_ALPHA
  271. int WINAPIV wsprintfX(LPWSTR pwszOut, LPCWSTR pwszFormat, ...);
  272. #undef wsprintf
  273. #define wsprintf wsprintfX
  274. #define wsprintfT wsprintfA
  275. #endif // _M_ALPHA
  276. HWND
  277. WINAPI
  278. CreateWindowX(
  279. LPCWSTR lpClassName,
  280. LPCWSTR lpWindowName,
  281. DWORD dwStyle,
  282. int X,
  283. int Y,
  284. int nWidth,
  285. int nHeight,
  286. HWND hWndParent ,
  287. HMENU hMenu,
  288. HINSTANCE hInstance,
  289. LPVOID lpParam);
  290. #undef CreateWindow
  291. #define CreateWindow CreateWindowX
  292. #define CreateWindowT CreateWindowA
  293. HANDLE
  294. WINAPI
  295. GetPropX(
  296. HWND hWnd,
  297. LPCWSTR lpString);
  298. #undef GetProp
  299. #define GetProp GetPropX
  300. #define GetPropT GetPropA
  301. BOOL
  302. WINAPI
  303. SetPropX(
  304. HWND hWnd,
  305. LPCWSTR lpString,
  306. HANDLE hData);
  307. #undef SetProp
  308. #define SetProp SetPropX
  309. #define SetPropT SetPropA
  310. HANDLE
  311. WINAPI
  312. RemovePropX(
  313. HWND hWnd,
  314. LPCWSTR lpString);
  315. #undef RemoveProp
  316. #define RemoveProp RemovePropX
  317. #define RemovePropT RemovePropA
  318. UINT
  319. WINAPI
  320. GetProfileIntX(
  321. LPCWSTR lpAppName,
  322. LPCWSTR lpKeyName,
  323. INT nDefault
  324. );
  325. #undef GetProfileInt
  326. #define GetProfileInt GetProfileIntX
  327. #define GetProfileIntT GetProfileIntA
  328. ATOM
  329. WINAPI
  330. GlobalAddAtomX(
  331. LPCWSTR lpString
  332. );
  333. #undef GlobalAddAtom
  334. #define GlobalAddAtom GlobalAddAtomX
  335. #define GlobalAddAtomT GlobalAddAtomA
  336. UINT
  337. WINAPI
  338. GlobalGetAtomNameX(
  339. ATOM nAtom,
  340. LPWSTR lpBuffer,
  341. int nSize
  342. );
  343. #undef GlobalGetAtomName
  344. #define GlobalGetAtomName GlobalGetAtomNameX
  345. #define GlobalGetAtomNameT GlobalGetAtomNameA
  346. DWORD
  347. WINAPI
  348. GetModuleFileNameX(
  349. HMODULE hModule,
  350. LPWSTR lpFilename,
  351. DWORD nSize
  352. );
  353. #undef GetModuleFileName
  354. #define GetModuleFileName GetModuleFileNameX
  355. #define GetModuleFileNameT GetModuleFileNameA
  356. LPWSTR
  357. WINAPI
  358. CharPrevX(
  359. LPCWSTR lpszStart,
  360. LPCWSTR lpszCurrent);
  361. #undef CharPrev
  362. #define CharPrev CharPrevX
  363. #define CharPrevT CharPrevA
  364. HFONT WINAPI CreateFontX(int, int, int, int, int, DWORD,
  365. DWORD, DWORD, DWORD, DWORD, DWORD,
  366. DWORD, DWORD, LPCWSTR);
  367. #undef CreateFont
  368. #define CreateFont CreateFontX
  369. #define CreateFontT CreateFontA
  370. HMODULE
  371. WINAPI
  372. LoadLibraryX(
  373. LPCWSTR lpLibFileName
  374. );
  375. #undef LoadLibrary
  376. #define LoadLibrary LoadLibraryX
  377. #define LoadLibraryT LoadLibraryA
  378. HMODULE
  379. WINAPI
  380. LoadLibraryExX(
  381. LPCWSTR lpLibFileName,
  382. HANDLE hFile,
  383. DWORD dwFlags
  384. );
  385. #undef LoadLibraryEx
  386. #define LoadLibraryEx LoadLibraryExX
  387. #define LoadLibraryExT LoadLibraryExA
  388. LONG
  389. APIENTRY
  390. RegDeleteKeyX (
  391. HKEY hKey,
  392. LPCWSTR lpSubKey
  393. );
  394. #undef RegDeleteKey
  395. #define RegDeleteKey RegDeleteKeyX
  396. #define RegDeleteKeyT RegDeleteKeyA
  397. #undef RpcStringBindingCompose
  398. #define RpcStringBindingCompose RpcStringBindingComposeW
  399. #undef RpcBindingFromStringBinding
  400. #define RpcBindingFromStringBinding RpcBindingFromStringBindingW
  401. #undef RpcStringFree
  402. #define RpcStringFree RpcStringFreeW
  403. BOOL
  404. WINAPI
  405. CreateProcessX(
  406. LPCWSTR lpApplicationName,
  407. LPWSTR lpCommandLine,
  408. LPSECURITY_ATTRIBUTES lpProcessAttributes,
  409. LPSECURITY_ATTRIBUTES lpThreadAttributes,
  410. BOOL bInheritHandles,
  411. DWORD dwCreationFlags,
  412. LPVOID lpEnvironment,
  413. LPCWSTR lpCurrentDirectory,
  414. LPSTARTUPINFOW lpStartupInfo,
  415. LPPROCESS_INFORMATION lpProcessInformation
  416. );
  417. #undef CreateProcess
  418. #define CreateProcess CreateProcessX
  419. #define CreateProcessT CreateProcessA
  420. LONG
  421. APIENTRY
  422. RegEnumKeyExX (
  423. HKEY hKey,
  424. DWORD dwIndex,
  425. LPWSTR lpName,
  426. LPDWORD lpcbName,
  427. LPDWORD lpReserved,
  428. LPWSTR lpClass,
  429. LPDWORD lpcbClass,
  430. PFILETIME lpftLastWriteTime
  431. );
  432. #undef RegEnumKeyEx
  433. #define RegEnumKeyEx RegEnumKeyExX
  434. #define RegEnumKeyExT RegEnumKeyExA
  435. #undef RpcServerUseProtseqEp
  436. #define RpcServerUseProtseqEp RpcServerUseProtseqEpW
  437. BOOL
  438. WINAPI
  439. AppendMenuX(
  440. HMENU hMenu,
  441. UINT uFlags,
  442. UINT uIDNewItem,
  443. LPCWSTR lpNewItem
  444. );
  445. #undef AppendMenu
  446. #define AppendMenu AppendMenuX
  447. #define AppendMenuT AppendMenuA
  448. HANDLE
  449. WINAPI
  450. OpenEventX(
  451. DWORD dwDesiredAccess,
  452. BOOL bInheritHandle,
  453. LPCWSTR lpName
  454. );
  455. #undef OpenEvent
  456. #define OpenEvent OpenEventX
  457. #define OpenEventT OpenEventA
  458. HANDLE
  459. WINAPI
  460. CreateEventX(
  461. LPSECURITY_ATTRIBUTES lpEventAttributes,
  462. BOOL bManualReset,
  463. BOOL bInitialState,
  464. LPCWSTR lpName
  465. );
  466. #undef CreateEvent
  467. #define CreateEvent CreateEventX
  468. #define CreateEventT CreateEventA
  469. HANDLE
  470. WINAPI
  471. CreateMutexX(
  472. LPSECURITY_ATTRIBUTES lpEventAttributes,
  473. BOOL bInitialOwner,
  474. LPCWSTR lpName
  475. );
  476. #undef CreateMutex
  477. #define CreateMutex CreateMutexX
  478. UINT
  479. WINAPI
  480. GetDriveTypeX(
  481. LPCWSTR lpRootPathName
  482. );
  483. #undef GetDriveType
  484. #define GetDriveType GetDriveTypeX
  485. #define GetDriveTypeT GetDriveTypeA
  486. DWORD
  487. WINAPI
  488. GetFileAttributesX(
  489. LPCWSTR lpFileName
  490. );
  491. #undef GetFileAttributes
  492. #define GetFileAttributes GetFileAttributesX
  493. #define GetFileAttributesT GetFileAttributesA
  494. LONG
  495. APIENTRY
  496. RegEnumKeyX (
  497. HKEY hKey,
  498. DWORD dwIndex,
  499. LPWSTR lpName,
  500. DWORD cbName
  501. );
  502. #undef RegEnumKey
  503. #define RegEnumKey RegEnumKeyX
  504. #define RegEnumKeyT RegEnumKeyA
  505. LONG
  506. APIENTRY
  507. RegEnumValueX(
  508. HKEY hkey,
  509. DWORD dwIndex,
  510. LPWSTR wszName,
  511. LPDWORD pcbName,
  512. LPDWORD pReserved,
  513. LPDWORD ptype,
  514. LPBYTE pValue,
  515. LPDWORD pcbValue
  516. );
  517. #undef RegEnumValue
  518. #define RegEnumValue RegEnumValueX
  519. #define RegEnumValueT RegEnumValueA
  520. HANDLE
  521. WINAPI
  522. FindFirstFileX(
  523. LPCWSTR lpFileName,
  524. LPWIN32_FIND_DATAW lpFindFileData
  525. );
  526. #undef FindFirstFile
  527. #define FindFirstFile FindFirstFileX
  528. #define FindFirstFileT FindFirstFileA
  529. #undef RegisterProtseq
  530. #define RegisterProtseq RegisterProtseqW
  531. #undef RpcStringBindingParse
  532. #define RpcStringBindingParse RpcStringBindingParseW
  533. #undef RpcNetworkIsProtseqValid
  534. #define RpcNetworkIsProtseqValid RpcNetworkIsProtseqValidW
  535. #undef RpcBindingToStringBinding
  536. #define RpcBindingToStringBinding RpcBindingToStringBindingW
  537. #undef RpcServerUseProtseq
  538. #define RpcServerUseProtseq RpcServerUseProtseqW
  539. BOOL
  540. WINAPI
  541. GetComputerNameX (
  542. LPWSTR lpBuffer,
  543. LPDWORD nSize
  544. );
  545. #undef GetComputerName
  546. #define GetComputerName GetComputerNameX
  547. #define GetComputerNameT GetComputerNameA
  548. //The following force Chicago to directly use the ANSI versions
  549. LRESULT
  550. DefWindowProcX(
  551. HWND hWnd,
  552. UINT Msg,
  553. WPARAM wParam,
  554. LPARAM lParam);
  555. #undef DefWindowProc
  556. #define DefWindowProc DefWindowProcX
  557. #undef CopyMetaFile // Currently str ptr is always
  558. #define CopyMetaFile CopyMetaFileA // null, write a wrapper if this
  559. // changes
  560. #undef CreateMetaFile
  561. #define CreateMetaFile CreateMetaFileA
  562. #undef PostMessage
  563. #define PostMessage PostMessageA
  564. #undef SendMessage
  565. #define SendMessage SendMessageA
  566. #undef PeekMessage
  567. #define PeekMessage PeekMessageA
  568. #undef GetMessage
  569. #define GetMessage GetMessageA
  570. #undef TranslateAccelerator
  571. #define TranslateAccelerator TranslateAcceleratorA
  572. #undef IsDialogMessage
  573. #define IsDialogMessage IsDialogMessageA
  574. #undef DispatchMessage
  575. #define DispatchMessage DispatchMessageA
  576. #undef GetWindowLong
  577. #define GetWindowLong GetWindowLongA
  578. #undef SetWindowLong
  579. #define SetWindowLong SetWindowLongA
  580. #undef GetWindowLongPtr
  581. #define GetWindowLongPtr GetWindowLongPtrA
  582. #undef SetWindowLongPtr
  583. #define SetWindowLongPtr SetWindowLongPtrA
  584. #undef SystemParametersInfo
  585. #define SystemParametersInfo SystemParametersInfoA
  586. #undef GetObject
  587. #define GetObject GetObjectA
  588. DWORD
  589. WINAPI
  590. GetShortPathNameX(
  591. LPCWSTR lpszLongPath,
  592. LPWSTR lpszShortPath,
  593. DWORD cchBuffer
  594. );
  595. #undef GetShortPathName
  596. #define GetShortPathName GetShortPathNameX
  597. #define GetShortPathNameT GetShortPathNameA
  598. DWORD
  599. WINAPI
  600. GetFullPathNameX(
  601. LPCWSTR lpFileName,
  602. DWORD nBufferLength,
  603. LPWSTR lpBuffer,
  604. LPWSTR *lpFilePart
  605. );
  606. #undef GetFullPathName
  607. #define GetFullPathName GetFullPathNameX
  608. #define GetFullPathNameT GetFullPathNameA
  609. DWORD
  610. WINAPI
  611. SearchPathX(
  612. LPCWSTR lpPath,
  613. LPCWSTR lpFileName,
  614. LPCWSTR lpExtension,
  615. DWORD nBufferLength,
  616. LPWSTR lpBuffer,
  617. LPWSTR *lpFilePart
  618. );
  619. #undef SearchPath
  620. #define SearchPath SearchPathX
  621. #define SearchPathT SearchPathA
  622. ATOM
  623. WINAPI
  624. GlobalFindAtomX(
  625. LPCWSTR lpString
  626. );
  627. #undef GlobalFindAtom
  628. #define GlobalFindAtom GlobalFindAtomX
  629. #define GlobalFindAtomT GlobalFindAtomA
  630. int
  631. WINAPI
  632. GetClassNameX(
  633. HWND hWnd,
  634. LPWSTR lpClassName,
  635. int nMaxCount);
  636. #undef GetClassName
  637. #define GetClassName GetClassNameX
  638. #define GetClassNameT GetClassNameA
  639. LPWSTR
  640. WINAPI
  641. CharLowerX(
  642. LPWSTR lpsz);
  643. #undef CharLower
  644. #define CharLower CharLowerX
  645. LPWSTR
  646. WINAPI
  647. CharUpperX(
  648. LPWSTR lpsz);
  649. #undef CharUpper
  650. #define CharUpper CharUpperX
  651. #define CharLowerBuffW CharLowerBuffW_not_available_on_Win9x
  652. #define CharUpperBuffW CharUpperBuffW_not_available_on_Win9x
  653. BOOL
  654. WINAPI
  655. GetStringTypeX(
  656. DWORD dwInfoType,
  657. LPCWSTR lpSrcStr,
  658. int cchSrc,
  659. LPWORD lpCharType);
  660. #define GetStringTypeW GetStringTypeX
  661. BOOL
  662. WINAPI
  663. IsCharAlphaX(
  664. WCHAR ch);
  665. #define IsCharAlphaW IsCharAlphaX
  666. BOOL
  667. WINAPI
  668. IsCharAlphaNumericX(
  669. WCHAR ch);
  670. #define IsCharAlphaNumericW IsCharAlphaNumericX
  671. #define IsCharLowerW IsCharLowerW_is_not_available_on_Win9x
  672. #define IsCharUpperW IsCharUpperW_is_not_available_on_Win9x
  673. #define LCMapStringW LCMapStringW_is_not_available_on_Win9x
  674. LPWSTR
  675. WINAPI
  676. lstrcatX(
  677. LPWSTR lpString1,
  678. LPCWSTR lpString2
  679. );
  680. #undef lstrcat
  681. #define lstrcat lstrcatX
  682. LPWSTR
  683. WINAPI
  684. lstrcpyX(
  685. LPWSTR lpString1,
  686. LPCWSTR lpString2
  687. );
  688. #undef lstrcpy
  689. #define lstrcpy lstrcpyX
  690. LPWSTR
  691. WINAPI
  692. lstrcpynX(
  693. LPWSTR lpString1,
  694. LPCWSTR lpString2,
  695. int iMaxLength
  696. );
  697. #undef lstrcpyn
  698. #define lstrcpyn lstrcpynX
  699. int
  700. WINAPI
  701. lstrcmpX(
  702. LPCWSTR lpString1,
  703. LPCWSTR lpString2
  704. );
  705. #undef lstrcmp
  706. #define lstrcmp lstrcmpX
  707. int
  708. strnicmpX(
  709. LPWSTR lpString1,
  710. LPWSTR lpString2,
  711. size_t count
  712. );
  713. #undef strnicmp
  714. #define strnicmp strnicmpX
  715. int
  716. WINAPI
  717. lstrcmpiX(
  718. LPCWSTR lpString1,
  719. LPCWSTR lpString2
  720. );
  721. #undef lstrcmpi
  722. #define lstrcmpi lstrcmpiX
  723. DWORD
  724. WINAPI
  725. lstrlenX(
  726. LPCWSTR lpString2
  727. );
  728. #undef lstrlen
  729. #define lstrlen lstrlenX
  730. BOOL
  731. WINAPI
  732. SetFileAttributesX(
  733. LPCWSTR lpFileName,
  734. DWORD dwFileAttributes
  735. );
  736. #undef SetFileAttributes
  737. #define SetFileAttributes SetFileAttributesX
  738. HANDLE
  739. WINAPI
  740. CreateFileMappingX(
  741. HANDLE hFile,
  742. LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
  743. DWORD flProtect,
  744. DWORD dwMaximumSizeHigh,
  745. DWORD dwMaximumSizeLow,
  746. LPCWSTR lpName
  747. );
  748. #undef CreateFileMapping
  749. #define CreateFileMapping CreateFileMappingX
  750. #define CreateFileMappingT CreateFileMappingA
  751. HANDLE
  752. WINAPI
  753. OpenFileMappingX(
  754. DWORD dwDesiredAccess,
  755. BOOL bInheritHandle,
  756. LPCWSTR lpName
  757. );
  758. #undef OpenFileMapping
  759. #define OpenFileMapping OpenFileMappingX
  760. #define OpenFileMappingT OpenFileMappingA
  761. HICON LoadIconX(
  762. HINSTANCE hInstance,
  763. LPCWSTR lpIconName
  764. );
  765. #undef LoadIcon
  766. #define LoadIcon LoadIconX
  767. HCURSOR LoadCursorX(
  768. HINSTANCE hInstance,
  769. LPCWSTR lpCursorName
  770. );
  771. #undef LoadCursor
  772. #define LoadCursor LoadCursorX
  773. HANDLE LoadImageX(
  774. HINSTANCE hinst,
  775. LPCWSTR lpszName,
  776. UINT uType,
  777. int cxDesired,
  778. int cyDesired,
  779. UINT fuLoad
  780. );
  781. #undef LoadImage
  782. #define LoadImage LoadImageX
  783. HRSRC FindResourceX(
  784. HMODULE hModule,
  785. LPCWSTR lpName,
  786. LPCWSTR lpType
  787. );
  788. #undef FindResource
  789. #define FindResource FindResourceX
  790. DWORD_PTR
  791. WINAPI
  792. SHGetFileInfoX(
  793. LPCWSTR pszPath,
  794. DWORD dwFileAttributes,
  795. SHFILEINFOW FAR *psfi,
  796. UINT cbFileInfo,
  797. UINT uFlags);
  798. #undef SHGetFileInfo
  799. #define SHGetFileInfo SHGetFileInfoX
  800. BOOL
  801. WINAPI
  802. Shell_NotifyIconX(
  803. DWORD dwMessage,
  804. PNOTIFYICONDATAW lpData);
  805. #undef Shell_NotifyIcon
  806. #define Shell_NotifyIcon Shell_NotifyIconX
  807. int
  808. WINAPI
  809. MessageBoxX(
  810. HWND hWnd,
  811. LPCWSTR lpText,
  812. LPCWSTR lpCaption,
  813. UINT uType);
  814. #undef MessageBox
  815. #define MessageBox MessageBoxX
  816. // listView Wrappers
  817. BOOL
  818. ListView_GetItemX(
  819. HWND hwnd,
  820. LV_ITEM * pitem);
  821. #undef ListView_GetItem
  822. #define ListView_GetItem ListView_GetItemX
  823. BOOL
  824. ListView_SetItemX(
  825. HWND hwnd,
  826. LV_ITEM * pitem);
  827. #undef ListView_SetItem
  828. #define ListView_SetItem ListView_SetItemX
  829. BOOL
  830. ListView_InsertItemX(
  831. HWND hwnd,
  832. LV_ITEM * pitem);
  833. #undef ListView_InsertItem
  834. #define ListView_InsertItem ListView_InsertItemX
  835. BOOL
  836. ListView_SetColumnX(
  837. HWND hwnd,
  838. int iCol,
  839. LV_COLUMN * pColumn);
  840. #undef ListView_SetColumn
  841. #define ListView_SetColumn ListView_SetColumnX
  842. int
  843. ListView_InsertColumnX(
  844. HWND hwnd,
  845. int iCol,
  846. LV_COLUMN * pColumn);
  847. #undef ListView_InsertColumn
  848. #define ListView_InsertColumn ListView_InsertColumnX
  849. // comboBox wrappers
  850. int ComboEx_InsertItemX(HWND hwnd,PCCOMBOEXITEMW pComboExItemW);
  851. #undef ComboEx_InsertItem
  852. #define ComboEx_InsertItem ComboEx_InsertItemX
  853. BOOL ComboEx_GetItemX(HWND hwnd,PCCOMBOEXITEMW pComboExItemW);
  854. #undef ComboEx_GetItem
  855. #define ComboEx_GetItem ComboEx_GetItemX
  856. // TabCtrl Wrappers.
  857. int
  858. TabCtrl_InsertItemX(HWND hwnd,int iItem,LPTCITEMW ptcItem);
  859. #undef TabCtrl_InsertItem
  860. #define TabCtrl_InsertItem TabCtrl_InsertItemX
  861. // animatiion control wrappers
  862. BOOL Animate_OpenX(HWND hwnd,LPWSTR szName);
  863. #undef Animate_Open
  864. #define Animate_Open Animate_OpenX
  865. HPROPSHEETPAGE
  866. WINAPI CreatePropertySheetPageX(LPCPROPSHEETPAGEW);
  867. #undef CreatePropertySheetPage
  868. #define CreatePropertySheetPage CreatePropertySheetPageX
  869. INT_PTR
  870. WINAPI PropertySheetX(
  871. LPCPROPSHEETHEADERW);
  872. #undef PropertySheet
  873. #define PropertySheet PropertySheetX
  874. int DrawTextX(
  875. HDC hDC,
  876. LPCWSTR lpString,
  877. int nCount,
  878. LPRECT lpRect,
  879. UINT uFormat
  880. );
  881. #undef DrawText
  882. #define DrawText DrawTextX
  883. HWND
  884. WINAPI
  885. FindWindowExX(
  886. HWND hwndParent,
  887. HWND hwndChildAfter,
  888. LPCWSTR lpszClass,
  889. LPCWSTR lpszWindow
  890. );
  891. #undef FindWindowEx
  892. #define FindWindowEx FindWindowExX
  893. HWND
  894. WINAPI
  895. FindWindowX(
  896. LPCWSTR lpClassName,
  897. LPCWSTR lpWindowName);
  898. #undef FindWindow
  899. #define FindWindow FindWindowX
  900. BOOL SetWindowTextX(
  901. HWND hWnd,
  902. LPCWSTR lpString
  903. );
  904. #undef SetWindowText
  905. #define SetWindowText SetWindowTextX
  906. int ListBox_AddStringX(
  907. HWND hWnd,
  908. LPCWSTR lpString
  909. );
  910. #undef ListBox_AddString
  911. #define ListBox_AddString ListBox_AddStringX
  912. int GetWindowTextX(
  913. HWND hWnd,
  914. LPTSTR lpString,
  915. int nMaxCount
  916. );
  917. #undef GetWindowText
  918. #define GetWindowText GetWindowTextX
  919. #undef SetDlgItemText
  920. #define SetDlgItemText(h,id,szBuf) SetWindowTextX(GetDlgItem(h,id),szBuf)
  921. #undef GetDlgItemText
  922. #define GetDlgItemText(h,id,szBuf,cchMax) GetWindowTextX(GetDlgItem(h,id),szBuf,cchMax)
  923. #undef SendDlgItemMessage
  924. #define SendDlgItemMessage(h,id,msg,wp,lp) SendMessageA(GetDlgItem(h,id),msg,wp,lp)
  925. BOOL
  926. WINAPI
  927. WinHelpX(
  928. HWND hWndMain,
  929. LPCWSTR lpszHelp,
  930. UINT uCommand,
  931. ULONG_PTR dwData
  932. );
  933. #undef WinHelp
  934. #define WinHelp WinHelpX
  935. int
  936. WINAPI
  937. GetDateFormatX(
  938. LCID Locale,
  939. DWORD dwFlags,
  940. CONST SYSTEMTIME *lpDate,
  941. LPCWSTR lpFormat,
  942. LPWSTR lpDateStr,
  943. int cchDate);
  944. #undef GetDateFormat
  945. #define GetDateFormat GetDateFormatX
  946. int
  947. WINAPI
  948. GetTimeFormatX(
  949. LCID Locale,
  950. DWORD dwFlags,
  951. CONST SYSTEMTIME *lpTime,
  952. LPCWSTR lpFormat,
  953. LPWSTR lpTimeStr,
  954. int cchTime);
  955. #undef GetTimeFormat
  956. #define GetTimeFormat GetTimeFormatX
  957. BOOL
  958. DateTime_SetFormatX(
  959. HWND hwnd,
  960. LPCWSTR pszTimeFormat);
  961. #undef DateTime_SetFormat
  962. #define DateTime_SetFormat DateTime_SetFormatX
  963. HFONT
  964. WINAPI
  965. CreateFontIndirectX(
  966. CONST LOGFONTW *);
  967. #undef CreateFontIndirect
  968. #define CreateFontIndirect CreateFontIndirectX
  969. DWORD
  970. WINAPI
  971. FormatMessageX(
  972. DWORD dwFlags,
  973. LPCVOID lpSource,
  974. DWORD dwMessageId,
  975. DWORD dwLanguageId,
  976. LPWSTR lpBuffer,
  977. DWORD nSize,
  978. va_list *Arguments
  979. );
  980. #undef FormatMessage
  981. #define FormatMessage FormatMessageX
  982. BOOL
  983. WINAPI
  984. IsBadStringPtrX(
  985. LPCWSTR lpsz,
  986. UINT ucchMax
  987. );
  988. #undef IsBadStringPtr
  989. #define IsBadStringPtr IsBadStringPtrX
  990. BOOL
  991. APIENTRY
  992. GetTextExtentPointX(
  993. HDC,
  994. LPCWSTR,
  995. int,
  996. LPSIZE
  997. );
  998. #undef GetTextExtentPoint
  999. #define GetTextExtentPoint GetTextExtentPointX
  1000. #endif // _UNICODE
  1001. // automation exports
  1002. // don't widewrap so outside of UNICODE ifdef but need to delay load
  1003. // so do it here.
  1004. STDAPI_(BSTR) SysAllocStringX(const OLECHAR *);
  1005. #undef SysAllocString
  1006. #define SysAllocString SysAllocStringX
  1007. STDAPI_(void) SysFreeStringX(BSTR);
  1008. #undef SysFreeString
  1009. #define SysFreeString SysFreeStringX
  1010. STDAPI LoadRegTypeLibX(REFGUID rguid, WORD wVerMajor, WORD wVerMinor,
  1011. LCID lcid, ITypeLib ** pptlib);
  1012. #undef LoadRegTypeLib
  1013. #define LoadRegTypeLib LoadRegTypeLibX
  1014. // wrappers for delay loading userenv
  1015. BOOL
  1016. WINAPI
  1017. GetUserProfileDirectoryX(
  1018. HANDLE hToken,
  1019. LPWSTR lpProfileDir,
  1020. LPDWORD lpcchSize);
  1021. #undef GetUserProfileDirectory
  1022. #define GetUserProfileDirectory GetUserProfileDirectoryX
  1023. // wrappers for delay load of user32 exports only available on NT 5.0
  1024. #ifndef ASFW_ANY
  1025. #define ASFW_ANY ((DWORD)-1)
  1026. #endif // ASFW_ANY
  1027. BOOL
  1028. WINAPI
  1029. AllowSetForegroundWindowX(
  1030. DWORD dwProcessId);
  1031. #undef AllowSetForegroundWindow
  1032. #define AllowSetForegroundWindow AllowSetForegroundWindowX
  1033. // wrappers for delayed IMM
  1034. HIMC
  1035. WINAPI
  1036. ImmAssociateContextX(HWND hWnd,HIMC hIMC);
  1037. #undef ImmAssociateContext
  1038. #define ImmAssociateContext ImmAssociateContextX
  1039. #ifdef __cplusplus
  1040. }
  1041. #endif
  1042. #endif // _WIDEWRAP_H_