by Michael S. Kaplan, published on 2008/07/27 21:39 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2008/07/27/8781762.aspx
Allan asks via the Contact link:
Thanks for a great blog; it's the most insightfull (and honest) look at the whole IME business. I remember running into a Mr Kaplan at one of the Microsoft Game Meltdown events; is that part of your past, before respectability and keyboards?
Anyways; I'm trying to port our IME code for a fullscreen D3D8 application (yes, I know.. we're almost pre-historic, but sadly we make casual games, and to that audience, DX8 is cutting edge). We're having a pain of a time getting IME to work on Vista using the IMM framework, but since functions like ImmGetCandidateListW are broken (returns with no response).
Are we going to need to rewrite everything to use TSF (in all it's undocumented glory?), or are there ways to beat this beast into submission.
At the time when I wrote most of my previous comments I was unaware of it, but I have since found out that the original Input Method Manager (IMM) based IME samples won't actually compile with the header files from the Vista SDK or the Vista version of the Platform SDK. and none of the IMEs that ship with Windows rely on the IMM API.
Now for a few features the IMM API provides interesting shortcuts into getting information, and there is a huge compatibility layer that is used to support applications that use the IMM API to still work properly without change, but that layer does not have 100% coverage of the functionality across Vista and later versions of Windows, so I think in the end people will really be pushed to use the Text Services Framework to get their work done.
From a timing perspective that change will most likely happen as soon as an application runs into a blocking bug in that compatibility later provided by the IMM API, as soon as Vista is targeted.
There is a huge investment here, so I suspect that reported bugs have a decent chance of getting fixed, especially when they block functionality of existing applications, but this is hard to rely on and will ultimately have the biggest effect on applications in China, Japan, and Korea any time they are blocked because of this issue.
Regular readers might recall the ImmGetCandidiateList on Vista issue being mentioned here previously, in Sprechen Sie IME?.
Interestingly, the function does not fail for all IMEs, only some of them.
Though the ones it fails for probably aren't all that reassured by this fact.
Further, I was told by a few people that in some cases it is only the "ImmGetCandidateList(hIMC, dwIndex, NULL, 0)" code that is intended to get the required length that fails -- if one passes in fully sized buffers one can actually succeed, and supposedly just passing a non-NULL buffer with a 0 length can sometimes help, too.
People it fails for are probably not that much reassured by this, either.
And finally, I have been told that sometimes doing the lower level work oneself via ImmLockClientImc/ImmLockIMC/ImmLockIMCC/etc. directly can also help here, though I suspect that these are cases where the bigger buffer sizes would also do the trick, so I am skeptical.
In any case, the specific TSF interfaces involving the candidate list are:
And it is the last two that are most interesting for clients who would have wanted the results of ImmGetCandidiateList back in the day.
There is more information what to do over in TSF Aware in the Text Services: Candidates blog -- though centered on the applications, it is at least talking about how to get the info a bit.
Of course the samples on this page are still missing, though those samples are definitely centering around providers rather than clients so they wouldn't help here....
This blog brought to you by の (U+306e, aka HIRAGANA LETTER NO)
Michael S. Kaplan on 27 Jul 2008 9:41 PM:
For the record, I am not that Mr. Kaplan from the Game Meltdown event. :-)
David Bromberg on 12 Dec 2008 3:04 PM:
I'm seeing similar problems in XP SP3 that work with SP2. Anyone know if Microsoft did a similiar changeover of the API's here? I can't find anything in their release notes.
go to newer or older post, or back to index or month or day