Compartilhar via


IVsSolution2.OnAfterRenameProject Method

Completes the renaming of a project.

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

Syntax

'Declaration
Function OnAfterRenameProject ( _
    pProject As IVsProject, _
    pszMkOldName As String, _
    pszMkNewName As String, _
    dwReserved As UInteger _
) As Integer
int OnAfterRenameProject(
    IVsProject pProject,
    string pszMkOldName,
    string pszMkNewName,
    uint dwReserved
)
int OnAfterRenameProject(
    [InAttribute] IVsProject^ pProject, 
    [InAttribute] String^ pszMkOldName, 
    [InAttribute] String^ pszMkNewName, 
    [InAttribute] unsigned int dwReserved
)
abstract OnAfterRenameProject : 
        pProject:IVsProject * 
        pszMkOldName:string * 
        pszMkNewName:string * 
        dwReserved:uint32 -> int
function OnAfterRenameProject(
    pProject : IVsProject, 
    pszMkOldName : String, 
    pszMkNewName : String, 
    dwReserved : uint
) : int

Parameters

  • pszMkOldName
    Type: String

    [in] Old name of the project on disk.

  • pszMkNewName
    Type: String

    [in] New name of the project on disk.

  • dwReserved
    Type: UInt32

    [in] Reserved for future use.

Return Value

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsSolution2::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.

.NET Framework Security

See Also

Reference

IVsSolution2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace