Compartir a través de


IVsSccProjectEnlistmentFactory.GetDefaultEnlistment Method

Retrieves the suggested enlistment path based on the specified project path.

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

Syntax

'Declaration
Function GetDefaultEnlistment ( _
    lpszProjectPath As String, _
    <OutAttribute> ByRef pbstrDefaultEnlistment As String, _
    <OutAttribute> ByRef pbstrDefaultEnlistmentUNC As String _
) As Integer
int GetDefaultEnlistment(
    string lpszProjectPath,
    out string pbstrDefaultEnlistment,
    out string pbstrDefaultEnlistmentUNC
)
int GetDefaultEnlistment(
    [InAttribute] String^ lpszProjectPath, 
    [OutAttribute] String^% pbstrDefaultEnlistment, 
    [OutAttribute] String^% pbstrDefaultEnlistmentUNC
)
abstract GetDefaultEnlistment : 
        lpszProjectPath:string * 
        pbstrDefaultEnlistment:string byref * 
        pbstrDefaultEnlistmentUNC:string byref -> int
function GetDefaultEnlistment(
    lpszProjectPath : String, 
    pbstrDefaultEnlistment : String, 
    pbstrDefaultEnlistmentUNC : String
) : int

Parameters

  • lpszProjectPath
    Type: String

    [in] The project's path as read from the solution file (this is the name the project is known as to the solution).

  • pbstrDefaultEnlistment
    Type: String%

    [out] Returns the suggested enlistment destination. If there is no suggestion, then this will be a nulla null reference (Nothing in Visual Basic) value.

  • pbstrDefaultEnlistmentUNC
    Type: String%

    [out] Returns the suggested enlistment destination as a fully qualified path (UNC-style, [drive:]\path, or file://path).

Return Value

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

Remarks

COM Signature

From ivssccprojectenlistmentfactory.idl

HRESULT GetDefaultEnlistment(
   [in] LPCOLESTR lpszProjectPath,
   [out] BSTR * pbstrDefaultEnlistment,
   [out] BSTR * pbstrDefaultEnlistmentUNC
);

This path can be changed by the user later if desired. The path returned by this method is only a suggestion to be used as a default value that the user can later change.

.NET Framework Security

See Also

Reference

IVsSccProjectEnlistmentFactory Interface

Microsoft.VisualStudio.Shell.Interop Namespace