Austin English wrote: - FIXME("(%p,%08u,%u,%p): stub\n",This,dwFlags,dwEffectsCount,pdwResultCodes); + FIXME("(%p,%08u,%u,%p): stub, faking success!\n",This,dwFlags,dwEffectsCount,pdwResultCodes);
This is superfluous :-) "stub" is generally synonym with faking success.
One lesson about apps - I tend to forget it myself - is that often enough they don't check every result and choose an alternative control path when some call fails, so better return success even thought it's a lie. Several bugs were fixed by returning the success value that apps would get on native, instead of returning the value that would be consistent with the specification and implementation state in Wine, e.g. NOTSUPPORTED, ERR_NOTIMPLEMENTED etc. I don't like that, but it helps.
Often enough, the stub must fill part of the output parameters to prevent a crash later on. This remembers me to look at bug #17893 (needs amstream stub) again.
Regards, Jörg Höhle
On Wednesday, May 11, 2011 6:40:42 AM Joerg-Cyril.Hoehle@t-systems.com wrote:
Several bugs were fixed by returning the success value that apps would get on native, instead of returning the value that would be consistent with the specification and implementation state in Wine, e.g. NOTSUPPORTED, ERR_NOTIMPLEMENTED etc.
That's not fixing bugs, that's hiding them. :) The bug is that the function is not implemented/supported, not that the function is being truthful with its return value, and simply changing the return value doesn't fix that. Hence the bug is not fixed.
It actually kind of bothers me to see patches to "fix bugs" that only change the return value of a stub from error to success... returning success when the function doesn't work is itself a bug, and not any better than a hack, IMO. It can lead apps down a path that assume the function did what it was supposed to, when it really didn't, and trigger problems in unrelated code making it harder to track down the actual problem.
Especially as Wine tends to implement stuff on an as-needed basis, this leaves many stubs empty. If returning a failure code causes a problem, that's a sign that the stub should be properly filled out enough to satisfy it.