Kernel32TlsAlloc Method

Allocates a thread local storage (TLS) index.

Any thread of the process can subsequently use this index to store and retrieve values that are local to the thread, because each thread receives its own slot for the index.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", ExactSpelling = true, SetLastError = true)]
public static uint TlsAlloc()

Return Value

UInt32
If the function succeeds, the return value is a TLS index. The slots for the index are initialized to zero.

If the function fails, the return value is TLS_OUT_OF_INDEXES.

Remarks

See Also