(resend)imm: implement ImmGetIMEFileNameW and ImmGetIMEFileNameA correct registry lookups
Aric Stewart
aric at codeweavers.com
Tue Mar 25 06:28:49 CDT 2008
ok thanks. I will rework this.
-aric
Alexandre Julliard wrote:
> Aric Stewart <aric at codeweavers.com> writes:
>
>> + if (rc > 0)
>> + {
>> + if (uBufLen && lpszFileName)
>> + rc = WideCharToMultiByte(CP_ACP, 0, bufW, uBufLen, lpszFileName,
>> + uBufLen, NULL, NULL);
>> + else /* get the length */
>> + rc = WideCharToMultiByte(CP_ACP, 0, bufW, wBufLen, NULL, 0, NULL,
>> + NULL);
>
> The source length should be -1, you don't want to convert the whole
> buffer.
>
>> + static CHAR KeyboardKey[] = "System\\CurrentControlSet\\Control\\Keyboard Layouts";
>> + static WCHAR szImeFileW[] = {'I','m','e',' ','F','i','l','e',0};
>> +
>> + HKEY keyboardKey;
>> + DWORD length;
>> + DWORD rc;
>> + CHAR regKey[sizeof(KeyboardKey) + 11];
>> +
>> + wsprintfA( regKey, "%s\\%08x", KeyboardKey, (unsigned)hKL );
>> + rc = RegOpenKeyA( HKEY_LOCAL_MACHINE, regKey, &keyboardKey);
>
> This should use Unicode like the rest of the function.
>
More information about the wine-devel
mailing list