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

 

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)

int OnBeforeEnlistmentCreate(
	String^ lpszProjectPath,
	String^ lpszEnlistment,
	String^ lpszEnlistmentUNC
)

Parameters

lpszProjectPath
Type: System::String^

[in] The original project path.

lpszEnlistment
Type: System::String^

[in] The enlistment path to be used.

lpszEnlistmentUNC
Type: System::String^

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

System_CAPS_noteNote

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

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.

Return to top
Show: