#include#include using namespace Microsoft::WRL; // Create a COMPtr to hold the device context pointer ComPtr DeviceContext; // Get the device associated with the device context ComPtr Device; DeviceContext->GetDevice(&Device); // Obtain an ID3D11Device interface pointer from the ID3D11DeviceContext ComPtr D3DDevice; DeviceContext->QueryInterface(__uuidof(ID3D11Device), (void**)D3DDevice.GetAddressOf());
#includeThe Microsoft::WRL namespace indicates that the examples are using the Windows Runtime Library (WRL) for managing COM objects.#include using namespace Microsoft::WRL; // Create a COMPtr to hold the device pointer ComPtr Device; // Get the swap chain associated with the device ComPtr SwapChain; Device->QueryInterface(__uuidof(IDXGISwapChain), (void**)SwapChain.GetAddressOf());