Compartilhar via


IVsSccProjectEnlistmentFactory.ValidateEnlistmentEdit Method

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)

Syntax

'Declaration
Function ValidateEnlistmentEdit ( _
    fQuick As Integer, _
    lpszProjectPath As String, _
    lpszChosenEnlistment As String, _
    <OutAttribute> ByRef pbstrChosenEnlistmentUNC As String, _
    <OutAttribute> ByRef pfValidEnlistment As Integer _
) As Integer
int ValidateEnlistmentEdit(
    int fQuick,
    string lpszProjectPath,
    string lpszChosenEnlistment,
    out string pbstrChosenEnlistmentUNC,
    out int pfValidEnlistment
)
int ValidateEnlistmentEdit(
    [InAttribute] int fQuick, 
    [InAttribute] String^ lpszProjectPath, 
    [InAttribute] String^ lpszChosenEnlistment, 
    [OutAttribute] String^% pbstrChosenEnlistmentUNC, 
    [OutAttribute] int% pfValidEnlistment
)
abstract ValidateEnlistmentEdit : 
        fQuick:int * 
        lpszProjectPath:string * 
        lpszChosenEnlistment:string * 
        pbstrChosenEnlistmentUNC:string byref * 
        pfValidEnlistment:int byref -> int
function ValidateEnlistmentEdit(
    fQuick : int, 
    lpszProjectPath : String, 
    lpszChosenEnlistment : String, 
    pbstrChosenEnlistmentUNC : String, 
    pfValidEnlistment : int
) : int

Parameters

  • fQuick
    Type: 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: String

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

  • lpszChosenEnlistment
    Type: String

    [in] The user's edited enlistment choice.

  • pbstrChosenEnlistmentUNC
    Type: String%

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

  • pfValidEnlistment
    Type: Int32%

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

Return Value

Type: Int32
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.

.NET Framework Security

See Also

Reference

IVsSccProjectEnlistmentFactory Interface

Microsoft.VisualStudio.Shell.Interop Namespace