IVsPersistDocData.RenameDocData 方法

将文档数据重命名。

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)

语法

声明
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
)

参数

  • itemidNew
    类型:System.UInt32
    [in] 重命名文档的项 ID。请参见数据类型 VSITEMID。
  • pszMkDocumentNew
    类型:System.String
    [in] 重命名文档的路径。

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 vsshell.idl:

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

此方法可以从一个层次结构来调用文档数据的所有权更改为另一个。

.NET Framework 安全性

请参见

参考

IVsPersistDocData 接口

Microsoft.VisualStudio.Shell.Interop 命名空间