Compartir a través de


IVsTrackProjectDocuments2.OnQueryRemoveDirectories Method

This method is called by a project to determine whether directories can be removed from the project.

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

Syntax

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

Parameters

  • cDirectories
    Type: Int32

    [in] Number of directories to remove.

  • rgpszMkDocuments
    Type: array<String[]

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

Return Value

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

Remarks

COM Signature

From IVsTrackProjectDocuments2.idl

HRESULT IVsTrackProjectDocuments2::OnQueryRemoveDirectories(
   [in] IVsProject *pProject,
   [in] int cDirectories,
   [in, size_is(cDirectories)] const LPCOLESTR rgpszMkDocuments[],
   [in, size_is(cDirectories)] const VSQUERYREMOVEDIRECTORYFLAGS rgFlags[],
   [out] VSQUERYREMOVEDIRECTORYRESULTS *pSummaryResult,
   [out, size_is(cDirectories)] VSQUERYREMOVEDIRECTORYRESULTS rgResults[]
);

Call this method when you want to remove directories from the project. This method must be called before the directories are removed. The environment will return a flag indicating which directories can be removed. After you have received authorization to remove the directories and you have removed them, call OnAfterRemoveDirectories to confirm that the directories have been removed.

Note

All directory calls are optional. However, if you call one of the OnQuery* directory methods, then you are required to call the corresponding OnAfter* directory method if the OnQuery* call was successful.

.NET Framework Security

See Also

Reference

IVsTrackProjectDocuments2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace