imm32: Updated implementation of the ImmGetConversionList{A|W}.

This commit is contained in:
ByeongSik Jeon 2008-05-02 12:51:04 +09:00 committed by Alexandre Julliard
parent a45a07e474
commit 37901a6592

View File

@ -1249,9 +1249,21 @@ DWORD WINAPI ImmGetConversionListA(
return immHkl->pImeConversionList(hIMC,(LPCWSTR)pSrc,lpDst,dwBufLen,uFlag); return immHkl->pImeConversionList(hIMC,(LPCWSTR)pSrc,lpDst,dwBufLen,uFlag);
else else
{ {
FIXME("A procedure called with W ime back end\n"); LPCANDIDATELIST lpwDst;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); DWORD ret = 0, len;
return 0; LPWSTR pwSrc = strdupAtoW(pSrc);
len = immHkl->pImeConversionList(hIMC, pwSrc, NULL, 0, uFlag);
lpwDst = HeapAlloc(GetProcessHeap(), 0, len);
if ( lpwDst )
{
immHkl->pImeConversionList(hIMC, pwSrc, lpwDst, len, uFlag);
ret = convert_candidatelist_WtoA( lpwDst, lpDst, dwBufLen);
HeapFree(GetProcessHeap(), 0, lpwDst);
}
HeapFree(GetProcessHeap(), 0, pwSrc);
return ret;
} }
} }
else else
@ -1275,9 +1287,21 @@ DWORD WINAPI ImmGetConversionListW(
return immHkl->pImeConversionList(hIMC,pSrc,lpDst,dwBufLen,uFlag); return immHkl->pImeConversionList(hIMC,pSrc,lpDst,dwBufLen,uFlag);
else else
{ {
FIXME("W procedure called with A ime back end\n"); LPCANDIDATELIST lpaDst;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); DWORD ret = 0, len;
return 0; LPSTR paSrc = strdupWtoA(pSrc);
len = immHkl->pImeConversionList(hIMC, (LPCWSTR)paSrc, NULL, 0, uFlag);
lpaDst = HeapAlloc(GetProcessHeap(), 0, len);
if ( lpaDst )
{
immHkl->pImeConversionList(hIMC, (LPCWSTR)paSrc, lpaDst, len, uFlag);
ret = convert_candidatelist_AtoW( lpaDst, lpDst, dwBufLen);
HeapFree(GetProcessHeap(), 0, lpaDst);
}
HeapFree(GetProcessHeap(), 0, paSrc);
return ret;
} }
} }
else else