You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while (enumCompositionView.Next(1, compositionView, out fetchCount) && fetchCount > 0)
{
ITfRange range;
result = compositionView[0].GetRange(out range);
if (result)
{
var text = new char[256];
var writeCount = 0U;
//bool isEmpty;
//range.IsEmpty(ecReadOnly, out isEmpty);
range.GetText(ecReadOnly, TF_TF.TF_TF_MOVESTART, text, 255, out writeCount);
var tempStr = new string(text).Trim('\0');
resultStr += tempStr;
System.Diagnostics.Debug.WriteLine($"{tempStr}");
//OnTextOutput?.Invoke(tempStr);
//Debug.WriteLine("resultStr={0}, tempStr={1}", resultStr, tempStr);
}
Marshal.ReleaseComObject(compositionView[0]);
}
range.GetText(ecReadOnly, TF_TF.TF_TF_MOVESTART, text, 255, out writeCount);
这一句永远返回空字符串,求解
The text was updated successfully, but these errors were encountered:
while (enumCompositionView.Next(1, compositionView, out fetchCount) && fetchCount > 0)
{
ITfRange range;
result = compositionView[0].GetRange(out range);
if (result)
{
var text = new char[256];
var writeCount = 0U;
//bool isEmpty;
//range.IsEmpty(ecReadOnly, out isEmpty);
range.GetText(ecReadOnly, TF_TF.TF_TF_MOVESTART, text, 255, out writeCount);
var tempStr = new string(text).Trim('\0');
resultStr += tempStr;
System.Diagnostics.Debug.WriteLine($"{tempStr}");
//OnTextOutput?.Invoke(tempStr);
//Debug.WriteLine("resultStr={0}, tempStr={1}", resultStr, tempStr);
}
range.GetText(ecReadOnly, TF_TF.TF_TF_MOVESTART, text, 255, out writeCount);
这一句永远返回空字符串,求解
The text was updated successfully, but these errors were encountered: