Compartir a través de


IVsTrackProjectDocuments2.OnAfterRenameFile Method

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

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

Syntax

'Declaración
Function OnAfterRenameFile ( _
    pProject As IVsProject, _
    pszMkOldName As String, _
    pszMkNewName As String, _
    flags As VSRENAMEFILEFLAGS _
) As Integer
'Uso
Dim instance As IVsTrackProjectDocuments2
Dim pProject As IVsProject
Dim pszMkOldName As String
Dim pszMkNewName As String
Dim flags As VSRENAMEFILEFLAGS
Dim returnValue As Integer

returnValue = instance.OnAfterRenameFile(pProject, _
    pszMkOldName, pszMkNewName, flags)
int OnAfterRenameFile(
    IVsProject pProject,
    string pszMkOldName,
    string pszMkNewName,
    VSRENAMEFILEFLAGS flags
)
int OnAfterRenameFile(
    [InAttribute] IVsProject^ pProject, 
    [InAttribute] String^ pszMkOldName, 
    [InAttribute] String^ pszMkNewName, 
    [InAttribute] VSRENAMEFILEFLAGS flags
)
function OnAfterRenameFile(
    pProject : IVsProject, 
    pszMkOldName : String, 
    pszMkNewName : String, 
    flags : VSRENAMEFILEFLAGS
) : int

Parameters

  • pszMkNewName
    Type: System.String

    [in] Path for the renamed file.

Return Value

Type: System.Int32

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.

Permissions

See Also

Reference

IVsTrackProjectDocuments2 Interface

IVsTrackProjectDocuments2 Members

Microsoft.VisualStudio.Shell.Interop Namespace