FlavoredProject.IVsUIHierarchy.GetCanonicalName(UInt32, String) Method

Definition

Gets the unique name associated with an item in the hierarchy. Used for workspace persistence, such as remembering window positions.

 virtual int Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy.GetCanonicalName(System::UInt32 itemid, [Runtime::InteropServices::Out] System::String ^ % pbstrName) = Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy::GetCanonicalName;
int Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy.GetCanonicalName(unsigned int itemid, [Runtime::InteropServices::Out] std::wstring const & & pbstrName);
int IVsUIHierarchy.GetCanonicalName (uint itemid, out string pbstrName);
abstract member Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy.GetCanonicalName : uint32 * string -> int
override this.Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy.GetCanonicalName : uint32 * string -> int
Function GetCanonicalName (itemid As UInteger, ByRef pbstrName As String) As Integer Implements IVsUIHierarchy.GetCanonicalName

Parameters

itemid
UInt32

The ID of the hierarchy item.

pbstrName
String

[out] The canonical name of the item.

Returns

Int32

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

Implements

Remarks

This method calls GetCanonicalName.

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