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.

760 lines
30 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1994.
  5. //
  6. // File: wrapfns.h
  7. //
  8. // Contents: The list of Unicode functions wrapped for Win95. Each
  9. // wrapped function should listed in alphabetical order with
  10. // the following format:
  11. //
  12. // STRUCT_ENTRY(FunctionName, ReturnType, (Param list with args), (Argument list))
  13. //
  14. // For example:
  15. //
  16. // STRUCT_ENTRY(RegisterClass, ATOM, (CONST WNDCLASSW * pwc), (pwc))
  17. //
  18. // For functions which return void, use the following:
  19. //
  20. // STRUCT_ENTRY_VOID(FunctionName, (Param list with args), (Argument list))
  21. //
  22. //----------------------------------------------------------------------------
  23. #ifndef _WRAPFNS_H_
  24. #define _WRAPFNS_H_
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. #define STRUCT_ENTRY(FnName, FnType, FnParamList, FnArgs) \
  29. EXTERN_C FnType WINAPI FnName##Wrap FnParamList;
  30. #define STRUCT_ENTRY_VOID(FnName, FnParamList, FnArgs) \
  31. EXTERN_C void WINAPI FnName##Wrap FnParamList;
  32. #ifdef UNICODE
  33. #ifndef WINNT
  34. #define lstrcmpW StrCmpW
  35. #define lstrcmpiW StrCmpIW
  36. #define lstrcpyW StrCpyW
  37. #define lstrcpynW StrCpyNW
  38. #define lstrcatW StrCatW
  39. #define AppendMenuW AppendMenuWrap
  40. STRUCT_ENTRY(AppendMenu,
  41. BOOL,
  42. (HMENU hMenu, UINT uFlags, UINT uIDnewItem, LPCWSTR lpnewItem),
  43. (hMenu, uFlags, uIDnewItem, lpnewItem))
  44. #define CallMsgFilterW CallMsgFilterWrap
  45. STRUCT_ENTRY(CallMsgFilter, BOOL, (LPMSG lpMsg, int nCode), (lpMsg, nCode))
  46. #define CallWindowProcW CallWindowProcWrap
  47. STRUCT_ENTRY(CallWindowProc,
  48. LRESULT,
  49. (WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam),
  50. (lpPrevWndFunc, hWnd, Msg, wParam, lParam))
  51. #define CharLowerW CharLowerWrap
  52. STRUCT_ENTRY(CharLower, LPWSTR, (LPWSTR lpsz), (lpsz))
  53. #define CharLowerBuffW CharLowerBuffWrap
  54. STRUCT_ENTRY(CharLowerBuff, DWORD, (LPWSTR lpsz, DWORD cch), (lpsz, cch))
  55. #define CharNextW CharNextWrap
  56. STRUCT_ENTRY(CharNext, LPWSTR, (LPCWSTR lpsz), (lpsz))
  57. #define CharPrevW CharPrevWrap
  58. STRUCT_ENTRY(CharPrev, LPWSTR, (LPCWSTR lpszStart, LPCWSTR lpszCurrent), (lpszStart, lpszCurrent))
  59. #define CharToOemW CharToOemWrap
  60. STRUCT_ENTRY(CharToOem, BOOL, (LPCWSTR lpszSrc, LPSTR lpszDst), (lpszSrc, lpszDst))
  61. #define CharUpperW CharUpperWrap
  62. STRUCT_ENTRY(CharUpper, LPWSTR, (LPWSTR lpsz), (lpsz))
  63. #define CharUpperBuffW CharUpperBuffWrap
  64. STRUCT_ENTRY(CharUpperBuff, DWORD, (LPWSTR lpsz, DWORD cch), (lpsz, cch))
  65. #define CompareStringW CompareStringWrap
  66. STRUCT_ENTRY(CompareString,
  67. int,
  68. (LCID Locale, DWORD dwCmpFlags, LPCTSTR lpString1, int cchCount1, LPCTSTR lpString2, int cchCount2),
  69. (Locale, dwCmpFlags, lpString1, cchCount1, lpString2, cchCount2))
  70. #define CopyAcceleratorTableW CopyAcceleratorTableWrap
  71. STRUCT_ENTRY(CopyAcceleratorTable,
  72. int,
  73. (HACCEL hAccelSrc, LPACCEL lpAccelDst, int cAccelEntries),
  74. (hAccelSrc, lpAccelDst, cAccelEntries))
  75. #define CreateAcceleratorTableW CreateAcceleratorTableWrap
  76. STRUCT_ENTRY(CreateAcceleratorTable, HACCEL, (LPACCEL pAccel, int cEntries), (pAccel, cEntries))
  77. #define CreateDCW CreateDCWrap
  78. STRUCT_ENTRY(CreateDC,
  79. HDC,
  80. (LPCWSTR lpszDriver, LPCWSTR lpszDevice, LPCWSTR lpszOutput, CONST DEVMODEW* lpInitData),
  81. (lpszDriver, lpszDevice, lpszOutput, lpInitData))
  82. #define CreateDirectoryW CreateDirectoryWrap
  83. STRUCT_ENTRY(CreateDirectory,
  84. BOOL,
  85. (LPCWSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes),
  86. (lpPathName, lpSecurityAttributes))
  87. #define CreateEventW CreateEventWrap
  88. STRUCT_ENTRY(CreateEvent,
  89. HANDLE,
  90. (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCWSTR lpName),
  91. (lpEventAttributes, bManualReset, bInitialState, lpName))
  92. #define CreateFileW CreateFileWrap
  93. STRUCT_ENTRY(CreateFile,
  94. HANDLE,
  95. (LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile),
  96. (lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile))
  97. #define CreateFileMappingW CreateFileMappingWrap
  98. STRUCT_ENTRY(CreateFileMapping,
  99. HANDLE,
  100. (HANDLE hFile, LPSECURITY_ATTRIBUTES lpFileMappingAttributes, DWORD flProtect, DWORD dwMaxSizeHigh, DWORD dwMaxSizeLow, LPCWSTR lpName),
  101. (hFile, lpFileMappingAttributes, flProtect, dwMaxSizeHigh, dwMaxSizeLow, lpName))
  102. #define CreateFontW CreateFontWrap
  103. STRUCT_ENTRY(CreateFont,
  104. HFONT,
  105. (int nHeight, int nWidth, int nEscapement, int nOrientation, int fnWeight, DWORD fdwItalic, DWORD fdwUnderline, DWORD fdwStrikeOut, DWORD fdwCharSet, DWORD fdwOutputPrecision, DWORD fdwClipPrecision, DWORD fdwQuality, DWORD fdwPitchAndFamily, LPCWSTR lpszFace),
  106. (nHeight, nWidth, nEscapement, nOrientation, fnWeight, fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily, lpszFace))
  107. #define CreateFontIndirectW CreateFontIndirectWrap
  108. STRUCT_ENTRY(CreateFontIndirect, HFONT, (CONST LOGFONTW * lpfw), (lpfw))
  109. #define CreateICW CreateICWrap
  110. STRUCT_ENTRY(CreateIC,
  111. HDC,
  112. (LPCWSTR lpszDriver, LPCWSTR lpszDevice, LPCWSTR lpszOutput, CONST DEVMODEW* lpInitData),
  113. (lpszDriver, lpszDevice, lpszOutput, lpInitData))
  114. #define CreateWindowExW CreateWindowExWrap
  115. STRUCT_ENTRY(CreateWindowEx,
  116. HWND,
  117. (DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam),
  118. (dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam))
  119. #define DefWindowProcW DefWindowProcWrap
  120. STRUCT_ENTRY(DefWindowProc,
  121. LRESULT,
  122. (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam),
  123. (hWnd, msg, wParam, lParam))
  124. #define DeleteFileW DeleteFileWrap
  125. STRUCT_ENTRY(DeleteFile, BOOL, (LPCWSTR lpsz), (lpsz))
  126. #define DispatchMessageW DispatchMessageWrap
  127. STRUCT_ENTRY(DispatchMessage, LRESULT, (CONST MSG * pMsg), (pMsg))
  128. #define EnumFontFamiliesW EnumFontFamiliesWrap
  129. STRUCT_ENTRY(EnumFontFamilies,
  130. int,
  131. (HDC hdc, LPCWSTR lpszFamily, FONTENUMPROC lpEnumFontProc, LPARAM lParam),
  132. (hdc, lpszFamily, lpEnumFontProc, lParam))
  133. #define EnumFontFamiliesExW EnumFontFamiliesExWrap
  134. STRUCT_ENTRY(EnumFontFamiliesEx,
  135. int,
  136. (HDC hdc, LPLOGFONTW lpLogFont, FONTENUMPROC lpEnumFontProc, LPARAM lParam, DWORD dwFlags),
  137. (hdc, lpLogFont, lpEnumFontProc, lParam, dwFlags))
  138. #define EnumResourceNamesW EnumResourceNamesWrap
  139. STRUCT_ENTRY(EnumResourceNames,
  140. BOOL,
  141. (HINSTANCE hModule, LPCWSTR lpType, ENUMRESNAMEPROC lpEnumFunc, LONG lParam),
  142. (hModule, lpType, lpEnumFunc, lParam))
  143. #define FindFirstFileW FindFirstFileWrap
  144. STRUCT_ENTRY(FindFirstFile,
  145. HANDLE,
  146. (LPCWSTR lpFileName, LPWIN32_FIND_DATAW pwszFd),
  147. (lpFileName, pwszFd))
  148. #define FindResourceExW FindResourceExWrap
  149. STRUCT_ENTRY(FindResourceEx,
  150. HRSRC,
  151. (HINSTANCE hModule, LPCWSTR lpType, LPCWSTR lpName, WORD wLang),
  152. (hModule, lpType, lpName, wLang))
  153. // This is not a typo. FindResource and FindResourceEx take their parameters
  154. // in a DIFFERENT order!
  155. #define FindResourceW(a,b,c) FindResourceExW(a,c,b,0)
  156. #define FindWindowW FindWindowWrap
  157. STRUCT_ENTRY(FindWindow,
  158. HWND,
  159. (LPCWSTR lpClassName, LPCWSTR lpWindowName),
  160. (lpClassName, lpWindowName))
  161. #define FormatMessageW FormatMessageWrap
  162. STRUCT_ENTRY(FormatMessage,
  163. DWORD,
  164. (DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, va_list *Arguments),
  165. (dwFlags, lpSource, dwMessageId, dwLanguageId, lpBuffer, nSize, Arguments))
  166. #define GetClassInfoW GetClassInfoWrap
  167. STRUCT_ENTRY(GetClassInfo,
  168. BOOL,
  169. (HINSTANCE hModule, LPCWSTR lpClassName, LPWNDCLASSW lpWndClassW),
  170. (hModule, lpClassName, lpWndClassW))
  171. #define GetClassLongW GetClassLongWrap
  172. STRUCT_ENTRY(GetClassLong, DWORD, (HWND hWnd, int nIndex), (hWnd, nIndex))
  173. #define GetClassNameW GetClassNameWrap
  174. STRUCT_ENTRY(GetClassName,
  175. int,
  176. (HWND hWnd, LPWSTR lpClassName, int nMaxCount),
  177. (hWnd, lpClassName, nMaxCount))
  178. #define GetClipboardFormatNameW GetClipboardFormatNameWrap
  179. STRUCT_ENTRY(GetClipboardFormatName,
  180. int,
  181. (UINT format, LPWSTR lpFormatName, int cchFormatName),
  182. (format, lpFormatName, cchFormatName))
  183. #define GetCurrentDirectoryW GetCurrentDirectoryWrap
  184. STRUCT_ENTRY(GetCurrentDirectory,
  185. DWORD,
  186. (DWORD nBufferLength, LPWSTR lpBuffer),
  187. (nBufferLength, lpBuffer))
  188. #define GetDateFormatW GetDateFormatWrap
  189. STRUCT_ENTRY(GetDateFormat,
  190. int,
  191. (LCID Locale, DWORD dwFlags, CONST SYSTEMTIME *lpDate, LPCWSTR lpFormat, LPWSTR lpDateStr, int cchDate),
  192. (Locale, dwFlags, lpDate, lpFormat, lpDateStr, cchDate))
  193. #define GetDlgItemTextW GetDlgItemTextWrap
  194. STRUCT_ENTRY(GetDlgItemText,
  195. UINT,
  196. (HWND hWndDlg, int idControl, LPWSTR lpsz, int cchMax),
  197. (hWndDlg, idControl, lpsz, cchMax))
  198. #define GetFileAttributesW GetFileAttributesWrap
  199. STRUCT_ENTRY(GetFileAttributes, DWORD, (LPCWSTR lpsz), (lpsz))
  200. #define GetFullPathNameW GetFullPathNameWrap
  201. STRUCT_ENTRY(GetFullPathName,
  202. DWORD,
  203. ( LPCWSTR lpFileName,
  204. DWORD nBufferLength,
  205. LPWSTR lpBuffer,
  206. LPWSTR *lpFilePart),
  207. ( lpFileName, nBufferLength, lpBuffer, lpFilePart))
  208. #define GetKeyNameTextW GetKeyNameTextWrap
  209. STRUCT_ENTRY(GetKeyNameText, int, (LONG lParam, LPWSTR lpsz, int nSize), (lParam, lpsz, nSize))
  210. #define GetLocaleInfoW GetLocaleInfoWrap
  211. STRUCT_ENTRY(GetLocaleInfo,
  212. int,
  213. (LCID Locale, LCTYPE LCType, LPWSTR lpsz, int cchData),
  214. (Locale, LCType, lpsz, cchData))
  215. #define GetMenuItemInfoW GetMenuItemInfoWrap
  216. STRUCT_ENTRY(GetMenuItemInfo,
  217. BOOL,
  218. (HMENU hMenu, UINT uItem, BOOL fByPosition, LPMENUITEMINFOW lpmii),
  219. (hMenu, uItem, fByPosition, lpmii))
  220. #define GetMenuStringW GetMenuStringWrap
  221. STRUCT_ENTRY(GetMenuString,
  222. int,
  223. (HMENU hMenu, UINT uIDItem, LPWSTR lpString, int nMaxCount, UINT uFlag),
  224. (hMenu, uIDItem, lpString, nMaxCount, uFlag))
  225. #define GetMessageW GetMessageWrap
  226. STRUCT_ENTRY(GetMessage,
  227. BOOL,
  228. (LPMSG lpMsg, HWND hWnd , UINT wMsgFilterMin, UINT wMsgFilterMax),
  229. (lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax))
  230. #define GetModuleFileNameW GetModuleFileNameWrap
  231. STRUCT_ENTRY(GetModuleFileName,
  232. DWORD,
  233. (HINSTANCE hModule, LPWSTR pwszFilename, DWORD nSize),
  234. (hModule, pwszFilename, nSize))
  235. #define GetNumberFormatW GetNumberFormatWrap
  236. STRUCT_ENTRY(GetNumberFormat,
  237. int,
  238. (LCID Locale, DWORD dwFlags, LPCWSTR lpValue, CONST NUMBERFMTW *lpFormat, LPWSTR lpNumberStr, int cchNumber),
  239. (Locale, dwFlags, lpValue, lpFormat, lpNumberStr, cchNumber))
  240. #define GetSystemDirectoryW GetSystemDirectoryWrap
  241. STRUCT_ENTRY(GetSystemDirectory,
  242. UINT,
  243. (LPWSTR lpBuffer, UINT uSize),
  244. (lpBuffer, uSize))
  245. #define SearchPathW SearchPathWrap
  246. STRUCT_ENTRY(SearchPath,
  247. DWORD,
  248. (LPCWSTR lpPathName, LPCWSTR lpFileName, LPCWSTR lpExtension, DWORD cchReturnBuffer,
  249. LPWSTR lpReturnBuffer, LPWSTR * plpfilePart),
  250. (lpPathName, lpFileName, lpExtension, cchReturnBuffer, lpReturnBuffer, plpfilePart))
  251. #define GetModuleHandleW GetModuleHandleWrap
  252. STRUCT_ENTRY(GetModuleHandle, HMODULE, (LPCWSTR lpsz), (lpsz))
  253. #define GetObjectW GetObjectWrap
  254. STRUCT_ENTRY(GetObject,
  255. int,
  256. (HGDIOBJ hgdiObj, int cbBuffer, LPVOID lpvObj),
  257. (hgdiObj, cbBuffer, lpvObj))
  258. #define GetPrivateProfileIntW GetPrivateProfileIntWrap
  259. STRUCT_ENTRY(GetPrivateProfileInt,
  260. UINT,
  261. (LPCWSTR lpAppName, LPCWSTR lpKeyName, INT nDefault, LPCWSTR lpFileName),
  262. (lpAppName, lpKeyName, nDefault, lpFileName))
  263. #define GetProfileIntW GetProfileIntWrap
  264. STRUCT_ENTRY(GetProfileInt,
  265. UINT,
  266. (LPCWSTR lpAppName, LPCWSTR lpKeyName, INT nDefault),
  267. (lpAppName, lpKeyName, nDefault))
  268. #define GetProfileStringW GetProfileStringWrap
  269. STRUCT_ENTRY(GetProfileString,
  270. DWORD,
  271. (LPCWSTR lpAppName, LPCWSTR lpKeyName, LPCWSTR lpDefault, LPWSTR lpBuffer, DWORD dwBuffersize),
  272. (lpAppName, lpKeyName, lpDefault, lpBuffer, dwBuffersize))
  273. #define GetPropW GetPropWrap
  274. STRUCT_ENTRY(GetProp, HANDLE, (HWND hWnd, LPCWSTR lpString), (hWnd, lpString))
  275. #define GetStringTypeExW GetStringTypeExWrap
  276. STRUCT_ENTRY(GetStringTypeEx, BOOL,
  277. (LCID lcid, DWORD dwInfoType, LPCTSTR lpSrcStr, int cchSrc, LPWORD lpCharType),
  278. (lcid, dwInfoType, lpSrcStr, cchSrc, lpCharType))
  279. #define GetTempFileNameW GetTempFileNameWrap
  280. STRUCT_ENTRY(GetTempFileName,
  281. UINT,
  282. (LPCWSTR lpPathName, LPCWSTR lpPrefixString, UINT uUnique, LPWSTR lpTempFileName),
  283. (lpPathName, lpPrefixString, uUnique, lpTempFileName))
  284. #define GetTempPathW GetTempPathWrap
  285. STRUCT_ENTRY(GetTempPath, DWORD, (DWORD nBufferLength, LPWSTR lpBuffer), (nBufferLength, lpBuffer))
  286. #define GetTextFaceW GetTextFaceWrap
  287. STRUCT_ENTRY(GetTextFace,
  288. int,
  289. (HDC hdc, int cch, LPWSTR lpFaceName),
  290. (hdc, cch, lpFaceName))
  291. #define GetTextMetricsW GetTextMetricsWrap
  292. STRUCT_ENTRY(GetTextMetrics, BOOL, (HDC hdc, LPTEXTMETRICW lptm), (hdc, lptm))
  293. #define GetTimeFormatW GetTimeFormatWrap
  294. STRUCT_ENTRY(GetTimeFormat,
  295. int,
  296. (LCID Locale, DWORD dwFlags, CONST SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpTimeStr, int cchTime),
  297. (Locale, dwFlags, lpTime, lpFormat, lpTimeStr, cchTime))
  298. #define GetWindowLongW GetWindowLongWrap
  299. STRUCT_ENTRY(GetWindowLong, LONG, (HWND hWnd, int nIndex), (hWnd, nIndex))
  300. #define GetWindowTextW GetWindowTextWrap
  301. STRUCT_ENTRY(GetWindowText, int, (HWND hWnd, LPWSTR lpString, int nMaxCount), (hWnd, lpString, nMaxCount))
  302. #define GetWindowTextLengthW GetWindowTextLengthWrap
  303. STRUCT_ENTRY(GetWindowTextLength, int, (HWND hWnd), (hWnd))
  304. #define GetWindowsDirectoryW GetWindowsDirectoryWrap
  305. STRUCT_ENTRY(GetWindowsDirectory, UINT, (LPWSTR lpWinPath, UINT cch), (lpWinPath, cch))
  306. #define GlobalAddAtomW GlobalAddAtomWrap
  307. STRUCT_ENTRY(GlobalAddAtom, ATOM, (LPCWSTR lpString), (lpString))
  308. #define GrayStringW GrayStringWrap
  309. STRUCT_ENTRY(GrayString,
  310. BOOL,
  311. (HDC hDC, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc, LPARAM lpData, int nCount, int x, int y, int nWidth, int nHeight),
  312. (hDC, hBrush, lpOutputFunc, lpData, nCount, x, y, nWidth, nHeight))
  313. #define ImmGetCompositionStringW ImmGetCompositionStringWrap
  314. STRUCT_ENTRY(ImmGetCompositionString,
  315. LONG,
  316. (HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen),
  317. (hIMC, dwIndex, lpBuf, dwBufLen))
  318. #define ImmSetCompositionStringW ImmSetCompositionStringWrap
  319. STRUCT_ENTRY(ImmSetCompositionString,
  320. LONG,
  321. (HIMC hIMC, DWORD dwIndex, LPVOID lpComp, DWORD dwCompLen, LPVOID lpRead, DWORD dwReadLen),
  322. (hIMC, dwIndex, lpComp, dwCompLen, lpRead, dwReadLen))
  323. #define InsertMenuW InsertMenuWrap
  324. STRUCT_ENTRY(InsertMenu,
  325. BOOL,
  326. (HMENU hMenu, UINT uPosition, UINT uFlags, UINT uIDNewItem, LPCWSTR lpNewItem),
  327. (hMenu, uPosition, uFlags, uIDNewItem, lpNewItem))
  328. #define IsCharAlphaW IsCharAlphaWrap
  329. STRUCT_ENTRY(IsCharAlpha, BOOL, (WCHAR wch), wch);
  330. #define IsCharAlphaNumericW IsCharAlphaNumericWrap
  331. STRUCT_ENTRY(IsCharAlphaNumeric, BOOL, (WCHAR wch), wch);
  332. #define IsCharUpperW IsCharUpperWrap
  333. STRUCT_ENTRY(IsCharUpper, BOOL, (WCHAR wch), wch);
  334. #define IsCharLowerW IsCharLowerWrap
  335. STRUCT_ENTRY(IsCharLower, BOOL, (WCHAR wch), wch);
  336. #define IsDialogMessageW IsDialogMessageWrap
  337. STRUCT_ENTRY(IsDialogMessage, BOOL, (HWND hWndDlg, LPMSG lpMsg), (hWndDlg, lpMsg))
  338. #define LoadAcceleratorsW LoadAcceleratorsWrap
  339. STRUCT_ENTRY(LoadAccelerators, HACCEL, (HINSTANCE hInstance, LPCWSTR lpTableName), (hInstance, lpTableName))
  340. #define LoadBitmapW LoadBitmapWrap
  341. STRUCT_ENTRY(LoadBitmap, HBITMAP, (HINSTANCE hInstance, LPCWSTR lpBitmapName), (hInstance, lpBitmapName))
  342. #define LoadCursorW LoadCursorWrap
  343. STRUCT_ENTRY(LoadCursor, HCURSOR, (HINSTANCE hInstance, LPCWSTR lpCursorName), (hInstance, lpCursorName))
  344. #define LoadIconW LoadIconWrap
  345. STRUCT_ENTRY(LoadIcon, HICON, (HINSTANCE hInstance, LPCWSTR lpIconName), (hInstance, lpIconName))
  346. #define LoadImageW LoadImageWrap
  347. STRUCT_ENTRY(LoadImage, HANDLE, (HINSTANCE hInstance, LPCWSTR lpName, UINT uType, int cxDesired, int cyDesired, UINT fuLoad),
  348. (hInstance, lpName, uType, cxDesired, cyDesired, fuLoad))
  349. #define LoadLibraryW LoadLibraryWrap
  350. STRUCT_ENTRY(LoadLibrary, HINSTANCE, (LPCWSTR lpLibFileName), (lpLibFileName))
  351. #define LoadLibraryExW LoadLibraryExWrap
  352. STRUCT_ENTRY(LoadLibraryEx,
  353. HINSTANCE,
  354. (LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags),
  355. (lpLibFileName, hFile, dwFlags))
  356. #define LoadMenuW LoadMenuWrap
  357. STRUCT_ENTRY(LoadMenu, HMENU, (HINSTANCE hInstance, LPCWSTR lpMenuName), (hInstance, lpMenuName))
  358. #define LoadStringW LoadStringWrap
  359. STRUCT_ENTRY(LoadString,
  360. int,
  361. (HINSTANCE hInstance, UINT uID, LPWSTR lpBuffer, int nBufferMax),
  362. (hInstance, uID, lpBuffer, nBufferMax))
  363. #define MapVirtualKeyW MapVirtualKeyWrap
  364. STRUCT_ENTRY(MapVirtualKey, UINT, (UINT uCode, UINT uMapType), (uCode, uMapType))
  365. #define MessageBoxIndirectW MessageBoxIndirectWrap
  366. STRUCT_ENTRY(MessageBoxIndirect,
  367. BOOL,
  368. (LPMSGBOXPARAMS lpMsgBoxParams),
  369. (lpMsgBoxParams))
  370. #define ModifyMenuW ModifyMenuWrap
  371. STRUCT_ENTRY(ModifyMenu,
  372. BOOL,
  373. (HMENU hMenu, UINT uPosition, UINT uFlags, UINT uIDNewItem, LPCWSTR lpNewItem),
  374. (hMenu, uPosition, uFlags, uIDNewItem, lpNewItem))
  375. #define GetCharacterPlacementW GetCharacterPlacementWrap
  376. STRUCT_ENTRY(GetCharacterPlacement, DWORD,
  377. (HDC hdc, LPCTSTR lpString, int nCount, int nMaxExtent,
  378. LPGCP_RESULTS lpResults, DWORD dwFlags),
  379. (hdc, lpString, nCount, nMaxExtent,
  380. lpResults, dwFlags))
  381. #define CopyFileW CopyFileWrap
  382. STRUCT_ENTRY(CopyFile,
  383. BOOL,
  384. (LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName, BOOL bFailIfExists),
  385. (lpExistingFileName, lpNewFileName, bFailIfExists))
  386. #define MoveFileW MoveFileWrap
  387. STRUCT_ENTRY(MoveFile,
  388. BOOL,
  389. (LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName),
  390. (lpExistingFileName, lpNewFileName))
  391. #define OemToCharW OemToCharWrap
  392. STRUCT_ENTRY(OemToChar,
  393. BOOL,
  394. (LPCSTR lpszSrc, LPWSTR lpszDst),
  395. (lpszSrc, lpszDst))
  396. #define OutputDebugStringW OutputDebugStringWrap
  397. STRUCT_ENTRY_VOID(OutputDebugString,
  398. (LPCWSTR lpOutputString),
  399. (lpOutputString))
  400. #define PeekMessageW PeekMessageWrap
  401. STRUCT_ENTRY(PeekMessage,
  402. BOOL,
  403. (LPMSG lpMsg, HWND hWnd , UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg),
  404. (lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg))
  405. #define PostMessageW PostMessageWrap
  406. STRUCT_ENTRY(PostMessage,
  407. BOOL,
  408. (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam),
  409. (hWnd, Msg, wParam, lParam))
  410. #define PostThreadMessageW PostThreadMessageWrap
  411. STRUCT_ENTRY(PostThreadMessage,
  412. BOOL,
  413. (DWORD idThread, UINT Msg, WPARAM wParam, LPARAM lParam),
  414. (idThread, Msg, wParam, lParam))
  415. #define RegCreateKeyW RegCreateKeyWrap
  416. STRUCT_ENTRY(RegCreateKey,
  417. LONG,
  418. (HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult),
  419. (hKey, lpSubKey, phkResult))
  420. #define RegCreateKeyExW RegCreateKeyExWrap
  421. STRUCT_ENTRY(RegCreateKeyEx,
  422. LONG,
  423. (HKEY hKey, LPCWSTR lpSubKey, DWORD Reserved, LPWSTR lpClass, DWORD dwOptions, REGSAM samDesired, LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, LPDWORD lpdwDisposition),
  424. (hKey, lpSubKey, Reserved, lpClass, dwOptions, samDesired, lpSecurityAttributes, phkResult, lpdwDisposition))
  425. #define RegDeleteKeyW RegDeleteKeyWrap
  426. STRUCT_ENTRY(RegDeleteKey, LONG, (HKEY hKey, LPCWSTR pwszSubKey), (hKey, pwszSubKey))
  427. #define RegEnumKeyW RegEnumKeyWrap
  428. STRUCT_ENTRY(RegEnumKey,
  429. LONG,
  430. (HKEY hKey, DWORD dwIndex, LPWSTR lpName, DWORD cbName),
  431. (hKey, dwIndex, lpName, cbName))
  432. #define RegEnumKeyExW RegEnumKeyExWrap
  433. STRUCT_ENTRY(RegEnumKeyEx,
  434. LONG,
  435. (HKEY hKey, DWORD dwIndex, LPWSTR lpName, LPDWORD lpcbName, LPDWORD lpReserved, LPWSTR lpClass, LPDWORD lpcbClass, PFILETIME lpftLastWriteTime),
  436. (hKey, dwIndex, lpName, lpcbName, lpReserved, lpClass, lpcbClass, lpftLastWriteTime))
  437. #define RegOpenKeyW RegOpenKeyWrap
  438. STRUCT_ENTRY(RegOpenKey, LONG, (HKEY hKey, LPCWSTR pwszSubKey, PHKEY phkResult), (hKey, pwszSubKey, phkResult))
  439. #define RegOpenKeyExW RegOpenKeyExWrap
  440. STRUCT_ENTRY(RegOpenKeyEx,
  441. LONG,
  442. (HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult),
  443. (hKey, lpSubKey, ulOptions, samDesired, phkResult))
  444. #define RegQueryInfoKeyW RegQueryInfoKeyWrap
  445. STRUCT_ENTRY(RegQueryInfoKey,
  446. LONG,
  447. (HKEY hKey, LPWSTR lpClass, LPDWORD lpcbClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcbMaxSubKeyLen,
  448. LPDWORD lpcbMaxClassLen, LPDWORD lpcValues, LPDWORD lpcbMaxValueNameLen, LPDWORD lpcbMaxValueLen,
  449. LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime),
  450. (hKey, lpClass, lpcbClass, lpReserved, lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen, lpcbMaxValueLen, lpcbSecurityDescriptor, lpftLastWriteTime))
  451. #define RegQueryValueW RegQueryValueWrap
  452. STRUCT_ENTRY(RegQueryValue,
  453. LONG,
  454. (HKEY hKey, LPCWSTR pwszSubKey, LPWSTR pwszValue, PLONG lpcbValue),
  455. (hKey, pwszSubKey, pwszValue, lpcbValue))
  456. #define RegQueryValueExW RegQueryValueExWrap
  457. STRUCT_ENTRY(RegQueryValueEx,
  458. LONG,
  459. (HKEY hKey, LPCWSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData),
  460. (hKey, lpValueName, lpReserved, lpType, lpData, lpcbData))
  461. #define RegSetValueW RegSetValueWrap
  462. STRUCT_ENTRY(RegSetValue,
  463. LONG,
  464. (HKEY hKey, LPCWSTR lpSubKey, DWORD dwType, LPCWSTR lpData, DWORD cbData),
  465. (hKey, lpSubKey, dwType, lpData, cbData))
  466. #define RegSetValueExW RegSetValueExWrap
  467. STRUCT_ENTRY(RegSetValueEx,
  468. LONG,
  469. (HKEY hKey, LPCWSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE* lpData, DWORD cbData),
  470. (hKey, lpValueName, Reserved, dwType, lpData, cbData))
  471. #define RegisterClassW RegisterClassWrap
  472. STRUCT_ENTRY(RegisterClass, ATOM, (CONST WNDCLASSW * pwc), (pwc))
  473. #define RegisterClipboardFormatW RegisterClipboardFormatWrap
  474. STRUCT_ENTRY(RegisterClipboardFormat, UINT, (LPCWSTR psz), (psz))
  475. #define RegisterWindowMessageW RegisterWindowMessageWrap
  476. STRUCT_ENTRY(RegisterWindowMessage, UINT, (LPCWSTR psz), (psz))
  477. #define RemovePropW RemovePropWrap
  478. STRUCT_ENTRY(RemoveProp, HANDLE, (HWND hwnd, LPCWSTR psz), (hwnd, psz))
  479. #define SendDlgItemMessageW SendDlgItemMessageWrap
  480. STRUCT_ENTRY(SendDlgItemMessage,
  481. LRESULT,
  482. (HWND hDlg, int nIDDlgItem, UINT Msg, WPARAM wParam, LPARAM lParam),
  483. (hDlg, nIDDlgItem, Msg, wParam, lParam))
  484. #define SendMessageW SendMessageWrap
  485. STRUCT_ENTRY(SendMessage,
  486. LRESULT,
  487. (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam),
  488. (hWnd, Msg, wParam, lParam))
  489. #define SendNotifyMessageW SendNotifyMessageWrap
  490. STRUCT_ENTRY(SendNotifyMessage,
  491. BOOL,
  492. (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam),
  493. (hWnd, Msg, wParam, lParam))
  494. #define SetCurrentDirectoryW SetCurrentDirectoryWrap
  495. STRUCT_ENTRY(SetCurrentDirectory, BOOL, (LPCWSTR psz), (psz))
  496. #define SetDlgItemTextW SetDlgItemTextWrap
  497. STRUCT_ENTRY(SetDlgItemText, BOOL, (HWND hwnd, int id, LPCWSTR psz), (hwnd, id, psz))
  498. #define SetMenuItemInfoW SetMenuItemInfoWrap
  499. STRUCT_ENTRY(SetMenuItemInfo,
  500. BOOL,
  501. (HMENU hMenu, UINT uItem, BOOL fByPosition, LPCMENUITEMINFOW lpmii),
  502. (hMenu, uItem, fByPosition, lpmii))
  503. #define SetPropW SetPropWrap
  504. STRUCT_ENTRY(SetProp, BOOL, (HWND hwnd, LPCWSTR psz, HANDLE hData), (hwnd, psz, hData))
  505. #define SetWindowLongW SetWindowLongWrap
  506. STRUCT_ENTRY(SetWindowLong, LONG, (HWND hWnd, int nIndex, LONG dwNewLong), (hWnd, nIndex, dwNewLong))
  507. #define SetWindowsHookExW SetWindowsHookExWrap
  508. STRUCT_ENTRY(SetWindowsHookEx, HHOOK, (int idHook, HOOKPROC lpfn, HINSTANCE hmod, DWORD dwThreadId),
  509. (idHook, lpfn, hmod, dwThreadId))
  510. #define SetWindowTextW SetWindowTextWrap
  511. STRUCT_ENTRY(SetWindowText, BOOL, (HWND hWnd, LPCWSTR lpString), (hWnd, lpString))
  512. #define StartDocW StartDocWrap
  513. STRUCT_ENTRY(StartDoc, int, (HDC hDC, const DOCINFO * lpdi), (hDC, lpdi))
  514. #define SystemParametersInfoW SystemParametersInfoWrap
  515. STRUCT_ENTRY(SystemParametersInfo,
  516. BOOL,
  517. (UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni),
  518. (uiAction, uiParam, pvParam, fWinIni))
  519. #define TranslateAcceleratorW TranslateAcceleratorWrap
  520. STRUCT_ENTRY(TranslateAccelerator,
  521. int,
  522. (HWND hWnd, HACCEL hAccTable, LPMSG lpMsg),
  523. (hWnd, hAccTable, lpMsg))
  524. #define UnregisterClassW UnregisterClassWrap
  525. STRUCT_ENTRY(UnregisterClass, BOOL, (LPCWSTR psz, HINSTANCE hinst), (psz, hinst))
  526. #define VkKeyScanW VkKeyScanWrap
  527. STRUCT_ENTRY(VkKeyScan, SHORT, (WCHAR ch), (ch))
  528. #define WinHelpW WinHelpWrap
  529. STRUCT_ENTRY(WinHelp, BOOL, (HWND hwnd, LPCWSTR szFile, UINT uCmd, DWORD dwData), (hwnd, szFile, uCmd, dwData))
  530. #define wsprintfW wsprintfWrap
  531. STRUCT_ENTRY(wsprintf, int, (LPWSTR psz, LPCWSTR pszFormat, ...), (psz, pszFormat, ...))
  532. #define wvsprintfW wvsprintfWrap
  533. STRUCT_ENTRY(wvsprintf, int, (LPWSTR psz, LPCWSTR pszFormat, va_list va), (psz, pszFormat, va))
  534. #endif // !WINNT
  535. // Even on NT we want to wrap these for PlugUI on NT4
  536. #define CreateDialogIndirectParamW CreateDialogIndirectParamWrap
  537. STRUCT_ENTRY(CreateDialogIndirectParam,
  538. HWND,
  539. (HINSTANCE hInstance, LPCDLGTEMPLATE lpTemplate, HWND hWndParent , DLGPROC lpDialogFunc, LPARAM dwInitParam),
  540. (hInstance, lpTemplate, hWndParent , lpDialogFunc, dwInitParam))
  541. #undef CreateDialogParam
  542. #define CreateDialogParam CreateDialogParam_WeNeedToWriteTheThunkAgain
  543. #define DialogBoxIndirectParamW DialogBoxIndirectParamWrap
  544. STRUCT_ENTRY(DialogBoxIndirectParam,
  545. INT_PTR,
  546. (HINSTANCE hInstance, LPCDLGTEMPLATEW hDialogTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam),
  547. (hInstance, hDialogTemplate, hWndParent, lpDialogFunc, dwInitParam))
  548. #undef DialogBoxParam
  549. #define DialogBoxParam DialogBoxParam_WeNeedToWriteTheThunkAgain
  550. // And these are ML-specific
  551. #define MLIsMLHInstance MLIsMLHInstanceWrap
  552. BOOL MLIsMLHInstanceWrap(HINSTANCE hInst);
  553. #define MLSetMLHInstance MLSetMLHInstanceWrap
  554. HRESULT MLSetMLHInstanceWrap(HINSTANCE hInst, LANGID lidUI);
  555. #define MLClearMLHinstance MLClearMLHinstanceWrap
  556. HRESULT MLClearMLHinstanceWrap(HINSTANCE hInst);
  557. #endif // UNICODE
  558. #if defined(FONT_LINK) || defined(UNICODE_WIN9x)
  559. #define DrawTextW DrawTextWrap
  560. STRUCT_ENTRY(DrawText,
  561. int,
  562. (HDC hDC, LPCWSTR lpString, int nCount, LPRECT lpRect, UINT uFormat),
  563. (hDC, lpString, nCount, lpRect, uFormat))
  564. // We should use the shlwapi versions.
  565. #define DrawTextExW DrawTextExPrivWrap
  566. STRUCT_ENTRY(DrawTextExPriv,
  567. int,
  568. (HDC hDC, LPWSTR lpString, int nCount, LPRECT lpRect, UINT uFormat, LPDRAWTEXTPARAMS lpDTParams),
  569. (hDC, lpString, nCount, lpRect, uFormat, lpDTParams))
  570. #define ExtTextOutW ExtTextOutWrap
  571. STRUCT_ENTRY(ExtTextOut,
  572. BOOL,
  573. (HDC hdc, int xp, int yp, UINT eto, CONST RECT *lprect, LPCWSTR lpwch, UINT cLen, CONST INT *lpdxp),
  574. (hdc, xp, yp, eto, lprect, lpwch, cLen, lpdxp))
  575. #define GetCharWidthW GetCharWidthWrap
  576. STRUCT_ENTRY(GetCharWidth,
  577. BOOL,
  578. (HDC hdc, UINT uFirstChar, UINT uLastChar, LPINT lpnWidths),
  579. (hdc, uFirstChar, uLastChar, lpnWidths))
  580. #define GetTextExtentPointW GetTextExtentPointWrap
  581. STRUCT_ENTRY(GetTextExtentPoint,
  582. BOOL,
  583. (HDC hdc, LPCWSTR pwsz, int cb, LPSIZE pSize),
  584. (hdc, pwsz, cb, pSize))
  585. #define GetTextExtentPoint32W GetTextExtentPoint32Wrap
  586. STRUCT_ENTRY(GetTextExtentPoint32,
  587. BOOL,
  588. (HDC hdc, LPCWSTR pwsz, int cb, LPSIZE pSize),
  589. (hdc, pwsz, cb, pSize))
  590. #define TextOutW TextOutWrap
  591. STRUCT_ENTRY(TextOut, BOOL, (HDC hdc, int xp, int yp, LPCWSTR lpwch, int cLen), (hdc, xp, yp, lpwch, cLen))
  592. #endif // FONT_LINK || UNICODE_WIN9x
  593. #ifdef __cplusplus
  594. } // extern "C"
  595. #endif
  596. #endif // _WRAPFNS_H_