IVsTrackProjectDocumentsEvents2::OnQueryRemoveDirectories Method (IVsProject^, Int32, array<String^>^, array<VSQUERYREMOVEDIRECTORYFLAGS>^, array<VSQUERYREMOVEDIRECTORYRESULTS>^, array<VSQUERYREMOVEDIRECTORYRESULTS>^)

 

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

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

int OnQueryRemoveDirectories(
	IVsProject^ pProject,
	int cDirectories,
	array<String^>^ rgpszMkDocuments,
	array<VSQUERYREMOVEDIRECTORYFLAGS>^ rgFlags,
	array<VSQUERYREMOVEDIRECTORYRESULTS>^ pSummaryResult,
	array<VSQUERYREMOVEDIRECTORYRESULTS>^ rgResults
)

Parameters

pProject
Type: Microsoft.VisualStudio.Shell.Interop::IVsProject^

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

cDirectories
Type: System::Int32

[in] Number of directories to remove.

rgpszMkDocuments
Type: array<System::String^>^

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

rgFlags
Type: array<Microsoft.VisualStudio.Shell.Interop::VSQUERYREMOVEDIRECTORYFLAGS>^

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

pSummaryResult
Type: array<Microsoft.VisualStudio.Shell.Interop::VSQUERYREMOVEDIRECTORYRESULTS>^

[out] Summary result object. This object is a summation of the yes and no results for the array of directories passed in rgpszMkDocuments. If the result for a single directory 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
Type: array<Microsoft.VisualStudio.Shell.Interop::VSQUERYREMOVEDIRECTORYRESULTS>^

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

Return Value

Type: System::Int32

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

From IVsTrackProjectDocumentsEvents2.idl

HRESULT IVsTrackProjectDocumentsEvents2::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[]
);

Use IVsTrackProjectDocumentsEvents2.OnQueryRemoveDirectories to indicate whether specified directories can be removed from the project. Deny a query only if allowing the operation would compromise your stable state. For example, source control may deny remove queries if a directory contains files currently checked out of source control.

Return to top
Show: