Share via


IVsFormatFilterProvider.QueryInvalidEncoding(UInt32, String) Method

Definition

Supplies a message informing the user that he has chosen encoding that is not supported by the language service.

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

Parameters

Format
UInt32

[in] Type of encoding specified. Values are taken from the __VSTFF enumeration.

pbstrMessage
String

[out] String containing the message.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsFormatFilterProvider::QueryInvalidEncoding(  
   [in]VSTFF format,  
   [out] BSTR * pbstrMessage  
);  

QueryInvalidEncoding allows the language service to supply an appropriate message when the user has chosen an encoding that is not supported by the language tools. For example, if the compiler is unable to accept Unicode or UTF-8 source files, it is appropriate to warn users that they have chosen an incompatible encoding.

Applies to