Get a pointer to the object’s data.
public:
HRESULT GetPrivateData(
REFGUID Name,
UINT *pDataSize,
void *pData
)
Name
Type: REFGUID
[in] A GUID identifying the data.
pDataSize
Type: UINT *
[in, out] The size of the data.
pData
Type: void *
[out] Pointer to the data.
Type: HRESULT
Returns one of the following DXGI_ERROR.
If the data returned is a pointer to an IUnknown, or one of its derivative classes, previously set by IDXGIObject::SetPrivateDataInterface, you must call ::Release() on the pointer before the pointer is freed to decrement the reference count.
You can pass GUID_DeviceType in the Name parameter of GetPrivateData to retrieve the device type from the display adapter object (IDXGIAdapter, IDXGIAdapter1, IDXGIAdapter2).
On Windows 7 or earlier, this type is either a value from D3D10_DRIVER_TYPE or D3D_DRIVER_TYPE depending on which kind of device was created. On Windows 8, this type is always a value from D3D_DRIVER_TYPE. Don’t use IDXGIObject::SetPrivateData with GUID_DeviceType because the behavior when doing so is undefined.
Header: Declared in d3d11_x.h (dxgi.h on other Windows platforms).
Library: Use d3d11_x.lib (dxgi.lib on other Windows platforms).