Skip to content

Latest commit

 

History

History
100 lines (73 loc) · 3.59 KB

nf-d3d11-id3d11device-setprivatedata.md

File metadata and controls

100 lines (73 loc) · 3.59 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:d3d11.ID3D11Device.SetPrivateData
ID3D11Device::SetPrivateData (d3d11.h)
Set data to a device and associate that data with a guid. (ID3D11Device.SetPrivateData)
ID3D11Device interface [Direct3D 11]
SetPrivateData method
ID3D11Device.SetPrivateData
ID3D11Device::SetPrivateData
SetPrivateData
SetPrivateData method [Direct3D 11]
SetPrivateData method [Direct3D 11]
ID3D11Device interface
d3d11/ID3D11Device::SetPrivateData
direct3d11.id3d11device_setprivatedata
f1172c7e-62ba-f206-04b7-7dc3e29d9d16
direct3d11\id3d11device_setprivatedata.htm
direct3d11
0a8add57-b209-4096-9132-f3258469bdbd
12/05/2018
ID3D11Device interface [Direct3D 11],SetPrivateData method, ID3D11Device.SetPrivateData, ID3D11Device::SetPrivateData, SetPrivateData, SetPrivateData method [Direct3D 11], SetPrivateData method [Direct3D 11],ID3D11Device interface, d3d11/ID3D11Device::SetPrivateData, direct3d11.id3d11device_setprivatedata, f1172c7e-62ba-f206-04b7-7dc3e29d9d16
d3d11.h
Windows
D3D11.lib
Windows
19H1
ID3D11Device::SetPrivateData
d3d11/ID3D11Device::SetPrivateData
c++
APIRef
kbSyntax
COM
D3D11.lib
D3D11.dll
ID3D11Device.SetPrivateData

ID3D11Device::SetPrivateData

-description

Set data to a device and associate that data with a guid.

-parameters

-param guid [in]

Type: REFGUID

Guid associated with the data.

-param DataSize [in]

Type: UINT

Size of the data.

-param pData [in, optional]

Type: const void*

Pointer to the data to be stored with this device. If pData is NULL, DataSize must also be 0, and any data previously associated with the guid will be destroyed.

-returns

Type: HRESULT

This method returns one of the following Direct3D 11 Return Codes.

-remarks

The data stored in the device with this method can be retrieved with ID3D11Device::GetPrivateData.

The data and guid set with this method will typically be application-defined.

The debug layer reports memory leaks by outputting a list of object interface pointers along with their friendly names. The default friendly name is "<unnamed>". You can set the friendly name so that you can determine if the corresponding object interface pointer caused the leak. To set the friendly name, use the SetPrivateData method and the WKPDID_D3DDebugObjectName GUID that is in D3Dcommon.h. For example, to give pContext a friendly name of My name, use the following code:


static const char c_szName[] = "My name";
hr = pContext->SetPrivateData( WKPDID_D3DDebugObjectName, sizeof( c_szName ) - 1, c_szName );

-see-also

ID3D11Device