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
'宣言
Function GetDefaultEnlistment ( _
lpszProjectPath As String, _
<OutAttribute> ByRef pbstrDefaultEnlistment As String, _
<OutAttribute> ByRef pbstrDefaultEnlistmentUNC As String _
) As Integer
'使用
Dim instance As IVsSccProjectEnlistmentFactory
Dim lpszProjectPath As String
Dim pbstrDefaultEnlistment As String
Dim pbstrDefaultEnlistmentUNC As String
Dim returnValue As Integer
returnValue = instance.GetDefaultEnlistment(lpszProjectPath, _
pbstrDefaultEnlistment, pbstrDefaultEnlistmentUNC)
int GetDefaultEnlistment(
string lpszProjectPath,
out string pbstrDefaultEnlistment,
out string pbstrDefaultEnlistmentUNC
)
int GetDefaultEnlistment(
[InAttribute] String^ lpszProjectPath,
[OutAttribute] String^% pbstrDefaultEnlistment,
[OutAttribute] String^% pbstrDefaultEnlistmentUNC
)
function GetDefaultEnlistment(
lpszProjectPath : String,
pbstrDefaultEnlistment : String,
pbstrDefaultEnlistmentUNC : String
) : int
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 a null reference (Nothing in Visual Basic) 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.
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.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
IVsSccProjectEnlistmentFactory Interface