Share via


FlavoredProject.IVsUIHierarchy.GetCanonicalName Method

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

Namespace:  Microsoft.VisualStudio.Shell.Flavor
Assembly:  Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)

Syntax

'Declaration
Private Function GetCanonicalName ( _
    itemid As UInteger, _
    <OutAttribute> ByRef pbstrName As String _
) As Integer Implements IVsUIHierarchy.GetCanonicalName
int IVsUIHierarchy.GetCanonicalName(
    uint itemid,
    out string pbstrName
)
private:
virtual int GetCanonicalName(
    unsigned int itemid, 
    [OutAttribute] String^% pbstrName
) sealed = IVsUIHierarchy::GetCanonicalName
private abstract GetCanonicalName : 
        itemid:uint32 * 
        pbstrName:string byref -> int  
private override GetCanonicalName : 
        itemid:uint32 * 
        pbstrName:string byref -> int
JScript does not support explicit interface implementations.

Parameters

  • pbstrName
    Type: System.String%

    [out] The canonical name of the item.

Return Value

Type: System.Int32
If the method succeeds, it returns [F:Microsoft.VisualStudio.VSConstants.][S_OK]. If it fails, it returns an error code.

Implements

IVsUIHierarchy.GetCanonicalName(UInt32, String%)

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.

.NET Framework Security

See Also

Reference

FlavoredProject Class

Microsoft.VisualStudio.Shell.Flavor Namespace