[WINED3D] QueryInterface corrections
hverbeet at gmail.com
Sat May 6 19:37:23 CDT 2006
On 25/04/06, Ivan Gyurdiev <ivg2 at cornell.edu> wrote:
> H. Verbeet wrote:
> > On 25/04/06, Ivan Gyurdiev <ivg2 at cornell.edu> wrote:
> >> (2) write a NULL argument on no match.
> >> This patch corrects those issues, and also changes GetContainer() for
> >> surfaces and volumes to use the return value as MSDN specifies
> >> (WINED3D_INVALIDCALL), not E_NOINTERFACE on failure.
> > Did you verify this on Windows? MSDN tends to lie about these kind of things.
> No, I'll admit I did not (because I don't have Windows).
> If somebody could check I'd appreciate it.
I was under the impression that patches are supposed to be verified to
be correct before being submitted. Seeing this got commited, (together
with some changes that weren't in the original diff?), perhaps I was
wrong. Either way, I should probably have been somewhat more explicit:
That part of the patch is simply wrong.
- At least for d3d9, GetContainer returns E_NOINTERFACE on Windows. I
verified that when I rewrote part of the function some time ago, and I
just did again. I originally intended to add a test for that, but
well, guess I forgot about it.
- Even if GetContainer should return D3DERR_INVALIDCALL (not
WINED3D_INVALIDCALL!), this wouldn't be the right place to change it,
since d3d8/9 doesn't just forward to this function, but uses it
internally to get the wined3d container parent. It then gets the
d3d8/9 object from that. The return value for d3d8/9 is the result of
a QueryInterface on that object.
More information about the wine-devel