大网数据广告活动
Windows 系统接口

IWordInfo::BreakText method

· 52CE 我爱测

Parses text to identify words and provides the results to the WordSink object.

[This method is obsolete and is not supported on Windows Vista.]

Parses text to identify words and provides the results to the WordSink object.

Syntax

HRESULT BreakText(
  [in] TEXT_SOURCE *pTextSource,
  [in] IWordSink   *pWordSink,
  [in] DWORD       fBreakMode
);

Parameters

pTextSource [in]

A pointer to a TEXT_SOURCE structure that contains the Unicode text.

pWordSink [in]

A pointer to the WordSink object that receives and handles the words generated by this method. If this parameter is NULL, the method does not break the string into words.

fBreakMode [in]

The break mode. This parameter can be one of the following values.

Value Meaning
IWORDINFO_BREAKTEXTMODE_DICTFORM 0x00000002 Word break the text string and pass the dictionary form of the words to the WordSink object.
IWORDINFO_BREAKTEXTMODE_SMARTSEL 0x00000001 Word break the text string and pass the words to the WordSink object.

Return value

This method returns one of the following values.

Return code Description
S_OK The operation succeeded. There is no more text available to refill the pTextSource buffer.
E_FAIL The pTextSource parameter is NULL.

Remarks

Use the pfnFillTextBuffer member of the TEXT_SOURCE structure to replenish the source text. This method must handle all return values from the pfnFillTextBuffer callback function. If an error occurs, finish processing the text in the buffer before handling the error.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
End of client support Windows XP
End of server support Windows Server 2003
DLL Msir3jp.dll

See also

IWordInfo

TEXT_SOURCE

WordInfo

WordSink

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。