检索有关配置字符串的信息。调用包装到 ImmGetCompositionString。
命名空间: Microsoft.VisualStudio.Shell.Interop
程序集: Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)
语法
声明
Function GetImmCompositionString ( _
HIMC As UInteger, _
dwIndex As UInteger, _
<OutAttribute> ByRef pbstrCompString As String, _
<OutAttribute> ByRef plRetVal As Integer _
) As Integer
int GetImmCompositionString(
uint HIMC,
uint dwIndex,
out string pbstrCompString,
out int plRetVal
)
参数
- HIMC
类型:System.UInt32
[in] 向 IME 上下文的句柄。
- dwIndex
类型:System.UInt32
[in] 检索信息的索引。有关可能的值的更多信息,请参见 IME 组合字符串值。
- pbstrCompString
类型:System.String%
[out] 二进制缓冲区不支持 Unicode 字符串。发布使用 SysAllocStringByteLen。有关更多信息,请参见ImmSetCompositionString
并 ImmGetCompositionString。
- plRetVal
类型:System.Int32%
[out] 访问返回值的指针。在字节包含字节数复制到目标缓冲区; 或者,如果 dwBufLen 为零,缓冲区大小,,需要获取所有信息。该大小始终在字节,因此,即使该请求的数据是 Unicode 字符串。
在错误,将设置为两个值之一:IMM_ERROR_NODATA 或 IMM_ERROR_GENERAL。
返回值
类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
COM 签名
从 vsshell.idl:
HRESULT IVsIME::GetImmCompositionString(
[in] HIMC himc,
[in] DWORD dwIndex,
[out] BSTR *pbstrCompString,
[out] LONG * plRetVal
);
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。