Compartir a través de


IVsSccProjectEnlistmentFactory.OnBeforeEnlistmentCreate Method

Allows the project to do any special operations before the enlistment is actually created.

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

Syntax

'Declaration
Function OnBeforeEnlistmentCreate ( _
    lpszProjectPath As String, _
    lpszEnlistment As String, _
    lpszEnlistmentUNC As String _
) As Integer
int OnBeforeEnlistmentCreate(
    string lpszProjectPath,
    string lpszEnlistment,
    string lpszEnlistmentUNC
)
int OnBeforeEnlistmentCreate(
    [InAttribute] String^ lpszProjectPath, 
    [InAttribute] String^ lpszEnlistment, 
    [InAttribute] String^ lpszEnlistmentUNC
)
abstract OnBeforeEnlistmentCreate : 
        lpszProjectPath:string * 
        lpszEnlistment:string * 
        lpszEnlistmentUNC:string -> int
function OnBeforeEnlistmentCreate(
    lpszProjectPath : String, 
    lpszEnlistment : String, 
    lpszEnlistmentUNC : String
) : int

Parameters

  • lpszProjectPath
    Type: String

    [in] The original project path.

  • lpszEnlistment
    Type: String

    [in] The enlistment path to be used.

  • lpszEnlistmentUNC
    Type: String

    [in] The enlistment path 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.

Note

If this method returns an error code, the enlistment will not be created.

Remarks

COM Signature

From ivssccprojectenlistmentfactory.idl

HRESULT OnBeforeEnlistmentCreate(
   [in] LPCOLESTR lpszProjectPath,
   [in] LPCOLESTR lpszEnlistment,
   [in] LPCOLESTR lpszEnlistmentUNC
);

This method allows the project type to do any special setup required before the enlistment is created. Such setup could be creating a share to the source control server or initializing any data structures in memory that might be needed.

Any operation in this method can be reversed in the OnAfterEnlistmentCreate method, which is called after the enlistment is created.

.NET Framework Security

See Also

Reference

IVsSccProjectEnlistmentFactory Interface

Microsoft.VisualStudio.Shell.Interop Namespace