function QueryCompStr(hKB: HKL;
const sChinese: AnsiString): string;
var
dwGCL: DWORD;
szBuffer: array[0..254] of char;
iMaxKey, iStart, i: integer;
begin
Result := '';
iMaxKey := ImmEscape(hKB, 0, IME_ESC_MAX_KEY, nil);
if iMaxKey <= 0 then
exit;
dwGCL := ImmGetConversionList(hKB,0,pchar(sChinese),nil,0,GCL_REVERSECONVERSION);
if dwGCL <= 0 then
Exit;
dwGCL := ImmGetConversionList(hKB,0,pchar(sChinese),@szBuffer,dwGCL,GCL_REVERSECONVERSION);
if dwGCL > 0 then
begin
iStart := byte(szBuffer[24]);
for i := iStart to iStart + iMaxKey * 2do
AppendStr(Result, szBuffer);
end;
end;
这个你看是不是?