ID3D12Object::SetPrivateData method (d3d12.h)

Sets application-defined data to a device object and associates that data with an application-defined GUID.

Syntax

HRESULT SetPrivateData(
  [in]           REFGUID    guid,
  [in]           UINT       DataSize,
  [in, optional] const void *pData
);

Parameters

[in] guid

Type: REFGUID

The GUID to associate with the data.

[in] DataSize

Type: UINT

The size in bytes of the data.

[in, optional] pData

Type: const void*

A pointer to a memory block that contains the data to be stored with this device object. If pData is NULL, DataSize must also be 0, and any data that was previously associated with the GUID specified in guid will be destroyed.

Return value

Type: HRESULT

This method returns one of the Direct3D 12 Return Codes.

Remarks

Rather than using the Direct3D 11 debug object naming scheme of calling ID3D12Object::SetPrivateData using WKPDID_D3DDebugObjectName with an ASCII name, call ID3D12Object::SetName with a UNICODE name.

Requirements

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

See also

ID3D12Object