ReactOS 0.4.15-dev-7918-g2a2556c
TLS Class Reference

#include <tls.h>

Collaboration diagram for TLS:

Public Member Functions

BOOL NonEACompositionEnabled ()
 @implemented
 

Static Public Member Functions

static BOOL Initialize ()
 @implemented
 
static VOID Uninitialize ()
 @implemented
 
static TLSGetTLS ()
 @implemented
 
static TLSPeekTLS ()
 @implemented
 
static TLSInternalAllocateTLS ()
 @implemented
 
static BOOL InternalDestroyTLS ()
 @implemented
 

Public Attributes

DWORD m_dwSystemInfoFlags
 
CicBridgem_pBridge
 
CicProfilem_pProfile
 
ITfThreadMgr_Pm_pThreadMgr
 
DWORD m_dwFlags1
 
DWORD m_dwFlags2
 
DWORD m_dwUnknown2
 
BOOL m_bDestroyed
 
BOOL m_bNowOpening
 
DWORD m_NonEAComposition
 
DWORD m_cWnds
 

Static Public Attributes

static DWORD s_dwTlsIndex = (DWORD)-1
 

Detailed Description

Definition at line 13 of file tls.h.

Member Function Documentation

◆ GetTLS()

◆ Initialize()

BOOL TLS::Initialize ( )
static

@implemented

Definition at line 15 of file tls.cpp.

16{
18 return s_dwTlsIndex != (DWORD)-1;
19}
DWORD WINAPI TlsAlloc(VOID)
Definition: thread.c:1100
#define DWORD
Definition: nt_native.h:44

Referenced by ProcessAttach().

◆ InternalAllocateTLS()

TLS * TLS::InternalAllocateTLS ( )
static

@implemented

Definition at line 47 of file tls.cpp.

48{
49 TLS *pTLS = TLS::PeekTLS();
50 if (pTLS)
51 return pTLS;
52
54 return NULL;
55
56 pTLS = (TLS *)cicMemAllocClear(sizeof(TLS));
57 if (!pTLS)
58 return NULL;
59
60 if (!::TlsSetValue(s_dwTlsIndex, pTLS))
61 {
62 cicMemFree(pTLS);
63 return NULL;
64 }
65
66 pTLS->m_dwFlags1 |= 1;
67 pTLS->m_dwUnknown2 |= 1;
68 return pTLS;
69}
static void cicMemFree(LPVOID ptr)
Definition: cicbase.h:27
static LPVOID cicMemAllocClear(SIZE_T size)
Definition: cicbase.h:15
Definition: tls.h:14
static TLS * PeekTLS()
@implemented
Definition: tls.cpp:41
DWORD m_dwUnknown2
Definition: tls.h:24
DWORD m_dwFlags1
Definition: tls.h:22
BOOLEAN DllShutdownInProgress(VOID)
Definition: misc.cpp:42
BOOL WINAPI TlsSetValue(IN DWORD Index, IN LPVOID Value)
Definition: thread.c:1276

Referenced by GetTLS().

◆ InternalDestroyTLS()

BOOL TLS::InternalDestroyTLS ( )
static

@implemented

Definition at line 72 of file tls.cpp.

73{
74 TLS *pTLS = TLS::PeekTLS();
75 if (!pTLS)
76 return FALSE;
77
78 if (pTLS->m_pBridge)
79 pTLS->m_pBridge->Release();
80 if (pTLS->m_pProfile)
81 pTLS->m_pProfile->Release();
82 if (pTLS->m_pThreadMgr)
83 pTLS->m_pThreadMgr->Release();
84
85 cicMemFree(pTLS);
87 return TRUE;
88}
ITfThreadMgr_P * m_pThreadMgr
Definition: tls.h:21
CicProfile * m_pProfile
Definition: tls.h:20
CicBridge * m_pBridge
Definition: tls.h:19
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
ULONG Release()

Referenced by DllMain(), and ProcessDetach().

◆ NonEACompositionEnabled()

BOOL TLS::NonEACompositionEnabled ( )

@implemented

Definition at line 91 of file tls.cpp.

92{
94 {
95 DWORD dwValue = 1;
96
97 CicRegKey regKey;
98 LSTATUS error = regKey.Open(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\CTF\\CUAS"));
99 if (error == ERROR_SUCCESS)
100 {
101 error = regKey.QueryDword(TEXT("NonEAComposition"), &dwValue);
102 if (error != ERROR_SUCCESS)
103 dwValue = 1;
104 }
105
106 m_NonEAComposition = dwValue;
107 }
108
109 return (m_NonEAComposition == 2);
110}
LSTATUS Open(HKEY hKey, LPCTSTR lpSubKey, REGSAM samDesired=KEY_READ)
Definition: cicreg.h:51
LSTATUS QueryDword(LPCTSTR pszValueName, LPDWORD pdwValue)
Definition: cicreg.h:61
DWORD m_NonEAComposition
Definition: tls.h:27
#define ERROR_SUCCESS
Definition: deptool.c:10
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
#define TEXT(s)
Definition: k32.h:26
#define error(str)
Definition: mkdosfs.c:1605
#define HKEY_CURRENT_USER
Definition: winreg.h:11

Referenced by UIComposition::CreateCompButtonWnd().

◆ PeekTLS()

TLS * TLS::PeekTLS ( )
static

◆ Uninitialize()

VOID TLS::Uninitialize ( )
static

@implemented

Definition at line 22 of file tls.cpp.

23{
24 if (s_dwTlsIndex != (DWORD)-1)
25 {
27 s_dwTlsIndex = (DWORD)-1;
28 }
29}
BOOL WINAPI TlsFree(IN DWORD Index)
Definition: thread.c:1166

Referenced by ProcessDetach().

Member Data Documentation

◆ m_bDestroyed

BOOL TLS::m_bDestroyed

Definition at line 25 of file tls.h.

◆ m_bNowOpening

BOOL TLS::m_bNowOpening

Definition at line 26 of file tls.h.

Referenced by CicBridge::OnSetOpenStatus().

◆ m_cWnds

DWORD TLS::m_cWnds

Definition at line 28 of file tls.h.

Referenced by CtfImeDispatchDefImeMessage(), and UIComposition::SendMessageToUI().

◆ m_dwFlags1

DWORD TLS::m_dwFlags1

Definition at line 22 of file tls.h.

Referenced by ImeProcessKey(), and InternalAllocateTLS().

◆ m_dwFlags2

DWORD TLS::m_dwFlags2

Definition at line 23 of file tls.h.

Referenced by ImeProcessKey().

◆ m_dwSystemInfoFlags

◆ m_dwUnknown2

DWORD TLS::m_dwUnknown2

Definition at line 24 of file tls.h.

Referenced by InternalAllocateTLS().

◆ m_NonEAComposition

DWORD TLS::m_NonEAComposition

Definition at line 27 of file tls.h.

Referenced by NonEACompositionEnabled().

◆ m_pBridge

◆ m_pProfile

◆ m_pThreadMgr

◆ s_dwTlsIndex

DWORD TLS::s_dwTlsIndex = (DWORD)-1
static

Definition at line 16 of file tls.h.

Referenced by GetTLS(), Initialize(), InternalAllocateTLS(), InternalDestroyTLS(), PeekTLS(), and Uninitialize().


The documentation for this class was generated from the following files: