Skip to content

Latest commit

 

History

History
103 lines (76 loc) · 4.91 KB

nf-dxgi-idxgiobject-getprivatedata.md

File metadata and controls

103 lines (76 loc) · 4.91 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:dxgi.IDXGIObject.GetPrivateData
IDXGIObject::GetPrivateData (dxgi.h)
Get a pointer to the object's data.
86763938-a2bf-a817-2ffc-645427783675
GetPrivateData
GetPrivateData method [DXGI]
GetPrivateData method [DXGI]
IDXGIObject interface
IDXGIObject interface [DXGI]
GetPrivateData method
IDXGIObject.GetPrivateData
IDXGIObject::GetPrivateData
direct3ddxgi.idxgiobject_getprivatedata
dxgi/IDXGIObject::GetPrivateData
direct3ddxgi\idxgiobject_getprivatedata.htm
direct3ddxgi
VS|directx_sdk|~\idxgiobject_getprivatedata.htm
12/05/2018
86763938-a2bf-a817-2ffc-645427783675, GetPrivateData, GetPrivateData method [DXGI], GetPrivateData method [DXGI],IDXGIObject interface, IDXGIObject interface [DXGI],GetPrivateData method, IDXGIObject.GetPrivateData, IDXGIObject::GetPrivateData, direct3ddxgi.idxgiobject_getprivatedata, dxgi/IDXGIObject::GetPrivateData
dxgi.h
Windows
DXGI.lib
Windows
19H1
IDXGIObject::GetPrivateData
dxgi/IDXGIObject::GetPrivateData
c++
APIRef
kbSyntax
COM
DXGI.lib
DXGI.dll
IDXGIObject.GetPrivateData

IDXGIObject::GetPrivateData

-description

Get a pointer to the object's data.

-parameters

-param Name [in]

Type: REFGUID

A GUID identifying the data.

-param pDataSize [in, out]

Type: UINT*

The size of the data.

-param pData [out]

Type: void*

Pointer to the data.

-returns

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

  1. Call IUnknown::QueryInterface on the ID3D11Device or ID3D10Device object to retrieve the IDXGIDevice object.
  2. Call GetParent on the IDXGIDevice object to retrieve the IDXGIAdapter object.
  3. 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).
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.

-see-also

DXGI Interfaces

IDXGIObject