Share via


IVsSccProjectEnlistmentFactory.OnBeforeEnlistmentCreate Method

Definition

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

public:
 int OnBeforeEnlistmentCreate(System::String ^ lpszProjectPath, System::String ^ lpszEnlistment, System::String ^ lpszEnlistmentUNC);
public:
 int OnBeforeEnlistmentCreate(Platform::String ^ lpszProjectPath, Platform::String ^ lpszEnlistment, Platform::String ^ lpszEnlistmentUNC);
int OnBeforeEnlistmentCreate(std::wstring const & lpszProjectPath, std::wstring const & lpszEnlistment, std::wstring const & lpszEnlistmentUNC);
public int OnBeforeEnlistmentCreate (string lpszProjectPath, string lpszEnlistment, string lpszEnlistmentUNC);
abstract member OnBeforeEnlistmentCreate : string * string * string -> int
Public Function OnBeforeEnlistmentCreate (lpszProjectPath As String, lpszEnlistment As String, lpszEnlistmentUNC As String) As Integer

Parameters

lpszProjectPath
String

[in] The original project path.

lpszEnlistment
String

[in] The enlistment path to be used.

lpszEnlistmentUNC
String

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

Applies to