ByeongSik Jeon : imm32: Updated implementation of the ImmGetConversionList{A|W}.
Alexandre Julliard
julliard at winehq.org
Fri May 2 07:06:33 CDT 2008
Module: wine
Branch: master
Commit: 37901a6592f3dfd2f03a007aa3fb25e1e03cf19b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=37901a6592f3dfd2f03a007aa3fb25e1e03cf19b
Author: ByeongSik Jeon <bsjeon at hanmail.net>
Date: Fri May 2 12:51:04 2008 +0900
imm32: Updated implementation of the ImmGetConversionList{A|W}.
---
dlls/imm32/imm.c | 36 ++++++++++++++++++++++++++++++------
1 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c
index f382f2b..8b539de 100644
--- a/dlls/imm32/imm.c
+++ b/dlls/imm32/imm.c
@@ -1249,9 +1249,21 @@ DWORD WINAPI ImmGetConversionListA(
return immHkl->pImeConversionList(hIMC,(LPCWSTR)pSrc,lpDst,dwBufLen,uFlag);
else
{
- FIXME("A procedure called with W ime back end\n");
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+ LPCANDIDATELIST lpwDst;
+ DWORD ret = 0, len;
+ 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
@@ -1275,9 +1287,21 @@ DWORD WINAPI ImmGetConversionListW(
return immHkl->pImeConversionList(hIMC,pSrc,lpDst,dwBufLen,uFlag);
else
{
- FIXME("W procedure called with A ime back end\n");
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+ LPCANDIDATELIST lpaDst;
+ DWORD ret = 0, len;
+ 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
More information about the wine-cvs
mailing list