Export (0) Print
Expand All

IVsTrackProjectDocuments2.OnQueryRemoveFiles Method

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

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

int OnQueryRemoveFiles (
	[InAttribute] IVsProject pProject,
	[InAttribute] int cFiles,
	[InAttribute] string[] rgpszMkDocuments,
	[InAttribute] VSQUERYREMOVEFILEFLAGS[] rgFlags,
	[OutAttribute] VSQUERYREMOVEFILERESULTS[] pSummaryResult,
	[OutAttribute] VSQUERYREMOVEFILERESULTS[] rgResults
)
int OnQueryRemoveFiles (
	/** @attribute InAttribute() */ IVsProject pProject, 
	/** @attribute InAttribute() */ int cFiles, 
	/** @attribute InAttribute() */ String[] rgpszMkDocuments, 
	/** @attribute InAttribute() */ VSQUERYREMOVEFILEFLAGS[] rgFlags, 
	/** @attribute OutAttribute() */ VSQUERYREMOVEFILERESULTS[] pSummaryResult, 
	/** @attribute OutAttribute() */ VSQUERYREMOVEFILERESULTS[] rgResults
)
function OnQueryRemoveFiles (
	pProject : IVsProject, 
	cFiles : int, 
	rgpszMkDocuments : String[], 
	rgFlags : VSQUERYREMOVEFILEFLAGS[], 
	pSummaryResult : VSQUERYREMOVEFILERESULTS[], 
	rgResults : VSQUERYREMOVEFILERESULTS[]
) : int

Parameters

pProject

[in] Project containing the files to remove.

cFiles

[in] Number of files to remove.

rgpszMkDocuments

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

rgFlags

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

pSummaryResult

[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

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

NoteNote

If you pass in a null reference (Nothing in Visual Basic) for this parameter, then only the summary result will be returned (pSummaryResult).

Return Value

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

COM Signature

From IVsTrackProjectDocuments2.idl

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

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

Community Additions

ADD
Show:
© 2014 Microsoft