Compartir a través de


IVsSolution3.GetUniqueUINameOfProject Method

Generates a unique name for a project.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

Syntax

'Declaration
Function GetUniqueUINameOfProject ( _
    pHierarchy As IVsHierarchy, _
    <OutAttribute> ByRef pbstrUniqueName As String _
) As Integer
int GetUniqueUINameOfProject(
    IVsHierarchy pHierarchy,
    out string pbstrUniqueName
)
int GetUniqueUINameOfProject(
    [InAttribute] IVsHierarchy^ pHierarchy, 
    [OutAttribute] String^% pbstrUniqueName
)
abstract GetUniqueUINameOfProject : 
        pHierarchy:IVsHierarchy * 
        pbstrUniqueName:string byref -> int
function GetUniqueUINameOfProject(
    pHierarchy : IVsHierarchy, 
    pbstrUniqueName : String
) : int

Parameters

  • pbstrUniqueName
    Type: String%

    [out] The unique UI name for the project.

Return Value

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

Remarks

This method will generate a unique UI name for the project whose hierarchy is passed in. This is necessary in the case where there are two projects in the solution with the same name, but which reside in different solution folders. The solution will generate a name by prepending as many of the parent folder names as necessary to make the name unique.

COM Signature

From vsshell80.idl:

HRESULT IVsSolution3::GetUniqueUINameOfProject(
   [in] IVsHierarchy *pHierarchy, 
   [out] BSTR *pbstrUniqueName
);

.NET Framework Security

See Also

Reference

IVsSolution3 Interface

Microsoft.VisualStudio.Shell.Interop Namespace