Compartir a través de


IVsSolution3.GetUniqueUINameOfProject(IVsHierarchy, String) Method

Definition

Generates a unique name for a project.

public:
 int GetUniqueUINameOfProject(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierarchy, [Runtime::InteropServices::Out] System::String ^ % pbstrUniqueName);
int GetUniqueUINameOfProject(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHierarchy, [Runtime::InteropServices::Out] std::wstring const & & pbstrUniqueName);
public int GetUniqueUINameOfProject (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierarchy, out string pbstrUniqueName);
abstract member GetUniqueUINameOfProject : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * string -> int
Public Function GetUniqueUINameOfProject (pHierarchy As IVsHierarchy, ByRef pbstrUniqueName As String) As Integer

Parameters

pHierarchy
IVsHierarchy

[in] A IVsHierarchy for the project hierarchy.

pbstrUniqueName
String

[out] The unique UI name for the project.

Returns

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  
);  

Applies to