HierarchyNode.ParseCanonicalName Method

Returns the identifier of the hierarchy item, given its canonical name.

Namespace:  Microsoft.VisualStudio.Package
Assembly:  MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)

Syntax

'宣言
Public Overridable Function ParseCanonicalName ( _
    name As String, _
    <OutAttribute> ByRef itemId As UInteger _
) As Integer
'使用
Dim instance As HierarchyNode
Dim name As String
Dim itemId As UInteger
Dim returnValue As Integer

returnValue = instance.ParseCanonicalName(name, _
    itemId)
public virtual int ParseCanonicalName(
    string name,
    out uint itemId
)
public:
virtual int ParseCanonicalName(
    String^ name, 
    [OutAttribute] unsigned int% itemId
)
public function ParseCanonicalName(
    name : String, 
    itemId : uint
) : int

Parameters

  • itemId
    Type: System.UInt32%

    Item identifier for the hierarchy item.

Return Value

Type: System.Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

IVsUIHierarchy.ParseCanonicalName(String, UInt32%)
IVsHierarchy.ParseCanonicalName(String, UInt32%)

Remarks

Use this method to determine an item identifier (item ID), given the canonical name for an item. The canonical name is a unique name that is used to distinguish a particular item in the hierarchy from every other item in the hierarchy. Use the GetCanonicalName method to determine the canonical name, given an item ID.

Canonical names do not change between sessions of the environment, but item identifiers do. Use this method to manage workspace persistence, for example, to remember window positions.

Permissions

See Also

Reference

HierarchyNode Class

HierarchyNode Members

Microsoft.VisualStudio.Package Namespace

ParseCanonicalName