IVsTrackProjectDocumentsEvents2.OnQueryRemoveFiles Method

Definition

This method notifies the client when a project has requested to remove files.

public:
 int OnQueryRemoveFiles(Microsoft::VisualStudio::Shell::Interop::IVsProject ^ pProject, int cFiles, cli::array <System::String ^> ^ rgpszMkDocuments, cli::array <Microsoft::VisualStudio::Shell::Interop::VSQUERYREMOVEFILEFLAGS> ^ rgFlags, cli::array <Microsoft::VisualStudio::Shell::Interop::VSQUERYREMOVEFILERESULTS> ^ pSummaryResult, cli::array <Microsoft::VisualStudio::Shell::Interop::VSQUERYREMOVEFILERESULTS> ^ rgResults);
public:
 int OnQueryRemoveFiles(Microsoft::VisualStudio::Shell::Interop::IVsProject ^ pProject, int cFiles, Platform::Array <Platform::String ^> ^ rgpszMkDocuments, Platform::Array <Microsoft::VisualStudio::Shell::Interop::VSQUERYREMOVEFILEFLAGS> ^ rgFlags, Platform::Array <Microsoft::VisualStudio::Shell::Interop::VSQUERYREMOVEFILERESULTS> ^ pSummaryResult, Platform::Array <Microsoft::VisualStudio::Shell::Interop::VSQUERYREMOVEFILERESULTS> ^ rgResults);
int OnQueryRemoveFiles(Microsoft::VisualStudio::Shell::Interop::IVsProject const & pProject, int cFiles, std::Array <std::wstring const &> const & rgpszMkDocuments, std::Array <Microsoft::VisualStudio::Shell::Interop::VSQUERYREMOVEFILEFLAGS> const & rgFlags, std::Array <Microsoft::VisualStudio::Shell::Interop::VSQUERYREMOVEFILERESULTS> const & pSummaryResult, std::Array <Microsoft::VisualStudio::Shell::Interop::VSQUERYREMOVEFILERESULTS> const & rgResults);
public int OnQueryRemoveFiles (Microsoft.VisualStudio.Shell.Interop.IVsProject pProject, int cFiles, string[] rgpszMkDocuments, Microsoft.VisualStudio.Shell.Interop.VSQUERYREMOVEFILEFLAGS[] rgFlags, Microsoft.VisualStudio.Shell.Interop.VSQUERYREMOVEFILERESULTS[] pSummaryResult, Microsoft.VisualStudio.Shell.Interop.VSQUERYREMOVEFILERESULTS[] rgResults);
abstract member OnQueryRemoveFiles : Microsoft.VisualStudio.Shell.Interop.IVsProject * int * string[] * Microsoft.VisualStudio.Shell.Interop.VSQUERYREMOVEFILEFLAGS[] * Microsoft.VisualStudio.Shell.Interop.VSQUERYREMOVEFILERESULTS[] * Microsoft.VisualStudio.Shell.Interop.VSQUERYREMOVEFILERESULTS[] -> int
Public Function OnQueryRemoveFiles (pProject As IVsProject, cFiles As Integer, rgpszMkDocuments As String(), rgFlags As VSQUERYREMOVEFILEFLAGS(), pSummaryResult As VSQUERYREMOVEFILERESULTS(), rgResults As VSQUERYREMOVEFILERESULTS()) As Integer

Parameters

pProject
IVsProject

[in] Project from which the files will be removed.

cFiles
Int32

[in] Number of files to remove.

rgpszMkDocuments
String[]

[in] Array of paths for the files to be removed.

rgFlags
VSQUERYREMOVEFILEFLAGS[]

[in] Array of flags. For a list of rgFlags values, see VSQUERYREMOVEFILEFLAGS.

pSummaryResult
VSQUERYREMOVEFILERESULTS[]

[out] Summary result object. This object is a summation of the yes and no results for the array of files passed in rgpszMkDocuments. If the result for a single file is no, then pSummaryResult is equal to VSQUERYREMOVEFILERESULTS_RemoveNotOK; if the results for all files are yes, then pSummaryResult is equal to VSQUERYREMOVEFILERESULTS_RemoveOK. For a list of pSummaryResult values, see VSQUERYREMOVEFILERESULTS.

rgResults
VSQUERYREMOVEFILERESULTS[]

[out] Array of results[].For a list of rgResults values, see VSQUERYREMOVEFILERESULTS.

Returns

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

Remarks

COM Signature

From IVsTrackProjectDocumentsEvents2.idl

HRESULT IVsTrackProjectDocumentsEvents2::OnQueryRemoveFiles(  
   [in] IVsProject *pProject,  
   [in] int cFiles, [in, size_is(cFiles)] const LPCOLESTR rgpszMkDocuments[],  
   [in, size_is(cFiles)] const VSQUERYREMOVEFILEFLAGS rgFlags[],  
   [out] VSQUERYREMOVEFILERESULTS *pSummaryResult,  
   [out, size_is(cFiles)] VSQUERYREMOVEFILERESULTS rgResults[]  
);  

Use IVsTrackProjectDocumentsEvents2.OnQueryRemoveFiles to indicate whether specified files can be removed from the project. Only deny a query if allowing the operation would compromise your stable state. For example, source control may deny remove queries if a file being removed is currently checked out.

Applies to