Partilhar via


IVsTrackProjectDocuments2.OnAfterRenameFile Method

Definition

This method is called by a project after a file has been renamed in the project.

public:
 int OnAfterRenameFile(Microsoft::VisualStudio::Shell::Interop::IVsProject ^ pProject, System::String ^ pszMkOldName, System::String ^ pszMkNewName, Microsoft::VisualStudio::Shell::Interop::VSRENAMEFILEFLAGS flags);
public:
 int OnAfterRenameFile(Microsoft::VisualStudio::Shell::Interop::IVsProject ^ pProject, Platform::String ^ pszMkOldName, Platform::String ^ pszMkNewName, Microsoft::VisualStudio::Shell::Interop::VSRENAMEFILEFLAGS flags);
int OnAfterRenameFile(Microsoft::VisualStudio::Shell::Interop::IVsProject const & pProject, std::wstring const & pszMkOldName, std::wstring const & pszMkNewName, Microsoft::VisualStudio::Shell::Interop::VSRENAMEFILEFLAGS flags);
public int OnAfterRenameFile (Microsoft.VisualStudio.Shell.Interop.IVsProject pProject, string pszMkOldName, string pszMkNewName, Microsoft.VisualStudio.Shell.Interop.VSRENAMEFILEFLAGS flags);
abstract member OnAfterRenameFile : Microsoft.VisualStudio.Shell.Interop.IVsProject * string * string * Microsoft.VisualStudio.Shell.Interop.VSRENAMEFILEFLAGS -> int
Public Function OnAfterRenameFile (pProject As IVsProject, pszMkOldName As String, pszMkNewName As String, flags As VSRENAMEFILEFLAGS) As Integer

Parameters

pProject
IVsProject

[in] Project containing the files that were renamed.

pszMkOldName
String

[in] Path for the old file.

pszMkNewName
String

[in] Path for the renamed file.

flags
VSRENAMEFILEFLAGS

[in] For a list of flags values, see VSRENAMEFILEFLAGS.

Returns

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

Remarks

COM Signature

From IVsTrackProjectDocuments2.idl

HRESULT IVsTrackProjectDocuments2::OnAfterRenameFile(  
   [in] IVsProject *pProject,  
   [in] LPCOLESTR pszMkOldName,  
   [in] LPCOLESTR pszMkNewName,  
   [in] VSRENAMEFILEFLAGS flags  
);  

The project calls this method after it has renamed a file to notify the environment that the file has been renamed.

Applies to