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.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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()
<DllImportAttribute("Kernel32.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function TlsAlloc As UInteger
Dim returnValue As UInteger
returnValue = Kernel32.TlsAlloc()
public:
[DllImportAttribute(L"Kernel32.dll", ExactSpelling = true, SetLastError = true)]
static unsigned int TlsAlloc()
[<DllImportAttribute("Kernel32.dll", ExactSpelling = true, SetLastError = true)>]
static member TlsAlloc : unit -> uint32
No code example is currently available or this language may not be supported.
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.