<div dir="ltr"><div class="gmail_quote">Hi. I'm trying to set up a minimal implementation that will allow to run Assasin's Creed III.<br><div dir="ltr"><div>It uses these 2 functions:</div><div><br></div><div>dxgi.dll.CreateDXGIFactory1<br>
</div><div>
<div>d3d11.dll.D3D11CreateDevice</div></div><div><br></div><div>See <a href="http://bugs.winehq.org/show_bug.cgi?id=24517" target="_blank">http://bugs.winehq.org/show_bug.cgi?id=24517</a></div><div><br></div><div>I need an advice on how to implement CreateDXGIFactory1 without duplicating a lot of code.</div>

<div><div>There are problems with a straight-forward implementation:</div></div><div><br></div><div>interface IWineDXGIFactory : IDXGIFactory<br></div><div><div>{</div><div>    struct wined3d *get_wined3d();</div><div>}</div>

</div><div><br></div><div><div>interface IWineDXGIFactory1 : IDXGIFactory1</div><div>{</div><div>    struct wined3d *get_wined3d();</div><div>}</div></div><div><br></div><div><div>The problem is how to reuse functions where IWineDXGIFactory is used. Obviously we can't pass IWineDXGIFactory1 object where IWineDXGIFactory is required. Because the next time we call get_wined3d, a crash will occur (a different function will be called).</div>

<div><br></div><div>Is there a more elegant solution than duplicating code and replacing all occurencdes of IWineDXGIFactory by IWineDXGIFactory1?</div><div><br></div><div>Btw, D3D11CreateDevice accepts both IDXGIFactory and IDXGIFactory1:</div>

<div><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ff476082(v=vs.85).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/windows/desktop/ff476082(v=vs.85).aspx</a><br></div><div><br></div><div>
</div></div></div>
</div><br></div>