> Well, an object can have multiple interfaces and still be the same object. > So basically if at each new 'QueryInterface' call you allocation a new > I<Interface>Impl structure it's wrong regarding COM too... > > For example, you could create a surface1, query interface it to be a > surface2. Then if you changed stuff using the 'surface1' methods (like, for > example, attaching a palette to it), you should be able to query the same > palette back using the 'surface2' methods ... Which would not be the case > using your solution as both interfaces have separate contexts. Right, didn't know this QueryInterface thing. Of course if an application QueryInterface()s a IDirectDrawSurface for IDirectDrawSurface2, I replace the VTable and return the same pointer. This scews up the IDirectDrawSurface of course...
Well, I'll use the original way. I guess I should have studied the COM basics before :)
pgpHnSYuaT18R.pgp
Description: PGP signature