An IDXGIResource interface allows resource sharing and identifies the memory that a resource resides in.
interface IDXGIResource : public IDXGIDeviceSubObject
To find out what type of memory a resource is currently located in, use IDXGIDevice::QueryResourceResidency. To share resources between processes, use ID3D10Device::OpenSharedResource. For information about how to share resources between multiple Windows graphics APIs, including Direct3D 11, Direct2D, Direct3D 10, and Direct3D 9Ex, see Surface Sharing Between Windows Graphics APIs.
You can retrieve the IDXGIResource interface from any video memory resource that you create from a Direct3D 10 and later function. Any Direct3D object that supports ID3D10Resource or ID3D11Resource also supports IDXGIResource. For example, the Direct3D 2D texture object that you create from ID3D11Device::CreateTexture2D supports IDXGIResource. You can call QueryInterface on the 2D texture object (ID3D11Texture2D) to retrieve the IDXGIResource interface. For example, to retrieve the IDXGIResource interface from the 2D texture object, use the following code.
IDXGIResource * pDXGIResource;
hr = g_pd3dTexture2D->QueryInterface(__uuidof(IDXGIResource), (void **)&pDXGIResource);
Header: Declared in d3d11_x.h (dxgi.h on other Windows platforms).
Library: Use d3d11_x.lib (dxgi.lib on other Windows platforms).