IVsSccProjectEnlistmentFactory::ValidateEnlistmentEdit Method (Int32, String^, String^, String^, Int32)

 

Validates an enlistment choice made by the user.

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

int ValidateEnlistmentEdit(
	int fQuick,
	String^ lpszProjectPath,
	String^ lpszChosenEnlistment,
	[OutAttribute] String^% pbstrChosenEnlistmentUNC,
	[OutAttribute] int% pfValidEnlistment
)

Parameters

fQuick
Type: System::Int32

[in] Nonzero (true) if the validation should be fast (this allows the validation to be used during editing and to not slow down for things like network access).

lpszProjectPath
Type: System::String^

[in] The original project path. This is the name by which the project is known to the solution.

lpszChosenEnlistment
Type: System::String^

[in] The user's edited enlistment choice.

pbstrChosenEnlistmentUNC
Type: System::String^

[out] Returns the edited enlistment choice as a full path (UNC-style, [drive:]\path, or file://path).

pfValidEnlistment
Type: System::Int32

[out] Returns true (nonzero) if the enlistment choice is valid; returns false (0) if not valid.

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 ValidateEnlistmentEdit(
   [in] BOOL fQuick,
   [in] LPCOLESTR lpszProjectPath,
   [in] LPCOLESTR lpszChosenEnlistment,
   [out] BSTR * pbstrChosenEnlistmentUNC,
   [out] BOOL * pfValidEnlistment
);

The enlistment choice validation typically occurs because the user edited the choice. It also returns the full enlistment path based on the enlistment choice, assuming that the enlistment choice is valid.

This method can be called on the fly while the user is actively editing the enlistment choice (in an edit field). In this case, fQuick will be set to nonzero (true) so that the editing process is not adversely affected. If fQuick is zero (false), then this method can do whatever it needs to be sure the enlistment choice is valid.

Return to top
Show: