IDXGIResource interface (dxgi.h)

An IDXGIResource interface allows resource sharing and identifies the memory that a resource resides in.


The IDXGIResource interface inherits from IDXGIDeviceSubObject. IDXGIResource also has these types of members:


The IDXGIResource interface has these methods.


Get the eviction priority.

Gets the handle to a shared resource.

Get the expected resource usage.

Set the priority for evicting the resource from memory.


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);

Windows Phone 8: This API is supported.


Target Platform Windows
Header dxgi.h

See also

DXGI Interfaces