Compartilhar via


IVsSolution.OnAfterRenameProject(IVsProject, String, String, UInt32) Method

Definition

Completes the renaming of a project.

public:
 int OnAfterRenameProject(Microsoft::VisualStudio::Shell::Interop::IVsProject ^ pProject, System::String ^ pszMkOldName, System::String ^ pszMkNewName, System::UInt32 dwReserved);
public:
 int OnAfterRenameProject(Microsoft::VisualStudio::Shell::Interop::IVsProject ^ pProject, Platform::String ^ pszMkOldName, Platform::String ^ pszMkNewName, unsigned int dwReserved);
int OnAfterRenameProject(Microsoft::VisualStudio::Shell::Interop::IVsProject const & pProject, std::wstring const & pszMkOldName, std::wstring const & pszMkNewName, unsigned int dwReserved);
public int OnAfterRenameProject (Microsoft.VisualStudio.Shell.Interop.IVsProject pProject, string pszMkOldName, string pszMkNewName, uint dwReserved);
abstract member OnAfterRenameProject : Microsoft.VisualStudio.Shell.Interop.IVsProject * string * string * uint32 -> int
Public Function OnAfterRenameProject (pProject As IVsProject, pszMkOldName As String, pszMkNewName As String, dwReserved As UInteger) As Integer

Parameters

pProject
IVsProject

[in] IVsProject pointer for the project to rename.

pszMkOldName
String

[in] Old name of the project on disk.

pszMkNewName
String

[in] New name of the project on disk.

dwReserved
UInt32

[in] Reserved for future use.

Returns

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsSolution::OnAfterRenameProject(  
   [in] IVsProject *pProject,  
   [in] LPCOLESTR pszMkOldName,  
   [in] LPCOLESTR pszMkNewName,  
   [in] DWORD dwReserved  
);  

This method completes the renaming of a project. If the project is stored in the file system, the caller is required to rename the file in the file system prior to calling this method (for example, by calling the MoveFile method in the Platform SDK). This method handles updating the running document table and notifying IVsTrackProjectDocuments2 so that clients (for example, source control) can know that the project file has been renamed.

Applies to