On Mon, Apr 4, 2016 at 1:40 AM, Stefan Dösinger stefandoesinger@gmail.com wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi,
A few questions / suggestions:
*) What happens if you register the same callback with different context pointers?
It'll call the callback with the respective context pointer passed to it. I'll add a test for the same.
*) The test already does some testing of the call order. I think you could extend it a bit if you store arrays of expected callback functions and context pointers in the structure and compare them when the callbacks are invoked.
In what way would you want me to test the callback order? I.e. how many callbacks and context pointers to be used and in which order should I add them?
*) Does DeleteDestroyCallback return an error when no matching callback is found?
Yes, there's a test added which checks for D3DRMERR_BADVALUE if the callback pointer passed is NULL. Any other random value (except for a valid matching callback pointer) e.g. 0xdeadbeef would return the same.
*) The last one is mostly curiosity / a bad feeling: Is there a difference between callbacks added with IDirect3DRMObject (and its derived interfaces) and IDirect3DRMObject2? I am asking because Object2 is a separate interface and might be implemented in a separate object and then aggregated. If Microsoft screwed up (they never do that, right? ;-) ) then it'll have its own list of added callbacks...
That's not tested yet, but it could be the case that Microsoft might be adding their own internal callbacks for handling of internal objects.
Cheers, Aaryaman