Compartilhar via


IVsFormatFilterProvider.QueryInvalidEncoding Method

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)

Syntax

'Declaration
Function QueryInvalidEncoding ( _
    Format As UInteger, _
    <OutAttribute> ByRef pbstrMessage As String _
) As Integer
int QueryInvalidEncoding(
    uint Format,
    out string pbstrMessage
)
int QueryInvalidEncoding(
    [InAttribute] unsigned int Format, 
    [OutAttribute] String^% pbstrMessage
)
abstract QueryInvalidEncoding : 
        Format:uint32 * 
        pbstrMessage:string byref -> int
function QueryInvalidEncoding(
    Format : uint, 
    pbstrMessage : String
) : int

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.

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.

.NET Framework Security

See Also

Reference

IVsFormatFilterProvider Interface

Microsoft.VisualStudio.TextManager.Interop Namespace