IVsFormatFilterProvider.QueryInvalidEncoding(UInt32, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供一条消息,告知用户他已经选择了语言服务不支持的编码。
public:
int QueryInvalidEncoding(System::UInt32 Format, [Runtime::InteropServices::Out] System::String ^ % pbstrMessage);
int QueryInvalidEncoding(unsigned int Format, [Runtime::InteropServices::Out] std::wstring const & & pbstrMessage);
public int QueryInvalidEncoding (uint Format, out string pbstrMessage);
abstract member QueryInvalidEncoding : uint32 * string -> int
Public Function QueryInvalidEncoding (Format As UInteger, ByRef pbstrMessage As String) As Integer
参数
- pbstrMessage
- String
弄包含消息的字符串。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。
注解
COM 签名
从 textmgr:
HRESULT IVsFormatFilterProvider::QueryInvalidEncoding(
[in]VSTFF format,
[out] BSTR * pbstrMessage
);
QueryInvalidEncoding 当用户选择了语言工具不支持的编码时,允许语言服务提供相应的消息。 例如,如果编译器无法接受 Unicode 或 UTF-8 源文件,则适用于警告用户他们选择了不兼容的编码。