IVsSccProjectEnlistmentFactory.ValidateEnlistmentEdit Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Validates an enlistment choice made by the user.
public:
int ValidateEnlistmentEdit(int fQuick, System::String ^ lpszProjectPath, System::String ^ lpszChosenEnlistment, [Runtime::InteropServices::Out] System::String ^ % pbstrChosenEnlistmentUNC, [Runtime::InteropServices::Out] int % pfValidEnlistment);
int ValidateEnlistmentEdit(int fQuick, std::wstring const & lpszProjectPath, std::wstring const & lpszChosenEnlistment, [Runtime::InteropServices::Out] std::wstring const & & pbstrChosenEnlistmentUNC, [Runtime::InteropServices::Out] int & pfValidEnlistment);
public int ValidateEnlistmentEdit (int fQuick, string lpszProjectPath, string lpszChosenEnlistment, out string pbstrChosenEnlistmentUNC, out int pfValidEnlistment);
abstract member ValidateEnlistmentEdit : int * string * string * string * int -> int
Public Function ValidateEnlistmentEdit (fQuick As Integer, lpszProjectPath As String, lpszChosenEnlistment As String, ByRef pbstrChosenEnlistmentUNC As String, ByRef pfValidEnlistment As Integer) As Integer
Parameters
- fQuick
- 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
- String
[in] The original project path. This is the name by which the project is known to the solution.
- lpszChosenEnlistment
- String
[in] The user's edited enlistment choice.
- pbstrChosenEnlistmentUNC
- String
[out] Returns the edited enlistment choice as a full path (UNC-style, [drive:]\path, or file://path).
- pfValidEnlistment
- Int32
[out] Returns true
(nonzero) if the enlistment choice is valid; returns false
(0) if not valid.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
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.