次の方法で共有


FlavoredProject.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
Assemblies:   Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

'宣言
Protected Overridable Function GetCanonicalName ( _
    itemId As UInteger, _
    <OutAttribute> ByRef name As String _
) As Integer
'使用
Dim itemId As UInteger
Dim name As String
Dim returnValue As Integer

returnValue = Me.GetCanonicalName(itemId, _
    name)
protected virtual int GetCanonicalName(
    uint itemId,
    out string name
)
protected:
virtual int GetCanonicalName(
    unsigned int itemId, 
    [OutAttribute] String^% name
)
abstract GetCanonicalName : 
        itemId:uint32 * 
        name:string byref -> int 
override GetCanonicalName : 
        itemId:uint32 * 
        name:string byref -> int 
protected function GetCanonicalName(
    itemId : uint, 
    name : String
) : int

Parameters

  • name
    Type: System.String%
    [out] The canonical name of the hierarchy 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.

Remarks

This method calls GetCanonicalName(uintitemid, outstringpbstrName) on the inner project.

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

FlavoredProject Members

Microsoft.VisualStudio.Shell.Flavor Namespace