This documentation is archived and is not being maintained.

IVsTrackProjectDocuments2.OnAfterRemoveFiles Method

This method is called by a project after files have been removed from the project.

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

int OnAfterRemoveFiles (
	[InAttribute] IVsProject pProject,
	[InAttribute] int cFiles,
	[InAttribute] string[] rgpszMkDocuments,
	[InAttribute] VSREMOVEFILEFLAGS[] rgFlags
int OnAfterRemoveFiles (
	/** @attribute InAttribute() */ IVsProject pProject, 
	/** @attribute InAttribute() */ int cFiles, 
	/** @attribute InAttribute() */ String[] rgpszMkDocuments, 
	/** @attribute InAttribute() */ VSREMOVEFILEFLAGS[] rgFlags
function OnAfterRemoveFiles (
	pProject : IVsProject, 
	cFiles : int, 
	rgpszMkDocuments : String[], 
) : int



[in] Project from which the files have been removed.


[in] Number of files that were removed.


[in, size_is(cFiles)] Array of paths for the files that were removed.


[in, size_is(cFiles)] Array of flags. For a list of rgFlags values, see VSREMOVEFILEFLAGS.

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::OnAfterRemoveFiles(
   [in] IVsProject *pProject,
   [in] int cFiles,
   [in, size_is(cFiles)] const LPCOLESTR rgpszMkDocuments[],
   [in, size_is(cFiles)] const VSREMOVEFILEFLAGS rgFlags[]

The project must call this method after it has removed files to notify the environment that the files have been removed.