On 03/13/2010 08:11 PM, Andrew Nguyen wrote:
On Sat, Mar 13, 2010 at 12:27 PM, Paul Vriens paul.vriens.wine@gmail.com wrote:
On 03/13/2010 05:19 PM, Andrew Nguyen wrote:
- /* Test the conditions in which the output buffer can be modified. */
- lstrcpyW(container, testW);
- hr = IDxDiagContainer_EnumChildContainerNames(pddc, 0, container, 0);
- ok(hr == E_INVALIDARG,
"Expected IDxDiagContainer::EnumChildContainerNames to return
E_INVALIDARG, got 0x%08x\n", hr);
- ok(!lstrcmpW(container, testW),
"Expected the container buffer to be untouched, got %s\n",
wine_dbgstr_w(container));
Hi Andrew,
This won't work on Win9x/WinMe as most of these W-functions are not available. lstrcpyW will fail and I don't know what that would mean for the Enum-call (with an unitialized 'container'). lstrcmpW will always return 0 on Win9x/WinMe and thus these tests will always succeed.
There is a generic winetest_strcmpW now btw (include/wine/test.h)
-- Cheers,
Paul.
Thanks for your input. Apart from changing the tests to use memcpy and related functions, is there any other way to get Unicode string functionality that is Win9x compatible? Patch 5 of the series uses wsprintfW from user32 to achieve sprintf functionality for Unicode strings, and I figure that probably wouldn't work on Win9x platforms either.
If there is no way around this you can always create the ANSI string and convert with MultiByteToWideChar().