PsAllocateAffinityToken function (wdm.h)

The PsAllocateAffinityToken function allocates a thread affinity token. After use, the token must be freed by calling PsFreeAffinityToken.

Syntax

NTSTATUS PsAllocateAffinityToken(
  [out] PAFFINITY_TOKEN *AffinityToken
);

Parameters

[out] AffinityToken

Supplies a pointer to a buffer which, on success, receives a pointer to the newly allocated affinity token.

Return value

Returns an NTSTATUS code.

Requirements

Requirement Value
Minimum supported client Windows 11
Minimum supported server Windows Server 2022
Header wdm.h

See also

PsFreeAffinityToken