获取唯一名称与在层次结构中的项。用于工作区持久性,例如确保窗口位置。
命名空间: Microsoft.VisualStudio.Shell.Flavor
程序集: Microsoft.VisualStudio.Shell.11.0(在 Microsoft.VisualStudio.Shell.11.0.dll 中)
语法
声明
Private Function GetCanonicalName ( _
itemid As UInteger, _
<OutAttribute> ByRef pbstrName As String _
) As Integer Implements IVsUIHierarchy.GetCanonicalName
int IVsUIHierarchy.GetCanonicalName(
uint itemid,
out string pbstrName
)
参数
- itemid
类型:System.UInt32
层次结构项的 ID。
- pbstrName
类型:System.String%
[out] 项目的规范名称。
返回值
类型:System.Int32
如果方法成功,则返回 [F:Microsoft.VisualStudio.VSConstants.][S_OK]。如果失败,它会返回一个错误代码。
实现
IVsUIHierarchy.GetCanonicalName(UInt32, String%)
备注
此方法调用 GetCanonicalName。
规范名称不会更改该环境的会话之间,但是,项 ID。使用此方法控制工作区持久性,例如确保窗口位置。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。