次の方法で共有


IVsSccProjectEnlistmentFactory.GetDefaultEnlistment Method

Definition

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

public:
 int GetDefaultEnlistment(System::String ^ lpszProjectPath, [Runtime::InteropServices::Out] System::String ^ % pbstrDefaultEnlistment, [Runtime::InteropServices::Out] System::String ^ % pbstrDefaultEnlistmentUNC);
int GetDefaultEnlistment(std::wstring const & lpszProjectPath, [Runtime::InteropServices::Out] std::wstring const & & pbstrDefaultEnlistment, [Runtime::InteropServices::Out] std::wstring const & & pbstrDefaultEnlistmentUNC);
public int GetDefaultEnlistment (string lpszProjectPath, out string pbstrDefaultEnlistment, out string pbstrDefaultEnlistmentUNC);
abstract member GetDefaultEnlistment : string * string * string -> int
Public Function GetDefaultEnlistment (lpszProjectPath As String, ByRef pbstrDefaultEnlistment As String, ByRef pbstrDefaultEnlistmentUNC As String) As Integer

Parameters

lpszProjectPath
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
String

[out] Returns the suggested enlistment destination. If there is no suggestion, then this will be a null value.

pbstrDefaultEnlistmentUNC
String

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

Returns

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.

Applies to