ReactOS 0.4.15-dev-7907-g95bf896
misc.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS msctfime.ime
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: Miscellaneous of msctfime.ime
5 * COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6 */
7
8#include "msctfime.h"
9
11
15{
16 if (LangID == 0)
17 {
18 TLS *pTLS = TLS::GetTLS();
19 if (!pTLS || !pTLS->m_pProfile)
20 return FALSE;
21
23 }
24
25 switch (PRIMARYLANGID(LangID))
26 {
27 case LANG_CHINESE:
28 case LANG_JAPANESE:
29 case LANG_KOREAN:
30 return TRUE;
31
32 default:
33 return FALSE;
34 }
35}
36
38
43{
44 HMODULE hNTDLL;
45 static FN_DllShutdownInProgress s_fnDllShutdownInProgress = NULL;
46
47 if (s_fnDllShutdownInProgress)
48 return s_fnDllShutdownInProgress();
49
50 hNTDLL = cicGetSystemModuleHandle(L"ntdll.dll", FALSE);
51 s_fnDllShutdownInProgress =
52 (FN_DllShutdownInProgress)GetProcAddress(hNTDLL, "RtlDllShutdownInProgress");
53 if (!s_fnDllShutdownInProgress)
54 return FALSE;
55
56 return s_fnDllShutdownInProgress();
57}
58
62{
63 BOOL bOK, IsMember = FALSE;
64 PSID pSid;
66
68 0, 0, 0, 0, 0, 0, 0, &pSid))
69 {
70 ERR("Error: %ld\n", GetLastError());
71 return FALSE;
72 }
73
74 bOK = CheckTokenMembership(NULL, pSid, &IsMember);
75
76 if (pSid)
78
79 return bOK && IsMember;
80}
81
85{
88 return 0;
89 return info.ciCharset;
90}
91
95{
96 HWND hwndFocus = ::GetFocus();
97 if (!hwndFocus)
98 hwndFocus = ::GetActiveWindow();
99 return ::ImmGetContext(hwndFocus);
100}
101
102// MSIMTF.dll!MsimtfIsGuidMapEnable
105
108{
109 static FN_MsimtfIsGuidMapEnable s_fn = NULL;
110 if (!cicGetFN(g_hMSIMTF, s_fn, L"msimtf.dll", "MsimtfIsGuidMapEnable"))
111 return FALSE;
112 return s_fn(hIMC, pbValue);
113}
114
117{
118 switch (uVirtKey)
119 {
120 case VK_KANJI:
121 case VK_CONVERT:
122 return TRUE;
123 default:
124 return (VK_OEM_ATTN <= uVirtKey && uVirtKey <= VK_PA1);
125 }
126}
127
130{
131 if (!pLibThread)
132 return NULL;
133
134 if (pLibThread->m_pCategoryMgr)
135 return pLibThread->m_pCategoryMgr;
136
137 if (FAILED(cicCoCreateInstance(CLSID_TF_CategoryMgr, NULL, CLSCTX_INPROC_SERVER,
138 IID_ITfCategoryMgr, (void **)&pLibThread->m_pCategoryMgr)))
139 {
140 return NULL;
141 }
142 return pLibThread->m_pCategoryMgr;
143}
144
146static HRESULT
148{
149 ITfCategoryMgr *pCat = GetUIMCat(pLibThread);
150 if (!pCat)
151 return E_FAIL;
152 return pCat->EnumItemsInCategory(rguid, ppEnum);
153}
154
157{
158 if (!pLibThread)
159 return E_FAIL;
160
161 if (pLibThread->m_pDisplayAttrMgr)
162 {
163 pLibThread->m_pDisplayAttrMgr->Release();
164 pLibThread->m_pDisplayAttrMgr = NULL;
165 }
166
168 IID_ITfDisplayAttributeMgr,
169 (void **)&pLibThread->m_pDisplayAttrMgr)))
170 {
171 return E_FAIL;
172 }
173
174 IEnumGUID *pEnumGuid;
175 LibEnumItemsInCategory(pLibThread, GUID_TFCAT_DISPLAYATTRIBUTEPROPERTY, &pEnumGuid);
176
178
180 if (pEnumGuid && !g_pPropCache)
181 {
183 if (g_pPropCache)
184 {
186 GUID guid;
187 while (pEnumGuid->Next(1, &guid, NULL) == S_OK)
188 {
191 }
192 hr = S_OK;
193 }
194 }
196
197 return hr;
198}
199
202{
203 if (!pLibThread)
204 return E_FAIL;
205
206 if (pLibThread->m_pDisplayAttrMgr)
207 {
208 pLibThread->m_pDisplayAttrMgr->Release();
209 pLibThread->m_pDisplayAttrMgr = NULL;
210 }
211
212 return S_OK;
213}
214
215/***********************************************************************/
216
221 REFGUID rguid,
222 ITfCompartment **ppComp,
223 BOOL bThread)
224{
225 *ppComp = NULL;
226
227 ITfThreadMgr *pThreadMgr = NULL;
229
230 HRESULT hr;
231 if (bThread)
232 {
233 hr = pUnknown->QueryInterface(IID_ITfThreadMgr, (void **)&pThreadMgr);
234 if (FAILED(hr))
235 return hr;
236
237 hr = pThreadMgr->GetGlobalCompartment(&pCompMgr);
238 }
239 else
240 {
241 hr = pUnknown->QueryInterface(IID_ITfCompartmentMgr, (void **)&pCompMgr);
242 }
243
244 if (SUCCEEDED(hr))
245 {
246 hr = E_FAIL;
247 if (pCompMgr)
248 {
249 hr = pCompMgr->GetCompartment(rguid, ppComp);
250 pCompMgr->Release();
251 }
252 }
253
254 if (pThreadMgr)
255 pThreadMgr->Release();
256
257 return hr;
258}
259
265 REFGUID rguid,
266 DWORD dwValue,
267 BOOL bThread)
268{
269 ITfCompartment *pComp = NULL;
270 HRESULT hr = GetCompartment(pUnknown, rguid, &pComp, bThread);
271 if (FAILED(hr))
272 return hr;
273
274 VARIANT vari;
275 V_I4(&vari) = dwValue;
276 V_VT(&vari) = VT_I4;
277 hr = pComp->SetValue(cookie, &vari);
278
279 pComp->Release();
280 return hr;
281}
282
287 REFGUID rguid,
288 LPDWORD pdwValue,
289 BOOL bThread)
290{
291 *pdwValue = 0;
292
293 ITfCompartment *pComp = NULL;
294 HRESULT hr = GetCompartment(pUnknown, rguid, &pComp, bThread);
295 if (FAILED(hr))
296 return hr;
297
298 VARIANT vari;
299 hr = pComp->GetValue(&vari);
300 if (hr == S_OK)
301 *pdwValue = V_I4(&vari);
302
303 pComp->Release();
304 return hr;
305}
306
312 REFGUID rguid,
313 IUnknown *punkValue)
314{
315 ITfCompartment *pComp = NULL;
316 HRESULT hr = GetCompartment(pUnknown, rguid, &pComp, FALSE);
317 if (FAILED(hr))
318 return hr;
319
320 VARIANT vari;
321 V_UNKNOWN(&vari) = punkValue;
322 V_VT(&vari) = VT_UNKNOWN;
323 hr = pComp->SetValue(cookie, &vari);
324
325 pComp->Release();
326 return hr;
327}
328
334 REFGUID rguid,
335 BOOL bThread)
336{
338 ITfThreadMgr *pThreadMgr = NULL;
339
340 HRESULT hr;
341 if (bThread)
342 {
343 hr = pUnknown->QueryInterface(IID_ITfThreadMgr, (void **)&pThreadMgr);
344 if (FAILED(hr))
345 return hr;
346
347 hr = pThreadMgr->GetGlobalCompartment(&pCompMgr);
348 }
349 else
350 {
351 hr = pUnknown->QueryInterface(IID_ITfCompartmentMgr, (void **)&pCompMgr);
352 }
353
354 if (SUCCEEDED(hr))
355 {
356 hr = E_FAIL;
357 if (pCompMgr)
358 {
359 hr = pCompMgr->ClearCompartment(tid, rguid);
360 pCompMgr->Release();
361 }
362 }
363
364 if (pThreadMgr)
365 pThreadMgr->Release();
366
367 return hr;
368}
369
370/***********************************************************************/
371
373{
376};
377
378static const MODEBIAS g_ModeBiasMap[] =
379{
380 { GUID_MODEBIAS_FILENAME, 0x00000001 },
381 { GUID_MODEBIAS_NUMERIC, 0x00000004 },
382 { GUID_MODEBIAS_URLHISTORY, 0x00010000 },
383 { GUID_MODEBIAS_DEFAULT, 0x00000000 },
384 { GUID_MODEBIAS_NONE, 0x00000000 },
385};
386
389{
390 m_guid = rguid;
391}
392
395{
396 const GUID *pguid = &GUID_NULL;
397 for (auto& item : g_ModeBiasMap)
398 {
399 if (item.m_bias == bias)
400 {
401 pguid = &item.m_guid;
402 break;
403 }
404 }
405
406 return *pguid;
407}
408
411{
412 for (auto& item : g_ModeBiasMap)
413 {
414 if (IsEqualGUID(guid, item.m_guid))
415 return item.m_bias;
416 }
417 return 0;
418}
419
420/***********************************************************************/
421
424{
425 m_clientId = clientId;
427 m_bstr = NULL;
428 m_cRefs = 1;
429}
430
433{
436}
437
439BOOL
441 _In_ REFGUID rguid,
442 _In_ LPCWSTR psz)
443{
445 m_guid = rguid;
446 return (m_bstr != NULL);
447}
448
453 _Out_ LPVOID* ppvObj)
454{
455 static const QITAB c_tab[] =
456 {
458 { NULL }
459 };
460 return ::QISearch(this, c_tab, riid, ppvObj);
461}
462
465{
466 return ::InterlockedIncrement(&m_cRefs);
467}
468
471{
473 {
474 delete this;
475 return 0;
476 }
477 return m_cRefs;
478}
479
482{
483 *guid = m_guid;
484 return S_OK;
485}
486
489{
491 return (*desc ? S_OK : E_OUTOFMEMORY);
492}
493
494/***********************************************************************/
495
498{
499 Init(CLSID_CAImmLayer, L"MSCTFIME::Function Provider");
500}
501
508{
509 *func = NULL;
510
511 if (IsEqualGUID(guid, GUID_NULL) &&
512 IsEqualIID(riid, IID_IAImmFnDocFeed))
513 {
514 *func = new(cicNoThrow) CFnDocFeed();
515 if (*func)
516 return S_OK;
517 }
518
519 return E_NOINTERFACE;
520}
521
522/***********************************************************************/
523
525{
526 m_cRefs = 1;
527}
528
530{
531}
532
535{
536 static const QITAB c_tab[] =
537 {
539 { NULL }
540 };
541 return ::QISearch(this, c_tab, riid, ppvObj);
542}
543
546{
547 return ::InterlockedIncrement(&m_cRefs);
548}
549
552{
554 {
555 delete this;
556 return 0;
557 }
558 return m_cRefs;
559}
560
563{
564 TLS *pTLS = TLS::GetTLS();
565 if (!pTLS)
566 return E_OUTOFMEMORY;
567
568 HIMC hIMC = GetActiveContext();
569 CicIMCLock imcLock(hIMC);
570 if (FAILED(imcLock.m_hr))
571 return imcLock.m_hr;
572
573 CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
574 if (FAILED(imeContext.m_hr))
575 return imeContext.m_hr;
576 CicInputContext *pCicIC = imeContext.get().m_pCicIC;
577 if (!pCicIC)
578 return E_FAIL;
579
580 UINT uCodePage = CP_ACP;
581 pTLS->m_pProfile->GetCodePageA(&uCodePage);
582 pCicIC->SetupDocFeedString(imcLock, uCodePage);
583 return S_OK;
584}
585
588{
589 if (!TLS::GetTLS())
590 return E_OUTOFMEMORY;
591
592 HIMC hIMC = GetActiveContext();
593 CicIMCLock imcLock(hIMC);
594 if (FAILED(imcLock.m_hr))
595 return imcLock.m_hr;
596
597 CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
598 if (FAILED(imeContext.m_hr))
599 return imeContext.m_hr;
600
601 CicInputContext *pCicIC = imeContext.get().m_pCicIC;
602 if (!pCicIC)
603 return E_FAIL;
604
605 pCicIC->EscbClearDocFeedBuffer(imcLock, TRUE);
606 return S_OK;
607}
608
611{
612 TLS *pTLS = TLS::GetTLS();
613 if (!pTLS)
614 return E_OUTOFMEMORY;
615 auto *pThreadMgr = pTLS->m_pThreadMgr;
616 if (!pThreadMgr)
617 return E_OUTOFMEMORY;
618
619 HIMC hIMC = GetActiveContext();
620 CicIMCLock imcLock(hIMC);
621 if (FAILED(imcLock.m_hr))
622 return imcLock.m_hr;
623
624 CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
625 if (FAILED(imeContext.m_hr))
626 return imeContext.m_hr;
627 CicInputContext *pCicIC = imeContext.get().m_pCicIC;
628 if (!pCicIC)
629 return E_FAIL;
630
631 UINT uCodePage = CP_ACP;
632 pTLS->m_pProfile->GetCodePageA(&uCodePage);
633
634 pCicIC->m_bReconverting = TRUE;
635 pCicIC->SetupReconvertString(imcLock, pThreadMgr, uCodePage, 0, 0);
636 pCicIC->EndReconvertString(imcLock);
637 pCicIC->m_bReconverting = FALSE;
638 return S_OK;
639}
640
643{
644 TLS *pTLS = TLS::GetTLS();
645 if (!pTLS)
646 return E_OUTOFMEMORY;
647 auto *pThreadMgr = pTLS->m_pThreadMgr;
648 if (!pThreadMgr)
649 return E_OUTOFMEMORY;
650
651 HIMC hIMC = GetActiveContext();
652 CicIMCLock imcLock(hIMC);
653 if (FAILED(imcLock.m_hr))
654 return imcLock.m_hr;
655
656 CicIMCCLock<CTFIMECONTEXT> imeContext(imcLock.get().hCtfImeContext);
657 if (FAILED(imeContext.m_hr))
658 return imeContext.m_hr;
659 CicInputContext *pCicIC = imeContext.get().m_pCicIC;
660 if (!pCicIC)
661 return E_FAIL;
662
663 UINT uCodePage = CP_ACP;
664 pTLS->m_pProfile->GetCodePageA(&uCodePage);
665
666 pCicIC->SetupReconvertString(imcLock, pThreadMgr, uCodePage, 0, TRUE);
667 pCicIC->EndReconvertString(imcLock);
668 return S_OK;
669}
unsigned char BOOLEAN
#define VOID
Definition: acefi.h:82
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define STDMETHODIMP
Definition: basetyps.h:43
#define STDMETHODIMP_(t)
Definition: basetyps.h:44
#define ERR(fmt,...)
Definition: debug.h:110
HRESULT cicCoCreateInstance(_In_ REFCLSID rclsid, _In_ LPUNKNOWN pUnkOuter, _In_ DWORD dwClsContext, _In_ REFIID iid, _Out_ LPVOID *ppv)
Definition: cicbase.cpp:231
EXTERN_C HINSTANCE cicGetSystemModuleHandle(_In_ LPCTSTR pszFileName, _In_ BOOL bSysWinDir)
Definition: cicbase.cpp:130
#define cicNoThrow
Definition: cicbase.h:34
STDMETHODIMP ClearDocFeedBuffer() override
@implemented
Definition: misc.cpp:587
STDMETHODIMP StartUndoCompositionString() override
@implemented
Definition: misc.cpp:642
virtual ~CFnDocFeed()
Definition: misc.cpp:529
STDMETHODIMP StartReconvert() override
@unimplemented
Definition: misc.cpp:610
CFnDocFeed()
Definition: misc.cpp:524
STDMETHODIMP DocFeed() override
@implemented
Definition: misc.cpp:562
STDMETHODIMP QueryInterface(_In_ REFIID riid, _Out_ LPVOID *ppvObj) override
@implemented
Definition: misc.cpp:534
LONG m_cRefs
Definition: misc.h:115
STDMETHODIMP QueryInterface(_In_ REFIID riid, _Out_ LPVOID *ppvObj) override
@implemented
Definition: misc.cpp:451
CFunctionProviderBase(_In_ TfClientId clientId)
@implemented
Definition: misc.cpp:423
virtual ~CFunctionProviderBase()
@implemented
Definition: misc.cpp:432
TfClientId m_clientId
Definition: misc.h:79
STDMETHODIMP GetType(_Out_ GUID *guid) override
@implemented
Definition: misc.cpp:481
BOOL Init(_In_ REFGUID rguid, _In_ LPCWSTR psz)
@implemented
Definition: misc.cpp:440
STDMETHODIMP GetDescription(_Out_ BSTR *desc) override
@implemented
Definition: misc.cpp:488
CFunctionProvider(_In_ TfClientId clientId)
@implemented
Definition: misc.cpp:497
STDMETHODIMP GetFunction(_In_ REFGUID guid, _In_ REFIID riid, _Out_ IUnknown **func) override
@implemented
Definition: misc.cpp:504
HRESULT m_hr
Definition: cicimc.h:32
HRESULT m_hr
Definition: cicimc.h:96
void SetModeBias(REFGUID rguid)
@implemented
Definition: misc.cpp:388
GUID ConvertModeBias(LONG bias)
@implemented
Definition: misc.cpp:394
GUID m_guid
Definition: misc.h:65
BOOL Add(const T_ITEM &item)
Definition: cicarray.h:60
T_DATA & get() const
Definition: cicimc.h:68
INPUTCONTEXTDX & get() const
Definition: cicimc.h:165
HRESULT SetupReconvertString(CicIMCLock &imcLock, ITfThreadMgr_P *pThreadMgr, UINT uCodePage, UINT uMsg, BOOL bUndo)
@unimplemented
HRESULT EscbClearDocFeedBuffer(CicIMCLock &imcLock, BOOL bFlag)
@unimplemented
HRESULT EndReconvertString(CicIMCLock &imcLock)
@unimplemented
HRESULT SetupDocFeedString(CicIMCLock &imcLock, UINT uCodePage)
@unimplemented
HRESULT GetLangId(_Out_ LANGID *pLangID)
@implemented
Definition: profile.cpp:114
HRESULT GetCodePageA(_Out_ UINT *puCodePage)
@implemented
Definition: profile.cpp:83
Definition: tls.h:14
ITfThreadMgr_P * m_pThreadMgr
Definition: tls.h:21
static TLS * GetTLS()
@implemented
Definition: tls.cpp:32
CicProfile * m_pProfile
Definition: tls.h:20
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_FAIL
Definition: ddrawi.h:102
DWORD HIMC
Definition: dimm.idl:75
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
BOOL IsVKDBEKey(_In_ UINT uVirtKey)
@implemented
Definition: misc.cpp:116
ITfCategoryMgr * GetUIMCat(PCIC_LIBTHREAD pLibThread)
@implemented
Definition: misc.cpp:129
HRESULT GetCompartmentDWORD(IUnknown *pUnknown, REFGUID rguid, LPDWORD pdwValue, BOOL bThread)
@implemented
Definition: misc.cpp:285
HRESULT InitDisplayAttrbuteLib(PCIC_LIBTHREAD pLibThread)
@implemented
Definition: misc.cpp:156
static HRESULT LibEnumItemsInCategory(PCIC_LIBTHREAD pLibThread, REFGUID rguid, IEnumGUID **ppEnum)
@implemented
Definition: misc.cpp:147
BYTE GetCharsetFromLangId(_In_ DWORD dwValue)
Definition: misc.cpp:84
HRESULT SetCompartmentUnknown(TfEditCookie cookie, IUnknown *pUnknown, REFGUID rguid, IUnknown *punkValue)
@implemented
Definition: misc.cpp:309
HRESULT UninitDisplayAttrbuteLib(PCIC_LIBTHREAD pLibThread)
@implemented
Definition: misc.cpp:201
static const MODEBIAS g_ModeBiasMap[]
Definition: misc.cpp:378
HIMC GetActiveContext(VOID)
Definition: misc.cpp:94
HRESULT GetCompartment(IUnknown *pUnknown, REFGUID rguid, ITfCompartment **ppComp, BOOL bThread)
@implemented
Definition: misc.cpp:219
HINSTANCE g_hMSIMTF
Definition: misc.cpp:104
BOOL(WINAPI * FN_MsimtfIsGuidMapEnable)(HIMC hIMC, LPBOOL pbValue)
Definition: misc.cpp:103
BOOLEAN DllShutdownInProgress(VOID)
Definition: misc.cpp:42
HRESULT ClearCompartment(TfClientId tid, IUnknown *pUnknown, REFGUID rguid, BOOL bThread)
@implemented
Definition: misc.cpp:331
BOOL IsEALang(_In_opt_ LANGID LangID)
Definition: misc.cpp:14
BOOL MsimtfIsGuidMapEnable(_In_ HIMC hIMC, _Out_opt_ LPBOOL pbValue)
@implemented
Definition: misc.cpp:107
HRESULT SetCompartmentDWORD(TfEditCookie cookie, IUnknown *pUnknown, REFGUID rguid, DWORD dwValue, BOOL bThread)
@implemented
Definition: misc.cpp:262
BOOL IsInteractiveUserLogon(VOID)
Definition: misc.cpp:61
BOOLEAN(WINAPI * FN_DllShutdownInProgress)(VOID)
Definition: misc.cpp:37
HIMC GetActiveContext(VOID)
Definition: misc.cpp:94
BOOLEAN DllShutdownInProgress(VOID)
Definition: misc.cpp:42
BOOL WINAPI CheckTokenMembership(IN HANDLE ExistingTokenHandle, IN PSID SidToCheck, OUT PBOOL IsMember)
Definition: token.c:21
BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid)
Definition: security.c:674
PVOID WINAPI FreeSid(PSID pSid)
Definition: security.c:698
#define CP_ACP
Definition: compat.h:109
#define GetProcAddress(x, y)
Definition: compat.h:753
OLECHAR * BSTR
Definition: compat.h:2293
@ VT_UNKNOWN
Definition: compat.h:2308
@ VT_I4
Definition: compat.h:2298
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum func
Definition: glext.h:6028
GLfloat bias
Definition: glext.h:7909
REFIID riid
Definition: atlbase.h:39
HRESULT Next([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] GUID *rgelt, [out] ULONG *pceltFetched)
HRESULT EnumItemsInCategory([in] REFGUID rcatid, [out] IEnumGUID **ppEnum)
HRESULT SetValue([in] TfClientId tid, [in] const VARIANT *pvarValue)
HRESULT GetValue([out] VARIANT *pvarValue)
ULONG AddRef()
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
ULONG Release()
nsrefcnt Release()
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define GUID_NULL
Definition: ks.h:106
USHORT LANGID
Definition: mui.h:9
const GUID * guid
static PSID pSid
Definition: security.c:74
static const WCHAR desc[]
Definition: protectdata.c:36
static TfClientId tid
static ATOM item
Definition: dde.c:856
#define _Out_opt_
Definition: ms_sal.h:346
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
EXTERN_C const GUID GUID_PROP_ATTRIBUTE
Definition: msctf.idl:76
DWORD TfClientId
Definition: msctf.idl:105
DWORD TfEditCookie
Definition: msctf.idl:104
EXTERN_C const CLSID CLSID_TF_CategoryMgr
Definition: msctf.idl:84
EXTERN_C const CLSID CLSID_TF_DisplayAttributeMgr
Definition: msctf.idl:85
CRITICAL_SECTION g_csLock
Definition: msctfime.cpp:17
CDispAttrPropCache * g_pPropCache
Definition: msctfime.cpp:18
CicArray< GUID > CDispAttrPropCache
Definition: msctfime.h:41
#define GUID_MODEBIAS_NONE
Definition: msctfime.h:58
unsigned int UINT
Definition: ndis.h:50
static nsIComponentManager * pCompMgr
Definition: nsembed.c:62
#define BOOL
Definition: nt_native.h:43
#define L(x)
Definition: ntvdm.h:50
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define V_UNKNOWN(A)
Definition: oleauto.h:281
#define V_VT(A)
Definition: oleauto.h:211
#define V_I4(A)
Definition: oleauto.h:247
#define BOOLEAN
Definition: pedump.c:73
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
#define LANG_CHINESE
Definition: nls.h:42
#define LANG_JAPANESE
Definition: nls.h:76
#define PRIMARYLANGID(l)
Definition: nls.h:16
#define LANG_KOREAN
Definition: nls.h:84
HRESULT hr
Definition: shlfolder.c:183
#define QITABENT(Cthis, Ifoo)
Definition: shlwapi.h:2094
ITfCategoryMgr * m_pCategoryMgr
Definition: cicutb.h:25
ITfDisplayAttributeMgr * m_pDisplayAttrMgr
Definition: cicutb.h:26
HIMCC hCtfImeContext
Definition: imm32_undoc.h:166
LONG m_bias
Definition: misc.cpp:375
REFGUID m_guid
Definition: misc.cpp:374
Definition: scsiwmi.h:51
Definition: cookie.c:34
uint32_t DWORD_PTR
Definition: typedefs.h:65
uint32_t * LPDWORD
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR _In_opt_ USHORT LangID
Definition: wdfusb.h:1083
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
BOOL * LPBOOL
Definition: windef.h:162
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
#define TCI_SRCLOCALE
Definition: wingdi.h:964
BOOL WINAPI TranslateCharsetInfo(_Inout_ PDWORD, _Out_ LPCHARSETINFO, _In_ DWORD)
HWND WINAPI GetFocus(void)
Definition: window.c:1893
HWND WINAPI GetActiveWindow(void)
Definition: winpos.c:138
#define VK_CONVERT
Definition: winuser.h:2215
#define VK_PA1
Definition: winuser.h:2351
#define VK_OEM_ATTN
Definition: winuser.h:2338
#define VK_KANJI
Definition: winuser.h:2213
#define SECURITY_INTERACTIVE_RID
Definition: setypes.h:559
#define SECURITY_NT_AUTHORITY
Definition: setypes.h:554
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193