IVsSccProjectEnlistmentFactory::GetDefaultEnlistment Method (String^, String^, String^)

 

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)

int GetDefaultEnlistment(
	String^ lpszProjectPath,
	[OutAttribute] String^% pbstrDefaultEnlistment,
	[OutAttribute] String^% pbstrDefaultEnlistmentUNC
)

Parameters

lpszProjectPath
Type: System::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: System::String^

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

pbstrDefaultEnlistmentUNC
Type: System::String^

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

Return Value

Type: System::Int32

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

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.

Return to top
Show: