共用方式為


IVsUIHierarchy.ParseCanonicalName(String, UInt32) Method

Definition

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

public:
 int ParseCanonicalName(System::String ^ pszName, [Runtime::InteropServices::Out] System::UInt32 % pitemid);
int ParseCanonicalName(std::wstring const & pszName, [Runtime::InteropServices::Out] unsigned int & pitemid);
public int ParseCanonicalName (string pszName, out uint pitemid);
abstract member ParseCanonicalName : string * uint32 -> int
Public Function ParseCanonicalName (pszName As String, ByRef pitemid As UInteger) As Integer

Parameters

pszName
String

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

pitemid
UInt32

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

Returns

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

Implements

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.

Applies to