Partager via


IVsPersistDocData.RenameDocData Method

Renames the document data.

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

Syntax

'Déclaration
Function RenameDocData ( _
    grfAttribs As UInteger, _
    pHierNew As IVsHierarchy, _
    itemidNew As UInteger, _
    pszMkDocumentNew As String _
) As Integer
'Utilisation
Dim instance As IVsPersistDocData
Dim grfAttribs As UInteger
Dim pHierNew As IVsHierarchy
Dim itemidNew As UInteger
Dim pszMkDocumentNew As String
Dim returnValue As Integer

returnValue = instance.RenameDocData(grfAttribs, _
    pHierNew, itemidNew, pszMkDocumentNew)
int RenameDocData(
    uint grfAttribs,
    IVsHierarchy pHierNew,
    uint itemidNew,
    string pszMkDocumentNew
)
int RenameDocData(
    [InAttribute] unsigned int grfAttribs, 
    [InAttribute] IVsHierarchy^ pHierNew, 
    [InAttribute] unsigned int itemidNew, 
    [InAttribute] String^ pszMkDocumentNew
)
function RenameDocData(
    grfAttribs : uint, 
    pHierNew : IVsHierarchy, 
    itemidNew : uint, 
    pszMkDocumentNew : String
) : int

Parameters

  • itemidNew
    Type: System.UInt32

    [in] Item identifier of the document being renamed. See the data type VSITEMID.

  • pszMkDocumentNew
    Type: System.String

    [in] Path to the document being renamed.

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 vsshell.idl:

HRESULT IVsPersistDocData::RenameDocData(
   [in] VSRDTATTRIB grfAttribs,
   [in] IVsHierarchy *pHierNew,
   [in] VSITEMID itemidNew,
   [in] LPCOLESTR pszMkDocumentNew
);

This method can also transfer ownership of the document data from one hierarchy to another.

Permissions

See Also

Reference

IVsPersistDocData Interface

IVsPersistDocData Members

Microsoft.VisualStudio.Shell.Interop Namespace