CmtGetThreadLocalVar
- Updated2023-02-21
- 2 minute(s) read
CmtGetThreadLocalVar
int CmtGetThreadLocalVar (CmtTLVHandle variableHandle, void *variablePointer);
Purpose
Gets a pointer to the thread local variable instance for the current thread.
The first time you call this function from a thread, the variable is initialized to the value pointed to by the variableInitialValue parameter that you passed to CmtNewThreadLocalVar.
Parameters
Input | ||
Name | Type | Description |
variableHandle | CmtTLVHandle | The handle you obtained from CmtNewThreadLocalVar to identify the thread local variable. |
Output | ||
Name | Type | Description |
variablePointer | void * | Returns a pointer to the thread local variable instance for the current thread. Pass the address of a pointer to the type of the thread local variable. |
Return Value
Name | Type | Description |
cmtStatus | int | The CmtStatus code that the function call returns. This function returns 0 to indicate success and negative values to indicate failure. Pass the CmtStatus code to CmtGetErrorMessage to get a description of the error code. |
Additional Information
Library: Utility Library
Include file: utility.h
LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later