-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi,
Some curiosities:
Am 2016-04-03 um 20:04 schrieb Aaryaman Vasishta:
What does clsid != NULL, refiid == NULL, output object != NULL do?
I guess that clsid is the object you create, and iid is the interface to that object that is returned. So I guess in theory you can pass clsid = IDirect3DRMTexture3, iid = IDirect3DRMTexture and you'd get the same result as creating a d3drmtexture3 object and then calling QI(IDirect3DRMTexture). It might be worth adding explicit tests for this in future patches.
(And if you use aggregation you'll want to pass iid == IUnknown, otherwise there's no way you get the inner IUnknown and will never be able to release the object)
So what will increment the refcount? InitFrom*?
Since you're testing the refcounts of 1,2 and 1,3 you might as well test the refcounts of all interfaces in all 3 versions.
Cheers, Stefan
On Mon, Apr 4, 2016 at 1:26 AM, Stefan Dösinger stefandoesinger@gmail.com wrote:
So there's only one way to get a version 2/3 object i.e. from a version 1 CLSID.
Right, InitFrom* increments the refcount. One more thing I've noticed (and you can see that in my LoadTexture patch I sent a while ago) is that the refcount is incremented even if the function fails.
Cheers,
Stefan
Right, I'll add the new tests and submit a new patch.
Cheers, Aaryaman