IDMLObject::SetPrivateData method (directml.h)

Sets application-defined data to a DirectML device object, and associates that data with an application-defined GUID. This method is thread-safe.

Syntax

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

Parameters

guid

Type: REFGUID

The GUID to associate with the data.

[in] dataSize

Type: UINT

The size in bytes of the data.

[in, optional] data

Type: const void*

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

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Target Platform Windows
Header directml.h
Library DirectML.lib
DLL DirectML.dll

See also

IDMLObject