Public Types | |
typedef DWORD | TLSIndex |
Public Member Functions | |
CThreadLocalStorage () | |
Allocates and becomes the owner of a thread local storage slot. Throws an exception if there are no more TLS slots available. | |
CThreadLocalStorage (TLSIndex tlsIndex) | |
Connects to an existing TLS slot. | |
CThreadLocalStorage (const CThreadLocalStorage &rhs) | |
~CThreadLocalStorage () | |
If this object owns the TLS slot then it releases it. | |
CThreadLocalStorage & | operator= (const CThreadLocalStorage &rhs) |
TLSIndex | GetIndex () const |
Returns the object's TLS index. | |
void | ClearValue () const |
Clears the value of the TLS slot (sets it to zero). | |
void | SetValue (void *pValue) const |
Sets the value of the TLS slot. | |
void | SetValue (DWORD value) const |
Sets a DWORD value in the TLS stot without casting at the call site. | |
void * | GetValue () const |
Returns the stored value of the TLS slot. | |
DWORD | GetValueAsDWORD () const |
Returns the stored value of the TLS slot as a DWORD without casting at the call site. |
Allocates and becomes the owner of a thread local storage slot. Throws an exception if there are no more TLS slots available.
CThreadLocalStorage | ( | TLSIndex | tlsIndex | ) | [explicit] |
Connects to an existing TLS slot.
CThreadLocalStorage | ( | const CThreadLocalStorage & | rhs | ) |
~CThreadLocalStorage | ( | ) |
If this object owns the TLS slot then it releases it.
CThreadLocalStorage& operator= | ( | const CThreadLocalStorage & | rhs | ) |
DWORD GetIndex | ( | ) | const |
Returns the object's TLS index.
void ClearValue | ( | ) | const |
Clears the value of the TLS slot (sets it to zero).
void SetValue | ( | void * | pValue | ) | const |
Sets the value of the TLS slot.
void SetValue | ( | DWORD | value | ) | const |
Sets a DWORD value in the TLS stot without casting at the call site.
void * GetValue | ( | ) | const |
Returns the stored value of the TLS slot.
DWORD GetValueAsDWORD | ( | ) | const |
Returns the stored value of the TLS slot as a DWORD without casting at the call site.