"Ann and Jason Edmeades" us@the-edmeades.demon.co.uk writes:
Well I have an interface, it just doesnt extend IUnknown. Aside from that it is identical to any other com interface - I dont want to export all the functions provided. Is it 100% required to extend IUnknown (and would this mechanism not be equivalent to creating my own :-) )?
No, you really should extend IUnknown, it's going to be massively confusing otherwise.
I really dont want reference counting on the objects either as it needs to be forced that the reference counting is done on the IDirect3D* versions. I ran out of ideas, and just dropped IUnknown!
Please do proper reference counting, it doesn't cost anything, and someday we might need it. If you can't use standard ref counting it probably means you are doing something wrong.
I would be happy with IUnknown *, but cant see any way to use my own type other than a straight typedef to either void * or IUnknown. The problem is wined3d needs to deal with both d3d8 and d3d9 interfaces and cannot #include both d3d8 and d3d9 header files due to conflicts. We must store a pointer which can go from the IWineD3D<interface> object to the IDirect3D<interface>Object.
You don't have to include any of the headers, that's the whole point of interfaces. Just have wined3d export an IWineD3DUser interface and have both d3d8 and d3d9 implement it. wined3d doesn't have to know anything about the implementation, just like d3d8 and d3d9 don't have to know anything about the implementation of IWineD3D.