IVsUIHierarchy.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
'Declaration
Function ParseCanonicalName ( _
pszName As String, _
<OutAttribute> ByRef pitemid As UInteger _
) As Integer
int ParseCanonicalName(
string pszName,
out uint pitemid
)
int ParseCanonicalName(
[InAttribute] String^ pszName,
[OutAttribute] unsigned int% pitemid
)
abstract ParseCanonicalName :
pszName:string *
pitemid:uint32 byref -> int
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.
Implements
IVsHierarchy.ParseCanonicalName(String, UInt32%)
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsUIHierarchy::ParseCanonicalName(
[in] LPCOLESTR pszName,
[out] VSITEMID *pitemid
);
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.