35#define MAGIC_SEND_COMPSTR 0x4B425930
36#define MAGIC_SEND_IMEDISPLAY 0x4B425931
37#define MAGIC_SEND_GUIDELINE 0x4B425932
38#define MAGIC_SEND_CANDLIST 0x4B425935
39#define MAGIC_SEND_IMESYSTEM 0x4B425936
41#define _FOREGROUND_WHITE (FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE)
42#define _BACKGROUND_WHITE (BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE)
72 if (digit == 0 && ich > 0)
74 WCHAR prevChar = pszBuffer[ich - 1];
75 if (prevChar ==
L' ' || prevChar ==
L'/')
77 pszBuffer[ich] =
L' ';
82 pszBuffer[ich] = (
WCHAR)(
L'0' + digit);
90 if (0x0020 <= wch && wch <= 0x007E)
94 if ((0x3041 <= wch && wch <= 0x3094) ||
95 (0x30A1 <= wch && wch <= 0x30F6) ||
96 (0x3105 <= wch && wch <= 0x312C) ||
97 (0x3131 <= wch && wch <= 0x318E) ||
98 (0xAC00 <= wch && wch <= 0xD7A3) ||
99 (0xFF01 <= wch && wch <= 0xFF5E))
105 if ((0xFF61 <= wch && wch <= 0xFF9F) ||
106 (0xFFA0 <= wch && wch <= 0xFFBE) ||
107 (0xFFC2 <= wch && wch <= 0xFFC7) ||
108 (0xFFCA <= wch && wch <= 0xFFCF) ||
109 (0xFFD2 <= wch && wch <= 0xFFD7) ||
110 (0xFFDA <= wch && wch <= 0xFFDC))
116 if ((0xFFE0 <= wch && wch <= 0xFFE6) ||
117 (0x4E00 <= wch && wch <= 0x9FA5) ||
118 (0xF900 <= wch && wch <= 0xFA2D))
124 ULONG cbMultiByte = 0;
127 return cbMultiByte == 2;
142 TRACE(
"IntSendDataToConsole(%p, %p): 0x%lX, 0x%lX\n", hwndConsole, hwndSender,
145 if (!hwndConsole || !
IsWindow(hwndConsole))
147 ERR(
"%p is null or invalid window\n", hwndConsole);
155 ERR(
"SendMessageTimeoutW(%p) failed\n", hwndConsole);
224 if (!
pEntry->apCandList[iList])
228 pEntry->acbCandList[iList] = 0;
231 if (
pEntry->pdwCandPageStart)
235 pEntry->cbCandPageData = 0;
257 TRACE(
"g_hConsole: %p\n", hConsole);
281 TRACE(
"hConsole %p --> PCONENTRY %p\n", hConsole, pFound);
305 size_t cbNew =
sizeof(
PCONENTRY) * cNewCount;
325 if (!
pEntry->bConsoleEnabled)
347 if (!
pEntry->apCandList[iList])
354 if (
pEntry->pdwCandPageStart)
392 (szLayoutName[0] !=
L'E' && szLayoutName[0] !=
L'e'))
400 L"SYSTEM\\CurrentControlSet\\Control\\Keyboard Layouts\\");
416#define COLUMN_COUNT 7
417 static const WCHAR awchTable[] =
419 0x5009, 0x9821, 0x8ACB, 0x8F38, 0x5165, 0x5B57, 0x6839,
420 0x5167, 0x78BC, 0x8ACB, 0x8F38, 0x5165, 0x5167, 0x78BC,
421 0x55AE, 0x78BC, 0x8ACB, 0x8F38, 0x5165, 0x55AE, 0x78BC,
422 0x901F, 0x6210, 0x8ACB, 0x8F38, 0x5165, 0x5B57, 0x6839,
423 0x5927, 0x6613, 0x8ACB, 0x8F38, 0x5165, 0x5B57, 0x6839,
424 0x82F1, 0x6570, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000,
425 0xFF55, 0xFF53, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000,
426 0x6CE8, 0x97F3, 0x8ACB, 0x8F38, 0x5165, 0x7B26, 0x865F,
427 0x6CE8, 0x97F3, 0x8ACB, 0x3000, 0x9078, 0x3000, 0x5B57,
476 pDest->Char.UnicodeChar = *pchSrc;
478 pDest->Attributes = pCompStr->
awAttrColor[*pbAttrIndex];
488 for (
width = 0; *pLayoutSrc &&
width < 5 - 1;)
490 WCHAR wch = *pLayoutSrc++;
496 for (
INT i = 0;
i < paddingCount; ++
i)
525 PBYTE pbAttrIndex = (
PBYTE)pchSrc + cbCompStr;
529 for (
DWORD ich = 0; ich < dwCharCount && ich < maxX; ++ich, ++pDest)
533 BYTE ibColor = pbAttrIndex[ich];
542 for (
UINT ich = 0; ich <
cch; ++ich)
559 while (currentWidth > maxX &&
index > 0)
566 const UINT remainingSpace = maxX - currentWidth;
567 const UINT ichFinal =
index + remainingSpace;
569 if (remainingSpace > 0)
571 for (
UINT ich =
index; ich < ichFinal; ++ich)
594 if (
pEntry->bInComposition)
611 if (!ppDest || !*ppDest || !pszSrc)
615 for (pCurrent = *ppDest; *pszSrc; ++pCurrent)
633 goto DoSetAttributes;
669 wchSentence =
L'\x8907';
671 wchSentence =
L'\x5358';
673 wchSentence =
L'\x81EA';
675 wchSentence =
L'\x9023';
693 for (
UINT ich = 0; ich <
cch; ++ich)
717 for (
PWCHAR pLayoutSrc =
pEntry->szLayoutText; *pLayoutSrc; ++pLayoutSrc)
719 WCHAR wch = *pLayoutSrc;
735 for (
INT i = 0;
i < paddingCount; ++
i)
747 for (
UINT ich = 0; ich <
cch; ++ich)
762 UINT displayCols = 0;
763 DWORD strPosByte = 0;
771 while (displayCols < 10)
777 strPosByte +=
sizeof(
WCHAR);
787 INT padCount = 10 - displayCols;
788 for (
INT i = 0;
i < padCount; ++
i)
794 PBYTE pbCandAttrs = (
PBYTE)pCandInfo + pCandInfo->dwAttrsOffset;
796 for (
PWCHAR pszCand = pCandInfo->szCandStr; *pszCand; ++pszCand)
814 if (
pEntry->bInComposition)
873 CopyData.
cbData =
sizeof(*pDisplay);
874 CopyData.lpData = pDisplay;
898 CopyData.
cbData =
sizeof(*pDisplay);
900 CopyData.lpData = pDisplay;
915 CopyData.lpData = pCompStr;
927 CopyData.
cbData =
sizeof(*pDisplay);
929 CopyData.lpData = pDisplay;
1017 pEntry->ScreenSize = ScreenSize;
1029 switch (
pEntry->nOutputCodePage)
1050 if (iDirection == 0)
1064 for (; iCurrent < cKLs; ++iCurrent)
1066 if (
pEntry->hKL == phKLs[iCurrent])
1070 if (iCurrent < cKLs)
1072 for (
INT iAttempt = 0, iNext = iCurrent; iAttempt < cKLs; ++iAttempt)
1074 iNext += iDirection;
1078 else if (iNext >= cKLs)
1081 HKL hKL = phKLs[iNext];
1083 if (!
IS_IME_HKL(hKL) || wLangId == wTargetLang)
1114 CopyData.
cbData =
sizeof(*pDisplay);
1115 CopyData.lpData = pDisplay;
1149 TRACE(
"(%p, %p, %p)\n",
hwnd, hConsole, hwndConsole);
1153 for (
UINT iEntry = 1; ; ++iEntry)
1199 pEntry->hConsole = hConsole;
1200 pEntry->hwndConsole = hwndConsole;
1202 pEntry->ScreenSize.X = 80;
1271 DWORD dwCompLen = 0;
1272 DWORD dwAttrLen = 0;
1273 size_t cbCompStr, cbNeeded;
1279 if ((
LONG)dwCompLen < 0)
1285 if ((
LONG)dwAttrLen < 0)
1292 if ((
LONG)dwCompLen < 0)
1305 cbNeeded =
sizeof(
COMPSTRINFO) + cbCompStr + (dwAttrLen + 1);
1306 if (
pEntry->pCompStr &&
pEntry->pCompStr->dwSize < cbNeeded)
1325 PBYTE pAttrDest = (
PBYTE)pszDest + cbCompStr;
1335 pAttrDest[dwAttrLen] = 0;
1339 if (cursorPos >= 0 && (
DWORD)cursorPos < dwAttrLen)
1360 CopyData.lpData = pCompStr;
1381 DWORD dwCompLen = 0;
1382 DWORD dwAttrLen = 0;
1383 size_t cbCompStr, cbNeeded;
1389 if ((
LONG)dwCompLen < 0)
1395 if ((
LONG)dwAttrLen < 0)
1402 if ((
LONG)dwCompLen < 0)
1415 cbNeeded =
sizeof(
COMPSTRINFO) + cbCompStr + (dwAttrLen + 1);
1416 if (
pEntry->pCompStr && cbNeeded >
pEntry->pCompStr->dwSize)
1435 PBYTE pAttrDest = (
PBYTE)pszDest + cbCompStr;
1445 pAttrDest[dwAttrLen] = 0;
1463 CopyData.lpData = pCompStr;
1470 CopyData.lpData = pDisplay;
1495 DWORD dwCompLen = 0;
1496 DWORD dwAttrLen = 0;
1498 size_t cbCompStr, cbNeeded;
1506 if ((
LONG)dwCompLen < 0)
1512 if ((
LONG)dwAttrLen < 0)
1519 if ((
LONG)dwCompLen < 0)
1528 cbNeeded =
sizeof(
COMPSTRINFO) + cbCompStr + (dwAttrLen + 1);
1529 if (
pEntry->pCompStr && cbNeeded >
pEntry->pCompStr->dwSize)
1543 pCompStr =
pEntry->pCompStr;
1547 pszDest = (
PWCHAR)&pCompStr[1];
1548 pAttrDest = (
PBYTE)pszDest + cbCompStr;
1558 pAttrDest[dwAttrLen] = 0;
1586 CopyData.lpData = pCompStr;
1591 CopyData.lpData = pDisplay;
1592 CopyData.
cbData =
sizeof(*pDisplay);
1610 DWORD dwCompLen = 0;
1611 DWORD dwAttrLen = 0;
1612 size_t cbCompStr, cbNeeded;
1621 if ((
LONG)dwCompLen < 0)
1627 if ((
LONG)dwAttrLen < 0)
1632 dwAttrLen = dwCompLen;
1638 if ((
LONG)dwCompLen < 0)
1653 cbNeeded =
sizeof(
COMPSTRINFO) + cbCompStr + (dwAttrLen + 1);
1654 if (
pEntry->pCompStr &&
pEntry->pCompStr->dwSize < cbNeeded)
1665 pEntry->pCompStr->dwSize = cbNeeded;
1668 pCompStr =
pEntry->pCompStr;
1672 pszDest = (
PWCHAR)&pCompStr[1];
1673 pAttrDest = (
PBYTE)pszDest + cbCompStr;
1680 pAttrDest[dwAttrLen] = 0;
1690 pAttrDest[dwAttrLen] = 0;
1695 pAttrDest[dwAttrLen] = 0;
1699 pCompStr->dwCompAttrLen = dwAttrLen;
1700 pCompStr->dwCompAttrOffset = (
DWORD)((
PBYTE)pAttrDest - (
PBYTE)pCompStr);
1712 CopyData.lpData = pCompStr;
1725 switch (
pEntry->nOutputCodePage)
1745 TRACE(
"WM_IME_COMPOSITION\n");
1760 PWSTR pszCandStrDest,
1771 for (pageIndex =
pEntry->dwCandIndexMax; pageIndex > 0; --pageIndex)
1779 PWSTR pszCurrentPos = pszCandStrDest;
1780 PBYTE pbCurrentAttr = pbAttrsDest;
1786 WCHAR szCharCode[8];
1794 size_t cchCode =
wcslen(szCharCode);
1798 pszCurrentPos += cchCode;
1799 pbCurrentAttr += cchCode;
1803 DWORD iEnd =
pEntry->pdwCandPageStart[pageIndex + 1];
1811 if (currentX + strWidth + 3 >
width - labelWidth)
1813 UINT tmpW = 0, ichSrc = 0;
1814 for (ichSrc = 0; ichSrc <
cchSrc; ++ichSrc)
1817 if (currentX + tmpW >
width - labelWidth - 3)
1821 cchSrc = (ichSrc > 0) ? ichSrc - 1 : 0;
1826 if (currentX + strWidth + labelWidth + 3 >
width)
1832 *pszCurrentPos++ = (
WCHAR)(
L'0' + candNum);
1833 *pszCurrentPos++ =
L':';
1836 *pszCurrentPos++ =
L' ';
1838 currentX += strWidth + 3;
1839 pbCurrentAttr +=
cchSrc + 3;
1851 if (totalWidth <= usableWidth)
1855 if (totalWidth <
width)
1859 pszCurrentPos += pad;
1864 if (totalWidth < usableWidth)
1866 UINT pad = usableWidth - totalWidth;
1868 pszCurrentPos += pad;
1871 UINT halfLabel = (labelWidth - 1) / 2;
1874 pszCurrentPos += halfLabel;
1876 *pszCurrentPos++ =
L'/';
1879 pszCurrentPos += halfLabel;
1890 PWSTR pszCandStrDest,
1900 for (pageIndex =
pEntry->dwCandIndexMax; pageIndex > 0; --pageIndex)
1908 PWSTR pszCurrentStr = pszCandStrDest;
1909 PBYTE pbCurrentAttr = pbAttrsDest;
1912 DWORD iEnd =
pEntry->pdwCandPageStart[pageIndex + 1];
1925 if (currentX + strWidth + 3 > usableWidth)
1927 size_t tmpW = 0, ichSrc;
1928 for (ichSrc = 0; ichSrc <
cchSrc; ++ichSrc)
1931 if (currentX + tmpW > usableWidth - 3)
1935 cchSrc = (ichSrc > 0) ? ichSrc - 1 : 0;
1940 if (currentX + strWidth + labelWidth + 3 >
width)
1946 *pszCurrentStr++ = (
WCHAR)(
L'0' + candidateNum);
1947 *pszCurrentStr++ =
L':';
1951 *pszCurrentStr++ =
L' ';
1953 currentX += strWidth + 3;
1954 pbCurrentAttr +=
cchSrc + 3;
1965 *pszCurrentStr =
L' ';
1966 PWSTR pszLabelPos = pszCurrentStr + 1;
1968 UINT halfLabel = (labelWidth - 1) / 2;
1972 pszLabelPos[halfLabel] =
L'/';
1983 PWSTR pszCandStrDest,
1993 for (pageIndex =
pEntry->dwCandIndexMax; pageIndex > 0; --pageIndex)
2001 PWSTR pszCurrentPos = pszCandStrDest;
2002 PBYTE pbCurrentAttr = pbAttrsDest;
2008 DWORD iEnd =
pEntry->pdwCandPageStart[pageIndex + 1];
2016 if (strWidth + currentX + 3 > usableWidth)
2018 size_t tmpW = 0, ichSrc = 0;
2019 for (ichSrc = 0; ichSrc <
cchSrc; ++ichSrc)
2022 if (currentX + tmpW > usableWidth - 3)
2026 cchSrc = (ichSrc > 0) ? ichSrc - 1 : 0;
2031 if (currentX + strWidth + labelWidth + 3 >
width)
2037 *pszCurrentPos++ = (
WCHAR)(
L'0' + candidateNum);
2038 *pszCurrentPos++ =
L':';
2041 *pszCurrentPos++ =
L' ';
2043 currentX += strWidth + 3;
2044 pbCurrentAttr +=
cchSrc + 3;
2063 if (!(dwCandidates & (1 << dwIndex)))
2070 if (
pEntry->apCandList[dwIndex] &&
pEntry->acbCandList[dwIndex] != cbList)
2076 if (!
pEntry->apCandList[dwIndex])
2079 if (!
pEntry->apCandList[dwIndex])
2081 pEntry->acbCandList[dwIndex] = cbList;
2088 UINT usableWidth = screenX - 8;
2089 if (usableWidth < 7)
2092 UINT maxItemsPerPage = (usableWidth - 7) / 5;
2093 maxItemsPerPage =
min(
max(maxItemsPerPage, 1), 9);
2096 for (
UINT tmpCount = 1; tmpCount <= pCandList->
dwCount; (tmpCount *= 10), ++numDigits)
2102 UINT labelWidth = 2 * numDigits + 1;
2104 DWORD nPageCountNeeded;
2105 if ((pCandList->
dwCount / maxItemsPerPage + 10) >= 100)
2106 nPageCountNeeded = 100;
2108 nPageCountNeeded = (pCandList->
dwCount / maxItemsPerPage + 10);
2110 if (
pEntry->pdwCandPageStart &&
2111 pEntry->cbCandPageData != nPageCountNeeded *
sizeof(
DWORD))
2117 if (!
pEntry->pdwCandPageStart)
2120 if (!
pEntry->pdwCandPageStart)
2125 pEntry->cbCandPageData = nPageCountNeeded *
sizeof(
DWORD);
2129 pEntry->dwCandOffset = 0;
2136 UINT iItem = 0, iCand = 1;
2137 for (iItem = 1; iItem < pCandList->
dwCount && iCand < nPageCountNeeded - 1; ++iItem)
2142 if (currentX + strWidth + 3 > (usableWidth - labelWidth))
2144 pEntry->pdwCandPageStart[iCand++] = iItem;
2145 currentX = strWidth + 3;
2149 currentX += strWidth + 3;
2154 pEntry->dwCandIndexMax = iCand;
2156 UINT cbCandInfo = 3 * usableWidth + 4;
2157 if (
pEntry->dwSystemLineSize < cbCandInfo)
2167 pEntry->dwSystemLineSize = cbCandInfo;
2181 pEntry->pdwCandPageStart[iPage + 1] -
pEntry->pdwCandPageStart[iPage]);
2186 CopyData.
cbData =
sizeof(*pDisplay);
2187 CopyData.lpData = pDisplay;
2205 if (!(dwCandidates & (1 << dwIndex)))
2215 if (
pEntry->apCandList[dwIndex] &&
pEntry->acbCandList[dwIndex] != cbList)
2219 pEntry->acbCandList[dwIndex] = 0;
2222 if (!
pEntry->apCandList[dwIndex])
2225 if (!
pEntry->apCandList[dwIndex])
2230 pEntry->acbCandList[dwIndex] = cbList;
2238 INT usableWidth = (
INT)screenX - 25;
2240 UINT maxItemsPerPage;
2241 if (usableWidth <= 7)
2242 maxItemsPerPage = 1;
2244 maxItemsPerPage = (
UINT)((usableWidth - 7) / 5);
2246 if (maxItemsPerPage > 9)
2247 maxItemsPerPage = 9;
2249 DWORD nPageCountNeeded = pCandList->
dwCount / maxItemsPerPage + 10;
2250 if (nPageCountNeeded > 100)
2251 nPageCountNeeded = 100;
2253 if (
pEntry->pdwCandPageStart &&
2254 pEntry->cbCandPageData != nPageCountNeeded *
sizeof(
DWORD))
2259 if (!
pEntry->pdwCandPageStart)
2262 if (!
pEntry->pdwCandPageStart)
2267 pEntry->cbCandPageData = nPageCountNeeded *
sizeof(
DWORD);
2271 pEntry->dwCandOffset = 0;
2278 UINT iItem = 0, iCand = 1;
2279 for (iItem = 1; iItem < pCandList->
dwCount && iCand < nPageCountNeeded - 1; ++iItem)
2284 if (currentX + strWidth + 3 > usableWidth ||
2285 (iItem -
pEntry->pdwCandPageStart[iCand-1]) >= 9)
2287 pEntry->pdwCandPageStart[iCand++] = iItem;
2288 currentX = strWidth + 3;
2292 currentX += strWidth + 3;
2297 pEntry->dwCandIndexMax = iCand;
2299 DWORD cbCandInfo = 3 * usableWidth + 4;
2300 if (
pEntry->dwSystemLineSize < cbCandInfo)
2310 pEntry->dwSystemLineSize = cbCandInfo;
2324 pEntry->pdwCandPageStart[iPage + 1] -
pEntry->pdwCandPageStart[iPage]);
2329 CopyData.
cbData =
sizeof(*pDisplay);
2330 CopyData.lpData = pDisplay;
2345 if (!(dwCandidates & (1 << dwIndex)))
2352 if (
pEntry->apCandList[dwIndex] &&
pEntry->acbCandList[dwIndex] != cbList)
2358 if (!
pEntry->apCandList[dwIndex])
2361 if (!
pEntry->apCandList[dwIndex])
2363 pEntry->acbCandList[dwIndex] = cbList;
2371 UINT maxItems = (screenX - 7) / 5;
2372 if (maxItems > 9) maxItems = 9;
2383 for (
UINT tmp = 1; tmp <= pCandList->
dwCount; tmp *= 10)
2389 labelWidth = 2 *
digits + 1;
2392 DWORD nPageCountNeeded = (pCandList->
dwCount / maxItems + 10);
2393 if (nPageCountNeeded > 100)
2394 nPageCountNeeded = 100;
2396 if (
pEntry->pdwCandPageStart &&
2397 pEntry->cbCandPageData != nPageCountNeeded *
sizeof(
DWORD))
2403 if (!
pEntry->pdwCandPageStart)
2406 if (!
pEntry->pdwCandPageStart)
2408 pEntry->cbCandPageData = nPageCountNeeded *
sizeof(
DWORD);
2411 DWORD iItem, iCand = 1;
2418 pEntry->pdwCandPageStart[0] = 0;
2419 for (iItem =
pEntry->dwCandOffset; iItem < pCandList->dwCount; iItem += 9)
2420 pEntry->pdwCandPageStart[iCand++] = iItem;
2422 if (iItem > pCandList->
dwCount)
2428 pEntry->dwCandOffset = 0;
2434 UINT usableWidth = screenX - labelWidth;
2440 if (currentX + strWidth + 3 > usableWidth ||
2441 (
i -
pEntry->pdwCandPageStart[iCand - 1]) >= 9)
2443 pEntry->pdwCandPageStart[iCand++] =
i;
2444 currentX = strWidth + 3;
2448 currentX += strWidth + 3;
2455 pEntry->pdwCandPageStart[iCand] = iItem;
2456 pEntry->dwCandIndexMax = iCand;
2458 DWORD cbCandInfo = 3 * screenX + 4;
2459 if (
pEntry->dwSystemLineSize < cbCandInfo)
2466 pEntry->dwSystemLineSize = cbCandInfo;
2474 screenX, labelWidth,
pEntry, bIsCode);
2480 pEntry->pdwCandPageStart[iPage + 1] -
pEntry->pdwCandPageStart[iPage]);
2485 CopyData.
cbData = cbCandInfo;
2486 CopyData.lpData = pCI;
2501 if (
pEntry->bSkipPageMsg)
2556 CopyData.lpData =
NULL;
2568 CopyData.
cbData = cbAlloc;
2569 CopyData.lpData = pszGuideLine;
2623 pEntry->bOpened = bOpened;
2626 DWORD dwImeConversion = (dwConversion & ~_IME_CMODE_MASK);
2627 if (
pEntry->dwConversion != dwImeConversion)
2629 pEntry->dwConversion = dwImeConversion;
2645 pEntry->nOutputCodePage = wCodePage;
2647 pEntry->nCodePage = wCodePage;
2660 CopyData.lpData = &
wParam;
2677 if ((dwCandidates & (1 << iCand)) && apCandList[iCand])
2680 apCandList[iCand] =
NULL;
2681 pEntry->acbCandList[iCand] = 0;
2687 CopyData.
cbData =
sizeof(*pDisplay);
2688 CopyData.lpData = pDisplay;
2702 if ((dwCandidates & (1 << iCand)) && apCandList[iCand])
2705 apCandList[iCand] =
NULL;
2706 pEntry->acbCandList[iCand] = 0;
2725 if ((dwCandidates & (1 << iCand)) && apCandList[iCand])
2728 apCandList[iCand] =
NULL;
2729 pEntry->acbCandList[iCand] = 0;
2735 CopyData.
cbData =
sizeof(*pDisplay);
2736 CopyData.lpData = pDisplay;
2785 TRACE(
"IMN_OPENSTATUSWINDOW\n");
2789 TRACE(
"IMN_OPENCANDIDATE\n");
2793 TRACE(
"IMN_CHANGECANDIDATE\n");
2797 TRACE(
"IMN_CLOSECANDIDATE\n");
2801 TRACE(
"IMN_SETCONVERSIONMODE\n");
2805 TRACE(
"IMN_SETOPENSTATUS\n");
2809 TRACE(
"IMN_GUIDELINE\n");
2873 TRACE(
"WM_USER_SIMHOTKEY\n");
2891 if (!
pEntry->bWndEnabled)
2914 TRACE(
"WM_IME_STARTCOMPOSITION\n");
2923 TRACE(
"WM_IME_ENDCOMPOSITION\n");
2956 for (iKL = 0; iKL <
pEntry->cKLs; ++iKL)
2958 if (!pKLInfo[iKL].hKL || pKLInfo[iKL].hKL == hOldKL)
2971 pEntry->pKLInfo = phNewKLs;
2975 pEntry->pKLInfo[iKL].hKL = hOldKL;
2978 pEntry->pKLInfo[iKL].dwConversion = dwConversion;
2994 CopyData.
cbData =
sizeof(*pDisplay);
2995 CopyData.lpData = pDisplay;
2999 for (
INT iKL = 0; iKL <
pEntry->cKLs; ++iKL)
3001 if (
pEntry->pKLInfo[iKL].hKL != hNewKL)
3063 ERR(
"Unknown uMsg %u\n", uMsg);
3107 case WM_INPUTLANGCHANGE:
3111 case WM_INPUTLANGCHANGEREQUEST:
3123 case WM_IME_STARTCOMPOSITION:
3127 case WM_IME_ENDCOMPOSITION:
3131 case WM_IME_COMPOSITION:
3186 BOOL bIsConImeOnSystemProcessEnabled =
FALSE;
3190 L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Console",
3194 DWORD dwValue =
FALSE, cbValue =
sizeof(dwValue);
3196 (
PBYTE)&dwValue, &cbValue);
3198 bIsConImeOnSystemProcessEnabled = !!dwValue;
3202 return bIsConImeOnSystemProcessEnabled;
3247 x = cxScreen - (cxScreen / 3);
3297 ERR(
"ConIme_InitInstance failed\n");
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define RegCloseKey(hKey)
#define LANGID_CHINESE_SIMPLIFIED
#define CP_CHINESE_SIMPLIFIED
#define CP_CHINESE_TRADITIONAL
#define LANGID_CHINESE_TRADITIONAL
#define _FOREGROUND_WHITE
void IntFillImeCandidatesCHT(PCONENTRY pEntry, PIMEDISPLAY pDisplay, UINT iCand)
Fills the status buffer with characters and attributes from the.
void ConIme_OnEnd(HWND hwnd, UINT uMsg)
Terminate Console IME.
void ConIme_OnChangeKeyboard(HWND hwnd, HANDLE hConsole, HKL hNewKL)
WM_USER_CHANGEKEYBOARD.
#define MAGIC_SEND_GUIDELINE
BOOL IntFillImeDisplayJPN(PCONENTRY pEntry, PIMEDISPLAY pDisplay)
Converts the current Japanese IME status into a string for display (CHAR_INFO array).
BOOL ConIme_UnInitEntry(HWND hwnd, PCONENTRY pEntry)
Frees the resources associated with the console entry.
BOOL IntSendCandListJPNorKOR(HWND hwnd, HIMC hIMC, PCONENTRY pEntry, DWORD dwCandidates, BOOL bOpen)
LRESULT ConIme_OnInputLangChangeRequest(HWND hWnd, WPARAM wParam, LPARAM lParam)
WM_INPUTLANGCHANGEREQUEST.
void IntDoImeComp(HWND hwnd, DWORD dwFlags, WCHAR wch)
void ConIme_OnEnable(void)
WM_ENABLE.
BOOL IntFillImeDisplay(PCONENTRY pEntry, PIMEDISPLAY pDisplay)
Converts the current IME status into a string for display (CHAR_INFO array).
BOOL IntFillImeDisplayCHS(PCONENTRY pEntry, PIMEDISPLAY pDisplay)
Converts the current Simplified Chinese IME status into a string for display (CHAR_INFO array).
BOOL ConIme_OnImeSystem(HWND hwnd, WPARAM wParam, LPARAM lParam)
WM_IME_SYSTEM.
UINT IntFillImeCandidatesCHS(PCONENTRY pEntry, PIMEDISPLAY pDisplay, UINT cch)
Fills the status buffer with characters and attributes from the.
BOOL IntIsConImeOnSystemProcessEnabled(VOID)
Is Console IME on system process enabled?
BOOL ConIme_SetCodePage(HWND hwnd, HANDLE hConsole, BOOL bOutput, WORD wCodePage)
WM_USER_SETCODEPAGE.
BOOL IntSendCandListCHT(HWND hwnd, HIMC hIMC, PCONENTRY pEntry, DWORD dwCandidates, BOOL bOpen)
void IntSendConversionStatus(HWND hwnd)
BOOL ConIme_OnSwitchIme(HWND hwnd, HANDLE hConsole, HKL hKL)
WM_USER_SWITCHIME.
BOOL ConIme_OnNotifyGuideLine(HWND hWnd)
Handles guideline notifications (error messages, etc.) from IME.
BOOL IntGetImeLayoutText(PCONENTRY pEntry)
Gets the name of the current keyboard layout or IME and stores it in the entry.
#define MAGIC_SEND_IMESYSTEM
BOOL IntCloseCandsJPNorKOR(HWND hwnd, HIMC hIMC, PCONENTRY pEntry, DWORD dwCandidates)
Sends the IME candidate list for Japanese/Korean.
void IntSendConversionStatusJPNorKOR(HWND hwnd, PCONENTRY pEntry)
BOOL ConIme_OnNotifySetOpenStatus(HWND hwndTarget)
IMN_SETOPENSTATUS.
BOOL ConIme_OnImeNotify(HWND hWnd, WPARAM wParam, LPARAM lParam)
WM_IME_NOTIFY.
UINT IntFillImeModeCHT(PCONENTRY pEntry, PIMEDISPLAY pDisplay, INT cch)
Builds a buffer for displaying the Traditional Chinese IME mode.
#define MAGIC_SEND_IMEDISPLAY
#define _BACKGROUND_WHITE
void ConIme_OnImeStartComposition(HWND hwnd)
WM_IME_STARTCOMPOSITION.
void ConIme_OnImeEndComposition(HWND hWnd)
WM_IME_ENDCOMPOSITION.
BOOL ConIme_SimulateHotKey(HWND hwnd, WPARAM wParam, LPARAM lParam)
WM_USER_SIMHOTKEY.
UINT IntFormatCandLineCHS(PCANDIDATELIST pCandList, PWSTR pszCandStrDest, PBYTE pbAttrsDest, UINT width, UINT labelWidth, PCONENTRY pEntry)
UINT IntGetCharDisplayWidth(WCHAR wch)
BOOL IntFillImeDisplayKOR(PCONENTRY pEntry, PIMEDISPLAY pDisplay)
Converts the current Korean IME status into a string for display (CHAR_INFO array).
BOOL IntSendDataToConsole(HWND hwndConsole, HWND hwndSender, PCOPYDATASTRUCT pCopyData)
void IntDoImeCompCHT(HWND hWnd, PCONENTRY pEntry, DWORD dwFlags)
Processes the input composition status of the Chinese (Traditional) IME and.
BOOL ConIme_InitEntry(HWND hwnd, HANDLE hConsole, HWND hwndConsole)
Initializes and allocates a CONENTRY structure for the new console connection.
BOOL IntIsDoubleWidthChar(WCHAR wch)
Determines if a Unicode character should be rendered as "Double Width" (2 columns).
BOOL IntIsImeOpen(HIMC hIMC, PCONENTRY pEntry)
UINT IntFormatCandLineCHT(PCANDIDATELIST pCandList, PWSTR pszCandStrDest, PBYTE pbAttrsDest, UINT width, UINT labelWidth, PCONENTRY pEntry)
BOOL ConIme_OnGo(HWND hwnd, HANDLE hConsole, HKL hKL, INT iDirection)
Handles keyboard layout switch requests.
BOOL ConIme_OnInit(HWND hwnd, HANDLE hConsole, HWND hwndConsole)
WM_USER_INIT.
BOOL ConIme_SendImeStatus(HWND hWnd)
WM_USER_SENDIMESTATUS.
UINT IntGetCharInfoWidth(PCHAR_INFO pCharInfo, UINT cch)
#define MAGIC_SEND_CANDLIST
void IntDoImeCompCHS(HWND hwnd, PCONENTRY pEntry, DWORD dwFlags)
Notifies the input composition status of the Chinese (Simplified) IME to the console.
#define MAGIC_SEND_COMPSTR
void IntFormatNumber(PWSTR pszBuffer, UINT value, UINT width)
LRESULT ConIme_OnRoute(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
WM_ROUTE_...
BOOL IntFillImeDisplayCHT(PCONENTRY pEntry, PIMEDISPLAY pDisplay)
Converts the current Traditional Chinese IME status into a string for.
UINT IntFormatCandLineJPNorKOR(PCANDIDATELIST pCandList, PWSTR pszCandStrDest, PBYTE pbAttrsDest, UINT width, UINT labelWidth, PCONENTRY pEntry, BOOL bIsCode)
void IntFreeConsoleEntries(void)
INT IntGetStringWidth(PCWSTR pch)
void IntDoImeCompJPN(HWND hwnd, PCONENTRY pEntry, DWORD dwFlags)
Processes Japanese IME Composition and Result strings.
BOOL ConIme_InitInstance(HINSTANCE hInstance)
Initialize Console IME instance.
BOOL ConIme_OnNotifyCloseCandidate(HWND hwnd, DWORD dwCandidates)
IMN_CLOSECANDIDATE.
BOOL IntSetImeState(HWND hwnd, HANDLE hConsole, DWORD dwConversion)
WM_USER_SETIMESTATE.
BOOL ConIme_OnInputLangChange(HWND hwnd, WPARAM wParam, HKL hKL)
BOOL IntSendCandListCHS(HWND hwnd, HIMC hIMC, PCONENTRY pEntry, DWORD dwCandidates, BOOL bOpen)
LRESULT CALLBACK ConIme_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
The main window procedure for the Console IME.
BOOL ConIme_OnNotifyOpenCandidate(HWND hwnd, LPARAM lParam, BOOL bOpen)
When the conversion candidate window opens, invoke the language-specific candidate.
static void IntSetCurrentConsole(HANDLE hConsole)
BOOL ConIme_OnDeactivate(HWND hwnd, HANDLE hConsole)
WM_USER_DEACTIVATE.
CRITICAL_SECTION g_csLock
BOOL ConIme_SetScreenSize(HWND hwnd, HANDLE hConsole, COORD ScreenSize)
WM_USER_SETSCREENSIZE.
BOOL ConIme_OnNotifyChangeCandidate(HWND hwnd, LPARAM lParam)
void IntFillImeCompStrCHSorCHT(PCONENTRY pEntry, PIMEDISPLAY pDisplay, UINT cch)
BOOL IntGrowEntries(void)
BOOL IntIsLogOnSession(void)
Determines whether the current process is an interactive logon session (such as Winlogon)
BOOL ConIme_OnCreate(HWND hwnd)
WM_CREATE.
void IntSendConversionStatusCHS(HWND hwnd, PCONENTRY pEntry)
BOOL ConIme_OnUnInit(HWND hwnd, HANDLE hConsole)
WM_USER_UNINIT.
INT IntFillImeModeCHS(PCONENTRY pEntry, PIMEDISPLAY pDisplay, UINT cch)
Builds a buffer for displaying the Simplified Chinese IME mode.
DWORD IntGetImeState(HWND hWnd, HANDLE hConsole)
WM_USER_GETIMESTATE.
INT WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR lpCmdLine, INT nCmdShow)
void IntCopyUnicodeToCharInfo(PCHAR_INFO *ppDest, PCWSTR pszSrc)
void IntDoImeCompKOR(HWND hwnd, PCONENTRY pEntry, DWORD dwFlags, WCHAR wch)
Processes the Korean IME input composition state and notifies the console.
void ConIme_OnDisable(void)
WM_ENABLE.
void ConIme_OnImeComposition(HWND hwnd, WPARAM wParam, LPARAM lParam)
WM_IME_COMPOSITION.
LRESULT ConIme_OnUser(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
(WM_USER + ...)
void IntSendConversionStatusCHT(HWND hwnd, PCONENTRY pEntry)
BOOL ConIme_OnKeyChar(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL IntCloseCandsCHS(HWND hwnd, HIMC hIMC, PCONENTRY pEntry, DWORD dwCandidates)
Sends the IME candidate list for Simplified Chinese (CHS).
PCONENTRY IntFindConsoleEntry(HANDLE hConsole)
Finds the CONENTRY structure corresponding to the specified console handle.
DWORD g_dwAttachToThreadId
BOOL IntCloseCandsCHT(HWND hwnd, HIMC hIMC, PCONENTRY pEntry, DWORD dwCandidates)
Sends candidate list for Traditional Chinese (CHT).
UINT IntFillImeSpaceCHSorCHT(PCONENTRY pEntry, PIMEDISPLAY pDisplay, UINT cch)
Adjusts the width of the status display and pads it with spaces.
#define WM_USER_SWITCHIME
#define WM_USER_GETIMESTATE
#define WM_USER_SETCODEPAGE
#define WM_ROUTE_SYSKEYUP
struct tagIMEDISPLAY IMEDISPLAY
#define WM_USER_SETIMESTATE
#define _IME_CMODE_DEACTIVATE
#define WM_USER_SETSCREENSIZE
struct tagCOMPSTRINFO COMPSTRINFO
#define WM_ROUTE_SYSDEADCHAR
#define WM_USER_DEACTIVATE
#define WM_USER_CHANGEKEYBOARD
#define WM_USER_SIMHOTKEY
struct tagCONENTRY * PCONENTRY
#define WM_ROUTE_SYSKEYDOWN
#define WM_USER_SENDIMESTATUS
BOOL WINAPI ImmDisableTextFrameService(_In_ DWORD dwThreadId)
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
#define NT_SUCCESS(StatCode)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
#define INVALID_HANDLE_VALUE
#define WideCharToMultiByte
BOOL WINAPI DECLSPEC_HOTPATCH RegisterConsoleIME(_In_ HWND hWnd, _Out_opt_ LPDWORD pdwAttachToThreadId)
BOOL WINAPI DECLSPEC_HOTPATCH UnregisterConsoleIME(VOID)
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
static wchar_t *__cdecl wmemset(wchar_t *s, wchar_t c, size_t n)
#define FillMemory(BUF, SIZ, MASK)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei width
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
DWORD WINAPI ImmCallImeConsoleIME(_In_ HWND hWnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam, _Out_ LPUINT puVK)
#define IMS_CONSOLEIME_1B
BOOL WINAPI ImmSetActiveContextConsoleIME(_In_ HWND hwnd, _In_ BOOL fFlag)
#define IMS_CONSOLEIME_1A
HIMC WINAPI ImmAssociateContext(_In_ HWND hWnd, _In_opt_ HIMC hIMC)
#define IME_CMODE_KATAKANA
#define IME_PROP_CANDLIST_START_FROM_1
BOOL WINAPI ImmGetConversionStatus(_In_ HIMC hIMC, _Out_opt_ LPDWORD lpfdwConversion, _Out_opt_ LPDWORD lpfdwSentence)
BOOL WINAPI ImmSetConversionStatus(_In_ HIMC hIMC, _In_ DWORD fdwConversion, _In_ DWORD fdwSentence)
DWORD WINAPI ImmGetGuideLineW(_In_ HIMC hIMC, _In_ DWORD dwIndex, _Out_writes_bytes_opt_(dwBufLen) LPWSTR lpBuf, _In_ DWORD dwBufLen)
DWORD WINAPI ImmGetCandidateListW(_In_ HIMC hIMC, _In_ DWORD deIndex, _Out_writes_bytes_opt_(dwBufLen) LPCANDIDATELIST lpCandList, _In_ DWORD dwBufLen)
UINT WINAPI ImmGetIMEFileNameW(_In_ HKL hKL, _Out_writes_opt_(uBufLen) LPWSTR lpszFileName, _In_ UINT uBufLen)
#define IMN_CLOSECANDIDATE
BOOL WINAPI ImmSimulateHotKey(_In_ HWND hWnd, _In_ DWORD dwHotKeyID)
HIMC WINAPI ImmGetContext(_In_ HWND hWnd)
#define IMN_CHANGECANDIDATE
LRESULT WINAPI ImmEscapeW(_In_ HKL hKL, _In_ HIMC hIMC, _In_ UINT uSubFunc, _Inout_opt_ LPVOID lpData)
HIMC WINAPI ImmCreateContext(VOID)
#define IMN_OPENCANDIDATE
DWORD WINAPI ImmGetProperty(_In_ HKL hKL, _In_ DWORD fdwIndex)
BOOL WINAPI ImmReleaseContext(_In_ HWND hWnd, _In_ HIMC hIMC)
BOOL WINAPI ImmGetOpenStatus(_In_ HIMC hIMC)
#define IMN_OPENSTATUSWINDOW
#define IME_SMODE_PLAURALCLAUSE
#define IME_SMODE_SINGLECONVERT
LONG WINAPI ImmGetCompositionStringW(_In_ HIMC hIMC, _In_ DWORD dwIndex, _Out_writes_bytes_opt_(dwBufLen) LPVOID lpBuf, _In_ DWORD dwBufLen)
BOOL WINAPI ImmIsIME(_In_ HKL hKL)
BOOL WINAPI ImmDestroyContext(_In_ HIMC hIMC)
#define IME_SMODE_PHRASEPREDICT
#define IMN_SETOPENSTATUS
BOOL WINAPI ImmSetOpenStatus(_In_ HIMC hIMC, _In_ BOOL fOpen)
#define IME_CMODE_FULLSHAPE
#define IME_SMODE_AUTOMATIC
#define IMN_SETCONVERSIONMODE
BOOL WINAPI ImmNotifyIME(_In_ HIMC hIMC, _In_ DWORD dwAction, _In_ DWORD dwIndex, _In_ DWORD_PTR dwValue)
BOOL WINAPI ImmTranslateMessage(_In_ HWND hwnd, _In_ UINT msg, _In_ WPARAM wParam, _In_ LPARAM lKeyData)
#define NI_SETCANDIDATE_PAGESIZE
#define NI_SETCANDIDATE_PAGESTART
#define EXCEPTION_EXECUTE_HANDLER
static const int digits[]
#define RtlEqualMemory(dst, src, len)
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteSize(_Out_ PULONG MbSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSTATUS NTAPI NtOpenProcessToken(IN HANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, OUT PHANDLE TokenHandle)
#define WS_OVERLAPPEDWINDOW
_Out_opt_ int _Out_opt_ int * cy
_In_opt_ _In_opt_ _In_ _In_ DWORD cbData
#define _SEH2_EXCEPT(...)
#define offsetof(TYPE, MEMBER)
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
union _CHAR_INFO::@3473 Char
DWORD dwOffset[ANYSIZE_ARRAY]
WCHAR szCandStr[ANYSIZE_ARRAY]
WORD awAttrColor[MAX_ATTR_COLORS]
CHAR_INFO CharInfo[IMEDISPLAY_MAX_X]
HANDLE WINAPI DECLSPEC_HOTPATCH OpenEventW(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCWSTR lpName)
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
_Must_inspect_result_ __kernel_entry NTSTATUS NTAPI NtQueryInformationToken(_In_ HANDLE TokenHandle, _In_ TOKEN_INFORMATION_CLASS TokenInformationClass, _Out_writes_bytes_to_opt_(TokenInformationLength, *ReturnLength) PVOID TokenInformation, _In_ ULONG TokenInformationLength, _Out_ PULONG ReturnLength)
Queries a specific type of information in regard of an access token based upon the information class....
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define IPHK_PROCESSBYIME
DWORD WINAPI GetCurrentThreadId(void)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define EVENT_MODIFY_STATE
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define COMMON_LVB_UNDERSCORE
HGDIOBJ WINAPI GetStockObject(_In_ int)
_In_ UINT _In_ UINT cEntries
_In_ DWORD _In_ int cchSrc
#define HKEY_LOCAL_MACHINE
BOOL WINAPI GetKeyboardLayoutNameW(_Out_writes_(KL_NAMELENGTH) LPWSTR)
BOOL WINAPI IsWindow(_In_opt_ HWND)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI AttachThreadInput(_In_ DWORD, _In_ DWORD, _In_ BOOL)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
BOOL WINAPI SetForegroundWindow(_In_ HWND)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
LRESULT WINAPI SendMessageTimeoutW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM, _In_ UINT, _In_ UINT, _Out_opt_ PDWORD_PTR)
#define WM_IME_SETCONTEXT
UINT WINAPI GetKeyboardLayoutList(_In_ int nBuff, _Out_writes_to_opt_(nBuff, return) HKL FAR *lpList)
#define WM_QUERYENDSESSION
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
#define WM_IME_COMPOSITIONFULL
BOOL WINAPI IsWindowEnabled(_In_ HWND)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
#define MAKEINTRESOURCEW(i)
HKL WINAPI ActivateKeyboardLayout(_In_ HKL, _In_ UINT)
BOOL WINAPI DestroyWindow(_In_ HWND)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
int WINAPI GetSystemMetrics(_In_ int)
SHORT WINAPI GetKeyState(_In_ int)