user32: Add a test for ToUnicode - Win9x behaviour

Paul Vriens at
Wed Jul 30 04:31:57 CDT 2008

Andre Wisplinghoff wrote:
> Hello,
> I think my patch [1] shouldn't be applied, because I didn't think about 
> older versions of Windows. According to MSDN, ToUnicode has NT 3.1 as a 
> minimum, meaning we should test if the function is unimplemented and 
> skip the test in this case (Win9x Systems). Unfortunately I don't have a 
> Win9x system ready for testing at the moment. Is adding the following 
> after the first call to ToUnicode enough to handle this issue?
> {
>     trace("Skipping the ToUnicode test on a Win9x platform\n");
>     return;
> }
> Best Regards
> -- Andre Wisplinghoff
> [1]
I ran your tests on win95 and win98 and both have at least the function 
available but as you've stated it's not implemented.

Current approach for dealing with this is for example:

ret = ToUnicode(...);
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
     skip("ToUnicode is not implemented\n");

or something along those lines. Notice the handy skip() function we have for 
skipping tests. This will make sure that skipped tests will be marked as such in 
the test reports.



More information about the wine-devel mailing list