Partager via


IVsTrackProjectDocuments2.OnAfterRenameFiles Method

This method is called by a project after files have been renamed in the project.

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

Syntax

'Déclaration
Function OnAfterRenameFiles ( _
    pProject As IVsProject, _
    cFiles As Integer, _
    rgszMkOldNames As String(), _
    rgszMkNewNames As String(), _
    rgFlags As VSRENAMEFILEFLAGS() _
) As Integer
'Utilisation
Dim instance As IVsTrackProjectDocuments2
Dim pProject As IVsProject
Dim cFiles As Integer
Dim rgszMkOldNames As String()
Dim rgszMkNewNames As String()
Dim rgFlags As VSRENAMEFILEFLAGS()
Dim returnValue As Integer

returnValue = instance.OnAfterRenameFiles(pProject, _
    cFiles, rgszMkOldNames, rgszMkNewNames, _
    rgFlags)
int OnAfterRenameFiles(
    IVsProject pProject,
    int cFiles,
    string[] rgszMkOldNames,
    string[] rgszMkNewNames,
    VSRENAMEFILEFLAGS[] rgFlags
)
int OnAfterRenameFiles(
    [InAttribute] IVsProject^ pProject, 
    [InAttribute] int cFiles, 
    [InAttribute] array<String^>^ rgszMkOldNames, 
    [InAttribute] array<String^>^ rgszMkNewNames, 
    [InAttribute] array<VSRENAMEFILEFLAGS>^ rgFlags
)
function OnAfterRenameFiles(
    pProject : IVsProject, 
    cFiles : int, 
    rgszMkOldNames : String[], 
    rgszMkNewNames : String[], 
    rgFlags : VSRENAMEFILEFLAGS[]
) : int

Parameters

  • cFiles
    Type: System.Int32

    [in] Number of files that were renamed.

  • rgszMkOldNames
    Type: array<System.String[]

    [in] Array of paths for the old files' names.

  • rgszMkNewNames
    Type: array<System.String[]

    [in] Array of paths for the new files' names.

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::OnAfterRenameFiles(
   [in] IVsProject *pProject,
   [in] int cFiles,
   [in, size_is(cFiles)] const LPCOLESTR rgszMkOldNames[],
   [in, size_is(cFiles)] const LPCOLESTR rgszMkNewNames[],
   [in, size_is(cFiles)] const VSRENAMEFILEFLAGS rgflags[]
);

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

Permissions

See Also

Reference

IVsTrackProjectDocuments2 Interface

IVsTrackProjectDocuments2 Members

Microsoft.VisualStudio.Shell.Interop Namespace