FlsSetValue function
Applies to: desktop apps | Metro style apps
Stores a 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
BOOL WINAPI FlsSetValue( __in DWORD dwFlsIndex, __in_opt PVOID lpFlsData );
Parameters
- dwFlsIndex [in]
-
The FLS index that was allocated by the FlsAlloc function.
- lpFlsData [in, optional]
-
The value to be stored in the FLS slot for the calling fiber.
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError. The following errors can be returned.
| Return code | Description |
|---|---|
|
The index is not in range. |
|
The FLS array has not been allocated. |
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 thread 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 FlsGetValue to retrieve the stored value.
Requirements
|
Minimum supported client | Windows Vista |
|---|---|
|
Minimum supported server | Windows Server 2003 |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/7/2012
You'll get your question answered much faster if you ask it on the appropriate MSDN developer forum - go to http://forums.microsoft.com/msdn/. Thanks and good luck!
==========
Hi everyone,
I have a process which hangs on exit with several threads still in Wait mode. The top of the stack for one of the threads is "kernel32.dll!FlsSetValue+0x779". Are there any tools that can help reason out why it is blocked?
- 6/6/2007
- Ash9900
- 6/7/2007
- CarolBuchmiller - MSFT