D3D8_GetCreationParameters fix

Andrei Barbu teval at myrealbox.com
Fri Jul 9 16:08:05 CDT 2004


Don't be sorry,
We're both trying to help the wine project.

Wine itself never calls IDirect3DDevice8Impl_GetCreationParameters. I
greped through the sources for that. So it can't be a straightforward 
call from inside wine that would be passing that bad pointer.

And MSDN says: 

"
Return Value

        If the method succeeds, the return value is D3D_OK. 
        
        D3DERR_INVALIDCALL is returned if the argument is invalid.
"

Clearly here the argument is invalid so it should be returning
D3DERR_INVALIDCALL. I can't think of a better way that it would check
for the argument being invalid. Even if it does it a different way, this
is a reliable way of testing to see if we can write to a pointer, so if
it's valid.

I understand concerns that this might be hiding a different wine bug,
that's why I added the warning. Like that we can still see if it's
getting a bad pointer.

I think even if a wine bug might be generating that bad pointer, which I
don't think it is since Chessmaster works fine after that, this is how
DX works, so we should implement it. If it doesn't crash on windows, why
should it in wine?


Thanks,
Andrei

On Fri, 2004-07-09 at 13:54, Mike McCormack wrote:
> Andrei Barbu wrote:
> > Point is.. it works, it's compliant letter for letter with the MSDN
> > docs, and it doesn't break anything.
> > 
> > Don't see why it would need more testing.
> 
> It needs more testing because at least three other developers believe 
> that you're not fixing a bug, you're masking another bug.
> 
> You need to prove to us that the bad pointer is not being passed in 
> because of another wine bug, and that Windows really does check for bad 
> pointers using IsBadWritePtr.
> 
> Sorry, to be a pain, but Wine development is hard...
> 
> Mike
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20040709/47ae61ae/attachment.pgp


More information about the wine-devel mailing list