ID3D12Object::SetPrivateDataInterface method (d3d12.h)

Associates an IUnknown-derived interface with the device object, and associates that interface with an application-defined GUID.

Syntax

HRESULT SetPrivateDataInterface(
  [in]           REFGUID        guid,
  [in, optional] const IUnknown *pData
);

Parameters

[in] guid

Type: REFGUID

The GUID to associate with the interface.

[in, optional] pData

Type: const IUnknown*

A pointer to the IUnknown-derived interface to be associated with the device object. Its reference count is incremented when set, and its reference count is decremented when either the ID3D12Object is destroyed, or when the data is overwritten by calling SetPrivateData or SetPrivateDataInterface with the same GUID.

Return value

Type: HRESULT

This method returns one of the Direct3D 12 return codes.

Requirements

Requirement Value
Target Platform Windows
Header d3d12.h
Library D3D12.lib
DLL D3D12.dll

See also