Skip to main content

IDStorageFactoryX::SetCpuAffinity

Sets a CPU affinity mask for DirectStorage.

Syntax

Parameters

affinity
Type: UINT64
The CPU affinity mask.

Return value

Type: HRESULT Standard HRESULT error code.

Remarks

DirectStorage normally performs work in the calling thread. However, some work can’t be performed in the calling thread. To restrict such work to a specified set of CPU cores, set a CPU affinity mask. For more information, see “SetCPUAffinity” in the “IDStorageFileX” section in DirectStorage Overview.

Requirements

Header: dstorage_xs.h Library: dstorage_xs.lib Supported platforms: XBOX Series consoles

See also

IDStorageFactoryX
DStorage
Last modified on August 20, 2026