Share via


IVsTrackProjectDocumentsEvents2.OnQueryAddDirectories Method

This method notifies the client when a project has requested to add directories.

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

Syntax

'Declaration
Function OnQueryAddDirectories ( _
    pProject As IVsProject, _
    cDirectories As Integer, _
    rgpszMkDocuments As String(), _
    rgFlags As VSQUERYADDDIRECTORYFLAGS(), _
    <OutAttribute> pSummaryResult As VSQUERYADDDIRECTORYRESULTS(), _
    <OutAttribute> rgResults As VSQUERYADDDIRECTORYRESULTS() _
) As Integer
int OnQueryAddDirectories(
    IVsProject pProject,
    int cDirectories,
    string[] rgpszMkDocuments,
    VSQUERYADDDIRECTORYFLAGS[] rgFlags,
    VSQUERYADDDIRECTORYRESULTS[] pSummaryResult,
    VSQUERYADDDIRECTORYRESULTS[] rgResults
)
int OnQueryAddDirectories(
    [InAttribute] IVsProject^ pProject, 
    [InAttribute] int cDirectories, 
    [InAttribute] array<String^>^ rgpszMkDocuments, 
    [InAttribute] array<VSQUERYADDDIRECTORYFLAGS>^ rgFlags, 
    [OutAttribute] array<VSQUERYADDDIRECTORYRESULTS>^ pSummaryResult, 
    [OutAttribute] array<VSQUERYADDDIRECTORYRESULTS>^ rgResults
)
abstract OnQueryAddDirectories : 
        pProject:IVsProject * 
        cDirectories:int * 
        rgpszMkDocuments:string[] * 
        rgFlags:VSQUERYADDDIRECTORYFLAGS[] * 
        pSummaryResult:VSQUERYADDDIRECTORYRESULTS[] byref * 
        rgResults:VSQUERYADDDIRECTORYRESULTS[] byref -> int
function OnQueryAddDirectories(
    pProject : IVsProject, 
    cDirectories : int, 
    rgpszMkDocuments : String[], 
    rgFlags : VSQUERYADDDIRECTORYFLAGS[], 
    pSummaryResult : VSQUERYADDDIRECTORYRESULTS[], 
    rgResults : VSQUERYADDDIRECTORYRESULTS[]
) : int

Parameters

  • cDirectories
    Type: System.Int32

    [in] Number of directories to add.

  • rgpszMkDocuments
    Type: array<System.String[]

    [in] Array of paths for the directories to add.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From IVsTrackProjectDocumentsEvents2.idl

HRESULT IVsTrackProjectDocumentsEvents2::OnQueryAddDirectories(
   [in] IVsProject *pProject,
   [in] int cDirectories,
   [in, size_is(cDirectories)] const LPCOLESTR rgpszMkDocuments[],
   [in, size_is(cDirectories)] const VSQUERYADDDIRECTORYFLAGS rgFlags[],
   [out] VSQUERYADDDIRECTORYRESULTS *pSummaryResult,
   [out, size_is(cDirectories)] VSQUERYADDDIRECTORYRESULTS rgResults[]
);

Use IVsTrackProjectDocumentsEvents2.OnQueryAddDirectories to indicate whether specified directories can be added to the project. Deny a query only if allowing the operation would compromise your stable state. For example, source control denies add queries if a file being added conflicts with an existing file already under source control.

.NET Framework Security

See Also

Reference

IVsTrackProjectDocumentsEvents2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace