Compartilhar via


IVsPersistDocData2.RenameDocData Method

Renames the document data.

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

Syntax

'Declaration
Function RenameDocData ( _
    grfAttribs As UInteger, _
    pHierNew As IVsHierarchy, _
    itemidNew As UInteger, _
    pszMkDocumentNew As String _
) As Integer
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
)
abstract RenameDocData : 
        grfAttribs:uint32 * 
        pHierNew:IVsHierarchy * 
        itemidNew:uint32 * 
        pszMkDocumentNew:string -> int
function RenameDocData(
    grfAttribs : uint, 
    pHierNew : IVsHierarchy, 
    itemidNew : uint, 
    pszMkDocumentNew : String
) : int

Parameters

  • grfAttribs
    Type: UInt32

    [in] File attribute of the document data to be renamed. See the data type __VSRDTATTRIB.

  • itemidNew
    Type: UInt32

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

  • pszMkDocumentNew
    Type: String

    [in] Path to the document being renamed.

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 IVsPersistDocData2::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.

.NET Framework Security

See Also

Reference

IVsPersistDocData2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace