This topic has not yet been rated - Rate this topic

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)
int ParseCanonicalName(
	string pszName,
	out uint pitemid
)

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.

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
);
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.