185{
186
190 return 0;
191
193 WCHAR szImeFileName[80], szImeKey[20];
196 for (iKey = nCount = 0; ; ++iKey)
197 {
198
201 break;
202
203 if (szImeKey[0] !=
L'E' && szImeKey[0] !=
L'e')
204 continue;
205
206 if (pLayouts ==
NULL)
207 {
208 ++nCount;
209 continue;
210 }
211
212 if (cLayouts <= nCount)
213 break;
214
216 lError =
RegOpenKeyW(hkeyLayouts, szImeKey, &hkeyIME);
218 continue;
219
220
222 cbData =
sizeof(szImeFileName);
225
227
228
229 if (!szImeFileName[0] ||
wcscspn(szImeFileName,
L":\\/") !=
wcslen(szImeFileName))
230 {
232 continue;
233 }
234
238 {
239 WARN(
"Not IMM IME HKL: %p\n", hKL);
240 continue;
241 }
242
243
244 pLayouts[nCount].hKL = hKL;
247 szImeFileName);
248 ++nCount;
249 }
250
252 return nCount;
253}
#define RegCloseKey(hKey)
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
LONG WINAPI RegEnumKeyW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, DWORD cbName)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP size_t __cdecl wcscspn(const wchar_t *, const wchar_t *)
_In_opt_ _In_opt_ _In_ _In_ DWORD cbData
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
#define REGKEY_KEYBOARD_LAYOUTS
#define IS_ERROR_UNEXPECTEDLY(x)
HRESULT Imm32StrToUInt(_In_ PCWSTR pszText, _Out_ PDWORD pdwValue, _In_ ULONG nBase)
#define HKEY_LOCAL_MACHINE