IDXGIObject::GetPrivateData method (dxgi.h)
Get a pointer to the object's data.
Syntax
HRESULT GetPrivateData(
[in] REFGUID Name,
[in, out] UINT *pDataSize,
[out] void *pData
);
Parameters
[in] Name
Type: REFGUID
A GUID identifying the data.
[in, out] pDataSize
Type: UINT*
The size of the data.
[out] pData
Type: void*
Pointer to the data.
Return value
Type: HRESULT
Returns one of the following DXGI_ERROR.
Remarks
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).
To get the type of device on which the display adapter was created
- Call IUnknown::QueryInterface on the ID3D11Device or ID3D10Device object to retrieve the IDXGIDevice object.
- Call GetParent on the IDXGIDevice object to retrieve the IDXGIAdapter object.
- Call GetPrivateData on the IDXGIAdapter object with GUID_DeviceType to retrieve the type of device on which the display adapter was created. pData will point to a value from the driver-type enumeration (for example, a value from D3D_DRIVER_TYPE).
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | dxgi.h |
Library | DXGI.lib |