Compartilhar via


LanguageService.IVsFormatFilterProvider.QueryInvalidEncoding Method

Determines if the specified source format is valid or not.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)

Syntax

'Declaration
Private Function QueryInvalidEncoding ( _
    format As UInteger, _
    <OutAttribute> ByRef pbstrMessage As String _
) As Integer Implements IVsFormatFilterProvider.QueryInvalidEncoding
int IVsFormatFilterProvider.QueryInvalidEncoding(
    uint format,
    out string pbstrMessage
)
private:
virtual int QueryInvalidEncoding(
    unsigned int format, 
    [OutAttribute] String^% pbstrMessage
) sealed = IVsFormatFilterProvider::QueryInvalidEncoding
private abstract QueryInvalidEncoding : 
        format:uint32 * 
        pbstrMessage:string byref -> int  
private override QueryInvalidEncoding : 
        format:uint32 * 
        pbstrMessage:string byref -> int
JScript does not support explicit interface implementations.

Parameters

  • format
    Type: UInt32

    [in] The format to test. This is a value from __VSTFF enumeration.

  • pbstrMessage
    Type: String%

    [out] An error string describing why or how the format is invalid. Could be as simple as "The XX format is not supported."

Return Value

Type: Int32
If the format is not supported, returns S_OK; otherwise, return S_FALSE (the format is supported).

Implements

IVsFormatFilterProvider.QueryInvalidEncoding(UInt32, String%)

Remarks

The base method calls the other LanguageService.QueryInvalidEncoding and converting the return values of true and false to S_OK and S_FALSE, respectively.

.NET Framework Security

See Also

Reference

LanguageService Class

Microsoft.VisualStudio.Package Namespace