DirectX-Headers icon indicating copy to clipboard operation
DirectX-Headers copied to clipboard

Migration from Microsoft::WRL::ComPtr to winrt::com_ptr?

Open Zwaliebaba opened this issue 2 years ago • 2 comments

Are there any plans to migrate d3dx12_state_object.h from using Microsoft::WRL::ComPtr to winrt::com_ptr?

Zwaliebaba avatar Dec 28 '22 08:12 Zwaliebaba

Microsoft::WRL::ComPtr has the advantage of being present in all versions of the Windows SDK since version 8.0.

Currently the state object supports using either ATL's CComPtr or WRLs' ComPtr. I'm guessing you want a third option of using winrt::com_ptr?

walbourn avatar Jun 10 '23 19:06 walbourn

Yes, indeed. To prevent the inclusion of wrl/client.h. Without that I can put "using namespace winrt" early and prevent I have to add winrt:: before every other namespace. With the inclusion of wrl/client.h these namespaces conflict..

Zwaliebaba avatar Jun 10 '23 19:06 Zwaliebaba