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?
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { trace("Skipping the ToUnicode test on a Win9x platform\n"); return; }
Best Regards -- Andre Wisplinghoff
[1] http://www.winehq.org/pipermail/wine-patches/2008-July/058745.html
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?
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { trace("Skipping the ToUnicode test on a Win9x platform\n"); return; }
Best Regards -- Andre Wisplinghoff
[1] http://www.winehq.org/pipermail/wine-patches/2008-July/058745.html
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:
SetLastError(0xdeadbeef); ret = ToUnicode(...); if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { skip("ToUnicode is not implemented\n"); return; }
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.
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:
SetLastError(0xdeadbeef); ret = ToUnicode(...); if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { skip("ToUnicode is not implemented\n"); return; }
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.
Thanks for your help! I've resent my patch: http://www.winehq.org/pipermail/wine-patches/2008-July/058803.html
Best Regards -- Andre
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?
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { trace("Skipping the ToUnicode test on a Win9x platform\n"); return; }
Best Regards -- Andre Wisplinghoff
[1] http://www.winehq.org/pipermail/wine-patches/2008-July/058745.html
You should use dynamic linking here (GetProcAddress).
Nikolay Sivov wrote:
You should use dynamic linking here (GetProcAddress).
Is this necessary even though the function is there on 9x - returning unimplemented - as Paul wrote? I think you would need to do this if the function weren't there at all on some systems.
Best Regards -- Andre Wisplinghoff
Andre Wisplinghoff wrote:
Nikolay Sivov wrote:
You should use dynamic linking here (GetProcAddress).
Is this necessary even though the function is there on 9x - returning unimplemented - as Paul wrote? I think you would need to do this if the function weren't there at all on some systems.
Best Regards -- Andre Wisplinghoff
You're right of course. Sorry for that, I thought it isn't even stubbed on Win9x.