Leaked source code of windows server 2003
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.

7885 lines
160 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993 - 1999.
  5. //
  6. // File: win95wrp.cpp
  7. //
  8. // This file was taken from the Davinci sources and adapted for TriEdit
  9. // on 3/11/98 in order to get rid of the external dependency for the TriEdit SDK
  10. // The adaptation process included getting rid of several APIs that were not being
  11. // supported and moving some APIs from the supported to unsupported group
  12. //
  13. // Contents: Unicode wrapper API, used only on Win95
  14. //
  15. // Functions: About 125 Win32 function wrappers
  16. //
  17. // Notes: 'sz' is used instead of the "correct" hungarian 'psz'
  18. // throughout to enhance readability.
  19. //
  20. // Not all of every Win32 function is wrapped here. Some
  21. // obscurely-documented features may not be handled correctly
  22. // in these wrappers. Caller beware.
  23. //
  24. // These are privately exported for use by the Shell.
  25. // All memory allocation is done on the stack.
  26. //
  27. //----------------------------------------------------------------------------
  28. // Includes ------------------------------------------------------------------
  29. #include "stdafx.h"
  30. // The following two lines will ensure that no mapping from Foo to OFoo will take place
  31. // and the real windows APIs will get called from this file
  32. #define __WIN95WRP_CPP__
  33. #include "win95wrp.h"
  34. #include <mbstring.h>
  35. #include <commctrl.h>
  36. #include <shlobj.h>
  37. // Function prototypes
  38. inline LONG UnicodeToAnsi(LPSTR szOut, LPCWSTR pwszIn, LONG cbOut, LONG cbIn = -1) throw();
  39. inline LONG AnsiToUnicode(LPWSTR pwszOut, LPCSTR szIn, LONG cbOut, LONG cbIn = -1) throw();
  40. BOOL g_fWin95;
  41. BOOL g_fOSInit = FALSE;
  42. // Debug ----------------------------------------------------------------------
  43. #ifdef _DEBUG
  44. #define Assert(f) ((f) ? 0 : AssertFail(#f))
  45. #define Verify(f) Assert(f)
  46. #define Debug(f) (f)
  47. #else
  48. #define Assert(f) (0)
  49. #define Verify(f) (f)
  50. #define Debug(f) (0)
  51. #endif
  52. #ifdef DEBUG
  53. int AssertFail(const CHAR *pszMsg) throw()
  54. {
  55. int wRet = MessageBoxA(NULL, pszMsg, "Assert Failed in Win95 layer",
  56. MB_ABORTRETRYIGNORE | MB_DEFBUTTON3 |
  57. MB_SYSTEMMODAL | MB_ICONHAND );
  58. switch (wRet)
  59. {
  60. case IDABORT:
  61. FatalAppExit(0, L"BOO HOO");
  62. break;
  63. case IDRETRY:
  64. DebugBreak();
  65. // deliberately fall through to IDIGNORE in order to continue
  66. case IDIGNORE:
  67. // go aways
  68. break;
  69. }
  70. return 0;
  71. }
  72. #else
  73. #define AssertFail(s) (0)
  74. #endif // ! DEBUG
  75. // This macro determines whether a LPTSTR is an atom or string pointer
  76. #define FATOM(x) (!(HIWORD((x))))
  77. // OffsetOf - Return the byte offset into s of m
  78. #define OffsetOf(s,m) (size_t)(((unsigned char*)&(((s*)0)->m))-((unsigned char*)0))
  79. inline LONG UnicodeToAnsi(LPSTR szDestString, LPCWSTR pwszSrcString,
  80. LONG cbDestString, LONG cbSrcString ) throw()
  81. {
  82. Assert(-1 != cbDestString && (!cbDestString || szDestString));
  83. return WideCharToMultiByte(CP_ACP, 0, pwszSrcString, cbSrcString,
  84. szDestString, cbDestString, NULL, NULL);
  85. }
  86. inline LONG AnsiToUnicode(LPWSTR pwszDestString, LPCSTR szSrcString,
  87. LONG cbDestString, LONG cbSrcString ) throw()
  88. {
  89. Assert(-1 != cbDestString && (!cbDestString || pwszDestString));
  90. return MultiByteToWideChar(CP_ACP, 0, szSrcString, cbSrcString,
  91. pwszDestString, cbDestString );
  92. }
  93. inline bool FWide() throw()
  94. {
  95. if (!g_fOSInit)
  96. {
  97. OSVERSIONINFOA osvi;
  98. osvi.dwOSVersionInfoSize = sizeof(osvi);
  99. GetVersionExA(&osvi);
  100. g_fWin95 = (VER_PLATFORM_WIN32_WINDOWS == osvi.dwPlatformId);
  101. g_fOSInit = TRUE;
  102. }
  103. Assert(g_fOSInit);
  104. return !g_fWin95;
  105. }
  106. // The implementation of the Unicode to ANSI (MBCS) convertion macros use the
  107. // _alloca() function to allocate memory from the stack instead of the heap.
  108. // Allocating memory from the stack is much faster than allocating memory on
  109. // the heap, and the memory is automatically freed when the function is exited.
  110. // In addition, these macros avoid calling WideCharToMultiByte more than one
  111. // time. This is done by allocating a little bit more memory than is
  112. // necessary. We know that an MBC will convert into at most one WCHAR and
  113. // that for each WCHAR we will have a maximum of two MBC bytes. By allocating
  114. // a little more than necessary, but always enough to handle the conversion
  115. // the second call to the conversion function is avoided. The call to the
  116. // helper function UnicodeToAnsi reduces the number of argument pushes that
  117. // must be done in order to perform the conversion (this results in smaller
  118. // code, than if it called WideCharToMultiByte directly).
  119. //
  120. // In order for the macros to store the temporary length and the pointer to
  121. // the resultant string, it is necessary to declare some local variables
  122. // called _len and _sz in each function that uses these conversion macros.
  123. // This is done by invoking the PreConvert macro in each function before any
  124. // uses of Convert or ConverWithLen. (PreConvert just need to be invoked once
  125. // per function.)
  126. #define PreConvert() \
  127. LONG _len; \
  128. LPSTR _sz; \
  129. LONG _lJunk; \
  130. _lJunk; // Unused sometimes
  131. // stack-allocates a char buffer of size cch
  132. #define SzAlloc(cch) ((LPSTR)_alloca(cch))
  133. // stack-allocates a wchar buffer of size cch
  134. #define SzWAlloc(cch) ((LPWSTR)_alloca(cch * sizeof(WCHAR)))
  135. // Returns a properly converted string,
  136. // or NULL string on failure or szFrom == NULL
  137. // On return the variable passed via pnTo will have the output byte count
  138. // (including the trailing '\0' iff the nFrom is -1)
  139. #define ConvertWithLen(szFrom, nFrom, pnTo) \
  140. (!szFrom ? NULL : \
  141. (_len = (-1 == nFrom ? (wcslen(szFrom) + 1) : nFrom) * \
  142. sizeof(WCHAR), \
  143. _sz = SzAlloc(_len + sizeof(WCHAR)), \
  144. Debug(_sz[_len] = '\0'), \
  145. (((*pnTo) = UnicodeToAnsi(_sz, szFrom, _len, nFrom)) < 0 ? \
  146. (AssertFail("Convert failed in Unicode wrapper"), NULL) : \
  147. (Assert('\0' == _sz[_len]), _sz) ) ) )
  148. #define Convert(szFrom) ConvertWithLen(szFrom, -1, &_lJunk)
  149. // There are strings which are blocks of strings end to end with a trailing '\0'
  150. // to indicate the true end. These strings are used with the REG_MULTI_SZ
  151. // option of the Reg... routines and the lpstrFilter field of the OPENFILENAME
  152. // structure used in the GetOpenFileName and GetSaveFileName routines. To help
  153. // in converting these strings here are two routines which calculate the length
  154. // of the Unicode and ASNI versions (including all '\0's!):
  155. size_t
  156. cUnicodeMultiSzLen
  157. (
  158. LPCWSTR lpsz
  159. ) throw()
  160. {
  161. size_t cRet = 0;
  162. while (*lpsz)
  163. {
  164. size_t c = wcslen(lpsz) + 1;
  165. cRet += c;
  166. lpsz += c;
  167. }
  168. return cRet + 1;
  169. }
  170. size_t
  171. cAnsiMultiSzLen
  172. (
  173. LPCSTR lpsz
  174. ) throw()
  175. {
  176. size_t cRet = 0;
  177. while (*lpsz)
  178. {
  179. size_t c = _mbslen((const unsigned char*)lpsz) + 1;
  180. cRet += c;
  181. lpsz += c;
  182. }
  183. return cRet + 1;
  184. }
  185. extern "C"{
  186. BOOL
  187. WINAPI
  188. OAppendMenuW(
  189. HMENU hMenu,
  190. UINT uFlags,
  191. UINT uIDnewItem,
  192. LPCWSTR lpnewItem
  193. )
  194. {
  195. if(FWide())
  196. return AppendMenuW(hMenu, uFlags, uIDnewItem, lpnewItem);
  197. if(MF_STRING != uFlags)
  198. return AppendMenuA(hMenu, uFlags, uIDnewItem, (LPSTR)lpnewItem);
  199. PreConvert();
  200. LPSTR sz = Convert(lpnewItem);
  201. if (sz == NULL)
  202. return(0);
  203. return AppendMenuA(hMenu, uFlags, uIDnewItem, sz);
  204. }
  205. LRESULT
  206. WINAPI
  207. OCallWindowProcW(
  208. WNDPROC lpPrevWndFunc,
  209. HWND hWnd,
  210. UINT Msg,
  211. WPARAM wParam,
  212. LPARAM lParam)
  213. {
  214. if(FWide())
  215. return CallWindowProcW(lpPrevWndFunc, hWnd, Msg, wParam, lParam);
  216. return CallWindowProcA(lpPrevWndFunc, hWnd, Msg, wParam, lParam); //$ CONSIDER - Not really wrapped
  217. }
  218. DWORD
  219. WINAPI
  220. OCharLowerBuffW(
  221. LPWSTR lpsz,
  222. DWORD cchLength)
  223. {
  224. if(!lpsz)
  225. return 0;
  226. if(FWide())
  227. return CharLowerBuffW(lpsz, cchLength);
  228. DWORD i = 0;
  229. while(i++ < cchLength)
  230. {
  231. *lpsz = towlower(*lpsz);
  232. lpsz++;
  233. }
  234. return i;
  235. }
  236. LPWSTR
  237. WINAPI
  238. OCharLowerW(
  239. LPWSTR lpsz)
  240. {
  241. if(!lpsz)
  242. return NULL;
  243. if(FWide())
  244. return CharLowerW(lpsz);
  245. // Checking if it's a single byte character.
  246. if(FATOM(lpsz))
  247. {
  248. return (LPWSTR)towlower((WCHAR)LOWORD(lpsz));
  249. }
  250. LPWSTR lp = lpsz;
  251. while(*lp)
  252. {
  253. *lp = towlower(*lp);
  254. lp++;
  255. }
  256. return lpsz;
  257. }
  258. // From: Mark Ashton on 5/29/97
  259. LPWSTR
  260. WINAPI
  261. OCharPrevW(
  262. LPCWSTR lpszStart,
  263. LPCWSTR lpszCurrent)
  264. {
  265. return (LPWSTR)((lpszStart != lpszCurrent) ? lpszCurrent - 1 : lpszCurrent);
  266. }
  267. BOOL
  268. WINAPI
  269. OCharToOemW(
  270. LPCWSTR lpszSrc,
  271. LPSTR lpszDst)
  272. {
  273. if(FWide())
  274. {
  275. Assert((LPSTR) lpszSrc != lpszDst);
  276. return CharToOemW(lpszSrc, lpszDst);
  277. }
  278. PreConvert();
  279. LPSTR sz = Convert(lpszSrc);
  280. return CharToOemA(sz, lpszDst);
  281. }
  282. LPWSTR
  283. WINAPI
  284. OCharUpperW(
  285. LPWSTR lpsz)
  286. {
  287. if(!lpsz)
  288. return NULL;
  289. if(FWide())
  290. return CharUpperW(lpsz);
  291. // Checking if it's a single byte character.
  292. if(FATOM(lpsz))
  293. {
  294. return (LPWSTR)towupper((WCHAR)LOWORD(lpsz));
  295. }
  296. LPWSTR lp = lpsz;
  297. while(*lp)
  298. {
  299. *lp = towupper(*lp);
  300. lp++;
  301. }
  302. return lpsz;
  303. }
  304. // From: Mark Ashton on 5/8/97
  305. BOOL
  306. WINAPI
  307. OCopyFileW(
  308. LPCWSTR lpExistingFileName,
  309. LPCWSTR lpNewFileName,
  310. BOOL bFailIfExists
  311. )
  312. {
  313. if (FWide())
  314. return CopyFileW(lpExistingFileName, lpNewFileName, bFailIfExists);
  315. char szExisting[_MAX_PATH], szNew[_MAX_PATH];
  316. Verify(0 <= UnicodeToAnsi(szExisting, lpExistingFileName, _MAX_PATH));
  317. Verify(0 <= UnicodeToAnsi(szNew, lpNewFileName, _MAX_PATH));
  318. return CopyFileA(szExisting, szNew, bFailIfExists);
  319. }
  320. // From: Mark Ashton on 5/8/97
  321. BOOL
  322. WINAPI
  323. OCreateDirectoryW(
  324. LPCWSTR lpPathName,
  325. LPSECURITY_ATTRIBUTES lpSecurityAttributes
  326. )
  327. {
  328. if (FWide())
  329. return CreateDirectoryW(lpPathName, lpSecurityAttributes);
  330. PreConvert();
  331. LPSTR sz = Convert(lpPathName);
  332. if (sz == NULL)
  333. return(0);
  334. return CreateDirectoryA(sz, NULL);
  335. }
  336. // From: Mark Ashton on 5/8/97
  337. // Ted Smith: simpified on 6/25
  338. // Smoke tested by Mark Ashton on 6/25
  339. BOOL
  340. WINAPI
  341. OCreateDirectoryExW(
  342. LPCWSTR lpTemplateDirectory,
  343. LPCWSTR lpNewDirectory,
  344. LPSECURITY_ATTRIBUTES lpSecurityAttributes
  345. )
  346. {
  347. if (FWide())
  348. return CreateDirectoryExW(lpTemplateDirectory, lpNewDirectory, lpSecurityAttributes);
  349. PreConvert();
  350. LPSTR szTemplateDirectory = Convert(lpTemplateDirectory);
  351. LPSTR szNewDirectory = Convert(lpNewDirectory);
  352. return CreateDirectoryExA(szTemplateDirectory, szNewDirectory, NULL);
  353. }
  354. HDC
  355. WINAPI
  356. OCreateEnhMetaFileW(
  357. HDC hdc,
  358. LPCWSTR lpFileName,
  359. CONST RECT *lpRect,
  360. LPCWSTR lpDescription)
  361. {
  362. if(FWide())
  363. return CreateEnhMetaFileW(hdc, lpFileName, lpRect, lpDescription);
  364. PreConvert();
  365. LPSTR szN = Convert(lpFileName);
  366. LPSTR szD = ConvertWithLen(lpDescription, cUnicodeMultiSzLen(lpDescription), &_lJunk);
  367. return CreateEnhMetaFileA(hdc, szN, lpRect, szD);
  368. }
  369. HANDLE
  370. WINAPI
  371. OCreateEventW(
  372. LPSECURITY_ATTRIBUTES lpEventAttributes,
  373. BOOL bManualReset,
  374. BOOL bInitialState,
  375. LPCWSTR lpName
  376. )
  377. {
  378. if(FWide())
  379. return CreateEventW(lpEventAttributes, bManualReset, bInitialState, lpName);
  380. PreConvert();
  381. LPSTR sz = Convert(lpName);
  382. return CreateEventA(lpEventAttributes, bManualReset, bInitialState, sz);
  383. }
  384. HANDLE
  385. WINAPI
  386. OCreateFileW(
  387. LPCWSTR lpFileName,
  388. DWORD dwDesiredAccess,
  389. DWORD dwShareMode,
  390. LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  391. DWORD dwCreationDisposition,
  392. DWORD dwFlagsAndAttributes,
  393. HANDLE hTemplateFile
  394. )
  395. {
  396. // Don't even attempt this on Win95!
  397. Assert(0 != wcsncmp(lpFileName, L"\\\\?\\", 4));
  398. if(FWide())
  399. return CreateFileW(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes,
  400. dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
  401. PreConvert();
  402. LPSTR sz = Convert(lpFileName);
  403. return CreateFileA(sz, dwDesiredAccess, dwShareMode, lpSecurityAttributes,
  404. dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
  405. }
  406. HFONT
  407. WINAPI
  408. OCreateFontIndirectW(CONST LOGFONTW * plfw)
  409. {
  410. Assert(plfw);
  411. if(FWide())
  412. return CreateFontIndirectW(plfw);
  413. LOGFONTA lfa;
  414. //HFONT hFont = NULL;
  415. // It's assumed here that sizeof(LOGFONTA) <= sizeof (LOGFONTW);
  416. memcpy(&lfa, plfw, sizeof(LOGFONTA));
  417. Verify(0 <= UnicodeToAnsi(lfa.lfFaceName, plfw->lfFaceName, LF_FACESIZE));
  418. return CreateFontIndirectA(&lfa);
  419. }
  420. // From: Mark Ashton on 5/29/97
  421. HFONT
  422. OCreateFontW(
  423. int nHeight, // logical height of font
  424. int nWidth, // logical average character width
  425. int nEscapement, // angle of escapement
  426. int nOrientation, // base-line orientation angle
  427. int fnWeight, // font weight
  428. DWORD fdwItalic, // italic attribute flag
  429. DWORD fdwUnderline, // underline attribute flag
  430. DWORD fdwStrikeOut, // strikeout attribute flag
  431. DWORD fdwCharSet, // character set identifier
  432. DWORD fdwOutputPrecision, // output precision
  433. DWORD fdwClipPrecision, // clipping precision
  434. DWORD fdwQuality, // output quality
  435. DWORD fdwPitchAndFamily, // pitch and family
  436. LPCWSTR lpszFace) // pointer to typeface name string
  437. {
  438. if (FWide())
  439. return CreateFontW(nHeight, nWidth, nEscapement, nOrientation, fnWeight, fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily, lpszFace);
  440. PreConvert();
  441. LPSTR sz = Convert(lpszFace);
  442. return CreateFontA(nHeight, nWidth, nEscapement, nOrientation, fnWeight, fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily, sz);
  443. }
  444. HWND
  445. WINAPI
  446. OCreateMDIWindowW(
  447. LPWSTR lpClassName,
  448. LPWSTR lpWindowName,
  449. DWORD dwStyle,
  450. int X,
  451. int Y,
  452. int nWidth,
  453. int nHeight,
  454. HWND hWndParent,
  455. HINSTANCE hInstance,
  456. LPARAM lParam
  457. )
  458. {
  459. if(FWide())
  460. return CreateMDIWindowW(lpClassName, lpWindowName, dwStyle,
  461. X, Y, nWidth, nHeight, hWndParent, hInstance, lParam);
  462. PreConvert();
  463. LPSTR szClass = Convert(lpClassName);
  464. LPSTR szWin = Convert(lpWindowName);
  465. return CreateMDIWindowA(szClass, szWin, dwStyle,
  466. X, Y, nWidth, nHeight, hWndParent, hInstance, lParam);
  467. }
  468. HDC
  469. WINAPI
  470. OCreateMetaFileW(LPCWSTR lpstr)
  471. {
  472. if(FWide())
  473. return CreateMetaFileW(lpstr);
  474. PreConvert();
  475. LPSTR sz = Convert(lpstr);
  476. return CreateMetaFileA(sz);
  477. }
  478. HANDLE
  479. WINAPI
  480. OCreateSemaphoreW(
  481. LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
  482. LONG lInitialCount,
  483. LONG lMaximumCount,
  484. LPCWSTR lpName
  485. )
  486. {
  487. if(FWide())
  488. return CreateSemaphoreW(lpSemaphoreAttributes, lInitialCount, lMaximumCount, lpName);
  489. PreConvert();
  490. LPSTR sz = Convert(lpName);
  491. return CreateSemaphoreA(lpSemaphoreAttributes, lInitialCount, lMaximumCount, sz);
  492. }
  493. HWND
  494. WINAPI
  495. OCreateWindowExW( DWORD dwExStyle,
  496. LPCWSTR lpClassName,
  497. LPCWSTR lpWindowName,
  498. DWORD dwStyle,
  499. int X,
  500. int Y,
  501. int nWidth,
  502. int nHeight,
  503. HWND hWndParent ,
  504. HMENU hMenu,
  505. HINSTANCE hInstance,
  506. LPVOID lpParam )
  507. {
  508. if(FWide())
  509. return CreateWindowExW(dwExStyle,
  510. lpClassName,
  511. lpWindowName,
  512. dwStyle,
  513. X,
  514. Y,
  515. nWidth,
  516. nHeight,
  517. hWndParent ,
  518. hMenu,
  519. hInstance,
  520. lpParam );
  521. PreConvert();
  522. LPSTR szClass;
  523. if (FATOM(lpClassName))
  524. {
  525. // is it an atom?
  526. szClass = (LPSTR) lpClassName;
  527. }
  528. else
  529. {
  530. // otherwise convert the string
  531. szClass = Convert(lpClassName);
  532. }
  533. LPSTR szWindow = Convert(lpWindowName);
  534. return CreateWindowExA (dwExStyle, szClass, szWindow, dwStyle, X, Y,
  535. nWidth, nHeight, hWndParent, hMenu, hInstance,
  536. lpParam);
  537. }
  538. HSZ
  539. WINAPI
  540. ODdeCreateStringHandleW(
  541. DWORD idInst,
  542. LPCWSTR psz,
  543. int iCodePage)
  544. {
  545. if(FWide())
  546. {
  547. Assert(CP_WINUNICODE == iCodePage);
  548. return DdeCreateStringHandleW(idInst, psz, iCodePage);
  549. }
  550. PreConvert();
  551. LPSTR sz = Convert(psz);
  552. return DdeCreateStringHandleA(idInst, sz, CP_WINANSI);
  553. }
  554. UINT
  555. WINAPI
  556. ODdeInitializeW(
  557. LPDWORD pidInst,
  558. PFNCALLBACK pfnCallback,
  559. DWORD afCmd,
  560. DWORD ulRes)
  561. {
  562. if(FWide())
  563. return DdeInitializeW(pidInst, pfnCallback, afCmd, ulRes);
  564. return DdeInitializeA(pidInst, pfnCallback, afCmd, ulRes);
  565. }
  566. LRESULT
  567. WINAPI
  568. ODefFrameProcW(
  569. HWND hWnd,
  570. HWND hWndMDIClient ,
  571. UINT uMsg,
  572. WPARAM wParam,
  573. LPARAM lParam)
  574. {
  575. if(FWide())
  576. return DefFrameProcW(hWnd, hWndMDIClient , uMsg, wParam, lParam);
  577. return DefFrameProcA(hWnd, hWndMDIClient , uMsg, wParam, lParam);
  578. }
  579. LRESULT
  580. WINAPI
  581. ODefMDIChildProcW(
  582. HWND hWnd,
  583. UINT uMsg,
  584. WPARAM wParam,
  585. LPARAM lParam)
  586. {
  587. if(FWide())
  588. return DefMDIChildProcW(hWnd, uMsg, wParam, lParam);
  589. return DefMDIChildProcA(hWnd, uMsg, wParam, lParam);
  590. }
  591. LRESULT
  592. WINAPI
  593. ODefWindowProcW(
  594. HWND hWnd,
  595. UINT Msg,
  596. WPARAM wParam,
  597. LPARAM lParam)
  598. {
  599. if(FWide())
  600. return DefWindowProcW( hWnd, Msg,wParam, lParam);
  601. return DefWindowProcA( hWnd, Msg,wParam, lParam);
  602. }
  603. BOOL
  604. WINAPI
  605. ODeleteFileW(
  606. LPCWSTR pwsz)
  607. {
  608. if(FWide())
  609. return DeleteFileW(pwsz);
  610. PreConvert();
  611. LPSTR sz = Convert(pwsz);
  612. return DeleteFileA(sz);
  613. }
  614. LRESULT
  615. WINAPI
  616. ODialogBoxIndirectParamW(
  617. HINSTANCE hInstance,
  618. LPCDLGTEMPLATEW hDialogTemplate,
  619. HWND hWndParent ,
  620. DLGPROC lpDialogFunc,
  621. LPARAM dwInitParam)
  622. {
  623. if(FWide())
  624. return DialogBoxIndirectParamW(hInstance, hDialogTemplate, hWndParent ,
  625. lpDialogFunc, dwInitParam);
  626. return DialogBoxIndirectParamA(hInstance, hDialogTemplate, hWndParent ,
  627. lpDialogFunc, dwInitParam);
  628. }
  629. LRESULT
  630. WINAPI
  631. ODialogBoxParamW(
  632. HINSTANCE hInstance,
  633. LPCWSTR lpTemplateName,
  634. HWND hWndParent ,
  635. DLGPROC lpDialogFunc,
  636. LPARAM dwInitParam)
  637. {
  638. if(FWide())
  639. return DialogBoxParamW(hInstance, lpTemplateName, hWndParent , lpDialogFunc, dwInitParam);
  640. if(FATOM(lpTemplateName))
  641. return DialogBoxParamA(hInstance, (LPSTR)lpTemplateName, hWndParent , lpDialogFunc, dwInitParam);
  642. PreConvert();
  643. LPSTR sz = Convert(lpTemplateName);
  644. return DialogBoxParamA(hInstance, sz, hWndParent , lpDialogFunc, dwInitParam);
  645. }
  646. LRESULT
  647. WINAPI
  648. ODispatchMessageW(
  649. CONST MSG *lpMsg)
  650. {
  651. if(FWide())
  652. return DispatchMessageW(lpMsg);
  653. return DispatchMessageA(lpMsg);
  654. }
  655. int
  656. WINAPI
  657. ODrawTextW(
  658. HDC hDC,
  659. LPCWSTR lpString,
  660. int nCount,
  661. LPRECT lpRect,
  662. UINT uFormat)
  663. {
  664. // NOTE OS may write 3 characters beyond end of lpString so make room!
  665. if(FWide())
  666. return DrawTextW(hDC, lpString, nCount, lpRect, uFormat);
  667. bool fModifyString = (uFormat & DT_MODIFYSTRING) &&
  668. (uFormat & (DT_END_ELLIPSIS | DT_PATH_ELLIPSIS));
  669. const int nBuff = WideCharToMultiByte(CP_ACP, 0, lpString, nCount,
  670. NULL, 0, NULL, NULL );
  671. Assert(0 <= nBuff);
  672. // OS may write beyond end of buffer so make room!
  673. const LPSTR sz = SzAlloc(nBuff + 4);
  674. Verify(nBuff == WideCharToMultiByte(CP_ACP, 0, lpString, nCount,
  675. sz, nBuff, NULL, NULL ));
  676. if (fModifyString)
  677. {
  678. // DrawTextA doesn't nessacerily '\0' terminate the output,
  679. // so have termiators ready
  680. memcpy(sz + nBuff, "\0\0\0\0", 4);
  681. }
  682. const int iDrawTextReturn = DrawTextA(hDC, sz, nBuff - 1, lpRect, uFormat);
  683. // With certain flags, DrawText modifies the string, truncating it with
  684. // an ellipsis. We need to convert back and update the string passed to
  685. // the wrapper before we return.
  686. if (fModifyString && 0 <= iDrawTextReturn)
  687. {
  688. Assert('\0' == sz[nBuff + 3]); // Verify not too many were overwritten
  689. // The windows function prototype has lpString as constant even
  690. // though the string gets modified!
  691. const int nStringLen = -1 != nCount ? nCount : wcslen(lpString);
  692. Verify(0 <= AnsiToUnicode(const_cast<LPWSTR>(lpString), sz,
  693. nStringLen + 4 ));
  694. }
  695. return iDrawTextReturn;
  696. }
  697. // Written by Bill Hiebert on 9/4/97
  698. // Smoke tested by Bill Hiebert 9/4/97
  699. int
  700. WINAPI
  701. ODrawTextExW(HDC hdc, LPWSTR pwsz, int cb, LPRECT lprect, UINT dwDTFormat, LPDRAWTEXTPARAMS lpDTParams)
  702. {
  703. Assert(-1 != cb);
  704. Assert(!(DT_MODIFYSTRING & dwDTFormat));
  705. if(FWide())
  706. return DrawTextExW(hdc, pwsz, cb, lprect, dwDTFormat, lpDTParams);
  707. PreConvert();
  708. LONG n = 0;
  709. LPSTR sz = ConvertWithLen(pwsz, cb, &n);
  710. if (sz == NULL)
  711. return(0);
  712. return DrawTextExA(hdc, sz, n, lprect, dwDTFormat, lpDTParams);
  713. }
  714. // Written for Carlos Gomes on 6/26/97 by Ted Smith
  715. // Smoke tested by Carlos Gomes on 6/26
  716. DWORD
  717. WINAPI
  718. OExpandEnvironmentStringsW(
  719. LPCWSTR lpSrc,
  720. LPWSTR lpDst,
  721. DWORD nSize
  722. )
  723. {
  724. if (FWide())
  725. return ExpandEnvironmentStringsW(lpSrc, lpDst, nSize);
  726. PreConvert();
  727. LPSTR szSrc = Convert(lpSrc);
  728. LPSTR szDst = SzAlloc(sizeof(WCHAR) * nSize);
  729. if (szSrc == NULL)
  730. return(0);
  731. DWORD dwRet = ExpandEnvironmentStringsA(szSrc, szDst, sizeof(WCHAR) * nSize);
  732. if (dwRet)
  733. {
  734. LONG lRet = AnsiToUnicode(lpDst, szDst, nSize, min(dwRet, sizeof(WCHAR) * nSize));
  735. if (dwRet < (DWORD) lRet)
  736. {
  737. dwRet = lRet;
  738. }
  739. }
  740. else if (lpDst && 0 < nSize)
  741. {
  742. *lpDst = L'\0';
  743. }
  744. return dwRet;
  745. }
  746. VOID
  747. WINAPI
  748. OFatalAppExitW(
  749. UINT uAction,
  750. LPCWSTR lpMessageText
  751. )
  752. {
  753. if(FWide())
  754. FatalAppExitW(uAction, lpMessageText);
  755. PreConvert();
  756. LPSTR sz = Convert(lpMessageText);
  757. FatalAppExitA(uAction, sz);
  758. }
  759. // From: Mark Ashton on 5/8/97
  760. HANDLE
  761. WINAPI
  762. OFindFirstChangeNotificationW(
  763. LPCWSTR lpPathName,
  764. BOOL bWatchSubtree,
  765. DWORD dwNotifyFilter
  766. )
  767. {
  768. if (FWide())
  769. return FindFirstChangeNotificationW(lpPathName, bWatchSubtree, dwNotifyFilter);
  770. PreConvert();
  771. LPSTR sz = Convert(lpPathName);
  772. if (sz == NULL)
  773. return(INVALID_HANDLE_VALUE);
  774. return FindFirstChangeNotificationA(sz, bWatchSubtree, dwNotifyFilter);
  775. }
  776. // From: Mark Ashton on 5/8/97
  777. HANDLE
  778. WINAPI
  779. OFindFirstFileW(
  780. LPCWSTR lpFileName,
  781. LPWIN32_FIND_DATAW lpFindFileData
  782. )
  783. {
  784. if (FWide())
  785. return FindFirstFileW(lpFileName, lpFindFileData);
  786. PreConvert();
  787. LPSTR sz = Convert(lpFileName);
  788. if (sz == NULL)
  789. return(INVALID_HANDLE_VALUE);
  790. WIN32_FIND_DATAA findFileData;
  791. HANDLE h = FindFirstFileA(sz, &findFileData);
  792. if (INVALID_HANDLE_VALUE != h)
  793. {
  794. lpFindFileData->dwFileAttributes = findFileData.dwFileAttributes;
  795. lpFindFileData->ftCreationTime = findFileData.ftCreationTime;
  796. lpFindFileData->ftLastAccessTime = findFileData.ftLastAccessTime;
  797. lpFindFileData->ftLastWriteTime = findFileData.ftLastWriteTime;
  798. lpFindFileData->nFileSizeHigh = findFileData.nFileSizeHigh;
  799. lpFindFileData->nFileSizeLow = findFileData.nFileSizeLow;
  800. lpFindFileData->dwReserved0 = findFileData.dwReserved0;
  801. lpFindFileData->dwReserved1 = findFileData.dwReserved1;
  802. Verify(0 <= AnsiToUnicode(lpFindFileData->cFileName, findFileData.cFileName, _MAX_PATH));
  803. Verify(0 <= AnsiToUnicode(lpFindFileData->cAlternateFileName, findFileData.cAlternateFileName, 14));
  804. }
  805. return h;
  806. }
  807. // From: Mark Ashton on 5/8/97
  808. BOOL
  809. WINAPI
  810. OFindNextFileW(
  811. HANDLE hFindFile,
  812. LPWIN32_FIND_DATAW lpFindFileData
  813. )
  814. {
  815. if (FWide())
  816. return FindNextFileW(hFindFile, lpFindFileData);
  817. WIN32_FIND_DATAA findFileData;
  818. BOOL fFlag = FindNextFileA(hFindFile, &findFileData);
  819. if (fFlag)
  820. {
  821. lpFindFileData->dwFileAttributes = findFileData.dwFileAttributes;
  822. lpFindFileData->ftCreationTime = findFileData.ftCreationTime;
  823. lpFindFileData->ftLastAccessTime = findFileData.ftLastAccessTime;
  824. lpFindFileData->ftLastWriteTime = findFileData.ftLastWriteTime;
  825. lpFindFileData->nFileSizeHigh = findFileData.nFileSizeHigh;
  826. lpFindFileData->nFileSizeLow = findFileData.nFileSizeLow;
  827. lpFindFileData->dwReserved0 = findFileData.dwReserved0;
  828. lpFindFileData->dwReserved1 = findFileData.dwReserved1;
  829. Verify(0 <= AnsiToUnicode(lpFindFileData->cFileName, findFileData.cFileName, _MAX_PATH));
  830. Verify(0 <= AnsiToUnicode(lpFindFileData->cAlternateFileName, findFileData.cAlternateFileName, 14));
  831. }
  832. return fFlag;
  833. }
  834. HRSRC
  835. WINAPI
  836. OFindResourceW(
  837. HINSTANCE hModule,
  838. LPCWSTR lpName,
  839. LPCWSTR lpType
  840. )
  841. {
  842. if(FWide())
  843. return FindResourceW(hModule, lpName, lpType);
  844. LPCSTR szName = (LPCSTR)lpName;
  845. LPCSTR szType = (LPCSTR)lpType;
  846. PreConvert();
  847. if(!FATOM(lpName))
  848. szName = Convert(lpName);
  849. if(!FATOM(lpType))
  850. szType = Convert(lpType);
  851. return FindResourceA(hModule, szName, szType);
  852. }
  853. HWND
  854. WINAPI
  855. OFindWindowW(
  856. LPCWSTR lpClassName ,
  857. LPCWSTR lpWindowName)
  858. {
  859. if(FWide())
  860. return FindWindowW(lpClassName , lpWindowName);
  861. PreConvert();
  862. LPSTR szClass = Convert(lpClassName);
  863. LPSTR szWnd = Convert(lpWindowName);
  864. return FindWindowA(szClass, szWnd);
  865. }
  866. // Bill Hiebert of IStudio on 6/13/97 added support for the
  867. // FORMAT_MESSAGE_ALLOCATE_BUFFER flag
  868. // Bill donated a bugfix for 1819 on 8/1/97
  869. DWORD
  870. WINAPI
  871. OFormatMessageW(
  872. DWORD dwFlags,
  873. LPCVOID lpSource,
  874. DWORD dwMessageId,
  875. DWORD dwLanguageId,
  876. LPWSTR lpBuffer,
  877. DWORD nSize,
  878. va_list *Arguments)
  879. {
  880. if (FWide())
  881. return FormatMessageW(dwFlags, lpSource, dwMessageId, dwLanguageId,
  882. lpBuffer, nSize, Arguments );
  883. DWORD dwRet;
  884. LPSTR szBuffer = NULL;
  885. if (!(dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER))
  886. {
  887. Assert(!IsBadWritePtr(lpBuffer, nSize * sizeof(WCHAR)));
  888. szBuffer = SzAlloc(sizeof(WCHAR) * nSize);
  889. }
  890. if (dwFlags & FORMAT_MESSAGE_FROM_STRING)
  891. {
  892. PreConvert();
  893. LPSTR szSource = Convert((LPWSTR)lpSource);
  894. if (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER)
  895. { // Must pass address of szBuffer
  896. dwRet = FormatMessageA(dwFlags, szSource, dwMessageId, dwLanguageId,
  897. (char*)&szBuffer, sizeof(WCHAR) * nSize, Arguments);
  898. }
  899. else
  900. {
  901. dwRet = FormatMessageA(dwFlags, szSource, dwMessageId, dwLanguageId,
  902. szBuffer, sizeof(WCHAR) * nSize, Arguments);
  903. }
  904. }
  905. else
  906. {
  907. if (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER)
  908. { // Must pass address of szBuffer
  909. dwRet = FormatMessageA(dwFlags, lpSource, dwMessageId, dwLanguageId,
  910. (char*)&szBuffer, sizeof(WCHAR) * nSize, Arguments);
  911. }
  912. else
  913. {
  914. dwRet = FormatMessageA(dwFlags, lpSource, dwMessageId, dwLanguageId,
  915. szBuffer, sizeof(WCHAR) * nSize, Arguments);
  916. }
  917. }
  918. if (dwRet)
  919. {
  920. if (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER)
  921. { // szBuffer contains LocalAlloc ptr to new string. lpBuffer is a
  922. // WCHAR** when FORMAT_MESSAGE_ALLOCATE_BUFFER is defined.
  923. WCHAR* pTemp = (WCHAR*)LocalAlloc(NONZEROLPTR, (dwRet + 1) * sizeof(WCHAR) );
  924. dwRet = pTemp == NULL? 0 : AnsiToUnicode(pTemp, szBuffer, dwRet + 1);
  925. LocalFree(szBuffer);
  926. if (dwRet)
  927. {
  928. *(WCHAR**)lpBuffer = pTemp;
  929. }
  930. return dwRet;
  931. }
  932. else
  933. { // Just convert
  934. return AnsiToUnicode(lpBuffer, szBuffer, nSize);
  935. }
  936. }
  937. else if (lpBuffer && 0 < nSize)
  938. {
  939. *lpBuffer = L'\0';
  940. }
  941. return dwRet;
  942. }
  943. BOOL
  944. APIENTRY
  945. OGetCharABCWidthsFloatW(
  946. HDC hdc,
  947. UINT uFirstChar,
  948. UINT uLastChar,
  949. LPABCFLOAT lpABC)
  950. {
  951. if(FWide())
  952. return GetCharABCWidthsFloatW(hdc, uFirstChar, uLastChar, lpABC);
  953. return GetCharABCWidthsFloatA(hdc, uFirstChar, uLastChar, lpABC);
  954. }
  955. BOOL
  956. APIENTRY
  957. OGetCharABCWidthsW(
  958. HDC hdc,
  959. UINT uFirstChar,
  960. UINT uLastChar,
  961. LPABC lpABC)
  962. {
  963. if(FWide())
  964. return GetCharABCWidthsW(hdc, uFirstChar, uLastChar, lpABC);
  965. return GetCharABCWidthsA(hdc, uFirstChar, uLastChar, lpABC);
  966. }
  967. BOOL
  968. APIENTRY
  969. OGetCharWidthFloatW(
  970. HDC hdc,
  971. UINT iFirstChar,
  972. UINT iLastChar,
  973. PFLOAT pBuffer)
  974. {
  975. if(FWide())
  976. return GetCharWidthFloatW(hdc, iFirstChar, iLastChar, pBuffer);
  977. return GetCharWidthFloatA(hdc, iFirstChar, iLastChar, pBuffer);
  978. }
  979. BOOL
  980. WINAPI
  981. OGetCharWidthW(
  982. HDC hdc,
  983. UINT iFirstChar,
  984. UINT iLastChar,
  985. LPINT lpBuffer)
  986. {
  987. if(FWide())
  988. return GetCharWidth32W(hdc, iFirstChar, iLastChar, lpBuffer);
  989. return GetCharWidth32A(hdc, iFirstChar, iLastChar, lpBuffer);
  990. }
  991. // Static buffers for GetClassInfo[Ex] to return the classname
  992. // and menuname in Unicode, when running on an Ansi system.
  993. // The contract of GetClassInfo is that it returns const ptrs
  994. // back to the class name and menu name. Unfortuntely, this
  995. // prevents us from translating these back from Ansi to Unicode,
  996. // without having some static buffers to use. Since we strongly
  997. // believe that the only people calling this are doing it just to
  998. // see if it succeeds or not, so they know whether the class is
  999. // already registered, we've willing to just have one set of
  1000. // static buffers to use.
  1001. // CAUTION: this will work as long as two threads don't call
  1002. // GetClassInfo[Ex] at the same time!
  1003. static WCHAR g_szClassName[256];
  1004. static WCHAR g_szMenuName[256];
  1005. #ifdef DEBUG
  1006. static DWORD g_dwCallingThread = 0; // debug global for ensuring one thread.
  1007. #endif // DEBUG
  1008. BOOL
  1009. WINAPI
  1010. OGetClassInfoW
  1011. (
  1012. HINSTANCE hInstance,
  1013. LPCWSTR lpClassName,
  1014. LPWNDCLASSW lpWndClass
  1015. )
  1016. {
  1017. if (FWide())
  1018. return GetClassInfoW(hInstance, lpClassName, lpWndClass);
  1019. PreConvert();
  1020. LPSTR szClassName = Convert(lpClassName);
  1021. BOOL fRet = GetClassInfoA(hInstance, szClassName, (LPWNDCLASSA)lpWndClass);
  1022. if (!fRet)
  1023. {
  1024. return false;
  1025. }
  1026. // if ClassName or MenuName aren't atom's, we need to
  1027. // translate them back to Unicode. We use our static
  1028. // buffers above. See note about why and the CAUTION!
  1029. #ifdef DEBUG
  1030. if (!g_dwCallingThread)
  1031. g_dwCallingThread = GetCurrentThreadId();
  1032. Assert(GetCurrentThreadId() == g_dwCallingThread);
  1033. #endif // DEBUG
  1034. if (!FATOM(lpWndClass->lpszMenuName))
  1035. {
  1036. Assert(strlen((LPCSTR)lpWndClass->lpszMenuName) <
  1037. (sizeof(g_szMenuName)/sizeof(WCHAR)));
  1038. if (!AnsiToUnicode(g_szMenuName, (LPCSTR)lpWndClass->lpszMenuName,
  1039. strlen((LPCSTR)lpWndClass->lpszMenuName)+1))
  1040. {
  1041. return false;
  1042. }
  1043. lpWndClass->lpszMenuName = g_szMenuName;
  1044. }
  1045. if (!FATOM(lpWndClass->lpszClassName))
  1046. {
  1047. Assert(strlen((LPCSTR)lpWndClass->lpszClassName) <
  1048. (sizeof(g_szClassName)/sizeof(WCHAR)));
  1049. if (!AnsiToUnicode(g_szClassName, (LPCSTR)lpWndClass->lpszClassName,
  1050. strlen((LPCSTR)lpWndClass->lpszClassName)+1))
  1051. {
  1052. return false;
  1053. }
  1054. lpWndClass->lpszClassName = g_szClassName;
  1055. }
  1056. return fRet;
  1057. }
  1058. BOOL
  1059. WINAPI
  1060. OGetClassInfoExW
  1061. (
  1062. HINSTANCE hInstance,
  1063. LPCWSTR lpClassName,
  1064. LPWNDCLASSEXW lpWndClass
  1065. )
  1066. {
  1067. if (FWide())
  1068. return GetClassInfoExW(hInstance, lpClassName, lpWndClass);
  1069. PreConvert();
  1070. LPSTR szClassName = Convert(lpClassName);
  1071. BOOL fRet = GetClassInfoExA(hInstance, szClassName, (LPWNDCLASSEXA)lpWndClass);
  1072. if (!fRet)
  1073. {
  1074. return false;
  1075. }
  1076. // if ClassName or MenuName aren't atom's, we need to
  1077. // translate them back to Unicode. We use our static
  1078. // buffers above. See note about why and the CAUTION!
  1079. #ifdef DEBUG
  1080. if (!g_dwCallingThread)
  1081. g_dwCallingThread = GetCurrentThreadId();
  1082. Assert(GetCurrentThreadId() == g_dwCallingThread);
  1083. #endif // DEBUG
  1084. if (!FATOM(lpWndClass->lpszMenuName))
  1085. {
  1086. Assert(strlen((LPCSTR)lpWndClass->lpszMenuName) <
  1087. (sizeof(g_szMenuName)/sizeof(WCHAR)));
  1088. if (!AnsiToUnicode(g_szMenuName, (LPCSTR)lpWndClass->lpszMenuName,
  1089. strlen((LPCSTR)lpWndClass->lpszMenuName)+1))
  1090. {
  1091. return false;
  1092. }
  1093. lpWndClass->lpszMenuName = g_szMenuName;
  1094. }
  1095. if (!FATOM(lpWndClass->lpszClassName))
  1096. {
  1097. Assert(strlen((LPCSTR)lpWndClass->lpszClassName) <
  1098. (sizeof(g_szClassName)/sizeof(WCHAR)));
  1099. if (!AnsiToUnicode(g_szClassName, (LPCSTR)lpWndClass->lpszClassName,
  1100. strlen((LPCSTR)lpWndClass->lpszClassName)+1))
  1101. {
  1102. return false;
  1103. }
  1104. lpWndClass->lpszClassName = g_szClassName;
  1105. }
  1106. return fRet;
  1107. }
  1108. DWORD
  1109. WINAPI
  1110. OGetClassLongW(
  1111. HWND hWnd,
  1112. int nIndex)
  1113. {
  1114. if(FWide())
  1115. return GetClassLongW(hWnd, nIndex);
  1116. return GetClassLongA(hWnd, nIndex); //$UNDONE_POST_98 Watch out for GCL_MENUNAME, etc!
  1117. }
  1118. DWORD
  1119. WINAPI
  1120. OSetClassLongW(
  1121. HWND hWnd,
  1122. int nIndex,
  1123. LONG dwNewLong)
  1124. {
  1125. if (FWide())
  1126. return SetClassLongW(hWnd, nIndex, dwNewLong);
  1127. return SetClassLongA(hWnd, nIndex, dwNewLong); //$UNDONE_POST_98 Watch out for GCL_MENUNAME, etc!
  1128. }
  1129. int
  1130. WINAPI
  1131. OGetClassNameW(
  1132. HWND hWnd,
  1133. LPWSTR lpClassName,
  1134. int nMaxCount)
  1135. {
  1136. if(FWide())
  1137. return GetClassNameW(hWnd, lpClassName, nMaxCount);
  1138. LPSTR sz = SzAlloc(sizeof(WCHAR) * nMaxCount + 2);
  1139. int nRet = GetClassNameA(hWnd, sz, sizeof(WCHAR) * nMaxCount);
  1140. // $UNDONE_POST_98: This is bogus, we should do this like OLoadStringW
  1141. if (nRet)
  1142. {
  1143. // force null-termination
  1144. sz[sizeof(WCHAR) * nMaxCount] = '\0';
  1145. sz[sizeof(WCHAR) * nMaxCount + 1] = '\0';
  1146. // need a temporary wide string
  1147. LPWSTR wsz = SzWAlloc(2 * nMaxCount + 1);
  1148. nRet = min(AnsiToUnicode(wsz, sz, 2 * nMaxCount + 1), nMaxCount);
  1149. // copy the requested number of characters
  1150. if (lpClassName)
  1151. {
  1152. memcpy(lpClassName, wsz, nRet * sizeof(WCHAR));
  1153. }
  1154. return nRet;
  1155. }
  1156. else if (lpClassName && 0 < nMaxCount)
  1157. {
  1158. *lpClassName = L'\0';
  1159. }
  1160. return nRet;
  1161. }
  1162. DWORD
  1163. WINAPI
  1164. OGetCurrentDirectoryW(
  1165. DWORD nBufferLength,
  1166. LPWSTR lpBuffer)
  1167. {
  1168. if (FWide())
  1169. return GetCurrentDirectoryW(nBufferLength, lpBuffer);
  1170. LPSTR sz = SzAlloc(sizeof(WCHAR) * nBufferLength);
  1171. DWORD dwRet = GetCurrentDirectoryA(sizeof(WCHAR) * nBufferLength, sz);
  1172. // $UNDONE_POST_98: This is bogus, we should do this like OLoadStringW
  1173. if (dwRet)
  1174. {
  1175. return AnsiToUnicode(lpBuffer, sz, nBufferLength);
  1176. }
  1177. else if (lpBuffer && 0 < nBufferLength)
  1178. {
  1179. *lpBuffer = L'\0';
  1180. }
  1181. return dwRet;
  1182. }
  1183. UINT
  1184. WINAPI
  1185. OGetDlgItemTextW(
  1186. HWND hDlg,
  1187. int nIDDlgItem,
  1188. LPWSTR lpString,
  1189. int nMaxCount)
  1190. {
  1191. if(FWide())
  1192. return GetDlgItemTextW(hDlg, nIDDlgItem, lpString, nMaxCount);
  1193. LPSTR sz = SzAlloc(sizeof(WCHAR) * nMaxCount);
  1194. UINT uRet = GetDlgItemTextA(hDlg, nIDDlgItem, sz, sizeof(WCHAR) * nMaxCount);
  1195. // $UNDONE_POST_98: This is bogus, we should do this like OLoadStringW
  1196. if(uRet)
  1197. {
  1198. return AnsiToUnicode(lpString, sz, nMaxCount);
  1199. }
  1200. else if (lpString && 0 < nMaxCount)
  1201. {
  1202. *lpString = L'\0';
  1203. }
  1204. return uRet;
  1205. }
  1206. DWORD
  1207. WINAPI
  1208. OGetFileAttributesW(
  1209. LPCWSTR lpFileName
  1210. )
  1211. {
  1212. if(FWide())
  1213. return GetFileAttributesW(lpFileName);
  1214. PreConvert();
  1215. LPSTR sz = Convert(lpFileName);
  1216. if (sz == NULL)
  1217. return(DWORD)(-1);
  1218. return GetFileAttributesA(sz);
  1219. }
  1220. DWORD
  1221. WINAPI
  1222. OGetFullPathNameW(
  1223. LPCWSTR lpFileName,
  1224. DWORD nBufferLength,
  1225. LPWSTR lpBuffer,
  1226. LPWSTR *lpFilePart
  1227. )
  1228. {
  1229. if(FWide())
  1230. return GetFullPathNameW(lpFileName, nBufferLength, lpBuffer, lpFilePart);
  1231. PreConvert();
  1232. LPSTR szFile = Convert(lpFileName);
  1233. if (szFile == NULL)
  1234. return(0); // dwRet
  1235. LPSTR szBuffer = SzAlloc(sizeof(WCHAR) * nBufferLength);
  1236. LPSTR pszFile;
  1237. DWORD dwRet = GetFullPathNameA(szFile ,sizeof(WCHAR) * nBufferLength, szBuffer , &pszFile);
  1238. // $UNDONE_POST_98: This is bogus, we should do this like OLoadStringW
  1239. if(dwRet)
  1240. {
  1241. DWORD dwNoOfChar = AnsiToUnicode(lpBuffer, szBuffer , nBufferLength);
  1242. *pszFile = '\0';
  1243. *lpFilePart = lpBuffer + AnsiToUnicode(NULL, szBuffer, 0);
  1244. return dwNoOfChar;
  1245. }
  1246. return dwRet;
  1247. }
  1248. DWORD
  1249. WINAPI
  1250. OGetGlyphOutlineW(
  1251. HDC hdc,
  1252. UINT uChar,
  1253. UINT uFormat,
  1254. LPGLYPHMETRICS lpgm,
  1255. DWORD cbBuffer,
  1256. LPVOID lpvBuffer,
  1257. CONST MAT2 * lpmat2)
  1258. {
  1259. if (FWide())
  1260. return GetGlyphOutlineW(hdc, uChar, uFormat, lpgm, cbBuffer, lpvBuffer, lpmat2);
  1261. return GetGlyphOutlineA(hdc, uChar, uFormat, lpgm, cbBuffer, lpvBuffer, lpmat2);
  1262. }
  1263. DWORD
  1264. WINAPI
  1265. OGetKerningPairsW(
  1266. HDC hdc,
  1267. DWORD nNumPairs,
  1268. LPKERNINGPAIR lpkrnpair)
  1269. {
  1270. if(FWide())
  1271. return GetKerningPairsW(hdc, nNumPairs, lpkrnpair);
  1272. return GetKerningPairsA(hdc, nNumPairs, lpkrnpair);
  1273. }
  1274. BOOL
  1275. WINAPI
  1276. OGetMessageW(
  1277. LPMSG lpMsg,
  1278. HWND hWnd ,
  1279. UINT wMsgFilterMin,
  1280. UINT wMsgFilterMax)
  1281. {
  1282. if(FWide())
  1283. return GetMessageW(lpMsg, hWnd , wMsgFilterMin, wMsgFilterMax);
  1284. return GetMessageA(lpMsg, hWnd , wMsgFilterMin, wMsgFilterMax);
  1285. }
  1286. DWORD
  1287. WINAPI
  1288. OGetModuleFileNameW(
  1289. HINSTANCE hModule,
  1290. LPWSTR pwszFilename,
  1291. DWORD nSize
  1292. )
  1293. {
  1294. if(FWide())
  1295. return GetModuleFileNameW(
  1296. hModule,
  1297. pwszFilename,
  1298. nSize
  1299. );
  1300. LPSTR sz = SzAlloc(sizeof(WCHAR) * nSize);
  1301. DWORD dwRet = GetModuleFileNameA(hModule, sz, sizeof(WCHAR) * nSize);
  1302. // $UNDONE_POST_98: This is bogus, we should do this like OLoadStringW
  1303. if (dwRet)
  1304. {
  1305. return AnsiToUnicode(pwszFilename, sz, nSize, dwRet + 1);
  1306. }
  1307. else if (pwszFilename && 0 < nSize)
  1308. {
  1309. *pwszFilename = L'\0';
  1310. }
  1311. return dwRet;
  1312. }
  1313. HMODULE
  1314. WINAPI
  1315. OGetModuleHandleW(
  1316. LPCWSTR lpModuleName
  1317. )
  1318. {
  1319. if(FWide())
  1320. return GetModuleHandleW(lpModuleName);
  1321. PreConvert();
  1322. LPSTR sz = Convert(lpModuleName);
  1323. return GetModuleHandleA(sz);
  1324. }
  1325. UINT
  1326. APIENTRY
  1327. OGetOutlineTextMetricsW(
  1328. HDC hdc,
  1329. UINT cbData,
  1330. LPOUTLINETEXTMETRICW lpOTM)
  1331. {
  1332. // *** TextMetrics defines BYTE elements in the structure for the
  1333. // value of first first/last character defined in the font.
  1334. // Problem for DBCS.
  1335. if(FWide())
  1336. return GetOutlineTextMetricsW(hdc, cbData, lpOTM);
  1337. return GetOutlineTextMetricsA(hdc, cbData, (LPOUTLINETEXTMETRICA)lpOTM); //$ UNDONE_POST_98 - This doesn't convert the embedded Names...
  1338. }
  1339. UINT
  1340. WINAPI
  1341. OGetPrivateProfileIntW(
  1342. LPCWSTR lpAppName,
  1343. LPCWSTR lpKeyName,
  1344. INT nDefault,
  1345. LPCWSTR lpFileName)
  1346. {
  1347. if(FWide())
  1348. return GetPrivateProfileIntW(lpAppName, lpKeyName, nDefault, lpFileName);
  1349. PreConvert();
  1350. LPSTR szAppName = Convert(lpAppName);
  1351. LPSTR szKeyName = Convert(lpKeyName);
  1352. LPSTR szFileName = Convert(lpFileName);
  1353. return GetPrivateProfileIntA(szAppName, szKeyName, nDefault, szFileName);
  1354. }
  1355. DWORD
  1356. WINAPI
  1357. OGetPrivateProfileStringW(
  1358. LPCWSTR lpAppName,
  1359. LPCWSTR lpKeyName,
  1360. LPCWSTR lpDefault,
  1361. LPWSTR lpReturnedString,
  1362. DWORD nSize,
  1363. LPCWSTR lpFileName)
  1364. {
  1365. if(FWide())
  1366. return GetPrivateProfileStringW(lpAppName, lpKeyName, lpDefault, lpReturnedString,
  1367. nSize, lpFileName);
  1368. PreConvert();
  1369. LPSTR szAppName = Convert(lpAppName);
  1370. LPSTR szKeyName = Convert(lpKeyName);
  1371. LPSTR szDefault = Convert(lpDefault);
  1372. LPSTR szFileName = Convert(lpFileName);
  1373. LPSTR szReturnedString = SzAlloc(sizeof(WCHAR) * nSize);
  1374. DWORD dwRet = GetPrivateProfileStringA(szAppName, szKeyName, szDefault, szReturnedString,
  1375. sizeof(WCHAR) * nSize, szFileName);
  1376. // I hope this doesn't fail because there's no clear failure value in the docs
  1377. DWORD dwNoOfChar = AnsiToUnicode(lpReturnedString, szReturnedString, nSize);
  1378. if (dwNoOfChar)
  1379. return dwRet;
  1380. else
  1381. {
  1382. LPWSTR lpTempString = SzWAlloc(sizeof(WCHAR) * nSize);
  1383. if (AnsiToUnicode(lpTempString, szReturnedString, sizeof(WCHAR) * nSize))
  1384. {
  1385. if (lpAppName && lpKeyName)
  1386. {
  1387. lpTempString[nSize - 1] = L'\0';
  1388. wcsncpy(lpReturnedString, lpTempString, nSize);
  1389. return nSize - 1;
  1390. }
  1391. else
  1392. {
  1393. lpTempString[nSize - 1] = L'\0';
  1394. lpTempString[nSize - 2] = L'\0';
  1395. wcsncpy(lpReturnedString, lpTempString, nSize);
  1396. return nSize - 2;
  1397. }
  1398. }
  1399. }
  1400. return dwRet;
  1401. }
  1402. int
  1403. WINAPI
  1404. OGetObjectW(
  1405. HGDIOBJ hgdiobj,
  1406. int cbBuffer,
  1407. LPVOID lpvObject)
  1408. {
  1409. if(FWide())
  1410. return GetObjectW(hgdiobj, cbBuffer, lpvObject);
  1411. DWORD dwObj = GetObjectType(hgdiobj);
  1412. if (OBJ_FONT == dwObj)
  1413. {
  1414. //$CONSIDER: This effects all getobject call, performance?
  1415. Assert(cbBuffer == sizeof(LOGFONTW));
  1416. LOGFONTA lfa;
  1417. LOGFONTW *plfw = (LOGFONTW *)lpvObject;
  1418. int nRet = GetObjectA(hgdiobj, sizeof(lfa), &lfa);
  1419. if(nRet)
  1420. {
  1421. memcpy(plfw, &lfa, sizeof(LOGFONTA));
  1422. Verify(0 <= AnsiToUnicode(plfw->lfFaceName, lfa.lfFaceName, LF_FACESIZE));
  1423. }
  1424. return nRet;
  1425. }
  1426. else
  1427. {
  1428. return GetObjectA(hgdiobj, cbBuffer, lpvObject);
  1429. }
  1430. }
  1431. UINT
  1432. WINAPI
  1433. OGetProfileIntW(
  1434. LPCWSTR lpAppName,
  1435. LPCWSTR lpKeyName,
  1436. INT nDefault
  1437. )
  1438. {
  1439. if(FWide())
  1440. return GetProfileIntW(lpAppName, lpKeyName, nDefault);
  1441. PreConvert();
  1442. LPSTR szApp = Convert(lpAppName);
  1443. LPSTR szKey = Convert(lpKeyName);
  1444. return GetProfileIntA(szApp, szKey, nDefault);
  1445. }
  1446. HANDLE
  1447. WINAPI
  1448. OGetPropW(
  1449. HWND hWnd,
  1450. LPCWSTR lpString)
  1451. {
  1452. if(FWide())
  1453. return GetPropW(hWnd, lpString);
  1454. if(FATOM(lpString))
  1455. return GetPropA(hWnd, (LPSTR)lpString);
  1456. PreConvert();
  1457. LPSTR sz = Convert(lpString);
  1458. return GetPropA(hWnd, sz);
  1459. }
  1460. DWORD
  1461. WINAPI
  1462. OGetTabbedTextExtentW(
  1463. HDC hDC,
  1464. LPCWSTR lpString,
  1465. int nCount,
  1466. int nTabPositions,
  1467. LPINT lpnTabStopPositions)
  1468. {
  1469. Assert(-1 != nCount);
  1470. if(FWide())
  1471. return GetTabbedTextExtentW(hDC, lpString, nCount, nTabPositions, lpnTabStopPositions);
  1472. PreConvert();
  1473. LONG n = 0;
  1474. LPSTR sz = ConvertWithLen(lpString, nCount, &n);
  1475. if (sz == NULL)
  1476. return(0);
  1477. return GetTabbedTextExtentA(hDC, sz, n, nTabPositions, lpnTabStopPositions);
  1478. }
  1479. // From: Mark Ashton on 5/8/97
  1480. UINT
  1481. WINAPI
  1482. OGetTempFileNameW(
  1483. LPCWSTR lpPathName,
  1484. LPCWSTR lpPrefixString,
  1485. UINT uUnique,
  1486. LPWSTR lpTempFileName
  1487. )
  1488. {
  1489. if (FWide())
  1490. return GetTempFileNameW(lpPathName, lpPrefixString, uUnique, lpTempFileName);
  1491. char szPathName[_MAX_PATH];
  1492. Verify(0 <= UnicodeToAnsi(szPathName, lpPathName, _MAX_PATH));
  1493. char szPrefixString[_MAX_PATH];
  1494. Verify(0 <= UnicodeToAnsi(szPrefixString, lpPrefixString, _MAX_PATH));
  1495. char szTempFilename[_MAX_PATH];
  1496. UINT dwRet = GetTempFileNameA(szPathName, szPrefixString, uUnique, szTempFilename);
  1497. if (dwRet)
  1498. {
  1499. Verify(0 <= AnsiToUnicode(lpTempFileName, szTempFilename, _MAX_PATH));
  1500. }
  1501. return dwRet;
  1502. }
  1503. // From: Mark Ashton on 5/8/97
  1504. DWORD
  1505. WINAPI
  1506. OGetTempPathW(
  1507. DWORD nBufferLength,
  1508. LPWSTR lpBuffer
  1509. )
  1510. {
  1511. if (FWide())
  1512. return GetTempPathW(nBufferLength, lpBuffer);
  1513. char szPath[_MAX_PATH];
  1514. DWORD dwRet = GetTempPathA(_MAX_PATH, szPath);
  1515. if (dwRet)
  1516. {
  1517. Verify(0 <= AnsiToUnicode(lpBuffer, szPath, nBufferLength));
  1518. }
  1519. return dwRet;
  1520. }
  1521. BOOL
  1522. APIENTRY
  1523. OGetTextExtentPoint32W(
  1524. HDC hdc,
  1525. LPCWSTR pwsz,
  1526. int cb,
  1527. LPSIZE pSize
  1528. )
  1529. {
  1530. Assert(-1 != cb);
  1531. if(FWide())
  1532. return GetTextExtentPoint32W(hdc, pwsz, cb, pSize);
  1533. PreConvert();
  1534. LONG n = 0;
  1535. LPSTR sz = ConvertWithLen(pwsz, cb, &n);
  1536. if (sz == NULL)
  1537. return(0);
  1538. return GetTextExtentPoint32A(hdc, sz, n, pSize);
  1539. }
  1540. BOOL
  1541. APIENTRY
  1542. OGetTextExtentPointW(
  1543. HDC hdc,
  1544. LPCWSTR pwsz,
  1545. int cb,
  1546. LPSIZE pSize
  1547. )
  1548. {
  1549. Assert(-1 != cb);
  1550. if(FWide())
  1551. return GetTextExtentPointW(hdc, pwsz, cb, pSize);
  1552. PreConvert();
  1553. LONG n = 0;
  1554. LPSTR sz = ConvertWithLen(pwsz, cb, &n);
  1555. return GetTextExtentPointA(hdc, sz, n, pSize);
  1556. }
  1557. BOOL
  1558. APIENTRY OGetTextExtentExPointW(
  1559. HDC hdc,
  1560. LPCWSTR lpszStr,
  1561. int cchString,
  1562. int nMaxExtent,
  1563. LPINT lpnFit,
  1564. LPINT alpDx,
  1565. LPSIZE pSize
  1566. )
  1567. {
  1568. Assert(-1 != cchString);
  1569. if(FWide())
  1570. return GetTextExtentExPointW(hdc, lpszStr, cchString,
  1571. nMaxExtent, lpnFit, alpDx, pSize);
  1572. PreConvert();
  1573. LONG n = 0;
  1574. LPSTR sz = ConvertWithLen(lpszStr, cchString, &n);
  1575. if (sz == NULL)
  1576. return(0);
  1577. return GetTextExtentExPointA(hdc, sz, n, nMaxExtent, lpnFit, alpDx, pSize);
  1578. }
  1579. LONG
  1580. WINAPI
  1581. OGetWindowLongW(
  1582. HWND hWnd,
  1583. int nIndex)
  1584. {
  1585. if(FWide())
  1586. return GetWindowLongW(hWnd, nIndex);
  1587. return GetWindowLongA(hWnd, nIndex);
  1588. }
  1589. BOOL
  1590. WINAPI
  1591. OGetTextMetricsW(
  1592. HDC hdc,
  1593. LPTEXTMETRICW lptm)
  1594. {
  1595. if(FWide())
  1596. return GetTextMetricsW(hdc, lptm);
  1597. TEXTMETRICA tma;
  1598. memcpy(&tma, lptm, OffsetOf(TEXTMETRIC, tmFirstChar));
  1599. // tmFirstChar is defined as BYTE.
  1600. // $CONSIDER : will fail for DBCS !!
  1601. wctomb((LPSTR)&tma.tmFirstChar, lptm->tmFirstChar);
  1602. wctomb((LPSTR)&tma.tmLastChar, lptm->tmLastChar);
  1603. wctomb((LPSTR)&tma.tmDefaultChar, lptm->tmDefaultChar);
  1604. wctomb((LPSTR)&tma.tmBreakChar, lptm->tmBreakChar);
  1605. memcpy(&tma.tmItalic, &lptm->tmItalic, sizeof(TEXTMETRIC) - OffsetOf(TEXTMETRIC, tmItalic));
  1606. BOOL fRet = GetTextMetricsA(hdc, &tma);
  1607. if(fRet)
  1608. {
  1609. memcpy(&lptm->tmItalic, &tma.tmItalic, sizeof(TEXTMETRIC) - OffsetOf(TEXTMETRIC, tmItalic));
  1610. // Convert tma.tmFirstChar (1 byte char) to lptm->tmFirstChar
  1611. mbtowc(&lptm->tmFirstChar, (LPSTR)&tma.tmFirstChar, 1);
  1612. mbtowc(&lptm->tmLastChar, (LPSTR)&tma.tmLastChar, 1);
  1613. mbtowc(&lptm->tmDefaultChar, (LPSTR)&tma.tmDefaultChar, 1);
  1614. mbtowc(&lptm->tmBreakChar, (LPSTR)&tma.tmBreakChar, 1);
  1615. memcpy(lptm, &tma, OffsetOf(TEXTMETRIC, tmFirstChar));
  1616. }
  1617. return fRet;
  1618. }
  1619. // From: Mark Ashton on 5/8/97
  1620. BOOL
  1621. WINAPI
  1622. OGetUserNameW (
  1623. LPWSTR lpBuffer,
  1624. LPDWORD nSize
  1625. )
  1626. {
  1627. if (FWide())
  1628. return GetUserNameW(lpBuffer, nSize);
  1629. DWORD dwLen = *nSize;
  1630. LPSTR sz = SzAlloc(dwLen);
  1631. BOOL fFlag = GetUserNameA(sz, nSize);
  1632. if (fFlag)
  1633. {
  1634. *nSize = AnsiToUnicode(lpBuffer, sz, dwLen);
  1635. }
  1636. return fFlag;
  1637. }
  1638. BOOL
  1639. WINAPI
  1640. OGetVolumeInformationW(
  1641. LPCWSTR lpRootPathName,
  1642. LPWSTR lpVolumeNameBuffer,
  1643. DWORD nVolumeNameSize,
  1644. LPDWORD lpVolumeSerialNumber,
  1645. LPDWORD lpMaximumComponentLength,
  1646. LPDWORD lpFileSystemFlags,
  1647. LPWSTR lpFileSystemNameBuffer,
  1648. DWORD nFileSystemNameSize
  1649. )
  1650. {
  1651. if(FWide())
  1652. return GetVolumeInformationW(lpRootPathName, lpVolumeNameBuffer, nVolumeNameSize, lpVolumeSerialNumber,
  1653. lpMaximumComponentLength, lpFileSystemFlags, lpFileSystemNameBuffer, nFileSystemNameSize);
  1654. PreConvert();
  1655. LPSTR szRoot = Convert(lpRootPathName);
  1656. LPSTR szName = SzAlloc(sizeof(WCHAR) * nVolumeNameSize);
  1657. LPSTR szSysName = SzAlloc(sizeof(WCHAR) * nFileSystemNameSize);
  1658. BOOL fRet = GetVolumeInformationA(szRoot, szName, sizeof(WCHAR) * nVolumeNameSize, lpVolumeSerialNumber,
  1659. lpMaximumComponentLength, lpFileSystemFlags, szSysName, sizeof(WCHAR) * nFileSystemNameSize);
  1660. if(fRet)
  1661. {
  1662. if (!AnsiToUnicode(lpVolumeNameBuffer, szName, nVolumeNameSize) ||
  1663. !AnsiToUnicode(lpFileSystemNameBuffer, szSysName, nFileSystemNameSize))
  1664. {
  1665. fRet = false;
  1666. }
  1667. }
  1668. if (!fRet)
  1669. {
  1670. if (lpVolumeNameBuffer && 0 < nVolumeNameSize)
  1671. {
  1672. *lpVolumeNameBuffer = L'\0';
  1673. }
  1674. if (lpFileSystemNameBuffer && 0 < nFileSystemNameSize)
  1675. {
  1676. *lpFileSystemNameBuffer = L'\0';
  1677. }
  1678. }
  1679. return fRet;
  1680. }
  1681. int
  1682. WINAPI
  1683. OGetWindowTextLengthW(
  1684. HWND hWnd)
  1685. {
  1686. if(FWide())
  1687. return GetWindowTextLengthW(hWnd);
  1688. return GetWindowTextLengthA(hWnd);
  1689. }
  1690. int
  1691. WINAPI
  1692. OGetWindowTextW(
  1693. HWND hWnd,
  1694. LPWSTR lpString,
  1695. int nMaxCount)
  1696. {
  1697. /******* Blackbox Testing results for GetWindowText Win32 API ******
  1698. TestCase lpString nMaxCount Return Value *lpString modified
  1699. ======================================================================
  1700. Testing GetWindowTextW on WinNT :-
  1701. A not NULL 0 0 No
  1702. B NULL 0 0 No
  1703. C NULL not 0 0 No
  1704. D not NULL not 0 # of chars w/o Yes
  1705. \0 terminator
  1706. Testing GetWindowTextA on Win95 :-
  1707. A not NULL 0 0 Yes
  1708. B NULL 0 GPF!!
  1709. C NULL not 0 GPF!!
  1710. D not NULL not 0 # of chars w/o Yes
  1711. \0 terminator
  1712. *********************************************************************/
  1713. if(FWide())
  1714. return GetWindowTextW(hWnd, lpString, nMaxCount);
  1715. LPSTR sz = SzAlloc(sizeof(WCHAR) * nMaxCount);
  1716. int nRet = GetWindowTextA(hWnd, sz, sizeof(WCHAR) * nMaxCount);
  1717. // $UNDONE_POST_98: This is bogus, we should do this like OLoadStringW
  1718. if(nRet)
  1719. {
  1720. return AnsiToUnicode(lpString, sz, nMaxCount);
  1721. }
  1722. else
  1723. {
  1724. // GetWindowText() returns 0 when you call it on a window which
  1725. // has no text (e.g. edit control without any text). It also initializes
  1726. // the buffer passed in to receive the text to "\0". So we should initialize
  1727. // the buffer passed in before returning.
  1728. if (lpString && 0 < nMaxCount)
  1729. {
  1730. *lpString = L'\0';
  1731. }
  1732. }
  1733. return nRet;
  1734. }
  1735. ATOM
  1736. WINAPI
  1737. OGlobalAddAtomW(
  1738. LPCWSTR lpString
  1739. )
  1740. {
  1741. if(FWide())
  1742. return GlobalAddAtomW(lpString);
  1743. PreConvert();
  1744. LPSTR sz = Convert(lpString);
  1745. if (sz == NULL)
  1746. return(0);
  1747. return GlobalAddAtomA(sz);
  1748. }
  1749. // From: Josh Kaplan on 8/12/97
  1750. UINT
  1751. WINAPI
  1752. OGlobalGetAtomNameW(
  1753. ATOM nAtom,
  1754. LPWSTR lpBuffer,
  1755. int nSize
  1756. )
  1757. {
  1758. if(FWide())
  1759. return GlobalGetAtomNameW(nAtom, lpBuffer, nSize);
  1760. LPSTR sz = SzAlloc(sizeof(WCHAR) * nSize);
  1761. if (GlobalGetAtomNameA(nAtom, sz, sizeof(WCHAR) * nSize))
  1762. {
  1763. // $UNDONE_POST_98: This is bogus, we should do this like OLoadStringW
  1764. return AnsiToUnicode(lpBuffer, sz, nSize) - 1;
  1765. }
  1766. if (lpBuffer && 0 < nSize)
  1767. {
  1768. *lpBuffer = L'\0';
  1769. }
  1770. return 0;
  1771. }
  1772. BOOL
  1773. WINAPI
  1774. OGrayStringW(
  1775. HDC hDC,
  1776. HBRUSH hBrush,
  1777. GRAYSTRINGPROC lpOutputFunc,
  1778. LPARAM lpData,
  1779. int nCount,
  1780. int X,
  1781. int Y,
  1782. int nWidth,
  1783. int nHeight)
  1784. {
  1785. if(FWide())
  1786. return GrayStringW(hDC, hBrush, lpOutputFunc, lpData, nCount, X, Y, nWidth, nHeight);
  1787. if (!lpOutputFunc)
  1788. {
  1789. PreConvert();
  1790. LPSTR szData = Convert((LPCWSTR) lpData);
  1791. if (szData == NULL)
  1792. return(0);
  1793. return GrayStringA(hDC, hBrush, lpOutputFunc, (LPARAM) szData, nCount, X, Y, nWidth, nHeight);
  1794. }
  1795. return GrayStringA(hDC, hBrush, lpOutputFunc, lpData, nCount, X, Y, nWidth, nHeight);
  1796. }
  1797. BOOL
  1798. WINAPI
  1799. OInsertMenuW(
  1800. HMENU hMenu,
  1801. UINT uPosition,
  1802. UINT uFlags,
  1803. UINT uIDNewItem,
  1804. LPCWSTR lpNewItem
  1805. )
  1806. {
  1807. if(FWide())
  1808. return InsertMenuW(hMenu, uPosition, uFlags, uIDNewItem, lpNewItem);
  1809. if(uFlags & (MF_BITMAP | MF_OWNERDRAW))
  1810. return InsertMenuA(hMenu, uPosition, uFlags, uIDNewItem, (LPSTR)lpNewItem);
  1811. PreConvert();
  1812. LPSTR sz = Convert(lpNewItem);
  1813. return InsertMenuA(hMenu, uPosition, uFlags, uIDNewItem, sz);
  1814. }
  1815. BOOL
  1816. WINAPI
  1817. OIsBadStringPtrW(
  1818. LPCWSTR lpsz,
  1819. UINT ucchMax
  1820. )
  1821. {
  1822. if(FWide())
  1823. return IsBadStringPtrW(lpsz, ucchMax);
  1824. return IsBadStringPtrA((LPSTR) lpsz, ucchMax * sizeof(WCHAR)); //$UNDONE_POST_98 - We should use IsBadReadPtr(strlen)!
  1825. }
  1826. BOOL
  1827. WINAPI
  1828. OIsCharAlphaNumericW(
  1829. WCHAR wch)
  1830. {
  1831. if(FWide())
  1832. return IsCharAlphaNumericW(wch);
  1833. //$CONSIDER: we really want to use MB_CUR_MAX, but that is
  1834. // not a defined constant
  1835. CHAR psz[4];
  1836. int cch = WideCharToMultiByte(CP_ACP, 0, &wch, 1, (CHAR *) psz, 4, NULL, NULL);
  1837. if (1 == cch)
  1838. {
  1839. return IsCharAlphaNumericA(*psz);
  1840. }
  1841. else if (1 < cch)
  1842. {
  1843. // It's a multi-byte character, so treat it as alpha
  1844. // Note: we are not sure that this is entirely correct
  1845. return true;
  1846. }
  1847. else
  1848. {
  1849. return false;
  1850. }
  1851. }
  1852. BOOL
  1853. WINAPI
  1854. OIsCharAlphaW(
  1855. WCHAR wch)
  1856. {
  1857. if(FWide())
  1858. return IsCharAlphaW(wch);
  1859. //$CONSIDER: we really want to use MB_CUR_MAX, but that is
  1860. // not a defined constant
  1861. CHAR psz[4];
  1862. int cch = WideCharToMultiByte(CP_ACP, 0, &wch, 1, (CHAR *) psz, 4, NULL, NULL);
  1863. if(1 == cch)
  1864. {
  1865. return IsCharAlphaA(*psz);
  1866. }
  1867. else if (1 < cch)
  1868. {
  1869. // It's a multi-byte character, so treat it as alpha
  1870. // Note: we are not sure that this is entirely correct
  1871. return true;
  1872. }
  1873. else
  1874. {
  1875. return false;
  1876. }
  1877. }
  1878. BOOL
  1879. WINAPI
  1880. OIsDialogMessageW(
  1881. HWND hDlg,
  1882. LPMSG lpMsg)
  1883. {
  1884. // WARNING!!!
  1885. // Bug #6488. We have run into problems due to using IsDialogMessageW on
  1886. // WinNT Japanese. The fix for the bug was calling ANSI version of
  1887. // IsDialogMessage irrespective of whether we are running on NT or Win95.
  1888. // The shell is compiled MBCS (not UNICODE) and they are always using the
  1889. // ANSI versions of the routines. lpMsg passed by shell contains MBCS
  1890. // characters & not UNICODE. So in cases where you get the message
  1891. // structure from the Shell, you will have to call the IsDialogMessageA
  1892. // directly and not use this wrapper.
  1893. if(FWide())
  1894. return IsDialogMessageW(hDlg, lpMsg);
  1895. return IsDialogMessageA(hDlg, lpMsg);
  1896. }
  1897. // From: Mark Ashton on 5/8/97
  1898. // Bill Hieber - 2/5/98 fixed buffer size problem.
  1899. int
  1900. WINAPI
  1901. OLCMapStringW(
  1902. LCID Locale,
  1903. DWORD dwMapFlags,
  1904. LPCWSTR lpSrcStr,
  1905. int cchSrc,
  1906. LPWSTR lpDestStr,
  1907. int cchDest)
  1908. {
  1909. if (FWide())
  1910. return LCMapStringW(Locale, dwMapFlags, lpSrcStr, cchSrc, lpDestStr, cchDest);
  1911. // lpSrcStr is not required to be '\0' terminated. Note that we don't support -1!
  1912. Assert(cchSrc != -1);
  1913. LPSTR sz = SzAlloc(cchSrc * 2);
  1914. int dw = WideCharToMultiByte(CP_ACP, 0, lpSrcStr, cchSrc, sz, cchSrc * 2, NULL, NULL);
  1915. LPSTR dst = cchDest ? SzAlloc(cchDest*2) : NULL;
  1916. int dwRet = LCMapStringA(Locale, dwMapFlags, sz, dw, dst, cchDest*2);
  1917. if (dwRet && cchDest)
  1918. {
  1919. dwRet = MultiByteToWideChar(CP_ACP, 0, dst, dwRet, lpDestStr, cchDest);
  1920. }
  1921. return dwRet;
  1922. }
  1923. HACCEL
  1924. WINAPI
  1925. OLoadAcceleratorsW(
  1926. HINSTANCE hInst,
  1927. LPCWSTR lpTableName)
  1928. {
  1929. if(FWide())
  1930. return LoadAcceleratorsW(hInst, lpTableName);
  1931. if(FATOM(lpTableName))
  1932. return LoadAcceleratorsA(hInst, (LPSTR)lpTableName);
  1933. PreConvert();
  1934. LPSTR sz = Convert(lpTableName);
  1935. return LoadAcceleratorsA(hInst, sz);
  1936. }
  1937. HBITMAP
  1938. WINAPI
  1939. OLoadBitmapW(
  1940. HINSTANCE hInstance,
  1941. LPCWSTR lpBitmapName)
  1942. {
  1943. if(FWide())
  1944. return LoadBitmapW(hInstance, lpBitmapName);
  1945. if(FATOM(lpBitmapName))
  1946. return LoadBitmapA(hInstance, (LPSTR)lpBitmapName);
  1947. PreConvert();
  1948. LPSTR sz = Convert(lpBitmapName);
  1949. return LoadBitmapA(hInstance, sz);
  1950. }
  1951. HCURSOR
  1952. WINAPI
  1953. OLoadCursorW(
  1954. HINSTANCE hInstance,
  1955. LPCWSTR lpCursorName)
  1956. {
  1957. if(FWide())
  1958. return LoadCursorW(
  1959. hInstance,
  1960. lpCursorName);
  1961. if (FATOM(lpCursorName))
  1962. return LoadCursorA(hInstance, (LPSTR) lpCursorName);
  1963. PreConvert();
  1964. LPSTR sz = Convert(lpCursorName);
  1965. return LoadCursorA(hInstance, sz);
  1966. }
  1967. HICON
  1968. WINAPI
  1969. OLoadIconW(
  1970. HINSTANCE hInstance,
  1971. LPCWSTR lpIconName)
  1972. {
  1973. if(FWide())
  1974. return LoadIconW(hInstance, lpIconName);
  1975. if(FATOM(lpIconName))
  1976. return LoadIconA(hInstance, (LPSTR)lpIconName);
  1977. PreConvert();
  1978. LPSTR sz = Convert(lpIconName);
  1979. return LoadIconA(hInstance, sz);
  1980. }
  1981. HINSTANCE
  1982. WINAPI
  1983. OLoadLibraryW(
  1984. LPCWSTR pwszFileName
  1985. )
  1986. {
  1987. if(FWide())
  1988. return LoadLibraryW(pwszFileName);
  1989. PreConvert();
  1990. LPSTR sz = Convert(pwszFileName);
  1991. return LoadLibraryA(sz);
  1992. }
  1993. HMODULE
  1994. WINAPI
  1995. OLoadLibraryExW(
  1996. LPCWSTR lpLibFileName,
  1997. HANDLE hFile,
  1998. DWORD dwFlags
  1999. )
  2000. {
  2001. if(FWide())
  2002. return LoadLibraryExW(lpLibFileName, hFile, dwFlags);
  2003. PreConvert();
  2004. LPSTR sz = Convert(lpLibFileName);
  2005. return LoadLibraryExA(sz, hFile, dwFlags);
  2006. }
  2007. HMENU
  2008. WINAPI
  2009. OLoadMenuIndirectW(
  2010. CONST MENUTEMPLATEW *lpMenuTemplate)
  2011. {
  2012. if(FWide())
  2013. return LoadMenuIndirectW(lpMenuTemplate);
  2014. //$NOTE: For both the ANSI and the Unicode version of this function,
  2015. //the strings in the MENUITEMTEMPLATE structure must be Unicode strings
  2016. return LoadMenuIndirectA(lpMenuTemplate);
  2017. }
  2018. HMENU
  2019. WINAPI
  2020. OLoadMenuW(
  2021. HINSTANCE hInstance,
  2022. LPCWSTR lpMenuName)
  2023. {
  2024. if(FWide())
  2025. return LoadMenuW(hInstance, lpMenuName);
  2026. if(FATOM(lpMenuName))
  2027. return LoadMenuA(hInstance, (LPCSTR)lpMenuName);
  2028. PreConvert();
  2029. LPSTR sz = Convert(lpMenuName);
  2030. return LoadMenuA(hInstance, sz);
  2031. }
  2032. int
  2033. WINAPI
  2034. OLoadStringW(
  2035. HINSTANCE hInstance,
  2036. UINT uID,
  2037. LPWSTR lpBuffer,
  2038. int nBufferMax)
  2039. {
  2040. if(FWide())
  2041. return LoadStringW(hInstance, uID, lpBuffer, nBufferMax);
  2042. LPSTR sz = SzAlloc(sizeof(WCHAR) * nBufferMax);
  2043. int nRet = LoadStringA(hInstance, uID, sz, sizeof(WCHAR) * nBufferMax);
  2044. if (!nRet)
  2045. {
  2046. if (lpBuffer && 0 < nBufferMax)
  2047. {
  2048. *lpBuffer = L'\0';
  2049. }
  2050. return 0;
  2051. }
  2052. LONG lRet = AnsiToUnicode(lpBuffer, sz, nBufferMax, nRet + 1); // '\0'
  2053. if (lRet)
  2054. {
  2055. return lRet - 1;
  2056. }
  2057. LPWSTR szBuff = SzWAlloc(nRet + 1);
  2058. lRet = AnsiToUnicode(szBuff, sz, nRet + 1, nRet + 1);
  2059. Assert(lRet);
  2060. memcpy(lpBuffer, szBuff, sizeof(WCHAR) * nBufferMax);
  2061. lpBuffer[nBufferMax - 1] = L'\0';
  2062. return nBufferMax - 1;
  2063. }
  2064. LPWSTR
  2065. WINAPI
  2066. OlstrcatW(
  2067. LPWSTR lpString1,
  2068. LPCWSTR lpString2
  2069. )
  2070. {
  2071. if (!lpString1 || !lpString2)
  2072. return lpString1;
  2073. return wcscat(lpString1, lpString2);
  2074. }
  2075. int
  2076. WINAPI
  2077. OlstrcmpiW(
  2078. LPCWSTR lpString1,
  2079. LPCWSTR lpString2
  2080. )
  2081. {
  2082. if(FWide())
  2083. return lstrcmpiW(lpString1, lpString2);
  2084. PreConvert();
  2085. LPSTR psz1 = lpString1 ? Convert(lpString1) : NULL;
  2086. LPSTR psz2 = lpString2 ? Convert(lpString2) : NULL;
  2087. return lstrcmpiA(psz1, psz2);
  2088. }
  2089. int
  2090. WINAPI
  2091. OlstrcmpW(
  2092. LPCWSTR lpString1,
  2093. LPCWSTR lpString2
  2094. )
  2095. {
  2096. if(FWide())
  2097. return lstrcmpW(lpString1, lpString2);
  2098. PreConvert();
  2099. LPSTR psz1 = lpString1 ? Convert(lpString1) : NULL;
  2100. LPSTR psz2 = lpString2 ? Convert(lpString2) : NULL;
  2101. return lstrcmpA(psz1, psz2);
  2102. }
  2103. LPWSTR
  2104. WINAPI
  2105. OlstrcpyW(
  2106. LPWSTR lpString1,
  2107. LPCWSTR lpString2
  2108. )
  2109. {
  2110. if (!lpString1)
  2111. return lpString1;
  2112. if (!lpString2)
  2113. lpString2 = L"";
  2114. return wcscpy(lpString1, lpString2);
  2115. }
  2116. // From: Mark Ashton on 5/8/97
  2117. // Ted Smith added null string pointer handling
  2118. LPWSTR
  2119. WINAPI
  2120. OlstrcpynW(
  2121. LPWSTR lpString1,
  2122. LPCWSTR lpString2,
  2123. int iMaxLength
  2124. )
  2125. {
  2126. if (!lpString1)
  2127. {
  2128. return lpString1;
  2129. }
  2130. if (!lpString2)
  2131. {
  2132. lpString2 = L"";
  2133. }
  2134. if(FWide())
  2135. return lstrcpynW(lpString1, lpString2, iMaxLength);
  2136. lpString1[--iMaxLength] = L'\0';
  2137. return wcsncpy(lpString1, lpString2, iMaxLength);
  2138. }
  2139. int
  2140. WINAPI
  2141. OlstrlenW(
  2142. LPCWSTR lpString
  2143. )
  2144. {
  2145. return lpString ? wcslen(lpString) : 0;
  2146. }
  2147. UINT
  2148. WINAPI
  2149. OMapVirtualKeyW(
  2150. UINT uCode,
  2151. UINT uMapType)
  2152. {
  2153. // The only person using this so far is using uMapType == 0
  2154. Assert(2 != uMapType);
  2155. if (FWide())
  2156. return MapVirtualKeyW(uCode, uMapType);
  2157. return MapVirtualKeyA(uCode, uMapType);
  2158. }
  2159. int
  2160. WINAPI
  2161. OMessageBoxW(
  2162. HWND hWnd ,
  2163. LPCWSTR lpText,
  2164. LPCWSTR lpCaption,
  2165. UINT uType)
  2166. {
  2167. if(FWide())
  2168. return MessageBoxW(hWnd, lpText, lpCaption, uType);
  2169. PreConvert();
  2170. LPSTR szText = Convert(lpText);
  2171. LPSTR szCap = Convert(lpCaption);
  2172. return MessageBoxA(hWnd, szText, szCap, uType);
  2173. }
  2174. int
  2175. WINAPI
  2176. OMessageBoxIndirectW(
  2177. LPMSGBOXPARAMSW lpmbp)
  2178. {
  2179. Assert(!IsBadWritePtr((void*)lpmbp, sizeof MSGBOXPARAMSW));
  2180. Assert(sizeof MSGBOXPARAMSW == lpmbp->cbSize);
  2181. Assert(sizeof MSGBOXPARAMSW == sizeof MSGBOXPARAMSA);
  2182. if(FWide())
  2183. return MessageBoxIndirectW(lpmbp);
  2184. PreConvert();
  2185. MSGBOXPARAMSA mbpa;
  2186. memcpy(&mbpa, lpmbp, sizeof MSGBOXPARAMSA);
  2187. if (!FATOM(lpmbp->lpszText))
  2188. {
  2189. mbpa.lpszText = Convert(lpmbp->lpszText);
  2190. }
  2191. if (!FATOM(lpmbp->lpszCaption))
  2192. {
  2193. mbpa.lpszCaption = Convert(lpmbp->lpszCaption);
  2194. }
  2195. if ((lpmbp->dwStyle & MB_USERICON) && !FATOM(lpmbp->lpszIcon))
  2196. {
  2197. mbpa.lpszIcon = Convert(lpmbp->lpszIcon);
  2198. }
  2199. return MessageBoxIndirectA(&mbpa);
  2200. }
  2201. BOOL
  2202. WINAPI
  2203. OModifyMenuW(
  2204. HMENU hMnu,
  2205. UINT uPosition,
  2206. UINT uFlags,
  2207. UINT uIDNewItem,
  2208. LPCWSTR lpNewItem
  2209. )
  2210. {
  2211. if(FWide())
  2212. return ModifyMenuW(hMnu, uPosition, uFlags, uIDNewItem, lpNewItem);
  2213. if (MF_STRING == uFlags)
  2214. {
  2215. PreConvert();
  2216. LPSTR sz = Convert(lpNewItem);
  2217. return ModifyMenuA(hMnu, uPosition, uFlags, uIDNewItem, sz);
  2218. }
  2219. else
  2220. return ModifyMenuA(hMnu, uPosition, uFlags, uIDNewItem, (LPSTR) lpNewItem);
  2221. }
  2222. // From: Mark Ashton on 5/29/97
  2223. BOOL
  2224. WINAPI
  2225. OMoveFileExW(
  2226. LPCWSTR lpExistingFileName,
  2227. LPCWSTR lpNewFileName,
  2228. DWORD dwFlags
  2229. )
  2230. {
  2231. if (FWide())
  2232. return MoveFileExW(lpExistingFileName, lpNewFileName, dwFlags);
  2233. PreConvert();
  2234. LPSTR szOld = Convert(lpExistingFileName);
  2235. LPSTR szNew = Convert(lpNewFileName);
  2236. return MoveFileExA(szOld, szNew, dwFlags);
  2237. }
  2238. BOOL
  2239. WINAPI
  2240. OMoveFileW(
  2241. LPCWSTR lpExistingFileName,
  2242. LPCWSTR lpNewFileName)
  2243. {
  2244. if(FWide())
  2245. return MoveFileW(lpExistingFileName, lpNewFileName);
  2246. PreConvert();
  2247. LPSTR szOld = Convert(lpExistingFileName);
  2248. LPSTR szNew = Convert(lpNewFileName);
  2249. return MoveFileA(szOld, szNew);
  2250. }
  2251. HANDLE
  2252. WINAPI
  2253. OLoadImageW(
  2254. HINSTANCE hinst,
  2255. LPCWSTR lpszName,
  2256. UINT uType,
  2257. int cxDesired,
  2258. int cyDesired,
  2259. UINT fuLoad)
  2260. {
  2261. if (FWide())
  2262. {
  2263. Assert(!(LR_LOADFROMFILE & fuLoad));
  2264. return LoadImageW(hinst, lpszName, uType, cxDesired, cyDesired, fuLoad);
  2265. }
  2266. if (!FATOM(lpszName))
  2267. {
  2268. PreConvert();
  2269. LPSTR pszName = Convert(lpszName);
  2270. return LoadImageA(hinst, pszName, uType, cxDesired, cyDesired, fuLoad);
  2271. }
  2272. else
  2273. return LoadImageA(hinst, (LPSTR) lpszName, uType, cxDesired, cyDesired, fuLoad);
  2274. }
  2275. BOOL
  2276. WINAPI
  2277. OOemToCharW(
  2278. LPCSTR lpszSrc,
  2279. LPWSTR lpszDst)
  2280. {
  2281. if(FWide())
  2282. {
  2283. Assert(lpszSrc != (LPCSTR) lpszDst);
  2284. #pragma prefast(suppress:56, "do not know the size of the destination buffer")
  2285. return OemToCharW(lpszSrc, lpszDst);
  2286. }
  2287. DWORD cb = _mbslen((const unsigned char *)lpszSrc);
  2288. LPSTR szDst = SzAlloc(cb);
  2289. #pragma prefast(suppress:56, "noise")
  2290. BOOL fRet = OemToCharA(lpszSrc, szDst);
  2291. if(fRet)
  2292. {
  2293. Verify(0 <= AnsiToUnicode(lpszDst, szDst, cb));
  2294. }
  2295. return fRet;
  2296. }
  2297. VOID
  2298. WINAPI
  2299. OOutputDebugStringW(
  2300. LPCWSTR lpOutputString
  2301. )
  2302. {
  2303. if(FWide())
  2304. {
  2305. OutputDebugStringW(lpOutputString);
  2306. return;
  2307. }
  2308. PreConvert();
  2309. LPSTR sz = Convert(lpOutputString);
  2310. if (NULL == sz)
  2311. return;
  2312. OutputDebugStringA(sz);
  2313. }
  2314. BOOL
  2315. WINAPI
  2316. OPeekMessageW(
  2317. LPMSG lpMsg,
  2318. HWND hWnd ,
  2319. UINT wMsgFilterMin,
  2320. UINT wMsgFilterMax,
  2321. UINT wRemoveMsg)
  2322. {
  2323. if(FWide())
  2324. return PeekMessageW(lpMsg, hWnd , wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
  2325. return PeekMessageA(lpMsg, hWnd , wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
  2326. }
  2327. BOOL
  2328. WINAPI
  2329. OPostMessageW(
  2330. HWND hWnd,
  2331. UINT Msg,
  2332. WPARAM wParam,
  2333. LPARAM lParam)
  2334. {
  2335. if(FWide())
  2336. return PostMessageW(hWnd, Msg, wParam, lParam);
  2337. return PostMessageA(hWnd, Msg, wParam, lParam);
  2338. }
  2339. BOOL
  2340. WINAPI
  2341. OPostThreadMessageW(
  2342. DWORD idThread,
  2343. UINT Msg,
  2344. WPARAM wParam,
  2345. LPARAM lParam)
  2346. {
  2347. if (FWide())
  2348. return PostThreadMessageW(idThread, Msg, wParam, lParam);
  2349. return PostThreadMessageA(idThread, Msg, wParam, lParam);
  2350. }
  2351. // From: Mark Ashton on 5/8/97
  2352. LONG
  2353. APIENTRY
  2354. ORegCreateKeyExW(
  2355. HKEY hKey,
  2356. LPCWSTR lpSubKey,
  2357. DWORD Reserved,
  2358. LPWSTR lpClass,
  2359. DWORD dwOptions,
  2360. REGSAM samDesired,
  2361. LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  2362. PHKEY phkResult,
  2363. LPDWORD lpdwDisposition
  2364. )
  2365. {
  2366. Assert(lpSubKey);
  2367. if(FWide())
  2368. return RegCreateKeyExW(hKey, lpSubKey, Reserved, lpClass, dwOptions, samDesired,
  2369. lpSecurityAttributes, phkResult, lpdwDisposition);
  2370. PreConvert();
  2371. LPSTR sz = Convert(lpSubKey);
  2372. LPSTR sz2 = Convert(lpClass);
  2373. return RegCreateKeyExA(hKey, sz, Reserved, sz2, dwOptions, samDesired,
  2374. lpSecurityAttributes, phkResult, lpdwDisposition);
  2375. }
  2376. // From: Mark Ashton on 5/8/97
  2377. LONG
  2378. APIENTRY
  2379. ORegCreateKeyW (
  2380. HKEY hKey,
  2381. LPCWSTR lpSubKey,
  2382. PHKEY phkResult
  2383. )
  2384. {
  2385. if (FWide())
  2386. return RegCreateKeyW(hKey, lpSubKey, phkResult);
  2387. PreConvert();
  2388. LPSTR sz = Convert(lpSubKey);
  2389. return RegCreateKeyA(hKey, sz, phkResult);
  2390. }
  2391. // From: Mark Ashton on 5/8/97
  2392. LONG
  2393. APIENTRY
  2394. ORegEnumKeyW (
  2395. HKEY hKey,
  2396. DWORD dwIndex,
  2397. LPWSTR lpName,
  2398. DWORD cbName
  2399. )
  2400. {
  2401. if (FWide())
  2402. return RegEnumKeyW(hKey, dwIndex, lpName, cbName);
  2403. LPSTR sz = SzAlloc(cbName);
  2404. LONG dwRet = RegEnumKeyA(hKey, dwIndex, sz, cbName);
  2405. Verify(0 <= AnsiToUnicode(lpName, sz, cbName));
  2406. return dwRet;
  2407. }
  2408. // Van Kichline
  2409. // IHammer group
  2410. // Not supported: REG_MULTI_SZ
  2411. //
  2412. LONG
  2413. APIENTRY
  2414. ORegEnumValueW (
  2415. HKEY hKey,
  2416. DWORD dwIndex,
  2417. LPWSTR lpValueName,
  2418. LPDWORD lpcbValueName, // Documentation indicates this is a count of characters, despite the Hungarian.
  2419. LPDWORD lpReserved,
  2420. LPDWORD lpType, // May be NULL, but we need to know it on return if lpData is not NULL.
  2421. LPBYTE lpData, // May be NULL
  2422. LPDWORD lpcbData // May be NULL is lpData is NULL
  2423. )
  2424. {
  2425. if (FWide())
  2426. return RegEnumValueW(hKey, dwIndex, lpValueName, lpcbValueName, lpReserved, lpType, lpData, lpcbData);
  2427. // Required pointers:
  2428. if (!lpValueName || !lpcbValueName || !lpcbData && lpData)
  2429. {
  2430. Assert(lpValueName);
  2431. Assert(lpcbValueName);
  2432. Assert(!lpcbData && lpData);
  2433. return E_POINTER;
  2434. }
  2435. // If NULL was specified for lpType, we need to supply our own so we can check for string results.
  2436. DWORD dwPrivateType = 0;
  2437. if (!lpType)
  2438. {
  2439. lpType = &dwPrivateType;
  2440. }
  2441. DWORD cbValueName = *lpcbValueName;
  2442. DWORD dwOrigCbData = lpcbData ? *lpcbData : 0;
  2443. LPSTR pchValueName = SzAlloc(*lpcbValueName);
  2444. LONG lResult = RegEnumValueA(hKey, dwIndex, pchValueName, &cbValueName, lpReserved, lpType, lpData, lpcbData);
  2445. if (ERROR_SUCCESS == lResult)
  2446. {
  2447. *lpcbValueName = AnsiToUnicode(lpValueName, pchValueName, min(*lpcbValueName, cbValueName + 1)) - 1; // Returned value does NOT include terminating NULL
  2448. if (lpData)
  2449. {
  2450. // If the resulting data was a string, convert it in place.
  2451. switch (*lpType)
  2452. {
  2453. case REG_MULTI_SZ:
  2454. // Not supported
  2455. Assert(0 && REG_MULTI_SZ);
  2456. lResult = E_FAIL;
  2457. break;
  2458. case REG_EXPAND_SZ:
  2459. case REG_SZ:
  2460. {
  2461. Assert(lpcbData);
  2462. LPSTR pszTemp = SzAlloc(*lpcbData); // is the number of bytes!
  2463. memcpy(pszTemp, lpData, *lpcbData);
  2464. *lpcbData = AnsiToUnicode((LPWSTR)lpData, pszTemp, dwOrigCbData/sizeof(WCHAR), *lpcbData) * sizeof(WCHAR);
  2465. // It's possible to encounter a second stage overflow, if lpData >= sizeof(Unicode)/2
  2466. if ( 0 == *lpcbData )
  2467. {
  2468. lResult = ERROR_MORE_DATA;
  2469. }
  2470. }
  2471. break;
  2472. }
  2473. }
  2474. }
  2475. return lResult;
  2476. }
  2477. LONG
  2478. APIENTRY ORegOpenKeyW(HKEY hKey, LPCWSTR pwszSubKey, PHKEY phkResult)
  2479. {
  2480. if(FWide())
  2481. return RegOpenKeyW(hKey, pwszSubKey, phkResult);
  2482. PreConvert();
  2483. LPSTR sz = Convert(pwszSubKey);
  2484. return RegOpenKeyA(hKey, sz, phkResult);
  2485. }
  2486. LONG
  2487. APIENTRY
  2488. ORegDeleteKeyW(
  2489. HKEY hKey,
  2490. LPCWSTR pwszSubKey
  2491. )
  2492. {
  2493. Assert(pwszSubKey);
  2494. if(FWide())
  2495. return RegDeleteKeyW(hKey, pwszSubKey);
  2496. PreConvert();
  2497. LPSTR sz = Convert(pwszSubKey);
  2498. return RegDeleteKeyA(hKey, sz);
  2499. }
  2500. LONG
  2501. APIENTRY
  2502. ORegDeleteValueW(
  2503. HKEY hKey,
  2504. LPWSTR lpValueName
  2505. )
  2506. {
  2507. if(FWide())
  2508. return RegDeleteValueW (hKey, lpValueName);
  2509. PreConvert();
  2510. LPSTR sz = Convert(lpValueName);
  2511. return RegDeleteValueA(hKey, sz);
  2512. }
  2513. ATOM
  2514. WINAPI
  2515. ORegisterClassW(
  2516. CONST WNDCLASSW *lpWndClass)
  2517. {
  2518. if(FWide())
  2519. return RegisterClassW(lpWndClass);
  2520. WNDCLASSA wc;
  2521. memcpy(&wc, lpWndClass, sizeof(wc));
  2522. PreConvert();
  2523. if (!(IsBadReadPtr(wc.lpszMenuName, sizeof(* wc.lpszMenuName)) ||
  2524. IsBadReadPtr(lpWndClass->lpszMenuName, sizeof (*(lpWndClass->lpszMenuName)))))
  2525. {
  2526. wc.lpszMenuName = Convert(lpWndClass->lpszMenuName);
  2527. }
  2528. wc.lpszClassName = Convert(lpWndClass->lpszClassName);
  2529. return RegisterClassA(&wc);
  2530. }
  2531. ATOM
  2532. WINAPI
  2533. ORegisterClassExW(CONST WNDCLASSEXW * lpWndClass)
  2534. {
  2535. if (FWide())
  2536. return RegisterClassExW(lpWndClass);
  2537. WNDCLASSEXA wc;
  2538. memcpy(&wc, lpWndClass, sizeof(wc));
  2539. PreConvert();
  2540. if (!FATOM(wc.lpszMenuName))
  2541. {
  2542. wc.lpszMenuName = Convert(lpWndClass->lpszMenuName);
  2543. }
  2544. if (!FATOM(wc.lpszClassName))
  2545. wc.lpszClassName = Convert(lpWndClass->lpszClassName);
  2546. return RegisterClassExA(&wc);
  2547. }
  2548. BOOL
  2549. WINAPI
  2550. OUnregisterClassW
  2551. (
  2552. LPCTSTR lpClassName, // address of class name string
  2553. HINSTANCE hInstance // handle of application instance
  2554. )
  2555. {
  2556. if(FWide())
  2557. return UnregisterClassW(lpClassName, hInstance);
  2558. if (FATOM(lpClassName))
  2559. return UnregisterClassW(lpClassName, hInstance);
  2560. PreConvert();
  2561. LPSTR sz = Convert(lpClassName);
  2562. return UnregisterClassA(sz, hInstance);
  2563. }
  2564. UINT
  2565. WINAPI
  2566. ORegisterClipboardFormatW(
  2567. LPCWSTR lpszFormat)
  2568. {
  2569. if(FWide())
  2570. return RegisterClipboardFormatW(lpszFormat);
  2571. PreConvert();
  2572. LPSTR sz = Convert(lpszFormat);
  2573. if (sz == NULL)
  2574. return(0);
  2575. return RegisterClipboardFormatA(sz);
  2576. }
  2577. UINT
  2578. WINAPI
  2579. ORegisterWindowMessageW(LPCWSTR lpString)
  2580. {
  2581. if(FWide())
  2582. return RegisterWindowMessageW(lpString);
  2583. PreConvert();
  2584. LPSTR sz = Convert(lpString);
  2585. if (sz == NULL)
  2586. return(0);
  2587. return RegisterWindowMessageA(sz);
  2588. }
  2589. LONG
  2590. APIENTRY
  2591. ORegOpenKeyExW (
  2592. HKEY hKey,
  2593. LPCTSTR lpSubKey,
  2594. DWORD ulOptions,
  2595. REGSAM samDesired,
  2596. PHKEY phkResult
  2597. )
  2598. {
  2599. if(FWide())
  2600. return RegOpenKeyExW(hKey, lpSubKey, ulOptions, samDesired, phkResult);
  2601. PreConvert();
  2602. LPSTR sz = Convert(lpSubKey);
  2603. return RegOpenKeyExA(hKey, sz, ulOptions, samDesired, phkResult);
  2604. }
  2605. LONG
  2606. APIENTRY
  2607. ORegQueryInfoKeyW (
  2608. HKEY hKey,
  2609. LPWSTR lpClass,
  2610. LPDWORD lpcbClass,
  2611. LPDWORD lpReserved,
  2612. LPDWORD lpcSubKeys,
  2613. LPDWORD lpcbMaxSubKeyLen,
  2614. LPDWORD lpcbMaxClassLen,
  2615. LPDWORD lpcValues,
  2616. LPDWORD lpcbMaxValueNameLen,
  2617. LPDWORD lpcbMaxValueLen,
  2618. LPDWORD lpcbSecurityDescriptor,
  2619. PFILETIME lpftLastWriteTime
  2620. )
  2621. {
  2622. Assert(!lpClass && !lpcbClass); //$ UNDONE_POST_98 - Not wrapped yet!
  2623. if(FWide())
  2624. return RegQueryInfoKeyW(hKey, lpClass, lpcbClass, lpReserved,
  2625. lpcSubKeys, lpcbMaxSubKeyLen,
  2626. lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen,
  2627. lpcbMaxValueLen, lpcbSecurityDescriptor,
  2628. lpftLastWriteTime );
  2629. if (lpClass && (!lpcbClass || IsBadWritePtr(lpcbClass, sizeof(lpcbClass))))
  2630. {
  2631. // lpcbClass must be valid if lpClass is non-NULL
  2632. return ERROR_INVALID_PARAMETER;
  2633. }
  2634. return RegQueryInfoKeyA(hKey, NULL, NULL, lpReserved,
  2635. lpcSubKeys, lpcbMaxSubKeyLen,
  2636. lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen,
  2637. lpcbMaxValueLen, lpcbSecurityDescriptor,
  2638. lpftLastWriteTime );
  2639. }
  2640. LONG
  2641. APIENTRY ORegQueryValueW(HKEY hKey, LPCWSTR pwszSubKey, LPWSTR pwszValue,
  2642. PLONG lpcbValue)
  2643. {
  2644. if(FWide())
  2645. return RegQueryValueW(hKey, pwszSubKey, pwszValue, lpcbValue);
  2646. LONG cb;
  2647. LONG lRet = 0;
  2648. LPSTR szValue = NULL;
  2649. PreConvert();
  2650. LPSTR sz = Convert(pwszSubKey);
  2651. lRet = RegQueryValueA(hKey, sz, NULL, &cb);
  2652. if(ERROR_SUCCESS != lRet)
  2653. {
  2654. return lRet;
  2655. }
  2656. // If the caller was just asking for the size of the value, jump out
  2657. // now, without actually retrieving and converting the value.
  2658. if (!pwszValue)
  2659. {
  2660. // Adjust size of buffer to report, to account for CHAR -> WCHAR
  2661. *lpcbValue = cb * sizeof(WCHAR);
  2662. goto Exit;
  2663. }
  2664. // If the caller was asking for the value, but allocated too small
  2665. // of a buffer, set the buffer size and jump out.
  2666. if (*lpcbValue < (LONG) (cb * sizeof(WCHAR)))
  2667. {
  2668. //$UNDONE_POST_98: We should actually use the nubmer of bytes required, not some
  2669. // wild guess as we are here
  2670. // Adjust size of buffer to report, to account for CHAR -> WCHAR
  2671. *lpcbValue = cb * sizeof(WCHAR);
  2672. lRet = ERROR_MORE_DATA;
  2673. goto Exit;
  2674. }
  2675. // Otherwise, retrieve and convert the value.
  2676. szValue = SzAlloc(cb);
  2677. lRet = RegQueryValueA(hKey, sz, szValue, &cb);
  2678. if (ERROR_SUCCESS == lRet)
  2679. {
  2680. Verify(0 <= AnsiToUnicode(pwszValue, szValue, cb));
  2681. //$UNDONE_POST_98: We should actually use the nubmer of bytes required, not some
  2682. // wild guess as we are here
  2683. // Adjust size of buffer to report, to account for CHAR -> WCHAR
  2684. *lpcbValue = cb * sizeof(WCHAR);
  2685. }
  2686. else if (pwszValue && 0 < cb)
  2687. {
  2688. *pwszValue = L'\0';
  2689. }
  2690. Exit:
  2691. return lRet;
  2692. }
  2693. LONG
  2694. APIENTRY
  2695. ORegSetValueExW(
  2696. HKEY hKey,
  2697. LPCWSTR lpValueName,
  2698. DWORD Reserved,
  2699. DWORD dwType,
  2700. CONST BYTE* lpData,
  2701. DWORD cbData
  2702. )
  2703. {
  2704. if(FWide())
  2705. return RegSetValueExW(hKey, lpValueName, Reserved, dwType, lpData, cbData);
  2706. PreConvert();
  2707. LPSTR sz = Convert(lpValueName);
  2708. LONG lRet;
  2709. // NOTE: when calling RegSetValueExA, if the data type is
  2710. // REG_SZ, REG_EXPAND_SZ, or REG_MULTI_SZ, then the API expects the strings
  2711. // to be ansi also.
  2712. if (REG_SZ == dwType || REG_EXPAND_SZ == dwType)
  2713. {
  2714. LONG lData = 0;
  2715. LPSTR szData = ConvertWithLen((LPTSTR)lpData, -1, &lData);
  2716. lRet = RegSetValueExA(hKey, sz, Reserved, dwType, (CONST BYTE *)szData, lData);
  2717. }
  2718. else if (REG_MULTI_SZ == dwType)
  2719. {
  2720. LONG lData = 0;
  2721. LPSTR szData = ConvertWithLen((LPWSTR)lpData,
  2722. cUnicodeMultiSzLen((LPWSTR)lpData),
  2723. &lData );
  2724. lRet = RegSetValueExA(hKey, sz, Reserved, dwType, (CONST BYTE *)szData, lData);
  2725. }
  2726. else
  2727. {
  2728. lRet = RegSetValueExA(hKey, sz, Reserved, dwType, lpData, cbData);
  2729. }
  2730. return lRet;
  2731. }
  2732. LONG
  2733. APIENTRY ORegSetValueW(HKEY hKey, LPCWSTR lpSubKey, DWORD dwType,
  2734. LPCWSTR lpData, DWORD cbData)
  2735. {
  2736. Assert(REG_SZ == dwType);
  2737. if(FWide())
  2738. return RegSetValueW(hKey, lpSubKey, dwType,
  2739. lpData, cbData);
  2740. PreConvert();
  2741. LPSTR szKey = Convert(lpSubKey);
  2742. LPSTR szValue = Convert(lpData);
  2743. return RegSetValueA(hKey, szKey, dwType, szValue, cbData);
  2744. }
  2745. LONG
  2746. APIENTRY
  2747. ORegQueryValueExW (
  2748. HKEY hKey,
  2749. LPCWSTR lpValueName,
  2750. LPDWORD lpReserved,
  2751. LPDWORD lpType,
  2752. LPBYTE lpData,
  2753. LPDWORD lpcbData
  2754. )
  2755. {
  2756. Assert(lpcbData || !lpData); // lpcbData can be NULL only if lpData is NULL
  2757. if(FWide())
  2758. return RegQueryValueExW (
  2759. hKey,
  2760. lpValueName,
  2761. lpReserved,
  2762. lpType,
  2763. lpData,
  2764. lpcbData
  2765. );
  2766. LPBYTE lpTempBuffer;
  2767. DWORD dwTempType;
  2768. DWORD cb, cbRequired;
  2769. LONG lRet;
  2770. PreConvert();
  2771. LPSTR sz = Convert(lpValueName);
  2772. lRet = RegQueryValueExA(hKey, sz, lpReserved, &dwTempType, NULL, &cb);
  2773. if(ERROR_SUCCESS != lRet)
  2774. {
  2775. return lRet;
  2776. }
  2777. // If the caller was just asking for the size of the value, jump out
  2778. // now, without actually retrieving and converting the value.
  2779. if (!lpData)
  2780. {
  2781. switch (dwTempType)
  2782. {
  2783. case REG_EXPAND_SZ:
  2784. case REG_MULTI_SZ:
  2785. case REG_SZ:
  2786. // Adjust size of buffer to report, to account for CHAR -> WCHAR
  2787. *lpcbData = cb * sizeof(WCHAR);
  2788. break;
  2789. default:
  2790. *lpcbData = cb;
  2791. break;
  2792. }
  2793. // Set the type, if required.
  2794. if (lpType)
  2795. {
  2796. *lpType = dwTempType;
  2797. }
  2798. goto Exit;
  2799. }
  2800. //
  2801. // Determine the size of buffer needed
  2802. //
  2803. switch (dwTempType)
  2804. {
  2805. case REG_EXPAND_SZ:
  2806. case REG_MULTI_SZ:
  2807. case REG_SZ:
  2808. cbRequired = cb * sizeof(WCHAR);
  2809. break;
  2810. default:
  2811. cbRequired = cb;
  2812. break;
  2813. }
  2814. // If the caller was asking for the value, but allocated too small
  2815. // of a buffer, set the buffer size and jump out.
  2816. if (*lpcbData < cbRequired)
  2817. {
  2818. // Adjust size of buffer to report, to account for CHAR -> WCHAR
  2819. *lpcbData = cbRequired;
  2820. // Set the type, if required.
  2821. if (lpType)
  2822. {
  2823. *lpType = dwTempType;
  2824. }
  2825. lRet = ERROR_MORE_DATA;
  2826. goto Exit;
  2827. }
  2828. // Otherwise, retrieve and convert the value.
  2829. switch (dwTempType)
  2830. {
  2831. case REG_EXPAND_SZ:
  2832. case REG_MULTI_SZ:
  2833. case REG_SZ:
  2834. lpTempBuffer = (LPBYTE)SzAlloc(cbRequired);
  2835. lRet = RegQueryValueExA(hKey,
  2836. sz,
  2837. lpReserved,
  2838. &dwTempType,
  2839. lpTempBuffer,
  2840. &cb);
  2841. if (ERROR_SUCCESS == lRet)
  2842. {
  2843. switch (dwTempType)
  2844. {
  2845. case REG_EXPAND_SZ:
  2846. case REG_MULTI_SZ:
  2847. case REG_SZ:
  2848. *lpcbData = AnsiToUnicode((LPWSTR)lpData, (LPSTR)lpTempBuffer, *lpcbData, cb);
  2849. *lpcbData = cb * sizeof(WCHAR); // Result it in BYTES!
  2850. // Set the type, if required.
  2851. if (lpType)
  2852. {
  2853. *lpType = dwTempType;
  2854. }
  2855. break;
  2856. }
  2857. }
  2858. goto Exit;
  2859. default:
  2860. //
  2861. // No conversion of out parameters needed. Just call narrow
  2862. // version with args passed in, and return directly.
  2863. //
  2864. lRet = RegQueryValueExA(hKey,
  2865. sz,
  2866. lpReserved,
  2867. lpType,
  2868. lpData,
  2869. lpcbData);
  2870. }
  2871. Exit:
  2872. return lRet;
  2873. }
  2874. HANDLE
  2875. WINAPI
  2876. ORemovePropW(
  2877. HWND hWnd,
  2878. LPCWSTR lpString)
  2879. {
  2880. if(FWide())
  2881. return RemovePropW(hWnd, lpString);
  2882. if(FATOM(lpString))
  2883. return RemovePropA(hWnd, (LPSTR)lpString);
  2884. PreConvert();
  2885. LPSTR sz = Convert(lpString);
  2886. return RemovePropA(hWnd, sz);
  2887. }
  2888. LRESULT
  2889. WINAPI
  2890. OSendDlgItemMessageW(
  2891. HWND hDlg,
  2892. int nIDDlgItem,
  2893. UINT Msg,
  2894. WPARAM wParam,
  2895. LPARAM lParam)
  2896. {
  2897. if(FWide())
  2898. return SendDlgItemMessageW(hDlg, nIDDlgItem, Msg, wParam, lParam);
  2899. PreConvert();
  2900. switch (Msg)
  2901. {
  2902. case LB_ADDSTRING:
  2903. case LB_INSERTSTRING:
  2904. case LB_SELECTSTRING:
  2905. case LB_FINDSTRING:
  2906. case LB_FINDSTRINGEXACT:
  2907. case CB_ADDSTRING:
  2908. case CB_INSERTSTRING:
  2909. case CB_SELECTSTRING:
  2910. case CB_FINDSTRING:
  2911. case CB_FINDSTRINGEXACT:
  2912. {
  2913. lParam = (LPARAM)Convert((LPWSTR)lParam);
  2914. break;
  2915. }
  2916. }
  2917. return SendDlgItemMessageA(hDlg, nIDDlgItem, Msg, wParam, lParam);
  2918. }
  2919. LRESULT
  2920. WINAPI
  2921. OSendMessageW(
  2922. HWND hWnd,
  2923. UINT Msg,
  2924. WPARAM wParam,
  2925. LPARAM lParam)
  2926. {
  2927. // incase TCHAR strings are being passed in lParam the caller
  2928. // will have to do the proper conversions PlatformToInternal or
  2929. // InternalToPlatform
  2930. if(FWide())
  2931. return SendMessageW(hWnd, Msg, wParam, lParam);
  2932. return SendMessageA(hWnd, Msg, wParam, lParam);
  2933. }
  2934. BOOL
  2935. WINAPI
  2936. OSendNotifyMessageW(
  2937. HWND hWnd,
  2938. UINT Msg,
  2939. WPARAM wParam,
  2940. LPARAM lParam)
  2941. {
  2942. if(FWide())
  2943. return SendNotifyMessageW(hWnd, Msg, wParam, lParam);
  2944. return SendNotifyMessageA(hWnd, Msg, wParam, lParam);
  2945. }
  2946. BOOL
  2947. WINAPI
  2948. OSetDlgItemTextW(
  2949. HWND hDlg,
  2950. int nIDDlgItem,
  2951. LPCWSTR lpString)
  2952. {
  2953. if(FWide())
  2954. return SetDlgItemTextW(hDlg, nIDDlgItem, lpString);
  2955. PreConvert();
  2956. LPSTR sz = Convert(lpString);
  2957. return SetDlgItemTextA(hDlg, nIDDlgItem, sz);
  2958. }
  2959. BOOL
  2960. WINAPI
  2961. OSetFileAttributesW(
  2962. LPCWSTR lpFileName,
  2963. DWORD dwFileAttributes
  2964. )
  2965. {
  2966. if (FWide())
  2967. return SetFileAttributesW(lpFileName, dwFileAttributes);
  2968. PreConvert();
  2969. LPSTR sz = Convert(lpFileName);
  2970. if (sz == NULL)
  2971. return(0);
  2972. return SetFileAttributesA(sz, dwFileAttributes);
  2973. }
  2974. BOOL
  2975. WINAPI
  2976. OSetPropW(
  2977. HWND hWnd,
  2978. LPCWSTR lpString,
  2979. HANDLE hData)
  2980. {
  2981. if(FWide())
  2982. return SetPropW(hWnd, lpString, hData);
  2983. if(FATOM(lpString))
  2984. return SetPropA(hWnd, (LPSTR)lpString, hData);
  2985. PreConvert();
  2986. LPSTR sz = Convert(lpString);
  2987. return SetPropA(hWnd, sz, hData);
  2988. }
  2989. BOOL
  2990. WINAPI
  2991. OSetMenuItemInfoW(
  2992. HMENU hMenu,
  2993. UINT uItem,
  2994. BOOL fByPosition,
  2995. LPCMENUITEMINFOW lpcmii
  2996. )
  2997. {
  2998. Assert(!IsBadWritePtr((void*)lpcmii, sizeof MENUITEMINFOW));
  2999. Assert(sizeof MENUITEMINFOW == lpcmii->cbSize);
  3000. Assert(sizeof MENUITEMINFOW == sizeof MENUITEMINFOA);
  3001. if (FWide())
  3002. return SetMenuItemInfoW(hMenu, uItem, fByPosition, lpcmii);
  3003. MENUITEMINFOA mii;
  3004. memcpy(&mii, lpcmii, sizeof MENUITEMINFOA);
  3005. if (!(lpcmii->fMask & MIIM_TYPE) ||
  3006. MFT_STRING != (lpcmii->fType &
  3007. (MFT_BITMAP | MFT_SEPARATOR | MFT_OWNERDRAW | MFT_STRING) ) )
  3008. {
  3009. return SetMenuItemInfoA(hMenu, uItem, fByPosition, &mii);
  3010. }
  3011. PreConvert();
  3012. mii.dwTypeData = Convert(lpcmii->dwTypeData);
  3013. return SetMenuItemInfoA(hMenu, uItem, fByPosition, &mii);
  3014. }
  3015. LONG
  3016. WINAPI
  3017. OSetWindowLongW(
  3018. HWND hWnd,
  3019. int nIndex,
  3020. LONG dwNewLong)
  3021. {
  3022. if(FWide())
  3023. return SetWindowLongW(hWnd, nIndex, dwNewLong);
  3024. return SetWindowLongA(hWnd, nIndex, dwNewLong);
  3025. }
  3026. HHOOK
  3027. WINAPI
  3028. OSetWindowsHookExW(
  3029. int idHook,
  3030. HOOKPROC lpfn,
  3031. HINSTANCE hmod,
  3032. DWORD dwThreadId)
  3033. {
  3034. if(FWide())
  3035. return SetWindowsHookExW(idHook, lpfn, hmod, dwThreadId);
  3036. return SetWindowsHookExA(idHook, lpfn, hmod, dwThreadId); //$ CONSIDER - Not really wrapped
  3037. }
  3038. BOOL
  3039. WINAPI
  3040. OSetWindowTextW(
  3041. HWND hWnd,
  3042. LPCWSTR lpString)
  3043. {
  3044. if(FWide())
  3045. return SetWindowTextW(hWnd, lpString);
  3046. PreConvert();
  3047. LPSTR sz = Convert(lpString);
  3048. return SetWindowTextA(hWnd, sz);
  3049. }
  3050. LONG
  3051. WINAPI
  3052. OTabbedTextOutW(
  3053. HDC hDC,
  3054. int X,
  3055. int Y,
  3056. LPCWSTR lpString,
  3057. int nCount,
  3058. int nTabPositions,
  3059. LPINT lpnTabStopPositions,
  3060. int nTabOrigin)
  3061. {
  3062. Assert(-1 != nCount);
  3063. if(FWide())
  3064. return TabbedTextOutW(hDC, X, Y, lpString, nCount, nTabPositions,
  3065. lpnTabStopPositions, nTabOrigin);
  3066. PreConvert();
  3067. LONG n = 0;
  3068. LPSTR sz = ConvertWithLen(lpString, nCount, &n);
  3069. if (sz == NULL)
  3070. return(0);
  3071. return TabbedTextOutA(hDC, X, Y, sz, n, nTabPositions,
  3072. lpnTabStopPositions, nTabOrigin );
  3073. }
  3074. int
  3075. WINAPI
  3076. OTranslateAcceleratorW(
  3077. HWND hWnd,
  3078. HACCEL hAccTable,
  3079. LPMSG lpMsg)
  3080. {
  3081. if(FWide())
  3082. return TranslateAcceleratorW(hWnd, hAccTable, lpMsg);
  3083. return TranslateAcceleratorA(hWnd, hAccTable, lpMsg);
  3084. }
  3085. SHORT
  3086. WINAPI
  3087. OVkKeyScanW(
  3088. WCHAR ch)
  3089. {
  3090. if (FWide())
  3091. return VkKeyScanW(ch);
  3092. TCHAR szW[2];
  3093. char szA[2];
  3094. szW[0] = ch;
  3095. szW[1] = L'\0';
  3096. Verify(0 <= UnicodeToAnsi(szA, szW, 2));
  3097. return VkKeyScanA(szA[0]);
  3098. }
  3099. BOOL
  3100. WINAPI
  3101. OWinHelpW(
  3102. HWND hWndMain,
  3103. LPCWSTR lpszHelp,
  3104. UINT uCommand,
  3105. DWORD dwData
  3106. )
  3107. {
  3108. if(FWide())
  3109. return WinHelpW(hWndMain, lpszHelp, uCommand,dwData);
  3110. PreConvert();
  3111. LPSTR sz = Convert(lpszHelp);
  3112. return WinHelpA(hWndMain, sz, uCommand, dwData);
  3113. }
  3114. BOOL
  3115. WINAPI
  3116. OWritePrivateProfileStringW(
  3117. LPCWSTR lpAppName,
  3118. LPCWSTR lpKeyName,
  3119. LPCWSTR lpString,
  3120. LPCWSTR lpFileName)
  3121. {
  3122. if(FWide())
  3123. return WritePrivateProfileStringW(lpAppName, lpKeyName, lpString, lpFileName);
  3124. PreConvert();
  3125. LPSTR szAppName = Convert(lpAppName);
  3126. LPSTR szKeyName = Convert(lpKeyName);
  3127. LPSTR szString = Convert(lpString);
  3128. LPSTR szFileName = Convert(lpFileName);
  3129. return WritePrivateProfileStringA(szAppName, szKeyName, szString, szFileName);
  3130. }
  3131. int
  3132. WINAPIV
  3133. OwsprintfW(LPWSTR pwszOut, LPCWSTR pwszFormat, ...)
  3134. {
  3135. va_list vaArgs;
  3136. va_start(vaArgs, pwszFormat);
  3137. int retval;
  3138. if(FWide())
  3139. retval = wvsprintfW(pwszOut, pwszFormat, vaArgs);
  3140. else
  3141. retval = _vstprintf(pwszOut, pwszFormat, vaArgs); //$CONSIDER Why isn't this vswprint?
  3142. va_end(vaArgs);
  3143. return retval;
  3144. }
  3145. BOOL
  3146. WINAPI
  3147. OGetVersionExW(
  3148. LPOSVERSIONINFOW lpVersionInformation
  3149. )
  3150. {
  3151. if(FWide())
  3152. return GetVersionExW(lpVersionInformation);
  3153. if (lpVersionInformation->dwOSVersionInfoSize < sizeof(OSVERSIONINFOW))
  3154. return false;
  3155. OSVERSIONINFOA osviVersionInfo;
  3156. osviVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
  3157. int fRetval = GetVersionExA(&osviVersionInfo);
  3158. if (fRetval)
  3159. {
  3160. memcpy(lpVersionInformation, &osviVersionInfo, sizeof(OSVERSIONINFOA));
  3161. Verify(0 <= AnsiToUnicode(lpVersionInformation->szCSDVersion,
  3162. osviVersionInfo.szCSDVersion,
  3163. sizeof(lpVersionInformation->szCSDVersion)
  3164. /sizeof(lpVersionInformation->szCSDVersion[0])));
  3165. }
  3166. return fRetval;
  3167. }
  3168. LONG
  3169. APIENTRY
  3170. ORegEnumKeyExW (
  3171. HKEY hKey,
  3172. DWORD dwIndex,
  3173. LPWSTR lpName,
  3174. LPDWORD lpcbName,
  3175. LPDWORD lpReserved,
  3176. LPWSTR lpClass,
  3177. LPDWORD lpcbClass,
  3178. PFILETIME lpftLastWriteTime
  3179. )
  3180. {
  3181. if(FWide())
  3182. return RegEnumKeyExW (
  3183. hKey,
  3184. dwIndex,
  3185. lpName,
  3186. lpcbName,
  3187. lpReserved,
  3188. lpClass,
  3189. lpcbClass,
  3190. lpftLastWriteTime
  3191. );
  3192. LPSTR szName, szClass;
  3193. DWORD cbName, cbClass;
  3194. if (lpcbName)
  3195. {
  3196. cbName = sizeof(WCHAR) * *lpcbName;
  3197. szName = lpName ? SzAlloc(cbName) : NULL;
  3198. }
  3199. else
  3200. {
  3201. szName = NULL;
  3202. cbName = 0;
  3203. }
  3204. if (lpcbClass)
  3205. {
  3206. cbClass = sizeof(WCHAR) * (*lpcbClass);
  3207. szClass = lpClass ? SzAlloc(cbClass) : NULL;
  3208. }
  3209. else
  3210. {
  3211. szClass = NULL;
  3212. cbClass = 0;
  3213. }
  3214. if (szName == NULL)
  3215. return(ERROR_BUFFER_OVERFLOW);
  3216. LONG lRet = RegEnumKeyExA(hKey, dwIndex, szName, &cbName, lpReserved,
  3217. szClass, &cbClass, lpftLastWriteTime );
  3218. if (ERROR_SUCCESS != lRet)
  3219. {
  3220. return lRet;
  3221. }
  3222. // Get the number of characters instead of number of bytes.
  3223. if (lpcbName)
  3224. {
  3225. DWORD dwNoOfChar = AnsiToUnicode((LPWSTR) lpName, (LPSTR) szName, *lpcbName);
  3226. if (cbName && !dwNoOfChar)
  3227. {
  3228. return ERROR_BUFFER_OVERFLOW;
  3229. }
  3230. *lpcbName = dwNoOfChar;
  3231. }
  3232. if (lpcbClass && lpClass)
  3233. {
  3234. DWORD dwNoOfChar = AnsiToUnicode((LPWSTR) lpClass, (LPSTR) szClass, *lpcbClass);
  3235. if (cbClass && !dwNoOfChar)
  3236. {
  3237. return ERROR_BUFFER_OVERFLOW;
  3238. }
  3239. *lpcbClass = dwNoOfChar;
  3240. }
  3241. return lRet;
  3242. }
  3243. HANDLE
  3244. WINAPI
  3245. OCreateFileMappingW(
  3246. HANDLE hFile,
  3247. LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
  3248. DWORD flProtect,
  3249. DWORD dwMaximumSizeHigh,
  3250. DWORD dwMaximumSizeLow,
  3251. LPCWSTR lpName
  3252. )
  3253. {
  3254. if(FWide())
  3255. return CreateFileMappingW(hFile, lpFileMappingAttributes, flProtect, dwMaximumSizeHigh, dwMaximumSizeLow, lpName);
  3256. PreConvert();
  3257. LPSTR sz = Convert(lpName);
  3258. return CreateFileMappingA(hFile, lpFileMappingAttributes, flProtect, dwMaximumSizeHigh, dwMaximumSizeLow, sz);
  3259. }
  3260. LRESULT
  3261. WINAPI
  3262. ODefDlgProcW(
  3263. HWND hDlg,
  3264. UINT Msg,
  3265. WPARAM wParam,
  3266. LPARAM lParam)
  3267. {
  3268. // incase TCHAR strings are being passed in lParam the caller
  3269. // will have to do the proper conversions PlatformToInternal or
  3270. // InternalToPlatform
  3271. if(FWide())
  3272. return DefDlgProcW(hDlg, Msg, wParam, lParam);
  3273. return DefDlgProcA(hDlg, Msg, wParam, lParam);
  3274. }
  3275. int
  3276. WINAPI
  3277. OGetLocaleInfoW(
  3278. LCID Locale,
  3279. LCTYPE LCType,
  3280. LPWSTR lpLCData,
  3281. int cchData)
  3282. {
  3283. DWORD dwRet;
  3284. if (FWide())
  3285. return GetLocaleInfoW(Locale, LCType, lpLCData, cchData);
  3286. if (!cchData || !lpLCData)
  3287. return GetLocaleInfoA(Locale, LCType, NULL, cchData);
  3288. int cchDataAnsi = sizeof(WCHAR) * cchData;
  3289. LPSTR szBuffer = SzAlloc(cchDataAnsi);
  3290. dwRet = GetLocaleInfoA(Locale, LCType, szBuffer, cchDataAnsi);
  3291. // $UNDONE_POST_98: This is bogus, we should do this like OLoadStringW
  3292. if(dwRet)
  3293. {
  3294. return AnsiToUnicode(lpLCData, szBuffer, cchData, dwRet);
  3295. }
  3296. else if (lpLCData && 0 < cchData)
  3297. {
  3298. *lpLCData = L'\0';
  3299. }
  3300. return dwRet;
  3301. }
  3302. BOOL
  3303. WINAPI
  3304. OSetLocaleInfoW(
  3305. LCID Locale,
  3306. LCTYPE LCType,
  3307. LPCWSTR lpLCData)
  3308. {
  3309. if (FWide())
  3310. return SetLocaleInfoW(Locale, LCType, lpLCData);
  3311. PreConvert();
  3312. LPSTR sz = Convert(lpLCData);
  3313. if (sz == NULL)
  3314. return(0);
  3315. return SetLocaleInfoA(Locale, LCType, sz);
  3316. }
  3317. // $UNDONE_POST_98$ Workaround because StgCreateDocfile is not reentrant.
  3318. // We were getting ACCESS DENIED errors when multiple threads opened
  3319. // temp files simultaneously.
  3320. //-----------------------------------------------------------------------------
  3321. // Name: StgCreateDocfileCriticalSection
  3322. //
  3323. // Description:
  3324. // Used solely by OStgCreateDocfile in order to protect its call to
  3325. // StgCreateDocfile from simultaneously entry by multiple threads.
  3326. //
  3327. //-----------------------------------------------------------------------------
  3328. class StgCreateDocfileCriticalSection
  3329. {
  3330. public:
  3331. StgCreateDocfileCriticalSection() {InitializeCriticalSection(&m_critsec);}
  3332. ~StgCreateDocfileCriticalSection() {DeleteCriticalSection(&m_critsec);}
  3333. VOID VEnter() {EnterCriticalSection(&m_critsec);}
  3334. VOID VLeave() {LeaveCriticalSection(&m_critsec);}
  3335. private:
  3336. CRITICAL_SECTION m_critsec;
  3337. };
  3338. #pragma warning(disable: 4717) // IA64 build fix
  3339. //-----------------------------------------------------------------------------
  3340. // Name: OStgCreateDocfile
  3341. //
  3342. // Description:
  3343. // Wrapper for StgCreateDocfile to protect against reentrancy bug in OLE.
  3344. //
  3345. // Thread-Safety: Bullet-proof
  3346. //
  3347. // Return Values: same HRESULT as StgCreateDocfile
  3348. //-----------------------------------------------------------------------------
  3349. HRESULT
  3350. WINAPI
  3351. OStgCreateDocfile
  3352. (
  3353. const WCHAR * pwcsName,
  3354. DWORD grfMode,
  3355. DWORD reserved,
  3356. IStorage ** ppstgOpen
  3357. )
  3358. {
  3359. static StgCreateDocfileCriticalSection Crit;
  3360. Crit.VEnter();
  3361. HRESULT hrReturn = StgCreateDocfile(pwcsName, grfMode, reserved, ppstgOpen);
  3362. Crit.VLeave();
  3363. return hrReturn;
  3364. }
  3365. #pragma warning(default: 4717) // IA64 build fix
  3366. int
  3367. WINAPI
  3368. OStartDocW
  3369. (
  3370. HDC hDC,
  3371. CONST DOCINFOW * pdiDocW
  3372. )
  3373. {
  3374. if (FWide())
  3375. return StartDocW(hDC, pdiDocW);
  3376. DOCINFOA diDocA;
  3377. PreConvert();
  3378. diDocA.lpszDocName = Convert(pdiDocW->lpszDocName);
  3379. diDocA.lpszOutput = Convert(pdiDocW->lpszOutput);
  3380. diDocA.lpszDatatype = Convert(pdiDocW->lpszDatatype);
  3381. diDocA.cbSize = sizeof(DOCINFOA);
  3382. diDocA.fwType = pdiDocW->fwType;
  3383. return StartDocA(hDC, &diDocA);
  3384. }
  3385. BOOL
  3386. WINAPI
  3387. OSystemParametersInfoW(
  3388. UINT uiAction,
  3389. UINT uiParam,
  3390. PVOID pvParam,
  3391. UINT fWinIni)
  3392. {
  3393. if (FWide())
  3394. return SystemParametersInfoW(uiAction, uiParam, pvParam, fWinIni);
  3395. switch (uiAction)
  3396. { // unsupported actions
  3397. case SPI_GETHIGHCONTRAST:
  3398. case SPI_GETICONMETRICS:
  3399. case SPI_GETICONTITLELOGFONT:
  3400. case SPI_GETNONCLIENTMETRICS:
  3401. case SPI_GETSERIALKEYS:
  3402. case SPI_GETSOUNDSENTRY:
  3403. case SPI_SETDESKWALLPAPER:
  3404. case SPI_SETHIGHCONTRAST:
  3405. case SPI_SETICONMETRICS:
  3406. case SPI_SETICONTITLELOGFONT:
  3407. case SPI_SETNONCLIENTMETRICS:
  3408. case SPI_SETSERIALKEYS:
  3409. case SPI_SETSOUNDSENTRY:
  3410. AssertFail("No Unicode Wrapper Available for Win32 API - SystemParametersInfoW");
  3411. return 0;
  3412. };
  3413. return SystemParametersInfoA(uiAction, uiParam, pvParam, fWinIni);
  3414. }
  3415. LPWSTR
  3416. WINAPI
  3417. OCharNextW(
  3418. LPCWSTR lpsz)
  3419. {
  3420. if ( FWide() )
  3421. return CharNextW( lpsz );
  3422. if (*lpsz == L'\0')
  3423. {
  3424. return const_cast<LPWSTR>(lpsz);
  3425. }
  3426. return const_cast<LPWSTR>(lpsz + 1);
  3427. }
  3428. #ifdef DEBUG
  3429. BOOL
  3430. APIENTRY
  3431. OAbortSystemShutdownW(
  3432. LPWSTR lpMachineName
  3433. )
  3434. {
  3435. AssertFail("No Unicode Wrapper Available for Win32 API - AbortSystemShutdownW");
  3436. return 0;
  3437. }
  3438. BOOL
  3439. WINAPI
  3440. OAccessCheckAndAuditAlarmW (
  3441. LPCWSTR SubsystemName,
  3442. LPVOID HandleId,
  3443. LPWSTR ObjectTypeName,
  3444. LPWSTR ObjectName,
  3445. PSECURITY_DESCRIPTOR SecurityDescriptor,
  3446. DWORD DesiredAccess,
  3447. PGENERIC_MAPPING GenericMapping,
  3448. BOOL ObjectCreation,
  3449. LPDWORD GrantedAccess,
  3450. LPBOOL AccessStatus,
  3451. LPBOOL pfGenerateOnClose
  3452. )
  3453. {
  3454. AssertFail("No Unicode Wrapper Available for Win32 API - AccessCheckAndAuditAlarmW");
  3455. return 0;
  3456. }
  3457. int
  3458. WINAPI OAddFontResourceW(LPCWSTR)
  3459. {
  3460. AssertFail("No Unicode Wrapper Available for Win32 API - AddFontResourceW");
  3461. return 0;
  3462. }
  3463. BOOL
  3464. WINAPI
  3465. OAddFormW(
  3466. HANDLE hPrinter,
  3467. DWORD Level,
  3468. LPBYTE pForm
  3469. )
  3470. {
  3471. AssertFail("No Unicode Wrapper Available for Win32 API - AddFormW");
  3472. return 0;
  3473. }
  3474. BOOL
  3475. WINAPI
  3476. OAddJobW(
  3477. HANDLE hPrinter,
  3478. DWORD Level,
  3479. LPBYTE pData,
  3480. DWORD cbBuf,
  3481. LPDWORD pcbNeeded
  3482. )
  3483. {
  3484. AssertFail("No Unicode Wrapper Available for Win32 API - AddJobW");
  3485. return 0;
  3486. }
  3487. BOOL
  3488. WINAPI
  3489. OAddMonitorW(
  3490. LPWSTR pName,
  3491. DWORD Level,
  3492. LPBYTE pMonitors
  3493. )
  3494. {
  3495. AssertFail("No Unicode Wrapper Available for Win32 API - AddMonitorW");
  3496. return 0;
  3497. }
  3498. BOOL
  3499. WINAPI
  3500. OAddPortW(
  3501. LPWSTR pName,
  3502. HWND hWnd,
  3503. LPWSTR pMonitorName
  3504. )
  3505. {
  3506. AssertFail("No Unicode Wrapper Available for Win32 API - AddPortW");
  3507. return 0;
  3508. }
  3509. HANDLE
  3510. WINAPI
  3511. OAddPrinterW(
  3512. LPWSTR pName,
  3513. DWORD Level,
  3514. LPBYTE pPrinter
  3515. )
  3516. {
  3517. AssertFail("No Unicode Wrapper Available for Win32 API - AddPrinterW");
  3518. return 0;
  3519. }
  3520. BOOL
  3521. WINAPI
  3522. OAddPrinterConnectionW(
  3523. LPWSTR pName
  3524. )
  3525. {
  3526. AssertFail("No Unicode Wrapper Available for Win32 API - AddPrinterConnectionW");
  3527. return 0;
  3528. }
  3529. BOOL
  3530. WINAPI
  3531. OAddPrinterDriverW(
  3532. LPWSTR pName,
  3533. DWORD Level,
  3534. LPBYTE pDriverInfo
  3535. )
  3536. {
  3537. AssertFail("No Unicode Wrapper Available for Win32 API - AddPrinterDriverW");
  3538. return 0;
  3539. }
  3540. BOOL
  3541. WINAPI
  3542. OAddPrintProcessorW(
  3543. LPWSTR pName,
  3544. LPWSTR pEnvironment,
  3545. LPWSTR pPathName,
  3546. LPWSTR pPrintProcessorName
  3547. )
  3548. {
  3549. AssertFail("No Unicode Wrapper Available for Win32 API - AddPrintProcessorW");
  3550. return 0;
  3551. }
  3552. BOOL
  3553. WINAPI
  3554. OAddPrintProvidorW(
  3555. LPWSTR pName,
  3556. DWORD level,
  3557. LPBYTE pProvidorInfo
  3558. )
  3559. {
  3560. AssertFail("No Unicode Wrapper Available for Win32 API - AddPrintProvidorW");
  3561. return 0;
  3562. }
  3563. LONG
  3564. WINAPI
  3565. OAdvancedDocumentPropertiesW(
  3566. HWND hWnd,
  3567. HANDLE hPrinter,
  3568. LPWSTR pDeviceName,
  3569. PDEVMODEW pDevModeOutput,
  3570. PDEVMODEW pDevModeInput
  3571. )
  3572. {
  3573. AssertFail("No Unicode Wrapper Available for Win32 API - AdvancedDocumentPropertiesW");
  3574. return 0;
  3575. }
  3576. MMRESULT WINAPI OauxGetDevCapsW(UINT uDeviceID, LPAUXCAPSW pac, UINT cbac)
  3577. {
  3578. AssertFail("No Unicode Wrapper Available for Win32 API - auxGetDevCapsW");
  3579. return 0;
  3580. }
  3581. BOOL
  3582. WINAPI
  3583. OBackupEventLogW (
  3584. HANDLE hEventLog,
  3585. LPCWSTR lpBackupFileName
  3586. )
  3587. {
  3588. AssertFail("No Unicode Wrapper Available for Win32 API - BackupEventLogW");
  3589. return 0;
  3590. }
  3591. HANDLE
  3592. WINAPI
  3593. OBeginUpdateResourceW(
  3594. LPCWSTR pFileName,
  3595. BOOL bDeleteExistingResources
  3596. )
  3597. {
  3598. AssertFail("No Unicode Wrapper Available for Win32 API - BeginUpdateResourceW");
  3599. return 0;
  3600. }
  3601. BOOL
  3602. WINAPI
  3603. OBuildCommDCBW(
  3604. LPCWSTR lpDef,
  3605. LPDCB lpDCB
  3606. )
  3607. {
  3608. AssertFail("No Unicode Wrapper Available for Win32 API - BuildCommDCBW");
  3609. return 0;
  3610. }
  3611. BOOL
  3612. WINAPI
  3613. OBuildCommDCBAndTimeoutsW(
  3614. LPCWSTR lpDef,
  3615. LPDCB lpDCB,
  3616. LPCOMMTIMEOUTS lpCommTimeouts
  3617. )
  3618. {
  3619. AssertFail("No Unicode Wrapper Available for Win32 API - BuildCommDCBAndTimeoutsW");
  3620. return 0;
  3621. }
  3622. BOOL
  3623. WINAPI
  3624. OCallMsgFilterW(
  3625. LPMSG lpMsg,
  3626. int nCode)
  3627. {
  3628. AssertFail("No Unicode Wrapper Available for Win32 API - CallMsgFilterW");
  3629. return 0;
  3630. }
  3631. BOOL
  3632. WINAPI
  3633. OCallNamedPipeW(
  3634. LPCWSTR lpNamedPipeName,
  3635. LPVOID lpInBuffer,
  3636. DWORD nInBufferSize,
  3637. LPVOID lpOutBuffer,
  3638. DWORD nOutBufferSize,
  3639. LPDWORD lpBytesRead,
  3640. DWORD nTimeOut
  3641. )
  3642. {
  3643. AssertFail("No Unicode Wrapper Available for Win32 API - CallNamedPipeW");
  3644. return 0;
  3645. }
  3646. LONG
  3647. WINAPI
  3648. OChangeDisplaySettingsW(
  3649. LPDEVMODEW lpDevMode,
  3650. DWORD dwFlags)
  3651. {
  3652. AssertFail("No Unicode Wrapper Available for Win32 API - ChangeDisplaySettingsW");
  3653. return 0;
  3654. }
  3655. BOOL
  3656. WINAPI
  3657. OChangeMenuW(
  3658. HMENU hMenu,
  3659. UINT cmd,
  3660. LPCWSTR lpszNewItem,
  3661. UINT cmdInsert,
  3662. UINT flags)
  3663. {
  3664. AssertFail("No Unicode Wrapper Available for Win32 API - ChangeMenuW");
  3665. return 0;
  3666. }
  3667. #if 0 //$UNDONE_POST_98 - We should wrap these as being NT only...
  3668. BOOL
  3669. WINAPI
  3670. OChangeServiceConfigW(
  3671. SC_HANDLE hService,
  3672. DWORD dwServiceType,
  3673. DWORD dwStartType,
  3674. DWORD dwErrorControl,
  3675. LPCWSTR lpBinaryPathName,
  3676. LPCWSTR lpLoadOrderGroup,
  3677. LPDWORD lpdwTagId,
  3678. LPCWSTR lpDependencies,
  3679. LPCWSTR lpServiceStartName,
  3680. LPCWSTR lpPassword,
  3681. LPCWSTR lpDisplayName
  3682. )
  3683. {
  3684. AssertFail("No Unicode Wrapper Available for Win32 API - ChangeServiceConfigW");
  3685. return 0;
  3686. }
  3687. #endif
  3688. BOOL
  3689. WINAPI
  3690. OCharToOemBuffW(
  3691. LPCWSTR lpszSrc,
  3692. LPSTR lpszDst,
  3693. DWORD cchDstLength)
  3694. {
  3695. AssertFail("No Unicode Wrapper Available for Win32 API - CharToOemBuffW");
  3696. return 0;
  3697. }
  3698. DWORD
  3699. WINAPI
  3700. OCharUpperBuffW(
  3701. LPWSTR lpsz,
  3702. DWORD cchLength)
  3703. {
  3704. AssertFail("No Unicode Wrapper Available for Win32 API - CharUpperBuffW");
  3705. return 0;
  3706. }
  3707. BOOL
  3708. WINAPI
  3709. OChooseColorW(
  3710. LPCHOOSECOLORW lpcc)
  3711. {
  3712. AssertFail("No Unicode Wrapper Available for Win32 API - ChooseColorW");
  3713. return 0;
  3714. }
  3715. BOOL
  3716. APIENTRY OChooseFontW(LPCHOOSEFONTW pchfw)
  3717. {
  3718. AssertFail("No Unicode Wrapper Available for Win32 API - ChooseFontW");
  3719. return 0;
  3720. }
  3721. BOOL
  3722. WINAPI
  3723. OClearEventLogW (
  3724. HANDLE hEventLog,
  3725. LPCWSTR lpBackupFileName
  3726. )
  3727. {
  3728. AssertFail("No Unicode Wrapper Available for Win32 API - ClearEventLogW");
  3729. return 0;
  3730. }
  3731. BOOL
  3732. WINAPI
  3733. OCommConfigDialogW(
  3734. LPCWSTR lpszName,
  3735. HWND hWnd,
  3736. LPCOMMCONFIG lpCC
  3737. )
  3738. {
  3739. AssertFail("No Unicode Wrapper Available for Win32 API - CommConfigDialogW");
  3740. return 0;
  3741. }
  3742. int
  3743. WINAPI
  3744. OCompareStringW(
  3745. LCID Locale,
  3746. DWORD dwCmpFlags,
  3747. LPCWSTR lpString1,
  3748. int cchCount1,
  3749. LPCWSTR lpString2,
  3750. int cchCount2)
  3751. {
  3752. AssertFail("No Unicode Wrapper Available for Win32 API - CompareStringW");
  3753. return 0;
  3754. }
  3755. BOOL
  3756. WINAPI
  3757. OConfigurePortW(
  3758. LPWSTR pName,
  3759. HWND hWnd,
  3760. LPWSTR pPortName
  3761. )
  3762. {
  3763. AssertFail("No Unicode Wrapper Available for Win32 API - ConfigurePortW");
  3764. return 0;
  3765. }
  3766. int
  3767. WINAPI
  3768. OCopyAcceleratorTableW(
  3769. HACCEL hAccelSrc,
  3770. LPACCEL lpAccelDst,
  3771. int cAccelEntries)
  3772. {
  3773. AssertFail("No Unicode Wrapper Available for Win32 API - CopyAcceleratorTableW");
  3774. return 0;
  3775. }
  3776. HENHMETAFILE
  3777. WINAPI
  3778. OCopyEnhMetaFileW(HENHMETAFILE, LPCWSTR)
  3779. {
  3780. AssertFail("No Unicode Wrapper Available for Win32 API - CopyEnhMetaFileW");
  3781. return 0;
  3782. }
  3783. HMETAFILE
  3784. WINAPI
  3785. OCopyMetaFileW(HMETAFILE, LPCWSTR)
  3786. {
  3787. AssertFail("No Unicode Wrapper Available for Win32 API - CopyMetaFileW");
  3788. return 0;
  3789. }
  3790. HACCEL
  3791. WINAPI
  3792. OCreateAcceleratorTableW(
  3793. LPACCEL, int)
  3794. {
  3795. AssertFail("No Unicode Wrapper Available for Win32 API - CreateAcceleratorTableW");
  3796. return 0;
  3797. }
  3798. WINAPI
  3799. OCreateColorSpaceW(LPLOGCOLORSPACEW)
  3800. {
  3801. AssertFail("No Unicode Wrapper Available for Win32 API - CreateColorSpaceW");
  3802. return 0;
  3803. }
  3804. HDC
  3805. WINAPI
  3806. OCreateDCW(
  3807. LPCWSTR lpszDriver,
  3808. LPCWSTR lpszDevice,
  3809. LPCWSTR lpszOutput,
  3810. CONST DEVMODEW *lpInitData)
  3811. {
  3812. AssertFail("No Unicode Wrapper Available for Win32 API - CreateDCW");
  3813. return 0;
  3814. }
  3815. HDESK
  3816. WINAPI
  3817. OCreateDesktopW(
  3818. LPWSTR lpszDesktop,
  3819. LPWSTR lpszDevice,
  3820. LPDEVMODEW pDevmode,
  3821. DWORD dwFlags,
  3822. DWORD dwDesiredAccess,
  3823. LPSECURITY_ATTRIBUTES lpsa)
  3824. {
  3825. AssertFail("No Unicode Wrapper Available for Win32 API - CreateDesktopW");
  3826. return 0;
  3827. }
  3828. HWND
  3829. WINAPI
  3830. OCreateDialogIndirectParamW(
  3831. HINSTANCE hInstance,
  3832. LPCDLGTEMPLATEW lpTemplate,
  3833. HWND hWndParent,
  3834. DLGPROC lpDialogFunc,
  3835. LPARAM dwInitParam)
  3836. {
  3837. AssertFail("No Unicode Wrapper Available for Win32 API - CreateDialogIndirectParamW");
  3838. return 0;
  3839. }
  3840. HWND
  3841. WINAPI
  3842. OCreateDialogParamW(
  3843. HINSTANCE hInstance,
  3844. LPCWSTR lpTemplateName,
  3845. HWND hWndParent ,
  3846. DLGPROC lpDialogFunc,
  3847. LPARAM dwInitParam)
  3848. {
  3849. AssertFail("No Unicode Wrapper Available for Win32 API - CreateDialogParamW");
  3850. return 0;
  3851. }
  3852. HDC
  3853. WINAPI
  3854. OCreateICW(
  3855. LPCWSTR lpszDriver,
  3856. LPCWSTR lpszDevice,
  3857. LPCWSTR lpszOutput,
  3858. CONST DEVMODEW *lpdvmInit)
  3859. {
  3860. AssertFail("No Unicode Wrapper Available for Win32 API - CreateICW");
  3861. return 0;
  3862. }
  3863. HANDLE
  3864. WINAPI
  3865. OCreateMailslotW(
  3866. LPCWSTR lpName,
  3867. DWORD nMaxMessageSize,
  3868. DWORD lReadTimeout,
  3869. LPSECURITY_ATTRIBUTES lpSecurityAttributes
  3870. )
  3871. {
  3872. AssertFail("No Unicode Wrapper Available for Win32 API - CreateMailslotW");
  3873. return 0;
  3874. }
  3875. HANDLE
  3876. WINAPI
  3877. OCreateMutexW(
  3878. LPSECURITY_ATTRIBUTES lpMutexAttributes,
  3879. BOOL bInitialOwner,
  3880. LPCWSTR lpName
  3881. )
  3882. {
  3883. AssertFail("No Unicode Wrapper Available for Win32 API - CreateMutexW");
  3884. return 0;
  3885. }
  3886. HANDLE
  3887. WINAPI
  3888. OCreateNamedPipeW(
  3889. LPCWSTR lpName,
  3890. DWORD dwOpenMode,
  3891. DWORD dwPipeMode,
  3892. DWORD nMaxInstances,
  3893. DWORD nOutBufferSize,
  3894. DWORD nInBufferSize,
  3895. DWORD nDefaultTimeOut,
  3896. LPSECURITY_ATTRIBUTES lpSecurityAttributes
  3897. )
  3898. {
  3899. AssertFail("No Unicode Wrapper Available for Win32 API - CreateNamedPipeW");
  3900. return 0;
  3901. }
  3902. BOOL
  3903. WINAPI
  3904. OCreateProcessW(
  3905. LPCWSTR lpApplicationName,
  3906. LPWSTR lpCommandLine,
  3907. LPSECURITY_ATTRIBUTES lpProcessAttributes,
  3908. LPSECURITY_ATTRIBUTES lpThreadAttributes,
  3909. BOOL bInheritHandles,
  3910. DWORD dwCreationFlags,
  3911. LPVOID lpEnvironment,
  3912. LPCWSTR lpCurrentDirectory,
  3913. LPSTARTUPINFOW lpStartupInfo,
  3914. LPPROCESS_INFORMATION lpProcessInformation
  3915. )
  3916. {
  3917. AssertFail("No Unicode Wrapper Available for Win32 API - CreateProcessW");
  3918. return 0;
  3919. }
  3920. BOOL
  3921. WINAPI
  3922. OCreateProcessAsUserW (
  3923. HANDLE hToken,
  3924. LPCWSTR lpApplicationName,
  3925. LPWSTR lpCommandLine,
  3926. LPSECURITY_ATTRIBUTES lpProcessAttributes,
  3927. LPSECURITY_ATTRIBUTES lpThreadAttributes,
  3928. BOOL bInheritHandles,
  3929. DWORD dwCreationFlags,
  3930. LPVOID lpEnvironment,
  3931. LPCWSTR lpCurrentDirectory,
  3932. LPSTARTUPINFOW lpStartupInfo,
  3933. LPPROCESS_INFORMATION lpProcessInformation
  3934. )
  3935. {
  3936. AssertFail("No Unicode Wrapper Available for Win32 API - CreateProcessAsUserW");
  3937. return 0;
  3938. }
  3939. HPROPSHEETPAGE
  3940. WINAPI
  3941. OCreatePropertySheetPageW(
  3942. LPCPROPSHEETPAGEW lpcpsp
  3943. )
  3944. {
  3945. AssertFail("No Unicode Wrapper Available for Win32 API - CreatePropertySheetPageW");
  3946. return 0;
  3947. }
  3948. BOOL
  3949. WINAPI
  3950. OCreateScalableFontResourceW(DWORD, LPCWSTR, LPCWSTR, LPCWSTR)
  3951. {
  3952. AssertFail("No Unicode Wrapper Available for Win32 API - CreateScalableFontResourceW");
  3953. return 0;
  3954. }
  3955. #if 0 //$UNDONE_POST_98 - We should wrap these as being NT only...
  3956. SC_HANDLE
  3957. WINAPI
  3958. OCreateServiceW(
  3959. SC_HANDLE hSCManager,
  3960. LPCWSTR lpServiceName,
  3961. LPCWSTR lpDisplayName,
  3962. DWORD dwDesiredAccess,
  3963. DWORD dwServiceType,
  3964. DWORD dwStartType,
  3965. DWORD dwErrorControl,
  3966. LPCWSTR lpBinaryPathName,
  3967. LPCWSTR lpLoadOrderGroup,
  3968. LPDWORD lpdwTagId,
  3969. LPCWSTR lpDependencies,
  3970. LPCWSTR lpServiceStartName,
  3971. LPCWSTR lpPassword
  3972. )
  3973. {
  3974. AssertFail("No Unicode Wrapper Available for Win32 API - CreateServiceW");
  3975. return 0;
  3976. }
  3977. #endif
  3978. HWND WINAPI OCreateStatusWindowW(LONG style, LPCWSTR lpszText, HWND hwndParent, UINT wID)
  3979. {
  3980. AssertFail("No Unicode Wrapper Available for Win32 API - CreateStatusWindowW");
  3981. return 0;
  3982. }
  3983. HWINSTA
  3984. WINAPI
  3985. OCreateWindowStationW(
  3986. LPWSTR lpwinsta,
  3987. DWORD dwReserved,
  3988. DWORD dwDesiredAccess,
  3989. LPSECURITY_ATTRIBUTES lpsa)
  3990. {
  3991. AssertFail("No Unicode Wrapper Available for Win32 API - CreateWindowStationW");
  3992. return 0;
  3993. }
  3994. RPC_STATUS RPC_ENTRY
  3995. ODceErrorInqTextW (
  3996. IN RPC_STATUS RpcStatus,
  3997. OUT unsigned short __RPC_FAR * ErrorText
  3998. )
  3999. {
  4000. AssertFail("No Unicode Wrapper Available for Win32 API - DceErrorInqTextW");
  4001. return 0;
  4002. }
  4003. BOOL
  4004. WINAPI
  4005. ODefineDosDeviceW(
  4006. DWORD dwFlags,
  4007. LPCWSTR lpDeviceName,
  4008. LPCWSTR lpTargetPath
  4009. )
  4010. {
  4011. AssertFail("No Unicode Wrapper Available for Win32 API - DefineDosDeviceW");
  4012. return 0;
  4013. }
  4014. BOOL
  4015. WINAPI
  4016. ODeleteFormW(
  4017. HANDLE hPrinter,
  4018. LPWSTR pFormName
  4019. )
  4020. {
  4021. AssertFail("No Unicode Wrapper Available for Win32 API - DeleteFormW");
  4022. return 0;
  4023. }
  4024. BOOL
  4025. WINAPI
  4026. ODeleteMonitorW(
  4027. LPWSTR pName,
  4028. LPWSTR pEnvironment,
  4029. LPWSTR pMonitorName
  4030. )
  4031. {
  4032. AssertFail("No Unicode Wrapper Available for Win32 API - DeleteMonitorW");
  4033. return 0;
  4034. }
  4035. BOOL
  4036. WINAPI
  4037. ODeletePortW(
  4038. LPWSTR pName,
  4039. HWND hWnd,
  4040. LPWSTR pPortName
  4041. )
  4042. {
  4043. AssertFail("No Unicode Wrapper Available for Win32 API - DeletePortW");
  4044. return 0;
  4045. }
  4046. BOOL
  4047. WINAPI
  4048. ODeletePrinterConnectionW(
  4049. LPWSTR pName
  4050. )
  4051. {
  4052. AssertFail("No Unicode Wrapper Available for Win32 API - DeletePrinterConnectionW");
  4053. return 0;
  4054. }
  4055. BOOL
  4056. WINAPI
  4057. ODeletePrinterDriverW(
  4058. LPWSTR pName,
  4059. LPWSTR pEnvironment,
  4060. LPWSTR pDriverName
  4061. )
  4062. {
  4063. AssertFail("No Unicode Wrapper Available for Win32 API - DeletePrinterDriverW");
  4064. return 0;
  4065. }
  4066. BOOL
  4067. WINAPI
  4068. ODeletePrintProcessorW(
  4069. LPWSTR pName,
  4070. LPWSTR pEnvironment,
  4071. LPWSTR pPrintProcessorName
  4072. )
  4073. {
  4074. AssertFail("No Unicode Wrapper Available for Win32 API - DeletePrintProcessorW");
  4075. return 0;
  4076. }
  4077. BOOL
  4078. WINAPI
  4079. ODeletePrintProvidorW(
  4080. LPWSTR pName,
  4081. LPWSTR pEnvironment,
  4082. LPWSTR pPrintProvidorName
  4083. )
  4084. {
  4085. AssertFail("No Unicode Wrapper Available for Win32 API - DeletePrintProvidorW");
  4086. return 0;
  4087. }
  4088. int
  4089. WINAPI
  4090. ODeviceCapabilitiesW(LPCWSTR, LPCWSTR, WORD,
  4091. LPWSTR, CONST DEVMODEW *)
  4092. {
  4093. AssertFail("No Unicode Wrapper Available for Win32 API - DeviceCapabilitiesW");
  4094. return 0;
  4095. }
  4096. int
  4097. WINAPI
  4098. ODlgDirListW(
  4099. HWND hDlg,
  4100. LPWSTR lpPathSpec,
  4101. int nIDListBox,
  4102. int nIDStaticPath,
  4103. UINT uFileType)
  4104. {
  4105. AssertFail("No Unicode Wrapper Available for Win32 API - DlgDirListW");
  4106. return 0;
  4107. }
  4108. int
  4109. WINAPI
  4110. ODlgDirListComboBoxW(
  4111. HWND hDlg,
  4112. LPWSTR lpPathSpec,
  4113. int nIDComboBox,
  4114. int nIDStaticPath,
  4115. UINT uFiletype)
  4116. {
  4117. AssertFail("No Unicode Wrapper Available for Win32 API - DlgDirListComboBoxW");
  4118. return 0;
  4119. }
  4120. BOOL
  4121. WINAPI
  4122. ODlgDirSelectComboBoxExW(
  4123. HWND hDlg,
  4124. LPWSTR lpString,
  4125. int nCount,
  4126. int nIDComboBox)
  4127. {
  4128. AssertFail("No Unicode Wrapper Available for Win32 API - DlgDirSelectComboBoxExW");
  4129. return 0;
  4130. }
  4131. BOOL
  4132. WINAPI
  4133. ODlgDirSelectExW(
  4134. HWND hDlg,
  4135. LPWSTR lpString,
  4136. int nCount,
  4137. int nIDListBox)
  4138. {
  4139. AssertFail("No Unicode Wrapper Available for Win32 API - DlgDirSelectExW");
  4140. return 0;
  4141. }
  4142. DWORD
  4143. WINAPI
  4144. ODocumentPropertiesW(
  4145. HWND hWnd,
  4146. HANDLE hPrinter,
  4147. LPWSTR pDeviceName,
  4148. PDEVMODEW pDevModeOutput,
  4149. PDEVMODEW pDevModeInput,
  4150. DWORD fMode
  4151. )
  4152. {
  4153. AssertFail("No Unicode Wrapper Available for Win32 API - DocumentPropertiesW");
  4154. return 0;
  4155. }
  4156. DWORD
  4157. APIENTRY
  4158. ODoEnvironmentSubstW(LPWSTR szString, UINT cbString)
  4159. {
  4160. AssertFail("No Unicode Wrapper Available for Win32 API - DoEnvironmentSubstW");
  4161. return 0;
  4162. }
  4163. UINT
  4164. APIENTRY
  4165. ODragQueryFileW(HDROP hDrop, UINT iFile, LPWSTR lpszFile, UINT cch)
  4166. {
  4167. AssertFail("No Unicode Wrapper Available for Win32 API - DragQueryFileW");
  4168. return 0;
  4169. }
  4170. BOOL
  4171. WINAPI
  4172. ODrawStateW(HDC, HBRUSH, DRAWSTATEPROC, LPARAM, WPARAM, int, int, int, int, UINT)
  4173. {
  4174. AssertFail("No Unicode Wrapper Available for Win32 API - DrawStateW");
  4175. return 0;
  4176. }
  4177. BOOL
  4178. WINAPI
  4179. OEndUpdateResourceW(
  4180. HANDLE hUpdate,
  4181. BOOL fDiscard
  4182. )
  4183. {
  4184. AssertFail("No Unicode Wrapper Available for Win32 API - EndUpdateResourceW");
  4185. return 0;
  4186. }
  4187. BOOL
  4188. WINAPI
  4189. OEnumCalendarInfoW(
  4190. CALINFO_ENUMPROCW lpCalInfoEnumProc,
  4191. LCID Locale,
  4192. CALID Calendar,
  4193. CALTYPE CalType)
  4194. {
  4195. AssertFail("No Unicode Wrapper Available for Win32 API - EnumCalendarInfoW");
  4196. return 0;
  4197. }
  4198. BOOL
  4199. WINAPI
  4200. OEnumDateFormatsW(
  4201. DATEFMT_ENUMPROCW lpDateFmtEnumProc,
  4202. LCID Locale,
  4203. DWORD dwFlags)
  4204. {
  4205. AssertFail("No Unicode Wrapper Available for Win32 API - EnumDateFormatsW");
  4206. return 0;
  4207. }
  4208. #if 0 //$UNDONE_POST_98 - We should wrap these as being NT only...
  4209. BOOL
  4210. WINAPI
  4211. OEnumDependentServicesW(
  4212. SC_HANDLE hService,
  4213. DWORD dwServiceState,
  4214. LPENUM_SERVICE_STATUSW lpServices,
  4215. DWORD cbBufSize,
  4216. LPDWORD pcbBytesNeeded,
  4217. LPDWORD lpServicesReturned
  4218. )
  4219. {
  4220. AssertFail("No Unicode Wrapper Available for Win32 API - EnumDependentServicesW");
  4221. return 0;
  4222. }
  4223. #endif
  4224. BOOL
  4225. WINAPI
  4226. OEnumDesktopsW(
  4227. HWINSTA hwinsta,
  4228. DESKTOPENUMPROCW lpEnumFunc,
  4229. LPARAM lParam)
  4230. {
  4231. AssertFail("No Unicode Wrapper Available for Win32 API - EnumDesktopsW");
  4232. return 0;
  4233. }
  4234. BOOL
  4235. WINAPI
  4236. OEnumDisplaySettingsW(
  4237. LPCWSTR lpszDeviceName,
  4238. DWORD iModeNum,
  4239. LPDEVMODEW lpDevMode)
  4240. {
  4241. AssertFail("No Unicode Wrapper Available for Win32 API - EnumDisplaySettingsW");
  4242. return 0;
  4243. }
  4244. int
  4245. WINAPI
  4246. OEnumFontFamiliesW(HDC, LPCWSTR, FONTENUMPROCW, LPARAM)
  4247. {
  4248. AssertFail("No Unicode Wrapper Available for Win32 API - EnumFontFamiliesW");
  4249. return 0;
  4250. }
  4251. int
  4252. WINAPI
  4253. OEnumFontFamiliesExW(HDC, LPLOGFONTW,FONTENUMPROCW, LPARAM,DWORD)
  4254. {
  4255. AssertFail("No Unicode Wrapper Available for Win32 API - EnumFontFamiliesExW");
  4256. return 0;
  4257. }
  4258. int
  4259. WINAPI
  4260. OEnumFontsW(HDC, LPCWSTR, FONTENUMPROCW, LPARAM)
  4261. {
  4262. AssertFail("No Unicode Wrapper Available for Win32 API - EnumFontsW");
  4263. return 0;
  4264. }
  4265. BOOL
  4266. WINAPI
  4267. OEnumFormsW(
  4268. HANDLE hPrinter,
  4269. DWORD Level,
  4270. LPBYTE pForm,
  4271. DWORD cbBuf,
  4272. LPDWORD pcbNeeded,
  4273. LPDWORD pcReturned
  4274. )
  4275. {
  4276. AssertFail("No Unicode Wrapper Available for Win32 API - EnumFormsW");
  4277. return 0;
  4278. }
  4279. WINAPI
  4280. OEnumICMProfilesW(HDC,ICMENUMPROCW,LPARAM)
  4281. {
  4282. AssertFail("No Unicode Wrapper Available for Win32 API - EnumICMProfilesW");
  4283. return 0;
  4284. }
  4285. BOOL
  4286. WINAPI
  4287. OEnumJobsW(
  4288. HANDLE hPrinter,
  4289. DWORD FirstJob,
  4290. DWORD NoJobs,
  4291. DWORD Level,
  4292. LPBYTE pJob,
  4293. DWORD cbBuf,
  4294. LPDWORD pcbNeeded,
  4295. LPDWORD pcReturned
  4296. )
  4297. {
  4298. AssertFail("No Unicode Wrapper Available for Win32 API - EnumJobsW");
  4299. return 0;
  4300. }
  4301. BOOL
  4302. WINAPI
  4303. OEnumMonitorsW(
  4304. LPWSTR pName,
  4305. DWORD Level,
  4306. LPBYTE pMonitors,
  4307. DWORD cbBuf,
  4308. LPDWORD pcbNeeded,
  4309. LPDWORD pcReturned
  4310. )
  4311. {
  4312. AssertFail("No Unicode Wrapper Available for Win32 API - EnumMonitorsW");
  4313. return 0;
  4314. }
  4315. BOOL
  4316. WINAPI
  4317. OEnumPortsW(
  4318. LPWSTR pName,
  4319. DWORD Level,
  4320. LPBYTE pPorts,
  4321. DWORD cbBuf,
  4322. LPDWORD pcbNeeded,
  4323. LPDWORD pcReturned
  4324. )
  4325. {
  4326. AssertFail("No Unicode Wrapper Available for Win32 API - EnumPortsW");
  4327. return 0;
  4328. }
  4329. BOOL
  4330. WINAPI
  4331. OEnumPrinterDriversW(
  4332. LPWSTR pName,
  4333. LPWSTR pEnvironment,
  4334. DWORD Level,
  4335. LPBYTE pDriverInfo,
  4336. DWORD cbBuf,
  4337. LPDWORD pcbNeeded,
  4338. LPDWORD pcReturned
  4339. )
  4340. {
  4341. AssertFail("No Unicode Wrapper Available for Win32 API - EnumPrinterDriversW");
  4342. return 0;
  4343. }
  4344. BOOL
  4345. WINAPI
  4346. OEnumPrintersW(
  4347. DWORD Flags,
  4348. LPWSTR Name,
  4349. DWORD Level,
  4350. LPBYTE pPrinterEnum,
  4351. DWORD cbBuf,
  4352. LPDWORD pcbNeeded,
  4353. LPDWORD pcReturned
  4354. )
  4355. {
  4356. AssertFail("No Unicode Wrapper Available for Win32 API - EnumPrintersW");
  4357. return 0;
  4358. }
  4359. BOOL
  4360. WINAPI
  4361. OEnumPrintProcessorDatatypesW(
  4362. LPWSTR pName,
  4363. LPWSTR pPrintProcessorName,
  4364. DWORD Level,
  4365. LPBYTE pDatatypes,
  4366. DWORD cbBuf,
  4367. LPDWORD pcbNeeded,
  4368. LPDWORD pcReturned
  4369. )
  4370. {
  4371. AssertFail("No Unicode Wrapper Available for Win32 API - EnumPrintProcessorDatatypesW");
  4372. return 0;
  4373. }
  4374. BOOL
  4375. WINAPI
  4376. OEnumPrintProcessorsW(
  4377. LPWSTR pName,
  4378. LPWSTR pEnvironment,
  4379. DWORD Level,
  4380. LPBYTE pPrintProcessorInfo,
  4381. DWORD cbBuf,
  4382. LPDWORD pcbNeeded,
  4383. LPDWORD pcReturned
  4384. )
  4385. {
  4386. AssertFail("No Unicode Wrapper Available for Win32 API - EnumPrintProcessorsW");
  4387. return 0;
  4388. }
  4389. int
  4390. WINAPI
  4391. OEnumPropsW(
  4392. HWND hWnd,
  4393. PROPENUMPROCW lpEnumFunc)
  4394. {
  4395. AssertFail("No Unicode Wrapper Available for Win32 API - EnumPropsW");
  4396. return 0;
  4397. }
  4398. int
  4399. WINAPI
  4400. OEnumPropsExW(
  4401. HWND hWnd,
  4402. PROPENUMPROCEXW lpEnumFunc,
  4403. LPARAM lParam)
  4404. {
  4405. AssertFail("No Unicode Wrapper Available for Win32 API - EnumPropsExW");
  4406. return 0;
  4407. }
  4408. INT
  4409. APIENTRY
  4410. OEnumProtocolsW (
  4411. IN LPINT lpiProtocols,
  4412. IN OUT LPVOID lpProtocolBuffer,
  4413. IN OUT LPDWORD lpdwBufferLength
  4414. )
  4415. {
  4416. AssertFail("No Unicode Wrapper Available for Win32 API - EnumProtocolsW");
  4417. return 0;
  4418. }
  4419. BOOL
  4420. WINAPI
  4421. OEnumResourceLanguagesW(
  4422. HMODULE hModule,
  4423. LPCWSTR lpType,
  4424. LPCWSTR lpName,
  4425. ENUMRESLANGPROC lpEnumFunc,
  4426. LONG lParam
  4427. )
  4428. {
  4429. AssertFail("No Unicode Wrapper Available for Win32 API - EnumResourceLanguagesW");
  4430. return 0;
  4431. }
  4432. BOOL
  4433. WINAPI
  4434. OEnumResourceNamesW(
  4435. HMODULE hModule,
  4436. LPCWSTR lpType,
  4437. ENUMRESNAMEPROC lpEnumFunc,
  4438. LONG lParam
  4439. )
  4440. {
  4441. AssertFail("No Unicode Wrapper Available for Win32 API - EnumResourceNamesW");
  4442. return 0;
  4443. }
  4444. BOOL
  4445. WINAPI
  4446. OEnumResourceTypesW(
  4447. HMODULE hModule,
  4448. ENUMRESTYPEPROC lpEnumFunc,
  4449. LONG lParam
  4450. )
  4451. {
  4452. AssertFail("No Unicode Wrapper Available for Win32 API - EnumResourceTypesW");
  4453. return 0;
  4454. }
  4455. #if 0 //$UNDONE_POST_98 - We should wrap these as being NT only...
  4456. BOOL
  4457. WINAPI
  4458. OEnumServicesStatusW(
  4459. SC_HANDLE hSCManager,
  4460. DWORD dwServiceType,
  4461. DWORD dwServiceState,
  4462. LPENUM_SERVICE_STATUSW lpServices,
  4463. DWORD cbBufSize,
  4464. LPDWORD pcbBytesNeeded,
  4465. LPDWORD lpServicesReturned,
  4466. LPDWORD lpResumeHandle
  4467. )
  4468. {
  4469. AssertFail("No Unicode Wrapper Available for Win32 API - EnumServicesStatusW");
  4470. return 0;
  4471. }
  4472. #endif
  4473. BOOL
  4474. WINAPI
  4475. OEnumSystemCodePagesW(
  4476. CODEPAGE_ENUMPROCW lpCodePageEnumProc,
  4477. DWORD dwFlags)
  4478. {
  4479. AssertFail("No Unicode Wrapper Available for Win32 API - EnumSystemCodePagesW");
  4480. return 0;
  4481. }
  4482. BOOL
  4483. WINAPI
  4484. OEnumSystemLocalesW(
  4485. LOCALE_ENUMPROCW lpLocaleEnumProc,
  4486. DWORD dwFlags)
  4487. {
  4488. AssertFail("No Unicode Wrapper Available for Win32 API - EnumSystemLocalesW");
  4489. return 0;
  4490. }
  4491. BOOL
  4492. WINAPI
  4493. OEnumTimeFormatsW(
  4494. TIMEFMT_ENUMPROCW lpTimeFmtEnumProc,
  4495. LCID Locale,
  4496. DWORD dwFlags)
  4497. {
  4498. AssertFail("No Unicode Wrapper Available for Win32 API - EnumTimeFormatsW");
  4499. return 0;
  4500. }
  4501. BOOL
  4502. WINAPI
  4503. OEnumWindowStationsW(
  4504. WINSTAENUMPROCW lpEnumFunc,
  4505. LPARAM lParam)
  4506. {
  4507. AssertFail("No Unicode Wrapper Available for Win32 API - EnumWindowStationsW");
  4508. return 0;
  4509. }
  4510. HICON
  4511. APIENTRY
  4512. OExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIcon)
  4513. {
  4514. AssertFail("No Unicode Wrapper Available for Win32 API - ExtractAssociatedIconW");
  4515. return 0;
  4516. }
  4517. HICON
  4518. APIENTRY
  4519. OExtractIconW(HINSTANCE hInst, LPCWSTR lpszExeFileName, UINT nIconIndex)
  4520. {
  4521. AssertFail("No Unicode Wrapper Available for Win32 API - ExtractIconW");
  4522. return 0;
  4523. }
  4524. UINT
  4525. WINAPI
  4526. OExtractIconExW(LPCWSTR lpszFile, int nIconIndex, HICON FAR *phiconLarge, HICON FAR *phiconSmall, UINT nIcons)
  4527. {
  4528. AssertFail("No Unicode Wrapper Available for Win32 API - ExtractIconExW");
  4529. return 0;
  4530. }
  4531. // Commented since gdi32.dll on Win95 provides the wrapper for this function.
  4532. /*
  4533. BOOL
  4534. WINAPI
  4535. OExtTextOutW(HDC, int, int, UINT, CONST RECT *,LPCWSTR, UINT, CONST INT *)
  4536. {
  4537. AssertFail("No Unicode Wrapper Available for Win32 API - ExtTextOutW");
  4538. return 0;
  4539. }
  4540. */
  4541. BOOL
  4542. WINAPI
  4543. OFillConsoleOutputCharacterW(
  4544. HANDLE hConsoleOutput,
  4545. WCHAR cCharacter,
  4546. DWORD nLength,
  4547. COORD dwWriteCoord,
  4548. LPDWORD lpNumberOfCharsWritten
  4549. )
  4550. {
  4551. AssertFail("No Unicode Wrapper Available for Win32 API - FillConsoleOutputCharacterW");
  4552. return 0;
  4553. }
  4554. LPWSTR
  4555. APIENTRY
  4556. OFindEnvironmentStringW(LPWSTR szEnvVar)
  4557. {
  4558. AssertFail("No Unicode Wrapper Available for Win32 API - FindEnvironmentStringW");
  4559. return 0;
  4560. }
  4561. HINSTANCE
  4562. APIENTRY
  4563. OFindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult)
  4564. {
  4565. AssertFail("No Unicode Wrapper Available for Win32 API - FindExecutableW");
  4566. return 0;
  4567. }
  4568. HRSRC
  4569. WINAPI
  4570. OFindResourceExW(
  4571. HMODULE hModule,
  4572. LPCWSTR lpType,
  4573. LPCWSTR lpName,
  4574. WORD wLanguage
  4575. )
  4576. {
  4577. AssertFail("No Unicode Wrapper Available for Win32 API - FindResourceExW");
  4578. return 0;
  4579. }
  4580. APIENTRY
  4581. OFindTextW(LPFINDREPLACEW)
  4582. {
  4583. AssertFail("No Unicode Wrapper Available for Win32 API - FindTextW");
  4584. return 0;
  4585. }
  4586. HWND
  4587. WINAPI
  4588. OFindWindowExW(HWND, HWND, LPCWSTR, LPCWSTR)
  4589. {
  4590. AssertFail("No Unicode Wrapper Available for Win32 API - FindWindowExW");
  4591. return 0;
  4592. }
  4593. int
  4594. WINAPI
  4595. OFoldStringW(
  4596. DWORD dwMapFlags,
  4597. LPCWSTR lpSrcStr,
  4598. int cchSrc,
  4599. LPWSTR lpDestStr,
  4600. int cchDest)
  4601. {
  4602. AssertFail("No Unicode Wrapper Available for Win32 API - FoldStringW");
  4603. return 0;
  4604. }
  4605. BOOL
  4606. WINAPI
  4607. OGetBinaryTypeW(
  4608. LPCWSTR lpApplicationName,
  4609. LPDWORD lpBinaryType
  4610. )
  4611. {
  4612. AssertFail("No Unicode Wrapper Available for Win32 API - GetBinaryTypeW");
  4613. return 0;
  4614. }
  4615. DWORD
  4616. WINAPI
  4617. OGetCharacterPlacementW(HDC, LPCWSTR, int, int, LPGCP_RESULTSW, DWORD)
  4618. {
  4619. AssertFail("No Unicode Wrapper Available for Win32 API - GetCharacterPlacementW");
  4620. return 0;
  4621. }
  4622. BOOL
  4623. WINAPI
  4624. OGetCharWidth32W(HDC, UINT, UINT, LPINT)
  4625. {
  4626. AssertFail("No Unicode Wrapper Available for Win32 API - GetCharWidth32W");
  4627. return 0;
  4628. }
  4629. LPWSTR
  4630. WINAPI
  4631. OGetCommandLineW(
  4632. VOID
  4633. )
  4634. {
  4635. AssertFail("No Unicode Wrapper Available for Win32 API - GetCommandLineW");
  4636. return 0;
  4637. }
  4638. DWORD
  4639. WINAPI
  4640. OGetCompressedFileSizeW(
  4641. LPCWSTR lpFileName,
  4642. LPDWORD lpFileSizeHigh
  4643. )
  4644. {
  4645. AssertFail("No Unicode Wrapper Available for Win32 API - GetCompressedFileSizeW");
  4646. return 0;
  4647. }
  4648. BOOL
  4649. WINAPI
  4650. OGetComputerNameW (
  4651. LPWSTR lpBuffer,
  4652. LPDWORD nSize
  4653. )
  4654. {
  4655. AssertFail("No Unicode Wrapper Available for Win32 API - GetComputerNameW");
  4656. return 0;
  4657. }
  4658. DWORD
  4659. WINAPI
  4660. OGetConsoleTitleW(
  4661. LPWSTR lpConsoleTitle,
  4662. DWORD nSize
  4663. )
  4664. {
  4665. AssertFail("No Unicode Wrapper Available for Win32 API - GetConsoleTitleW");
  4666. return 0;
  4667. }
  4668. int
  4669. WINAPI
  4670. OGetCurrencyFormatW(
  4671. LCID Locale,
  4672. DWORD dwFlags,
  4673. LPCWSTR lpValue,
  4674. CONST CURRENCYFMTW *lpFormat,
  4675. LPWSTR lpCurrencyStr,
  4676. int cchCurrency)
  4677. {
  4678. AssertFail("No Unicode Wrapper Available for Win32 API - GetCurrencyFormatW");
  4679. return 0;
  4680. }
  4681. int
  4682. WINAPI
  4683. OGetDateFormatW(
  4684. LCID Locale,
  4685. DWORD dwFlags,
  4686. CONST SYSTEMTIME *lpDate,
  4687. LPCWSTR lpFormat,
  4688. LPWSTR lpDateStr,
  4689. int cchDate)
  4690. {
  4691. AssertFail("No Unicode Wrapper Available for Win32 API - GetDateFormatW");
  4692. return 0;
  4693. }
  4694. BOOL
  4695. WINAPI
  4696. OGetDefaultCommConfigW(
  4697. LPCWSTR lpszName,
  4698. LPCOMMCONFIG lpCC,
  4699. LPDWORD lpdwSize
  4700. )
  4701. {
  4702. AssertFail("No Unicode Wrapper Available for Win32 API - GetDefaultCommConfigW");
  4703. return 0;
  4704. }
  4705. BOOL
  4706. WINAPI
  4707. OGetDiskFreeSpaceW(
  4708. LPCWSTR lpRootPathName,
  4709. LPDWORD lpSectorsPerCluster,
  4710. LPDWORD lpBytesPerSector,
  4711. LPDWORD lpNumberOfFreeClusters,
  4712. LPDWORD lpTotalNumberOfClusters
  4713. )
  4714. {
  4715. AssertFail("No Unicode Wrapper Available for Win32 API - GetDiskFreeSpaceW");
  4716. return 0;
  4717. }
  4718. UINT
  4719. WINAPI
  4720. OGetDriveTypeW(
  4721. LPCWSTR lpRootPathName
  4722. )
  4723. {
  4724. AssertFail("No Unicode Wrapper Available for Win32 API - GetDriveTypeW");
  4725. return 0;
  4726. }
  4727. HENHMETAFILE
  4728. WINAPI
  4729. OGetEnhMetaFileW(LPCWSTR)
  4730. {
  4731. AssertFail("No Unicode Wrapper Available for Win32 API - GetEnhMetaFileW");
  4732. return 0;
  4733. }
  4734. UINT
  4735. WINAPI
  4736. OGetEnhMetaFileDescriptionW(HENHMETAFILE, UINT, LPWSTR )
  4737. {
  4738. AssertFail("No Unicode Wrapper Available for Win32 API - GetEnhMetaFileDescriptionW");
  4739. return 0;
  4740. }
  4741. DWORD
  4742. WINAPI
  4743. OGetEnvironmentVariableW(
  4744. LPCWSTR lpName,
  4745. LPWSTR lpBuffer,
  4746. DWORD nSize
  4747. )
  4748. {
  4749. AssertFail("No Unicode Wrapper Available for Win32 API - GetEnvironmentVariableW");
  4750. return 0;
  4751. }
  4752. INT
  4753. APIENTRY
  4754. OGetExpandedNameW(
  4755. LPWSTR,
  4756. LPWSTR
  4757. )
  4758. {
  4759. AssertFail("No Unicode Wrapper Available for Win32 API - GetExpandedNameW");
  4760. return 0;
  4761. }
  4762. BOOL
  4763. WINAPI
  4764. OGetFileSecurityW (
  4765. LPCWSTR lpFileName,
  4766. SECURITY_INFORMATION RequestedInformation,
  4767. PSECURITY_DESCRIPTOR pSecurityDescriptor,
  4768. DWORD nLength,
  4769. LPDWORD lpnLengthNeeded
  4770. )
  4771. {
  4772. AssertFail("No Unicode Wrapper Available for Win32 API - GetFileSecurityW");
  4773. return 0;
  4774. }
  4775. short
  4776. WINAPI
  4777. OGetFileTitleW
  4778. (
  4779. LPCWSTR pwszFile,
  4780. LPWSTR pwszOut,
  4781. WORD w
  4782. )
  4783. {
  4784. AssertFail("No Unicode Wrapper Available for Win32 API - GetFileTitleW");
  4785. return 0;
  4786. }
  4787. BOOL
  4788. WINAPI
  4789. OGetFileVersionInfoW(
  4790. LPWSTR lpszFile,
  4791. DWORD dwHandle,
  4792. DWORD cbBuf,
  4793. LPVOID lpvData)
  4794. {
  4795. AssertFail("No Unicode Wrapper Available for Win32 API - GetFileVersionInfoW");
  4796. return 0;
  4797. }
  4798. DWORD
  4799. WINAPI
  4800. OGetFileVersionInfoSizeW(
  4801. LPWSTR lpszFile,
  4802. LPDWORD lpdwHandle)
  4803. {
  4804. AssertFail("No Unicode Wrapper Available for Win32 API - GetFileVersionInfoSizeW");
  4805. return 0;
  4806. }
  4807. BOOL
  4808. WINAPI
  4809. OGetFormW(
  4810. HANDLE hPrinter,
  4811. LPWSTR pFormName,
  4812. DWORD Level,
  4813. LPBYTE pForm,
  4814. DWORD cbBuf,
  4815. LPDWORD pcbNeeded
  4816. )
  4817. {
  4818. AssertFail("No Unicode Wrapper Available for Win32 API - GetFormW");
  4819. return 0;
  4820. }
  4821. WINAPI OGetICMProfileW(HDC,LPDWORD,LPWSTR)
  4822. {
  4823. AssertFail("No Unicode Wrapper Available for Win32 API - GetICMProfileW");
  4824. return 0;
  4825. }
  4826. BOOL
  4827. WINAPI
  4828. OGetJobW(
  4829. HANDLE hPrinter,
  4830. DWORD JobId,
  4831. DWORD Level,
  4832. LPBYTE pJob,
  4833. DWORD cbBuf,
  4834. LPDWORD pcbNeeded
  4835. )
  4836. {
  4837. AssertFail("No Unicode Wrapper Available for Win32 API - GetJobW");
  4838. return 0;
  4839. }
  4840. BOOL
  4841. WINAPI
  4842. OGetKeyboardLayoutNameW(
  4843. LPWSTR pwszKLID)
  4844. {
  4845. AssertFail("No Unicode Wrapper Available for Win32 API - GetKeyboardLayoutNameW");
  4846. return 0;
  4847. }
  4848. WINAPI OGetLogColorSpaceW(HCOLORSPACE,LPLOGCOLORSPACEW,DWORD)
  4849. {
  4850. AssertFail("No Unicode Wrapper Available for Win32 API - GetLogColorSpaceW");
  4851. return 0;
  4852. }
  4853. DWORD
  4854. WINAPI
  4855. OGetLogicalDriveStringsW(
  4856. DWORD nBufferLength,
  4857. LPWSTR lpBuffer
  4858. )
  4859. {
  4860. AssertFail("No Unicode Wrapper Available for Win32 API - GetLogicalDriveStringsW");
  4861. return 0;
  4862. }
  4863. BOOL
  4864. WINAPI
  4865. OGetMenuItemInfoW(
  4866. HMENU,
  4867. UINT,
  4868. BOOL,
  4869. LPMENUITEMINFOW
  4870. )
  4871. {
  4872. AssertFail("No Unicode Wrapper Available for Win32 API - GetMenuItemInfoW");
  4873. return 0;
  4874. }
  4875. HMETAFILE WINAPI OGetMetaFileW(LPCWSTR)
  4876. {
  4877. AssertFail("No Unicode Wrapper Available for Win32 API - GetMetaFileW");
  4878. return 0;
  4879. }
  4880. INT
  4881. APIENTRY
  4882. OGetNameByTypeW (
  4883. IN LPGUID lpServiceType,
  4884. IN OUT LPWSTR lpServiceName,
  4885. IN DWORD dwNameLength
  4886. )
  4887. {
  4888. AssertFail("No Unicode Wrapper Available for Win32 API - GetNameByTypeW");
  4889. return 0;
  4890. }
  4891. BOOL
  4892. WINAPI
  4893. OGetNamedPipeHandleStateW(
  4894. HANDLE hNamedPipe,
  4895. LPDWORD lpState,
  4896. LPDWORD lpCurInstances,
  4897. LPDWORD lpMaxCollectionCount,
  4898. LPDWORD lpCollectDataTimeout,
  4899. LPWSTR lpUserName,
  4900. DWORD nMaxUserNameSize
  4901. )
  4902. {
  4903. AssertFail("No Unicode Wrapper Available for Win32 API - GetNamedPipeHandleStateW");
  4904. return 0;
  4905. }
  4906. int
  4907. WINAPI
  4908. OGetNumberFormatW(
  4909. LCID Locale,
  4910. DWORD dwFlags,
  4911. LPCWSTR lpValue,
  4912. CONST NUMBERFMTW *lpFormat,
  4913. LPWSTR lpNumberStr,
  4914. int cchNumber)
  4915. {
  4916. AssertFail("No Unicode Wrapper Available for Win32 API - GetNumberFormatW");
  4917. return 0;
  4918. }
  4919. APIENTRY
  4920. OGetOpenFileNameW(
  4921. LPOPENFILENAMEW lpofn
  4922. )
  4923. {
  4924. AssertFail("No Unicode Wrapper Available for Win32 API - GetOpenFileNameW");
  4925. return 0;
  4926. }
  4927. BOOL
  4928. WINAPI
  4929. OGetPrinterW(
  4930. HANDLE hPrinter,
  4931. DWORD Level,
  4932. LPBYTE pPrinter,
  4933. DWORD cbBuf,
  4934. LPDWORD pcbNeeded
  4935. )
  4936. {
  4937. AssertFail("No Unicode Wrapper Available for Win32 API - GetPrinterW");
  4938. return 0;
  4939. }
  4940. DWORD
  4941. WINAPI
  4942. OGetPrinterDataW(
  4943. HANDLE hPrinter,
  4944. LPWSTR pValueName,
  4945. LPDWORD pType,
  4946. LPBYTE pData,
  4947. DWORD nSize,
  4948. LPDWORD pcbNeeded
  4949. )
  4950. {
  4951. AssertFail("No Unicode Wrapper Available for Win32 API - GetPrinterDataW");
  4952. return 0;
  4953. }
  4954. BOOL
  4955. WINAPI
  4956. OGetPrinterDriverW(
  4957. HANDLE hPrinter,
  4958. LPWSTR pEnvironment,
  4959. DWORD Level,
  4960. LPBYTE pDriverInfo,
  4961. DWORD cbBuf,
  4962. LPDWORD pcbNeeded
  4963. )
  4964. {
  4965. AssertFail("No Unicode Wrapper Available for Win32 API - GetPrinterDriverW");
  4966. return 0;
  4967. }
  4968. BOOL
  4969. WINAPI
  4970. OGetPrinterDriverDirectoryW(
  4971. LPWSTR pName,
  4972. LPWSTR pEnvironment,
  4973. DWORD Level,
  4974. LPBYTE pDriverDirectory,
  4975. DWORD cbBuf,
  4976. LPDWORD pcbNeeded
  4977. )
  4978. {
  4979. AssertFail("No Unicode Wrapper Available for Win32 API - GetPrinterDriverDirectoryW");
  4980. return 0;
  4981. }
  4982. BOOL
  4983. WINAPI
  4984. OGetPrintProcessorDirectoryW(
  4985. LPWSTR pName,
  4986. LPWSTR pEnvironment,
  4987. DWORD Level,
  4988. LPBYTE pPrintProcessorInfo,
  4989. DWORD cbBuf,
  4990. LPDWORD pcbNeeded
  4991. )
  4992. {
  4993. AssertFail("No Unicode Wrapper Available for Win32 API - GetPrintProcessorDirectoryW");
  4994. return 0;
  4995. }
  4996. DWORD
  4997. WINAPI
  4998. OGetPrivateProfileSectionW(
  4999. LPCWSTR lpAppName,
  5000. LPWSTR lpReturnedString,
  5001. DWORD nSize,
  5002. LPCWSTR lpFileName
  5003. )
  5004. {
  5005. AssertFail("No Unicode Wrapper Available for Win32 API - GetPrivateProfileSectionW");
  5006. return 0;
  5007. }
  5008. DWORD
  5009. WINAPI
  5010. OGetPrivateProfileSectionNamesW(
  5011. LPWSTR lpszReturnBuffer,
  5012. DWORD nSize,
  5013. LPCWSTR lpFileName
  5014. )
  5015. {
  5016. AssertFail("No Unicode Wrapper Available for Win32 API - GetPrivateProfileSectionNamesW");
  5017. return 0;
  5018. }
  5019. BOOL
  5020. WINAPI
  5021. OGetPrivateProfileStructW(
  5022. LPCWSTR lpszSection,
  5023. LPCWSTR lpszKey,
  5024. LPVOID lpStruct,
  5025. UINT uSizeStruct,
  5026. LPCWSTR szFile
  5027. )
  5028. {
  5029. AssertFail("No Unicode Wrapper Available for Win32 API - GetPrivateProfileStructW");
  5030. return 0;
  5031. }
  5032. DWORD
  5033. WINAPI
  5034. OGetProfileSectionW(
  5035. LPCWSTR lpAppName,
  5036. LPWSTR lpReturnedString,
  5037. DWORD nSize
  5038. )
  5039. {
  5040. AssertFail("No Unicode Wrapper Available for Win32 API - GetProfileSectionW");
  5041. return 0;
  5042. }
  5043. DWORD
  5044. WINAPI
  5045. OGetProfileStringW(
  5046. LPCWSTR lpAppName,
  5047. LPCWSTR lpKeyName,
  5048. LPCWSTR lpDefault,
  5049. LPWSTR lpReturnedString,
  5050. DWORD nSize
  5051. )
  5052. {
  5053. AssertFail("No Unicode Wrapper Available for Win32 API - GetProfileStringW");
  5054. return 0;
  5055. }
  5056. #if 0 //$UNDONE_POST_98 - We should wrap these as being NT only...
  5057. BOOL
  5058. WINAPI
  5059. OGetServiceDisplayNameW(
  5060. SC_HANDLE hSCManager,
  5061. LPCWSTR lpServiceName,
  5062. LPWSTR lpDisplayName,
  5063. LPDWORD lpcchBuffer
  5064. )
  5065. {
  5066. AssertFail("No Unicode Wrapper Available for Win32 API - GetServiceDisplayNameW");
  5067. return 0;
  5068. }
  5069. BOOL
  5070. WINAPI
  5071. OGetServiceKeyNameW(
  5072. SC_HANDLE hSCManager,
  5073. LPCWSTR lpDisplayName,
  5074. LPWSTR lpServiceName,
  5075. LPDWORD lpcchBuffer
  5076. )
  5077. {
  5078. AssertFail("No Unicode Wrapper Available for Win32 API - GetServiceKeyNameW");
  5079. return 0;
  5080. }
  5081. #endif
  5082. APIENTRY
  5083. OGetSaveFileNameW(LPOPENFILENAMEW lpofn)
  5084. {
  5085. AssertFail("No Unicode Wrapper Available for Win32 API - GetSaveFileNameW");
  5086. return 0;
  5087. }
  5088. DWORD
  5089. WINAPI
  5090. OGetShortPathNameW(
  5091. LPCWSTR lpszLongPath,
  5092. LPWSTR lpszShortPath,
  5093. DWORD cchBuffer
  5094. )
  5095. {
  5096. AssertFail("No Unicode Wrapper Available for Win32 API - GetShortPathNameW");
  5097. return 0;
  5098. }
  5099. VOID
  5100. WINAPI
  5101. OGetStartupInfoW(
  5102. LPSTARTUPINFOW lpStartupInfo
  5103. )
  5104. {
  5105. AssertFail("No Unicode Wrapper Available for Win32 API - GetStartupInfoW");
  5106. return;
  5107. }
  5108. BOOL
  5109. WINAPI
  5110. OGetStringTypeExW(
  5111. LCID Locale,
  5112. DWORD dwInfoType,
  5113. LPCWSTR lpSrcStr,
  5114. int cchSrc,
  5115. LPWORD lpCharType)
  5116. {
  5117. AssertFail("No Unicode Wrapper Available for Win32 API - GetStringTypeExW");
  5118. return 0;
  5119. }
  5120. UINT
  5121. WINAPI
  5122. OGetSystemDirectoryW(
  5123. LPWSTR lpBuffer,
  5124. UINT uSize
  5125. )
  5126. {
  5127. AssertFail("No Unicode Wrapper Available for Win32 API - GetSystemDirectoryW");
  5128. return 0;
  5129. }
  5130. int
  5131. WINAPI
  5132. OGetTimeFormatW(
  5133. LCID Locale,
  5134. DWORD dwFlags,
  5135. CONST SYSTEMTIME *lpTime,
  5136. LPCWSTR lpFormat,
  5137. LPWSTR lpTimeStr,
  5138. int cchTime)
  5139. {
  5140. AssertFail("No Unicode Wrapper Available for Win32 API - GetTimeFormatW");
  5141. return 0;
  5142. }
  5143. INT
  5144. APIENTRY
  5145. OGetTypeByNameW (
  5146. IN LPWSTR lpServiceName,
  5147. IN OUT LPGUID lpServiceType
  5148. )
  5149. {
  5150. AssertFail("No Unicode Wrapper Available for Win32 API - GetTypeByNameW");
  5151. return 0;
  5152. }
  5153. BOOL
  5154. WINAPI
  5155. OGetUserObjectInformationW(
  5156. HANDLE hObj,
  5157. int nIndex,
  5158. PVOID pvInfo,
  5159. DWORD nLength,
  5160. LPDWORD lpnLengthNeeded)
  5161. {
  5162. AssertFail("No Unicode Wrapper Available for Win32 API - GetUserObjectInformationW");
  5163. return 0;
  5164. }
  5165. UINT
  5166. WINAPI
  5167. OGetWindowsDirectoryW(
  5168. LPWSTR lpBuffer,
  5169. UINT uSize
  5170. )
  5171. {
  5172. AssertFail("No Unicode Wrapper Available for Win32 API - GetWindowsDirectoryW");
  5173. return 0;
  5174. }
  5175. ATOM
  5176. WINAPI
  5177. OGlobalFindAtomW(
  5178. LPCWSTR lpString
  5179. )
  5180. {
  5181. AssertFail("No Unicode Wrapper Available for Win32 API - GlobalFindAtomW");
  5182. return 0;
  5183. }
  5184. RPC_STATUS RPC_ENTRY
  5185. OI_RpcServerUnregisterEndpointW (
  5186. IN unsigned short * Protseq,
  5187. IN unsigned short * Endpoint
  5188. )
  5189. {
  5190. AssertFail("No Unicode Wrapper Available for Win32 API - I_RpcServerUnregisterEndpointW");
  5191. return 0;
  5192. }
  5193. HIMAGELIST
  5194. WINAPI
  5195. OImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, int cx, int cGrow, COLORREF crMask, UINT uType, UINT uFlags)
  5196. {
  5197. AssertFail("No Unicode Wrapper Available for Win32 API - ImageList_LoadImageW");
  5198. return 0;
  5199. }
  5200. WINAPI
  5201. OImmConfigureIMEW(HKL, HWND, DWORD, LPVOID)
  5202. {
  5203. AssertFail("No Unicode Wrapper Available for Win32 API - ImmConfigureIMEW");
  5204. return 0;
  5205. }
  5206. WINAPI
  5207. OImmEnumRegisterWordW(HKL, REGISTERWORDENUMPROCW, LPCWSTR lpszReading, DWORD, LPCWSTR lpszRegister, LPVOID)
  5208. {
  5209. AssertFail("No Unicode Wrapper Available for Win32 API - ImmEnumRegisterWordW");
  5210. return 0;
  5211. }
  5212. WINAPI
  5213. OImmEscapeW(HKL, HIMC, UINT, LPVOID)
  5214. {
  5215. AssertFail("No Unicode Wrapper Available for Win32 API - ImmEscapeW");
  5216. return 0;
  5217. }
  5218. WINAPI
  5219. OImmGetCandidateListW(HIMC, DWORD deIndex, LPCANDIDATELIST, DWORD dwBufLen)
  5220. {
  5221. AssertFail("No Unicode Wrapper Available for Win32 API - ImmGetCandidateListW");
  5222. return 0;
  5223. }
  5224. WINAPI
  5225. OImmGetCandidateListCountW(HIMC, LPDWORD lpdwListCount)
  5226. {
  5227. AssertFail("No Unicode Wrapper Available for Win32 API - ImmGetCandidateListCountW");
  5228. return 0;
  5229. }
  5230. WINAPI
  5231. OImmGetCompositionFontW(HIMC, LPLOGFONTW)
  5232. {
  5233. AssertFail("No Unicode Wrapper Available for Win32 API - ImmGetCompositionFontW");
  5234. return 0;
  5235. }
  5236. WINAPI
  5237. OImmGetCompositionStringW(HIMC, DWORD, LPVOID, DWORD)
  5238. {
  5239. AssertFail("No Unicode Wrapper Available for Win32 API - ImmGetCompositionStringW");
  5240. return 0;
  5241. }
  5242. WINAPI
  5243. OImmGetConversionListW(HKL, HIMC, LPCWSTR, LPCANDIDATELIST, DWORD dwBufLen, UINT uFlag)
  5244. {
  5245. AssertFail("No Unicode Wrapper Available for Win32 API - ImmGetConversionListW");
  5246. return 0;
  5247. }
  5248. WINAPI
  5249. OImmGetDescriptionW(HKL, LPWSTR, UINT uBufLen)
  5250. {
  5251. AssertFail("No Unicode Wrapper Available for Win32 API - ImmGetDescriptionW");
  5252. return 0;
  5253. }
  5254. WINAPI
  5255. OImmGetGuideLineW(HIMC, DWORD dwIndex, LPWSTR, DWORD dwBufLen)
  5256. {
  5257. AssertFail("No Unicode Wrapper Available for Win32 API - ImmGetGuideLineW");
  5258. return 0;
  5259. }
  5260. WINAPI
  5261. OImmGetIMEFileNameW(HKL, LPWSTR, UINT uBufLen)
  5262. {
  5263. AssertFail("No Unicode Wrapper Available for Win32 API - ImmGetIMEFileNameW");
  5264. return 0;
  5265. }
  5266. WINAPI
  5267. OImmGetRegisterWordStyleW(HKL, UINT nItem, LPSTYLEBUFW)
  5268. {
  5269. AssertFail("No Unicode Wrapper Available for Win32 API - ImmGetRegisterWordStyleW");
  5270. return 0;
  5271. }
  5272. WINAPI
  5273. OImmInstallIMEW(LPCWSTR lpszIMEFileName, LPCWSTR lpszLayoutText)
  5274. {
  5275. AssertFail("No Unicode Wrapper Available for Win32 API - ImmInstallIMEW");
  5276. return 0;
  5277. }
  5278. WINAPI
  5279. OImmIsUIMessageW(HWND, UINT, WPARAM, LPARAM)
  5280. {
  5281. AssertFail("No Unicode Wrapper Available for Win32 API - ImmIsUIMessageW");
  5282. return 0;
  5283. }
  5284. WINAPI
  5285. OImmRegisterWordW(HKL, LPCWSTR lpszReading, DWORD, LPCWSTR lpszRegister)
  5286. {
  5287. AssertFail("No Unicode Wrapper Available for Win32 API - ImmRegisterWordW");
  5288. return 0;
  5289. }
  5290. WINAPI
  5291. OImmSetCompositionFontW(HIMC, LPLOGFONTW)
  5292. {
  5293. AssertFail("No Unicode Wrapper Available for Win32 API - ImmSetCompositionFontW");
  5294. return 0;
  5295. }
  5296. WINAPI
  5297. OImmSetCompositionStringW(HIMC, DWORD dwIndex, LPCVOID lpComp, DWORD, LPCVOID lpRead, DWORD)
  5298. {
  5299. AssertFail("No Unicode Wrapper Available for Win32 API - ImmSetCompositionStringW");
  5300. return 0;
  5301. }
  5302. WINAPI
  5303. OImmUnregisterWordW(HKL, LPCWSTR lpszReading, DWORD, LPCWSTR lpszUnregister)
  5304. {
  5305. AssertFail("No Unicode Wrapper Available for Win32 API - ImmUnregisterWordW");
  5306. return 0;
  5307. }
  5308. BOOL
  5309. APIENTRY
  5310. OInitiateSystemShutdownW(
  5311. LPWSTR lpMachineName,
  5312. LPWSTR lpMessage,
  5313. DWORD dwTimeout,
  5314. BOOL bForceAppsClosed,
  5315. BOOL bRebootAfterShutdown
  5316. )
  5317. {
  5318. AssertFail("No Unicode Wrapper Available for Win32 API - InitiateSystemShutdownW");
  5319. return 0;
  5320. }
  5321. BOOL
  5322. WINAPI
  5323. OInsertMenuItemW(
  5324. HMENU,
  5325. UINT,
  5326. BOOL,
  5327. LPCMENUITEMINFOW
  5328. )
  5329. {
  5330. AssertFail("No Unicode Wrapper Available for Win32 API - InsertMenuItemW");
  5331. return 0;
  5332. }
  5333. BOOL
  5334. WINAPI
  5335. OIsCharLowerW(
  5336. WCHAR ch)
  5337. {
  5338. AssertFail("No Unicode Wrapper Available for Win32 API - IsCharLowerW");
  5339. return 0;
  5340. }
  5341. BOOL
  5342. WINAPI
  5343. OIsCharUpperW(
  5344. WCHAR ch)
  5345. {
  5346. AssertFail("No Unicode Wrapper Available for Win32 API - IsCharUpperW");
  5347. return 0;
  5348. }
  5349. MMRESULT
  5350. WINAPI
  5351. OjoyGetDevCapsW(UINT uJoyID, LPJOYCAPSW pjc, UINT cbjc)
  5352. {
  5353. AssertFail("No Unicode Wrapper Available for Win32 API - joyGetDevCapsW");
  5354. return 0;
  5355. }
  5356. HCURSOR
  5357. WINAPI
  5358. OLoadCursorFromFileW(
  5359. LPCWSTR lpFileName)
  5360. {
  5361. AssertFail("No Unicode Wrapper Available for Win32 API - LoadCursorFromFileW");
  5362. return 0;
  5363. }
  5364. HKL
  5365. WINAPI
  5366. OLoadKeyboardLayoutW(
  5367. LPCWSTR pwszKLID,
  5368. UINT Flags)
  5369. {
  5370. AssertFail("No Unicode Wrapper Available for Win32 API - LoadKeyboardLayoutW");
  5371. return 0;
  5372. }
  5373. BOOL
  5374. WINAPI
  5375. OLogonUserW (
  5376. LPWSTR lpszUsername,
  5377. LPWSTR lpszDomain,
  5378. LPWSTR lpszPassword,
  5379. DWORD dwLogonType,
  5380. DWORD dwLogonProvider,
  5381. PHANDLE phToken
  5382. )
  5383. {
  5384. AssertFail("No Unicode Wrapper Available for Win32 API - LogonUserW");
  5385. return 0;
  5386. }
  5387. INT
  5388. APIENTRY
  5389. OLZOpenFileW(
  5390. LPWSTR,
  5391. LPOFSTRUCT,
  5392. WORD
  5393. )
  5394. {
  5395. AssertFail("No Unicode Wrapper Available for Win32 API - LZOpenFileW");
  5396. return 0;
  5397. }
  5398. UINT
  5399. WINAPI
  5400. OMapVirtualKeyExW(
  5401. UINT uCode,
  5402. UINT uMapType,
  5403. HKL dwhkl)
  5404. {
  5405. AssertFail("No Unicode Wrapper Available for Win32 API - MapVirtualKeyExW");
  5406. return 0;
  5407. }
  5408. HRESULT
  5409. WINAPI
  5410. OMIMEAssociationDialogW(HWND hwndParent,
  5411. DWORD dwInFlags,
  5412. PCWSTR pcszFile,
  5413. PCWSTR pcszMIMEContentType,
  5414. PWSTR pszAppBuf,
  5415. UINT ucAppBufLen)
  5416. {
  5417. AssertFail("No Unicode Wrapper Available for Win32 API - MIMEAssociationDialogW");
  5418. return 0;
  5419. }
  5420. DWORD
  5421. APIENTRY
  5422. OMultinetGetConnectionPerformanceW(
  5423. LPNETRESOURCEW lpNetResource,
  5424. LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
  5425. )
  5426. {
  5427. AssertFail("No Unicode Wrapper Available for Win32 API - MultinetGetConnectionPerformanceW");
  5428. return 0;
  5429. }
  5430. BOOL
  5431. WINAPI
  5432. OObjectCloseAuditAlarmW (
  5433. LPCWSTR SubsystemName,
  5434. LPVOID HandleId,
  5435. BOOL GenerateOnClose
  5436. )
  5437. {
  5438. AssertFail("No Unicode Wrapper Available for Win32 API - ObjectCloseAuditAlarmW");
  5439. return 0;
  5440. }
  5441. BOOL
  5442. WINAPI
  5443. OObjectOpenAuditAlarmW (
  5444. LPCWSTR SubsystemName,
  5445. LPVOID HandleId,
  5446. LPWSTR ObjectTypeName,
  5447. LPWSTR ObjectName,
  5448. PSECURITY_DESCRIPTOR pSecurityDescriptor,
  5449. HANDLE ClientToken,
  5450. DWORD DesiredAccess,
  5451. DWORD GrantedAccess,
  5452. PPRIVILEGE_SET Privileges,
  5453. BOOL ObjectCreation,
  5454. BOOL AccessGranted,
  5455. LPBOOL GenerateOnClose
  5456. )
  5457. {
  5458. AssertFail("No Unicode Wrapper Available for Win32 API - ObjectOpenAuditAlarmW");
  5459. return 0;
  5460. }
  5461. BOOL
  5462. WINAPI
  5463. OObjectPrivilegeAuditAlarmW (
  5464. LPCWSTR SubsystemName,
  5465. LPVOID HandleId,
  5466. HANDLE ClientToken,
  5467. DWORD DesiredAccess,
  5468. PPRIVILEGE_SET Privileges,
  5469. BOOL AccessGranted
  5470. )
  5471. {
  5472. AssertFail("No Unicode Wrapper Available for Win32 API - ObjectPrivilegeAuditAlarmW");
  5473. return 0;
  5474. }
  5475. BOOL
  5476. WINAPI
  5477. OOemToCharBuffW(
  5478. LPCSTR lpszSrc,
  5479. LPWSTR lpszDst,
  5480. DWORD cchDstLength)
  5481. {
  5482. AssertFail("No Unicode Wrapper Available for Win32 API - OemToCharBuffW");
  5483. return 0;
  5484. }
  5485. HANDLE
  5486. WINAPI
  5487. OOpenBackupEventLogW (
  5488. LPCWSTR lpUNCServerName,
  5489. LPCWSTR lpFileName
  5490. )
  5491. {
  5492. AssertFail("No Unicode Wrapper Available for Win32 API - OpenBackupEventLogW");
  5493. return 0;
  5494. }
  5495. HDESK
  5496. WINAPI
  5497. OOpenDesktopW(
  5498. LPWSTR lpszDesktop,
  5499. DWORD dwFlags,
  5500. BOOL fInherit,
  5501. DWORD dwDesiredAccess)
  5502. {
  5503. AssertFail("No Unicode Wrapper Available for Win32 API - OpenDesktopW");
  5504. return 0;
  5505. }
  5506. HANDLE
  5507. WINAPI
  5508. OOpenEventW(
  5509. DWORD dwDesiredAccess,
  5510. BOOL bInheritHandle,
  5511. LPCWSTR lpName
  5512. )
  5513. {
  5514. AssertFail("No Unicode Wrapper Available for Win32 API - OpenEventW");
  5515. return 0;
  5516. }
  5517. HANDLE
  5518. WINAPI
  5519. OOpenEventLogW (
  5520. LPCWSTR lpUNCServerName,
  5521. LPCWSTR lpSourceName
  5522. )
  5523. {
  5524. AssertFail("No Unicode Wrapper Available for Win32 API - OpenEventLogW");
  5525. return 0;
  5526. }
  5527. HANDLE
  5528. WINAPI
  5529. OOpenFileMappingW(
  5530. DWORD dwDesiredAccess,
  5531. BOOL bInheritHandle,
  5532. LPCWSTR lpName
  5533. )
  5534. {
  5535. AssertFail("No Unicode Wrapper Available for Win32 API - OpenFileMappingW");
  5536. return 0;
  5537. }
  5538. HANDLE
  5539. WINAPI
  5540. OOpenMutexW(
  5541. DWORD dwDesiredAccess,
  5542. BOOL bInheritHandle,
  5543. LPCWSTR lpName
  5544. )
  5545. {
  5546. AssertFail("No Unicode Wrapper Available for Win32 API - OpenMutexW");
  5547. return 0;
  5548. }
  5549. BOOL
  5550. WINAPI
  5551. OOpenPrinterW(
  5552. LPWSTR pPrinterName,
  5553. LPHANDLE phPrinter,
  5554. LPPRINTER_DEFAULTSW pDefault
  5555. )
  5556. {
  5557. AssertFail("No Unicode Wrapper Available for Win32 API - OpenPrinterW");
  5558. return 0;
  5559. }
  5560. #if 0 //$UNDONE_POST_98 - We should wrap these as being NT only...
  5561. SC_HANDLE
  5562. WINAPI
  5563. OOpenSCManagerW(
  5564. LPCWSTR lpMachineName,
  5565. LPCWSTR lpDatabaseName,
  5566. DWORD dwDesiredAccess
  5567. )
  5568. {
  5569. AssertFail("No Unicode Wrapper Available for Win32 API - OpenSCManagerW");
  5570. return 0;
  5571. }
  5572. #endif
  5573. HANDLE
  5574. WINAPI
  5575. OOpenSemaphoreW(
  5576. DWORD dwDesiredAccess,
  5577. BOOL bInheritHandle,
  5578. LPCWSTR lpName
  5579. )
  5580. {
  5581. AssertFail("No Unicode Wrapper Available for Win32 API - OpenSemaphoreW");
  5582. return 0;
  5583. }
  5584. #if 0 //$UNDONE_POST_98 - We should wrap these as being NT only...
  5585. SC_HANDLE
  5586. WINAPI
  5587. OOpenServiceW(
  5588. SC_HANDLE hSCManager,
  5589. LPCWSTR lpServiceName,
  5590. DWORD dwDesiredAccess
  5591. )
  5592. {
  5593. AssertFail("No Unicode Wrapper Available for Win32 API - OpenServiceW");
  5594. return 0;
  5595. }
  5596. #endif
  5597. HWINSTA
  5598. WINAPI
  5599. OOpenWindowStationW(
  5600. LPWSTR lpszWinSta,
  5601. BOOL fInherit,
  5602. DWORD dwDesiredAccess)
  5603. {
  5604. AssertFail("No Unicode Wrapper Available for Win32 API - OpenWindowStationW");
  5605. return 0;
  5606. }
  5607. APIENTRY OPageSetupDlgW( LPPAGESETUPDLGW )
  5608. {
  5609. AssertFail("No Unicode Wrapper Available for Win32 API - PageSetupDlgW");
  5610. return 0;
  5611. }
  5612. BOOL
  5613. WINAPI
  5614. OPeekConsoleInputW(
  5615. HANDLE hConsoleInput,
  5616. PINPUT_RECORD lpBuffer,
  5617. DWORD nLength,
  5618. LPDWORD lpNumberOfEventsRead
  5619. )
  5620. {
  5621. AssertFail("No Unicode Wrapper Available for Win32 API - PeekConsoleInputW");
  5622. return 0;
  5623. }
  5624. BOOL
  5625. WINAPI
  5626. OPolyTextOutW(HDC, CONST POLYTEXTW *, int)
  5627. {
  5628. AssertFail("No Unicode Wrapper Available for Win32 API - PolyTextOutW");
  5629. return 0;
  5630. }
  5631. APIENTRY
  5632. OPrintDlgW(LPPRINTDLGW lppd)
  5633. {
  5634. AssertFail("No Unicode Wrapper Available for Win32 API - PrintDlgW");
  5635. return 0;
  5636. }
  5637. DWORD
  5638. WINAPI
  5639. OPrinterMessageBoxW(
  5640. HANDLE hPrinter,
  5641. DWORD Error,
  5642. HWND hWnd,
  5643. LPWSTR pText,
  5644. LPWSTR pCaption,
  5645. DWORD dwType
  5646. )
  5647. {
  5648. AssertFail("No Unicode Wrapper Available for Win32 API - PrinterMessageBoxW");
  5649. return 0;
  5650. }
  5651. BOOL
  5652. WINAPI
  5653. OPrivilegedServiceAuditAlarmW (
  5654. LPCWSTR SubsystemName,
  5655. LPCWSTR ServiceName,
  5656. HANDLE ClientToken,
  5657. PPRIVILEGE_SET Privileges,
  5658. BOOL AccessGranted
  5659. )
  5660. {
  5661. AssertFail("No Unicode Wrapper Available for Win32 API - PrivilegedServiceAuditAlarmW");
  5662. return 0;
  5663. }
  5664. int
  5665. WINAPI
  5666. OPropertySheetW(
  5667. LPCPROPSHEETHEADERW lpcpsh
  5668. )
  5669. {
  5670. AssertFail("No Unicode Wrapper Available for Win32 API - PropertySheetW");
  5671. return 0;
  5672. }
  5673. DWORD
  5674. WINAPI
  5675. OQueryDosDeviceW(
  5676. LPCWSTR lpDeviceName,
  5677. LPWSTR lpTargetPath,
  5678. DWORD ucchMax
  5679. )
  5680. {
  5681. AssertFail("No Unicode Wrapper Available for Win32 API - QueryDosDeviceW");
  5682. return 0;
  5683. }
  5684. #if 0 //$UNDONE_POST_98 - We should wrap these as being NT only...
  5685. BOOL
  5686. WINAPI
  5687. OQueryServiceConfigW(
  5688. SC_HANDLE hService,
  5689. LPQUERY_SERVICE_CONFIGW lpServiceConfig,
  5690. DWORD cbBufSize,
  5691. LPDWORD pcbBytesNeeded
  5692. )
  5693. {
  5694. AssertFail("No Unicode Wrapper Available for Win32 API - QueryServiceConfigW");
  5695. return 0;
  5696. }
  5697. BOOL
  5698. WINAPI
  5699. OQueryServiceLockStatusW(
  5700. SC_HANDLE hSCManager,
  5701. LPQUERY_SERVICE_LOCK_STATUSW lpLockStatus,
  5702. DWORD cbBufSize,
  5703. LPDWORD pcbBytesNeeded
  5704. )
  5705. {
  5706. AssertFail("No Unicode Wrapper Available for Win32 API - QueryServiceLockStatusW");
  5707. return 0;
  5708. }
  5709. #endif
  5710. BOOL
  5711. WINAPI
  5712. OReadConsoleW(
  5713. HANDLE hConsoleInput,
  5714. LPVOID lpBuffer,
  5715. DWORD nNumberOfCharsToRead,
  5716. LPDWORD lpNumberOfCharsRead,
  5717. LPVOID lpReserved
  5718. )
  5719. {
  5720. AssertFail("No Unicode Wrapper Available for Win32 API - ReadConsoleW");
  5721. return 0;
  5722. }
  5723. BOOL
  5724. WINAPI
  5725. OReadConsoleInputW(
  5726. HANDLE hConsoleInput,
  5727. PINPUT_RECORD lpBuffer,
  5728. DWORD nLength,
  5729. LPDWORD lpNumberOfEventsRead
  5730. )
  5731. {
  5732. AssertFail("No Unicode Wrapper Available for Win32 API - ReadConsoleInputW");
  5733. return 0;
  5734. }
  5735. BOOL
  5736. WINAPI
  5737. OReadConsoleOutputW(
  5738. HANDLE hConsoleOutput,
  5739. PCHAR_INFO lpBuffer,
  5740. COORD dwBufferSize,
  5741. COORD dwBufferCoord,
  5742. PSMALL_RECT lpReadRegion
  5743. )
  5744. {
  5745. AssertFail("No Unicode Wrapper Available for Win32 API - ReadConsoleOutputW");
  5746. return 0;
  5747. }
  5748. BOOL
  5749. WINAPI
  5750. OReadConsoleOutputCharacterW(
  5751. HANDLE hConsoleOutput,
  5752. LPWSTR lpCharacter,
  5753. DWORD nLength,
  5754. COORD dwReadCoord,
  5755. LPDWORD lpNumberOfCharsRead
  5756. )
  5757. {
  5758. AssertFail("No Unicode Wrapper Available for Win32 API - ReadConsoleOutputCharacterW");
  5759. return 0;
  5760. }
  5761. BOOL
  5762. WINAPI
  5763. OReadEventLogW (
  5764. HANDLE hEventLog,
  5765. DWORD dwReadFlags,
  5766. DWORD dwRecordOffset,
  5767. LPVOID lpBuffer,
  5768. DWORD nNumberOfBytesToRead,
  5769. DWORD *pnBytesRead,
  5770. DWORD *pnMinNumberOfBytesNeeded
  5771. )
  5772. {
  5773. AssertFail("No Unicode Wrapper Available for Win32 API - ReadEventLogW");
  5774. return 0;
  5775. }
  5776. LONG
  5777. APIENTRY
  5778. ORegConnectRegistryW (
  5779. LPWSTR lpMachineName,
  5780. HKEY hKey,
  5781. PHKEY phkResult
  5782. )
  5783. {
  5784. AssertFail("No Unicode Wrapper Available for Win32 API - RegConnectRegistryW");
  5785. return 0;
  5786. }
  5787. HANDLE
  5788. WINAPI
  5789. ORegisterEventSourceW (
  5790. LPCWSTR lpUNCServerName,
  5791. LPCWSTR lpSourceName
  5792. )
  5793. {
  5794. AssertFail("No Unicode Wrapper Available for Win32 API - RegisterEventSourceW");
  5795. return 0;
  5796. }
  5797. #if 0 //$UNDONE_POST_98 - We should wrap these as being NT only...
  5798. SERVICE_STATUS_HANDLE
  5799. WINAPI
  5800. ORegisterServiceCtrlHandlerW(
  5801. LPCWSTR lpServiceName,
  5802. LPHANDLER_FUNCTION lpHandlerProc
  5803. )
  5804. {
  5805. AssertFail("No Unicode Wrapper Available for Win32 API - RegisterServiceCtrlHandlerW");
  5806. return 0;
  5807. }
  5808. #endif
  5809. LONG
  5810. APIENTRY
  5811. ORegLoadKeyW (
  5812. HKEY hKey,
  5813. LPCWSTR lpSubKey,
  5814. LPCWSTR lpFile
  5815. )
  5816. {
  5817. AssertFail("No Unicode Wrapper Available for Win32 API - RegLoadKeyW");
  5818. return 0;
  5819. }
  5820. LONG
  5821. APIENTRY
  5822. ORegQueryMultipleValuesW (
  5823. HKEY hKey,
  5824. PVALENTW val_list,
  5825. DWORD num_vals,
  5826. LPWSTR lpValueBuf,
  5827. LPDWORD ldwTotsize
  5828. )
  5829. {
  5830. AssertFail("No Unicode Wrapper Available for Win32 API - RegQueryMultipleValuesW");
  5831. return 0;
  5832. }
  5833. LONG
  5834. APIENTRY
  5835. ORegReplaceKeyW (
  5836. HKEY hKey,
  5837. LPCWSTR lpSubKey,
  5838. LPCWSTR lpNewFile,
  5839. LPCWSTR lpOldFile
  5840. )
  5841. {
  5842. AssertFail("No Unicode Wrapper Available for Win32 API - RegReplaceKeyW");
  5843. return 0;
  5844. }
  5845. LONG
  5846. APIENTRY
  5847. ORegRestoreKeyW (
  5848. HKEY hKey,
  5849. LPCWSTR lpFile,
  5850. DWORD dwFlags
  5851. )
  5852. {
  5853. AssertFail("No Unicode Wrapper Available for Win32 API - RegRestoreKeyW");
  5854. return 0;
  5855. }
  5856. LONG
  5857. APIENTRY
  5858. ORegSaveKeyW (
  5859. HKEY hKey,
  5860. LPCWSTR lpFile,
  5861. LPSECURITY_ATTRIBUTES lpSecurityAttributes
  5862. )
  5863. {
  5864. AssertFail("No Unicode Wrapper Available for Win32 API - RegSaveKeyW");
  5865. return 0;
  5866. }
  5867. LONG
  5868. APIENTRY
  5869. ORegUnLoadKeyW (
  5870. HKEY hKey,
  5871. LPCWSTR lpSubKey
  5872. )
  5873. {
  5874. AssertFail("No Unicode Wrapper Available for Win32 API - RegUnLoadKeyW");
  5875. return 0;
  5876. }
  5877. BOOL
  5878. WINAPI
  5879. ORemoveDirectoryW(
  5880. LPCWSTR lpPathName
  5881. )
  5882. {
  5883. AssertFail("No Unicode Wrapper Available for Win32 API - RemoveDirectoryW");
  5884. return 0;
  5885. }
  5886. BOOL
  5887. WINAPI
  5888. ORemoveFontResourceW(LPCWSTR)
  5889. {
  5890. AssertFail("No Unicode Wrapper Available for Win32 API - RemoveFontResourceW");
  5891. return 0;
  5892. }
  5893. APIENTRY
  5894. OReplaceTextW(LPFINDREPLACEW)
  5895. {
  5896. AssertFail("No Unicode Wrapper Available for Win32 API - ReplaceTextW");
  5897. return 0;
  5898. }
  5899. BOOL
  5900. WINAPI
  5901. OReportEventW (
  5902. HANDLE hEventLog,
  5903. WORD wType,
  5904. WORD wCategory,
  5905. DWORD dwEventID,
  5906. PSID lpUserSid,
  5907. WORD wNumStrings,
  5908. DWORD dwDataSize,
  5909. LPCWSTR *lpStrings,
  5910. LPVOID lpRawData
  5911. )
  5912. {
  5913. AssertFail("No Unicode Wrapper Available for Win32 API - ReportEventW");
  5914. return 0;
  5915. }
  5916. HDC
  5917. WINAPI
  5918. OResetDCW(
  5919. HDC hdc,
  5920. CONST DEVMODEW *lpInitData)
  5921. {
  5922. AssertFail("No Unicode Wrapper Available for Win32 API - ResetDCW");
  5923. return 0;
  5924. }
  5925. BOOL
  5926. WINAPI
  5927. OResetPrinterW(
  5928. HANDLE hPrinter,
  5929. LPPRINTER_DEFAULTSW pDefault
  5930. )
  5931. {
  5932. AssertFail("No Unicode Wrapper Available for Win32 API - ResetPrinterW");
  5933. return 0;
  5934. }
  5935. RPC_STATUS RPC_ENTRY
  5936. ORpcBindingFromStringBindingW (
  5937. IN unsigned short __RPC_FAR * StringBinding,
  5938. OUT RPC_BINDING_HANDLE __RPC_FAR * Binding
  5939. )
  5940. {
  5941. AssertFail("No Unicode Wrapper Available for Win32 API - RpcBindingFromStringBindingW");
  5942. return 0;
  5943. }
  5944. RPC_STATUS RPC_ENTRY
  5945. ORpcBindingInqAuthClientW (
  5946. IN RPC_BINDING_HANDLE ClientBinding, OPTIONAL
  5947. OUT RPC_AUTHZ_HANDLE __RPC_FAR * Privs,
  5948. OUT unsigned short __RPC_FAR * __RPC_FAR * ServerPrincName, OPTIONAL
  5949. OUT unsigned long __RPC_FAR * AuthnLevel, OPTIONAL
  5950. OUT unsigned long __RPC_FAR * AuthnSvc, OPTIONAL
  5951. OUT unsigned long __RPC_FAR * AuthzSvc OPTIONAL
  5952. )
  5953. {
  5954. AssertFail("No Unicode Wrapper Available for Win32 API - RpcBindingInqAuthClientW");
  5955. return 0;
  5956. }
  5957. RPC_STATUS RPC_ENTRY
  5958. ORpcBindingToStringBindingW (
  5959. IN RPC_BINDING_HANDLE Binding,
  5960. OUT unsigned short __RPC_FAR * __RPC_FAR * StringBinding
  5961. )
  5962. {
  5963. AssertFail("No Unicode Wrapper Available for Win32 API - RpcBindingToStringBindingW");
  5964. return 0;
  5965. }
  5966. RPC_STATUS RPC_ENTRY
  5967. ORpcEpRegisterNoReplaceW (
  5968. IN RPC_IF_HANDLE IfSpec,
  5969. IN RPC_BINDING_VECTOR * BindingVector,
  5970. IN UUID_VECTOR * UuidVector OPTIONAL,
  5971. IN unsigned short * Annotation
  5972. )
  5973. {
  5974. AssertFail("No Unicode Wrapper Available for Win32 API - RpcEpRegisterNoReplaceW");
  5975. return 0;
  5976. }
  5977. RPC_STATUS RPC_ENTRY
  5978. ORpcMgmtEpEltInqNextW (
  5979. IN RPC_EP_INQ_HANDLE InquiryContext,
  5980. OUT RPC_IF_ID __RPC_FAR * IfId,
  5981. OUT RPC_BINDING_HANDLE __RPC_FAR * Binding OPTIONAL,
  5982. OUT UUID __RPC_FAR * ObjectUuid OPTIONAL,
  5983. OUT unsigned short __RPC_FAR * __RPC_FAR * Annotation OPTIONAL
  5984. )
  5985. {
  5986. AssertFail("No Unicode Wrapper Available for Win32 API - RpcMgmtEpEltInqNextW");
  5987. return 0;
  5988. }
  5989. RPC_STATUS RPC_ENTRY
  5990. ORpcMgmtInqServerPrincNameW (
  5991. IN RPC_BINDING_HANDLE Binding,
  5992. IN unsigned long AuthnSvc,
  5993. OUT unsigned short __RPC_FAR * __RPC_FAR * ServerPrincName
  5994. )
  5995. {
  5996. AssertFail("No Unicode Wrapper Available for Win32 API - RpcMgmtInqServerPrincNameW");
  5997. return 0;
  5998. }
  5999. RPC_STATUS RPC_ENTRY
  6000. ORpcNetworkInqProtseqsW (
  6001. OUT RPC_PROTSEQ_VECTORW __RPC_FAR * __RPC_FAR * ProtseqVector
  6002. )
  6003. {
  6004. AssertFail("No Unicode Wrapper Available for Win32 API - RpcNetworkInqProtseqsW");
  6005. return 0;
  6006. }
  6007. RPC_STATUS RPC_ENTRY
  6008. ORpcNetworkIsProtseqValidW (
  6009. IN unsigned short __RPC_FAR * Protseq
  6010. )
  6011. {
  6012. AssertFail("No Unicode Wrapper Available for Win32 API - RpcNetworkIsProtseqValidW");
  6013. return 0;
  6014. }
  6015. RPC_STATUS RPC_ENTRY
  6016. ORpcNsBindingInqEntryNameW (
  6017. IN RPC_BINDING_HANDLE Binding,
  6018. IN unsigned long EntryNameSyntax,
  6019. OUT unsigned short __RPC_FAR * __RPC_FAR * EntryName
  6020. )
  6021. {
  6022. AssertFail("No Unicode Wrapper Available for Win32 API - RpcNsBindingInqEntryNameW");
  6023. return 0;
  6024. }
  6025. RPC_STATUS RPC_ENTRY
  6026. ORpcProtseqVectorFreeW (
  6027. IN OUT RPC_PROTSEQ_VECTORW __RPC_FAR * __RPC_FAR * ProtseqVector
  6028. )
  6029. {
  6030. AssertFail("No Unicode Wrapper Available for Win32 API - RpcProtseqVectorFreeW");
  6031. return 0;
  6032. }
  6033. RPC_STATUS RPC_ENTRY
  6034. ORpcServerInqDefaultPrincNameW (
  6035. IN unsigned long AuthnSvc,
  6036. OUT unsigned short __RPC_FAR * __RPC_FAR * PrincName
  6037. )
  6038. {
  6039. AssertFail("No Unicode Wrapper Available for Win32 API - RpcServerInqDefaultPrincNameW");
  6040. return 0;
  6041. }
  6042. RPC_STATUS RPC_ENTRY
  6043. ORpcServerUseProtseqW (
  6044. IN unsigned short __RPC_FAR * Protseq,
  6045. IN unsigned int MaxCalls,
  6046. IN void __RPC_FAR * SecurityDescriptor OPTIONAL
  6047. )
  6048. {
  6049. AssertFail("No Unicode Wrapper Available for Win32 API - RpcServerUseProtseqW");
  6050. return 0;
  6051. }
  6052. RPC_STATUS RPC_ENTRY
  6053. ORpcServerUseProtseqEpW (
  6054. IN unsigned short __RPC_FAR * Protseq,
  6055. IN unsigned int MaxCalls,
  6056. IN unsigned short __RPC_FAR * Endpoint,
  6057. IN void __RPC_FAR * SecurityDescriptor OPTIONAL
  6058. )
  6059. {
  6060. AssertFail("No Unicode Wrapper Available for Win32 API - RpcServerUseProtseqEpW");
  6061. return 0;
  6062. }
  6063. RPC_STATUS RPC_ENTRY
  6064. ORpcServerUseProtseqIfW (
  6065. IN unsigned short __RPC_FAR * Protseq,
  6066. IN unsigned int MaxCalls,
  6067. IN RPC_IF_HANDLE IfSpec,
  6068. IN void __RPC_FAR * SecurityDescriptor OPTIONAL
  6069. )
  6070. {
  6071. AssertFail("No Unicode Wrapper Available for Win32 API - RpcServerUseProtseqIfW");
  6072. return 0;
  6073. }
  6074. RPC_STATUS RPC_ENTRY
  6075. ORpcStringBindingComposeW (
  6076. IN unsigned short __RPC_FAR * ObjUuid OPTIONAL,
  6077. IN unsigned short __RPC_FAR * Protseq OPTIONAL,
  6078. IN unsigned short __RPC_FAR * NetworkAddr OPTIONAL,
  6079. IN unsigned short __RPC_FAR * Endpoint OPTIONAL,
  6080. IN unsigned short __RPC_FAR * Options OPTIONAL,
  6081. OUT unsigned short __RPC_FAR * __RPC_FAR * StringBinding OPTIONAL
  6082. )
  6083. {
  6084. AssertFail("No Unicode Wrapper Available for Win32 API - RpcStringBindingComposeW");
  6085. return 0;
  6086. }
  6087. RPC_STATUS RPC_ENTRY
  6088. ORpcStringBindingParseW (
  6089. IN unsigned short __RPC_FAR * StringBinding,
  6090. OUT unsigned short __RPC_FAR * __RPC_FAR * ObjUuid OPTIONAL,
  6091. OUT unsigned short __RPC_FAR * __RPC_FAR * Protseq OPTIONAL,
  6092. OUT unsigned short __RPC_FAR * __RPC_FAR * NetworkAddr OPTIONAL,
  6093. OUT unsigned short __RPC_FAR * __RPC_FAR * Endpoint OPTIONAL,
  6094. OUT unsigned short __RPC_FAR * __RPC_FAR * NetworkOptions OPTIONAL
  6095. )
  6096. {
  6097. AssertFail("No Unicode Wrapper Available for Win32 API - RpcStringBindingParseW");
  6098. return 0;
  6099. }
  6100. RPC_STATUS RPC_ENTRY
  6101. ORpcStringFreeW (
  6102. IN OUT unsigned short __RPC_FAR * __RPC_FAR * String
  6103. )
  6104. {
  6105. AssertFail("No Unicode Wrapper Available for Win32 API - RpcStringFreeW");
  6106. return 0;
  6107. }
  6108. BOOL
  6109. WINAPI
  6110. OScrollConsoleScreenBufferW(
  6111. HANDLE hConsoleOutput,
  6112. CONST SMALL_RECT *lpScrollRectangle,
  6113. CONST SMALL_RECT *lpClipRectangle,
  6114. COORD dwDestinationOrigin,
  6115. CONST CHAR_INFO *lpFill
  6116. )
  6117. {
  6118. AssertFail("No Unicode Wrapper Available for Win32 API - ScrollConsoleScreenBufferW");
  6119. return 0;
  6120. }
  6121. DWORD
  6122. WINAPI
  6123. OSearchPathW(
  6124. LPCWSTR lpPath,
  6125. LPCWSTR lpFileName,
  6126. LPCWSTR lpExtension,
  6127. DWORD nBufferLength,
  6128. LPWSTR lpBuffer,
  6129. LPWSTR *lpFilePart
  6130. )
  6131. {
  6132. AssertFail("No Unicode Wrapper Available for Win32 API - SearchPathW");
  6133. return 0;
  6134. }
  6135. BOOL
  6136. WINAPI
  6137. OSendMessageCallbackW(
  6138. HWND hWnd,
  6139. UINT Msg,
  6140. WPARAM wParam,
  6141. LPARAM lParam,
  6142. SENDASYNCPROC lpResultCallBack,
  6143. DWORD dwData)
  6144. {
  6145. AssertFail("No Unicode Wrapper Available for Win32 API - SendMessageCallbackW");
  6146. return 0;
  6147. }
  6148. LRESULT
  6149. WINAPI
  6150. OSendMessageTimeoutW(
  6151. HWND hWnd,
  6152. UINT Msg,
  6153. WPARAM wParam,
  6154. LPARAM lParam,
  6155. UINT fuFlags,
  6156. UINT uTimeout,
  6157. LPDWORD lpdwResult)
  6158. {
  6159. AssertFail("No Unicode Wrapper Available for Win32 API - SendMessageTimeoutW");
  6160. return 0;
  6161. }
  6162. BOOL
  6163. WINAPI
  6164. OSetComputerNameW (
  6165. LPCWSTR lpComputerName
  6166. )
  6167. {
  6168. AssertFail("No Unicode Wrapper Available for Win32 API - SetComputerNameW");
  6169. return 0;
  6170. }
  6171. BOOL
  6172. WINAPI
  6173. OSetConsoleTitleW(
  6174. LPCWSTR lpConsoleTitle
  6175. )
  6176. {
  6177. AssertFail("No Unicode Wrapper Available for Win32 API - SetConsoleTitleW");
  6178. return 0;
  6179. }
  6180. BOOL
  6181. WINAPI
  6182. OSetCurrentDirectoryW(
  6183. LPCWSTR lpPathName
  6184. )
  6185. {
  6186. AssertFail("No Unicode Wrapper Available for Win32 API - SetCurrentDirectoryW");
  6187. return 0;
  6188. }
  6189. BOOL
  6190. WINAPI
  6191. OSetDefaultCommConfigW(
  6192. LPCWSTR lpszName,
  6193. LPCOMMCONFIG lpCC,
  6194. DWORD dwSize
  6195. )
  6196. {
  6197. AssertFail("No Unicode Wrapper Available for Win32 API - SetDefaultCommConfigW");
  6198. return 0;
  6199. }
  6200. BOOL
  6201. WINAPI
  6202. OSetEnvironmentVariableW(
  6203. LPCWSTR lpName,
  6204. LPCWSTR lpValue
  6205. )
  6206. {
  6207. AssertFail("No Unicode Wrapper Available for Win32 API - SetEnvironmentVariableW");
  6208. return 0;
  6209. }
  6210. BOOL
  6211. WINAPI
  6212. OSetFileSecurityW (
  6213. LPCWSTR lpFileName,
  6214. SECURITY_INFORMATION SecurityInformation,
  6215. PSECURITY_DESCRIPTOR pSecurityDescriptor
  6216. )
  6217. {
  6218. AssertFail("No Unicode Wrapper Available for Win32 API - SetFileSecurityW");
  6219. return 0;
  6220. }
  6221. BOOL
  6222. WINAPI
  6223. OSetFormW(
  6224. HANDLE hPrinter,
  6225. LPWSTR pFormName,
  6226. DWORD Level,
  6227. LPBYTE pForm
  6228. )
  6229. {
  6230. AssertFail("No Unicode Wrapper Available for Win32 API - SetFormW");
  6231. return 0;
  6232. }
  6233. WINAPI
  6234. OSetICMProfileW(HDC,LPWSTR)
  6235. {
  6236. AssertFail("No Unicode Wrapper Available for Win32 API - SetICMProfileW");
  6237. return 0;
  6238. }
  6239. BOOL
  6240. WINAPI
  6241. OSetJobW(
  6242. HANDLE hPrinter,
  6243. DWORD JobId,
  6244. DWORD Level,
  6245. LPBYTE pJob,
  6246. DWORD Command
  6247. )
  6248. {
  6249. AssertFail("No Unicode Wrapper Available for Win32 API - SetJobW");
  6250. return 0;
  6251. }
  6252. BOOL
  6253. WINAPI
  6254. OSetPrinterW(
  6255. HANDLE hPrinter,
  6256. DWORD Level,
  6257. LPBYTE pPrinter,
  6258. DWORD Command
  6259. )
  6260. {
  6261. AssertFail("No Unicode Wrapper Available for Win32 API - SetPrinterW");
  6262. return 0;
  6263. }
  6264. DWORD
  6265. WINAPI
  6266. OSetPrinterDataW(
  6267. HANDLE hPrinter,
  6268. LPWSTR pValueName,
  6269. DWORD Type,
  6270. LPBYTE pData,
  6271. DWORD cbData
  6272. )
  6273. {
  6274. AssertFail("No Unicode Wrapper Available for Win32 API - SetPrinterDataW");
  6275. return 0;
  6276. }
  6277. BOOL
  6278. WINAPI
  6279. OSetUserObjectInformationW(
  6280. HANDLE hObj,
  6281. int nIndex,
  6282. PVOID pvInfo,
  6283. DWORD nLength)
  6284. {
  6285. AssertFail("No Unicode Wrapper Available for Win32 API - SetUserObjectInformationW");
  6286. return 0;
  6287. }
  6288. BOOL
  6289. WINAPI
  6290. OSetVolumeLabelW(
  6291. LPCWSTR lpRootPathName,
  6292. LPCWSTR lpVolumeName
  6293. )
  6294. {
  6295. AssertFail("No Unicode Wrapper Available for Win32 API - SetVolumeLabelW");
  6296. return 0;
  6297. }
  6298. HHOOK
  6299. WINAPI
  6300. OSetWindowsHookW(
  6301. int nFilterType,
  6302. HOOKPROC pfnFilterProc)
  6303. {
  6304. AssertFail("No Unicode Wrapper Available for Win32 API - SetWindowsHookW");
  6305. return 0;
  6306. }
  6307. LPITEMIDLIST
  6308. WINAPI
  6309. OSHBrowseForFolderW(
  6310. LPBROWSEINFO lpbi)
  6311. {
  6312. AssertFail("No Unicode Wrapper Available for Win32 API - SHBrowseForFolderW");
  6313. return 0;
  6314. }
  6315. BOOL
  6316. WINAPI
  6317. OShell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData)
  6318. {
  6319. AssertFail("No Unicode Wrapper Available for Win32 API - Shell_NotifyIconW");
  6320. return 0;
  6321. }
  6322. INT
  6323. APIENTRY
  6324. OShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
  6325. {
  6326. AssertFail("No Unicode Wrapper Available for Win32 API - ShellAboutW");
  6327. return 0;
  6328. }
  6329. HINSTANCE
  6330. APIENTRY
  6331. OShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
  6332. {
  6333. AssertFail("No Unicode Wrapper Available for Win32 API - ShellExecuteW");
  6334. return 0;
  6335. }
  6336. BOOL
  6337. WINAPI
  6338. OShellExecuteExW(
  6339. LPSHELLEXECUTEINFOW lpExecInfo)
  6340. {
  6341. AssertFail("No Unicode Wrapper Available for Win32 API - ShellExecuteExW");
  6342. return 0;
  6343. }
  6344. int
  6345. WINAPI
  6346. OSHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
  6347. {
  6348. AssertFail("No Unicode Wrapper Available for Win32 API - SHFileOperationW");
  6349. return 0;
  6350. }
  6351. DWORD
  6352. WINAPI
  6353. OSHGetFileInfoW(LPCWSTR pszPath, DWORD dwFileAttributes, SHFILEINFOW FAR *psfi, UINT cbFileInfo, UINT uFlags)
  6354. {
  6355. AssertFail("No Unicode Wrapper Available for Win32 API - SHGetFileInfoW");
  6356. return 0;
  6357. }
  6358. BOOL
  6359. WINAPI
  6360. OSHGetNewLinkInfoW(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName,
  6361. BOOL FAR * pfMustCopy, UINT uFlags)
  6362. {
  6363. AssertFail("No Unicode Wrapper Available for Win32 API - SHGetNewLinkInfoW");
  6364. return 0;
  6365. }
  6366. BOOL
  6367. WINAPI
  6368. OSHGetPathFromIDListW(
  6369. LPCITEMIDLIST pidl,
  6370. LPTSTR pszPath)
  6371. {
  6372. AssertFail("No Unicode Wrapper Available for Win32 API - SHGetPathFromIDListW");
  6373. return 0;
  6374. }
  6375. BOOL
  6376. WINAPI
  6377. OsndPlaySoundW(LPCWSTR pszSound, UINT fuSound)
  6378. {
  6379. AssertFail("No Unicode Wrapper Available for Win32 API - sndPlaySoundW");
  6380. return 0;
  6381. }
  6382. DWORD
  6383. WINAPI
  6384. OStartDocPrinterW(
  6385. HANDLE hPrinter,
  6386. DWORD Level,
  6387. LPBYTE pDocInfo
  6388. )
  6389. {
  6390. AssertFail("No Unicode Wrapper Available for Win32 API - StartDocPrinterW");
  6391. return 0;
  6392. }
  6393. #if 0 //$UNDONE_POST_98 - We should wrap these as being NT only...
  6394. BOOL
  6395. WINAPI
  6396. OStartServiceW(
  6397. SC_HANDLE hService,
  6398. DWORD dwNumServiceArgs,
  6399. LPCWSTR *lpServiceArgVectors
  6400. )
  6401. {
  6402. AssertFail("No Unicode Wrapper Available for Win32 API - StartServiceW");
  6403. return 0;
  6404. }
  6405. BOOL
  6406. WINAPI
  6407. OStartServiceCtrlDispatcherW(
  6408. LPSERVICE_TABLE_ENTRYW lpServiceStartTable
  6409. )
  6410. {
  6411. AssertFail("No Unicode Wrapper Available for Win32 API - StartServiceCtrlDispatcherW");
  6412. return 0;
  6413. }
  6414. #endif
  6415. // Commented since gdi32.dll on Win95 provides the wrapper for this function.
  6416. /*
  6417. BOOL
  6418. WINAPI
  6419. OTextOutW(HDC, int, int, LPCWSTR, int)
  6420. {
  6421. AssertFail("No Unicode Wrapper Available for Win32 API - TextOutW");
  6422. return 0;
  6423. }
  6424. */
  6425. HRESULT
  6426. WINAPI
  6427. OTranslateURLW(PCWSTR pcszURL,
  6428. DWORD dwInFlags,
  6429. PWSTR *ppszTranslatedURL)
  6430. {
  6431. AssertFail("No Unicode Wrapper Available for Win32 API - TranslateURLW");
  6432. return 0;
  6433. }
  6434. WINAPI
  6435. OUpdateICMRegKeyW(DWORD, DWORD, LPWSTR, UINT)
  6436. {
  6437. AssertFail("No Unicode Wrapper Available for Win32 API - UpdateICMRegKeyW");
  6438. return 0;
  6439. }
  6440. HRESULT
  6441. WINAPI
  6442. OURLAssociationDialogW(HWND hwndParent,
  6443. DWORD dwInFlags,
  6444. PCWSTR pcszFile,
  6445. PCWSTR pcszURL,
  6446. PWSTR pszAppBuf,
  6447. UINT ucAppBufLen)
  6448. {
  6449. AssertFail("No Unicode Wrapper Available for Win32 API - URLAssociationDialogW");
  6450. return 0;
  6451. }
  6452. /* client/server */
  6453. RPC_STATUS RPC_ENTRY
  6454. OUuidFromStringW (
  6455. IN unsigned short __RPC_FAR * StringUuid,
  6456. OUT UUID __RPC_FAR * Uuid
  6457. )
  6458. {
  6459. AssertFail("No Unicode Wrapper Available for Win32 API - UuidFromStringW");
  6460. return 0;
  6461. }
  6462. DWORD
  6463. APIENTRY
  6464. OVerFindFileW(
  6465. DWORD uFlags,
  6466. LPWSTR szFileName,
  6467. LPWSTR szWinDir,
  6468. LPWSTR szAppDir,
  6469. LPWSTR szCurDir,
  6470. PUINT lpuCurDirLen,
  6471. LPWSTR szDestDir,
  6472. PUINT lpuDestDirLen
  6473. )
  6474. {
  6475. AssertFail("No Unicode Wrapper Available for Win32 API - VerFindFileW");
  6476. return 0;
  6477. }
  6478. DWORD
  6479. APIENTRY
  6480. OVerInstallFileW(
  6481. DWORD uFlags,
  6482. LPWSTR szSrcFileName,
  6483. LPWSTR szDestFileName,
  6484. LPWSTR szSrcDir,
  6485. LPWSTR szDestDir,
  6486. LPWSTR szCurDir,
  6487. LPWSTR szTmpFile,
  6488. PUINT lpuTmpFileLen
  6489. )
  6490. {
  6491. AssertFail("No Unicode Wrapper Available for Win32 API - VerInstallFileW");
  6492. return 0;
  6493. }
  6494. DWORD
  6495. APIENTRY
  6496. OVerLanguageNameW(
  6497. DWORD wLang,
  6498. LPWSTR szLang,
  6499. DWORD nSize
  6500. )
  6501. {
  6502. AssertFail("No Unicode Wrapper Available for Win32 API - VerLanguageNameW");
  6503. return 0;
  6504. }
  6505. BOOL
  6506. WINAPI
  6507. OVerQueryValueW(
  6508. const LPVOID pBlock,
  6509. LPWSTR lpSubBlock,
  6510. LPVOID *lplpBuffer,
  6511. PUINT puLerr)
  6512. {
  6513. AssertFail("No Unicode Wrapper Available for Win32 API - VerQueryValueW");
  6514. return 0;
  6515. }
  6516. WINAPI
  6517. OVkKeyScanExW(
  6518. WCHAR ch,
  6519. HKL dwhkl)
  6520. {
  6521. AssertFail("No Unicode Wrapper Available for Win32 API - VkKeyScanExW");
  6522. return 0;
  6523. }
  6524. BOOL
  6525. WINAPI
  6526. OWaitNamedPipeW(
  6527. LPCWSTR lpNamedPipeName,
  6528. DWORD nTimeOut
  6529. )
  6530. {
  6531. AssertFail("No Unicode Wrapper Available for Win32 API - WaitNamedPipeW");
  6532. return 0;
  6533. }
  6534. MMRESULT
  6535. WINAPI
  6536. OwaveInGetDevCapsW(UINT uDeviceID, LPWAVEINCAPSW pwic, UINT cbwic)
  6537. {
  6538. AssertFail("No Unicode Wrapper Available for Win32 API - waveInGetDevCapsW");
  6539. return 0;
  6540. }
  6541. MMRESULT
  6542. WINAPI
  6543. OwaveInGetErrorTextW(MMRESULT mmrError, LPWSTR pszText, UINT cchText)
  6544. {
  6545. AssertFail("No Unicode Wrapper Available for Win32 API - waveInGetErrorTextW");
  6546. return 0;
  6547. }
  6548. MMRESULT
  6549. WINAPI
  6550. OwaveOutGetDevCapsW(UINT uDeviceID, LPWAVEOUTCAPSW pwoc, UINT cbwoc)
  6551. {
  6552. AssertFail("No Unicode Wrapper Available for Win32 API - waveOutGetDevCapsW");
  6553. return 0;
  6554. }
  6555. MMRESULT
  6556. WINAPI
  6557. OwaveOutGetErrorTextW(MMRESULT mmrError, LPWSTR pszText, UINT cchText)
  6558. {
  6559. AssertFail("No Unicode Wrapper Available for Win32 API - waveOutGetErrorTextW");
  6560. return 0;
  6561. }
  6562. BOOL
  6563. WINAPI
  6564. OwglUseFontBitmapsW(HDC, DWORD, DWORD, DWORD)
  6565. {
  6566. AssertFail("No Unicode Wrapper Available for Win32 API - wglUseFontBitmapsW");
  6567. return 0;
  6568. }
  6569. BOOL
  6570. WINAPI
  6571. OwglUseFontOutlinesW(HDC, DWORD, DWORD, DWORD, FLOAT,
  6572. FLOAT, int, LPGLYPHMETRICSFLOAT)
  6573. {
  6574. AssertFail("No Unicode Wrapper Available for Win32 API - wglUseFontOutlinesW");
  6575. return 0;
  6576. }
  6577. void
  6578. WINAPI
  6579. OWinExecErrorW(HWND hwnd, int error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle)
  6580. {
  6581. AssertFail("No Unicode Wrapper Available for Win32 API - WinExecErrorW");
  6582. return;
  6583. }
  6584. DWORD
  6585. APIENTRY
  6586. OWNetAddConnectionW(
  6587. LPCWSTR lpRemoteName,
  6588. LPCWSTR lpPassword,
  6589. LPCWSTR lpLocalName
  6590. )
  6591. {
  6592. AssertFail("No Unicode Wrapper Available for Win32 API - WNetAddConnectionW");
  6593. return 0;
  6594. }
  6595. DWORD
  6596. APIENTRY
  6597. OWNetAddConnection2W(
  6598. LPNETRESOURCEW lpNetResource,
  6599. LPCWSTR lpPassword,
  6600. LPCWSTR lpUserName,
  6601. DWORD dwFlags
  6602. )
  6603. {
  6604. AssertFail("No Unicode Wrapper Available for Win32 API - WNetAddConnection2W");
  6605. return 0;
  6606. }
  6607. DWORD
  6608. APIENTRY
  6609. OWNetAddConnection3W(
  6610. HWND hwndOwner,
  6611. LPNETRESOURCEW lpNetResource,
  6612. LPCWSTR lpPassword,
  6613. LPCWSTR lpUserName,
  6614. DWORD dwFlags
  6615. )
  6616. {
  6617. AssertFail("No Unicode Wrapper Available for Win32 API - WNetAddConnection3W");
  6618. return 0;
  6619. }
  6620. DWORD
  6621. APIENTRY
  6622. OWNetCancelConnectionW(
  6623. LPCWSTR lpName,
  6624. BOOL fForce
  6625. )
  6626. {
  6627. AssertFail("No Unicode Wrapper Available for Win32 API - WNetCancelConnectionW");
  6628. return 0;
  6629. }
  6630. DWORD
  6631. APIENTRY
  6632. OWNetCancelConnection2W(
  6633. LPCWSTR lpName,
  6634. DWORD dwFlags,
  6635. BOOL fForce
  6636. )
  6637. {
  6638. AssertFail("No Unicode Wrapper Available for Win32 API - WNetCancelConnection2W");
  6639. return 0;
  6640. }
  6641. DWORD
  6642. APIENTRY
  6643. OWNetConnectionDialog1W(
  6644. LPCONNECTDLGSTRUCTW lpConnDlgStruct
  6645. )
  6646. {
  6647. AssertFail("No Unicode Wrapper Available for Win32 API - WNetConnectionDialog1W");
  6648. return 0;
  6649. }
  6650. DWORD
  6651. APIENTRY
  6652. OWNetDisconnectDialog1W(
  6653. LPDISCDLGSTRUCTW lpConnDlgStruct
  6654. )
  6655. {
  6656. AssertFail("No Unicode Wrapper Available for Win32 API - WNetDisconnectDialog1W");
  6657. return 0;
  6658. }
  6659. DWORD
  6660. APIENTRY
  6661. OWNetEnumResourceW(
  6662. HANDLE hEnum,
  6663. LPDWORD lpcCount,
  6664. LPVOID lpBuffer,
  6665. LPDWORD lpBufferSize
  6666. )
  6667. {
  6668. AssertFail("No Unicode Wrapper Available for Win32 API - WNetEnumResourceW");
  6669. return 0;
  6670. }
  6671. DWORD
  6672. APIENTRY
  6673. OWNetGetConnectionW(
  6674. LPCWSTR lpLocalName,
  6675. LPWSTR lpRemoteName,
  6676. LPDWORD lpnLength
  6677. )
  6678. {
  6679. AssertFail("No Unicode Wrapper Available for Win32 API - WNetGetConnectionW");
  6680. return 0;
  6681. }
  6682. DWORD
  6683. APIENTRY
  6684. OWNetGetLastErrorW(
  6685. LPDWORD lpError,
  6686. LPWSTR lpErrorBuf,
  6687. DWORD nErrorBufSize,
  6688. LPWSTR lpNameBuf,
  6689. DWORD nNameBufSize
  6690. )
  6691. {
  6692. AssertFail("No Unicode Wrapper Available for Win32 API - WNetGetLastErrorW");
  6693. return 0;
  6694. }
  6695. DWORD
  6696. APIENTRY
  6697. OWNetGetNetworkInformationW(
  6698. LPCWSTR lpProvider,
  6699. LPNETINFOSTRUCT lpNetInfoStruct
  6700. )
  6701. {
  6702. AssertFail("No Unicode Wrapper Available for Win32 API - WNetGetNetworkInformationW");
  6703. return 0;
  6704. }
  6705. DWORD
  6706. APIENTRY
  6707. OWNetGetProviderNameW(
  6708. DWORD dwNetType,
  6709. LPWSTR lpProviderName,
  6710. LPDWORD lpBufferSize
  6711. )
  6712. {
  6713. AssertFail("No Unicode Wrapper Available for Win32 API - WNetGetProviderNameW");
  6714. return 0;
  6715. }
  6716. DWORD
  6717. APIENTRY
  6718. OWNetGetUniversalNameW(
  6719. LPCWSTR lpLocalPath,
  6720. DWORD dwInfoLevel,
  6721. LPVOID lpBuffer,
  6722. LPDWORD lpBufferSize
  6723. )
  6724. {
  6725. AssertFail("No Unicode Wrapper Available for Win32 API - WNetGetUniversalNameW");
  6726. return 0;
  6727. }
  6728. DWORD
  6729. APIENTRY
  6730. OWNetGetUserW(
  6731. LPCWSTR lpName,
  6732. LPWSTR lpUserName,
  6733. LPDWORD lpnLength
  6734. )
  6735. {
  6736. AssertFail("No Unicode Wrapper Available for Win32 API - WNetGetUserW");
  6737. return 0;
  6738. }
  6739. DWORD
  6740. APIENTRY
  6741. OWNetOpenEnumW(
  6742. DWORD dwScope,
  6743. DWORD dwType,
  6744. DWORD dwUsage,
  6745. LPNETRESOURCEW lpNetResource,
  6746. LPHANDLE lphEnum
  6747. )
  6748. {
  6749. AssertFail("No Unicode Wrapper Available for Win32 API - WNetOpenEnumW");
  6750. return 0;
  6751. }
  6752. DWORD
  6753. APIENTRY
  6754. OWNetSetConnectionW(
  6755. LPCWSTR lpName,
  6756. DWORD dwProperties,
  6757. LPVOID pvValues
  6758. )
  6759. {
  6760. AssertFail("No Unicode Wrapper Available for Win32 API - WNetSetConnectionW");
  6761. return 0;
  6762. }
  6763. DWORD
  6764. APIENTRY
  6765. OWNetUseConnectionW(
  6766. HWND hwndOwner,
  6767. LPNETRESOURCEW lpNetResource,
  6768. LPCWSTR lpUserID,
  6769. LPCWSTR lpPassword,
  6770. DWORD dwFlags,
  6771. LPWSTR lpAccessName,
  6772. LPDWORD lpBufferSize,
  6773. LPDWORD lpResult
  6774. )
  6775. {
  6776. AssertFail("No Unicode Wrapper Available for Win32 API - WNetUseConnectionW");
  6777. return 0;
  6778. }
  6779. BOOL
  6780. WINAPI
  6781. OWriteConsoleW(
  6782. HANDLE hConsoleOutput,
  6783. CONST VOID *lpBuffer,
  6784. DWORD nNumberOfCharsToWrite,
  6785. LPDWORD lpNumberOfCharsWritten,
  6786. LPVOID lpReserved
  6787. )
  6788. {
  6789. AssertFail("No Unicode Wrapper Available for Win32 API - WriteConsoleW");
  6790. return 0;
  6791. }
  6792. BOOL
  6793. WINAPI
  6794. OWriteConsoleInputW(
  6795. HANDLE hConsoleInput,
  6796. CONST INPUT_RECORD *lpBuffer,
  6797. DWORD nLength,
  6798. LPDWORD lpNumberOfEventsWritten
  6799. )
  6800. {
  6801. AssertFail("No Unicode Wrapper Available for Win32 API - WriteConsoleInputW");
  6802. return 0;
  6803. }
  6804. BOOL
  6805. WINAPI
  6806. OWriteConsoleOutputW(
  6807. HANDLE hConsoleOutput,
  6808. CONST CHAR_INFO *lpBuffer,
  6809. COORD dwBufferSize,
  6810. COORD dwBufferCoord,
  6811. PSMALL_RECT lpWriteRegion
  6812. )
  6813. {
  6814. AssertFail("No Unicode Wrapper Available for Win32 API - WriteConsoleOutputW");
  6815. return 0;
  6816. }
  6817. BOOL
  6818. WINAPI
  6819. OWriteConsoleOutputCharacterW(
  6820. HANDLE hConsoleOutput,
  6821. LPCWSTR lpCharacter,
  6822. DWORD nLength,
  6823. COORD dwWriteCoord,
  6824. LPDWORD lpNumberOfCharsWritten
  6825. )
  6826. {
  6827. AssertFail("No Unicode Wrapper Available for Win32 API - WriteConsoleOutputCharacterW");
  6828. return 0;
  6829. }
  6830. BOOL
  6831. WINAPI
  6832. OWritePrivateProfileSectionW(
  6833. LPCWSTR lpAppName,
  6834. LPCWSTR lpString,
  6835. LPCWSTR lpFileName
  6836. )
  6837. {
  6838. AssertFail("No Unicode Wrapper Available for Win32 API - WritePrivateProfileSectionW");
  6839. return 0;
  6840. }
  6841. BOOL
  6842. WINAPI
  6843. OWritePrivateProfileStructW(
  6844. LPCWSTR lpszSection,
  6845. LPCWSTR lpszKey,
  6846. LPVOID lpStruct,
  6847. UINT uSizeStruct,
  6848. LPCWSTR szFile
  6849. )
  6850. {
  6851. AssertFail("No Unicode Wrapper Available for Win32 API - WritePrivateProfileStructW");
  6852. return 0;
  6853. }
  6854. BOOL
  6855. WINAPI
  6856. OWriteProfileSectionW(
  6857. LPCWSTR lpAppName,
  6858. LPCWSTR lpString
  6859. )
  6860. {
  6861. AssertFail("No Unicode Wrapper Available for Win32 API - WriteProfileSectionW");
  6862. return 0;
  6863. }
  6864. BOOL
  6865. WINAPI
  6866. OWriteProfileStringW(
  6867. LPCWSTR lpAppName,
  6868. LPCWSTR lpKeyName,
  6869. LPCWSTR lpString
  6870. )
  6871. {
  6872. AssertFail("No Unicode Wrapper Available for Win32 API - WriteProfileStringW");
  6873. return 0;
  6874. }
  6875. int
  6876. WINAPI
  6877. OwvsprintfW(
  6878. LPWSTR,
  6879. LPCWSTR,
  6880. va_list arglist)
  6881. {
  6882. AssertFail("No Unicode Wrapper Available for Win32 API - wvsprintfW");
  6883. return 0;
  6884. }
  6885. DWORD
  6886. WINAPI
  6887. ODdeQueryStringW(
  6888. DWORD idInst,
  6889. HSZ hsz,
  6890. LPWSTR psz,
  6891. DWORD cchMax,
  6892. int iCodePage)
  6893. {
  6894. AssertFail("No Unicode Wrapper Available for Win32 API - DdeQueryStringW");
  6895. return 0;
  6896. }
  6897. int WINAPI
  6898. OGetClipboardFormatNameW(
  6899. UINT format,
  6900. LPWSTR pwsz,
  6901. int cchMaxCount)
  6902. {
  6903. AssertFail("No Unicode Wrapper Available for Win32 API - GetClipboardFormatNameW");
  6904. return 0;
  6905. }
  6906. int
  6907. WINAPI
  6908. OGetKeyNameTextW(
  6909. LONG lParam,
  6910. LPWSTR lpString,
  6911. int nSize)
  6912. {
  6913. AssertFail("No Unicode Wrapper Available for Win32 API - GetKeyNameTextW");
  6914. return 0;
  6915. }
  6916. int
  6917. WINAPI
  6918. OGetMenuStringW(
  6919. HMENU hMenu,
  6920. UINT uIDItem,
  6921. LPWSTR lpString,
  6922. int nMaxCount,
  6923. UINT uFlag)
  6924. {
  6925. AssertFail("No Unicode Wrapper Available for Win32 API - GetMenuStringW");
  6926. return 0;
  6927. }
  6928. int
  6929. WINAPI
  6930. OGetTextFaceW(
  6931. HDC hdc,
  6932. int cch,
  6933. LPWSTR lpFaceName)
  6934. {
  6935. AssertFail("No Unicode Wrapper Available for Win32 API - GetMenuStringW");
  6936. return 0;
  6937. }
  6938. #endif //ifdef DEBUG
  6939. } // extern "C"