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
'Declaración
Function GetUniqueUINameOfProject ( _
pHierarchy As IVsHierarchy, _
<OutAttribute> ByRef pbstrUniqueName As String _
) As Integer
'Uso
Dim instance As IVsSolution3
Dim pHierarchy As IVsHierarchy
Dim pbstrUniqueName As String
Dim returnValue As Integer
returnValue = instance.GetUniqueUINameOfProject(pHierarchy, _
pbstrUniqueName)
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
- pHierarchy
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy
[in] A IVsHierarchy for the project hierarchy.
- pbstrUniqueName
Type: System.String%
[out] The unique UI name for the project.
Return Value
Type: System.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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.