次の方法で共有


IVsHierarchy.ParseCanonicalName Method

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

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

Syntax

'宣言
Function ParseCanonicalName ( _
    pszName As String, _
    <OutAttribute> ByRef pitemid As UInteger _
) As Integer
'使用
Dim instance As IVsHierarchy
Dim pszName As String
Dim pitemid As UInteger
Dim returnValue As Integer

returnValue = instance.ParseCanonicalName(pszName, _
    pitemid)
int ParseCanonicalName(
    string pszName,
    out uint pitemid
)
int ParseCanonicalName(
    [InAttribute] String^ pszName, 
    [OutAttribute] unsigned int% pitemid
)
function ParseCanonicalName(
    pszName : String, 
    pitemid : uint
) : int

Parameters

  • pszName
    Type: System.String

    [in] Pointer to the canonical name of the hierarchy item.

  • pitemid
    Type: System.UInt32%

    [out] Pointer to the item identifier for the hierarchy item. For a list of pitemid values, see VSITEMID.

Return Value

Type: System.Int32

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

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 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, such as remembering window positions.

COM Signature

From vsshell.idl:

HRESULT IVsHierarchy::ParseCanonicalName(
   [in] LPCOLESTR pszName,
   [out] VSITEMID *pitemid
);

Permissions

See Also

Reference

IVsHierarchy Interface

IVsHierarchy Members

Microsoft.VisualStudio.Shell.Interop Namespace