Compartir a través de


IVsSingleFileGenerator.DefaultExtension Method

Retrieves the file extension that is given to the output file name.

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

Syntax

'Declaration
Function DefaultExtension ( _
    <OutAttribute> ByRef pbstrDefaultExtension As String _
) As Integer
int DefaultExtension(
    out string pbstrDefaultExtension
)
int DefaultExtension(
    [OutAttribute] String^% pbstrDefaultExtension
)
abstract DefaultExtension : 
        pbstrDefaultExtension:string byref -> int
function DefaultExtension(
    pbstrDefaultExtension : String
) : int

Parameters

  • pbstrDefaultExtension
    Type: String%

    [out, retval] Returns the file extension that is to be given to the output file name. The returned extension must include a leading period.

Return Value

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

Remarks

The project system invokes DefaultExtension in order to determine what extension to give to the generated output file.

The project system creates the file name of the generated file by:

  • Stripping the extension of the input file.

  • Appending the extension obtained from DefaultExtension.

  • Making the file name unique, if necessary.

.NET Framework Security

See Also

Reference

IVsSingleFileGenerator Interface

Microsoft.VisualStudio.Shell.Interop Namespace