IVsFormatFilterProvider::QueryInvalidEncoding Method (UInt32, String^)

 

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

Namespace:   Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

int QueryInvalidEncoding(
	unsigned int Format,
	[OutAttribute] String^% pbstrMessage
)

Parameters

Format
Type: System::UInt32

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

pbstrMessage
Type: System::String^

[out] String containing the message.

Return Value

Type: System::Int32

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

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.

Return to top
Show: