On 11/23/05, Saulius Krasuckas saulius2@ar.fi.lt wrote:
I don't know why but I just feel the need to call SetLastError() before every modified check. :-/
It's good to do so you know exactly when the last error was changed and to what value.
- SetLastError(0); ret = pGetStandardColorSpaceProfileA( NULL, 0, newprofile, NULL );
You need to SetLastError to a bogus value like 0xdeadbeef. I haven't looked at the docs yet, but it may be possible that 0 is a valid return value of GetStandardColorSpaceProfile, and if it's not, we still need to set the return value to something that we know will never be set by either wine or windows.
-- James Hawkins
* On Thu, 24 Nov 2005, James Hawkins wrote:
- On 11/23/05, Saulius Krasuckas saulius2@ar.fi.lt wrote:
- SetLastError(0); ret = pGetStandardColorSpaceProfileA( NULL, 0, newprofile, NULL );
You need to SetLastError to a bogus value like 0xdeadbeef. I haven't looked at the docs yet, but it may be possible that 0 is a valid return value of GetStandardColorSpaceProfile, and if it's not, we still need to set the return value to something that we know will never be set by either wine or windows.
I've seen this advice a lot of times, but still I think setting it to my favorite one 0xfaceabad or decimal 133734404 (for 'leet error') would be nice only when we expect test-function to fail (when it returns non 0). This isn't expected in the checks I've modified, so lets wait and see if it will change.
BTW, this is the case for a two failures on 9x systems, and there I will definitely use some of 31eet3 5tuff. :-P
OTOH, those tests aren't aranged in a way letting us to understand, which params are checked first. So I must think on how to reorder them to make Wine work just like windows. (if noone else will work this out sooner) :-]
* On Fri, 25 Nov 2005, Saulius Krasuckas wrote:
- On Thu, 24 Nov 2005, James Hawkins wrote:
You need to SetLastError to a bogus value like 0xdeadbeef.
I've seen this advice a lot of times, but still I think setting it to my favorite one 0xfaceabad or decimal 133734404 (for 'leet error') would be nice only when we expect test-function to fail (when it returns non 0).
Oh dear. Should be like this: "only when we expect test-funtion to succeed"
This isn't expected in the checks I've modified, so lets wait and see if it will change.