Expand Minimize

FlsGetValue function

Retrieves the value in the calling fiber's fiber local storage (FLS) slot for the specified FLS index. Each fiber has its own slot for each FLS index.

Syntax


PVOID WINAPI FlsGetValue(
  _In_  DWORD dwFlsIndex
);

Parameters

dwFlsIndex [in]

The FLS index that was allocated by the FlsAlloc function.

Return value

If the function succeeds, the return value is the value stored in the calling fiber's FLS slot associated with the specified index.

If the function fails, the return value is NULL. To get extended error information, call GetLastError.

Remarks

FLS indexes are typically allocated by the FlsAlloc function during process or DLL initialization. After an FLS index is allocated, each fiber of the process can use it to access its own FLS slot for that index. A fiber specifies an FLS index in a call to FlsSetValue to store a value in its slot. The thread specifies the same index in a subsequent call to FlsSetValue to retrieve the stored value.

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2003 [desktop apps | Windows Store apps]

Header

WinBase.h on Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2 (include Windows.h);
Fibersapi.h on Windows 8 and Windows Server 2012

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Fibers
FlsAlloc
FlsSetValue
Process and Thread Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.