On 14 February 2017 at 18:54, Jacek Caban jacek@codeweavers.com wrote:
You could just call QI on dxgi_target unconditionally here. It will handle failure for you as well. Also by having this logic in one place, if there are any more interfaces that you'd like to expose from dxgi_target in the future, only dxgi_target QI change would be needed.
But it would also automatically expose interfaces you potentially don't want to expose.
The more usual way to do this would have been to aggregate the ID2D1GdiInteropRenderTarget interface directly instead of the entire dxgi_target, but there are trade-offs there as well.