Partager via


IVsSolution.GetProjectOfGuid(Guid, IVsHierarchy) Method

Definition

Returns the project in the solution, given a unique identifier.

public:
 int GetProjectOfGuid(Guid % rguidProjectID, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ % ppHierarchy);
public int GetProjectOfGuid (ref Guid rguidProjectID, out Microsoft.VisualStudio.Shell.Interop.IVsHierarchy ppHierarchy);
abstract member GetProjectOfGuid : Guid * IVsHierarchy -> int
Public Function GetProjectOfGuid (ByRef rguidProjectID As Guid, ByRef ppHierarchy As IVsHierarchy) As Integer

Parameters

rguidProjectID
Guid

[in] Unique identifier (GUID) for the project.

ppHierarchy
IVsHierarchy

[out] Pointer to the IVsHierarchy interface of the project referred to by the identifier.

Returns

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsSolution::GetProjectOfGuid(  
   [in] REFGUID rguidProjectID,  
   [out] IVsHierarchy **ppHierarchy  
);  

The project is identified by the GUID. This method returns the IVsHierarchy interface for the project based on the specified GUID.

Applies to