2009/1/21 Henri Verbeet <hverb...@gmail.com>:
> 2009/1/21 Stefan Dösinger <ste...@codeweavers.com>:
>>> I don't see the point. IDirect3DDevice7 is the primary vtable and
>>> that's not going to change, ever. We also do things like this about
>>> everywhere else, and I don't think ddraw should be special in that
>>> regard.
>> I don't see any 'primary' vtable in any ddraw object, but that's just my 
>> personal view. I also dislike casting between the iface and the impl, which 
>> is possible only because vtable is the first member of the impl struct.
>>
> Primary in the sense that it is the table that actually implements
> most of the methods, including things like QueryInterface(), rather
> than forwarding them to somewhere else.

You're also relying on the IDirect3DDevice7 vtable field being the
first field on the impl struct, so you should add a big comment to the
impl struct warning that bad things will happen if the
IDirect3DDevice7 vtable field isn't the first one.

-- 
Rob Shearman


Reply via email to