IVsSolution.GetProjectOfGuid(Guid, IVsHierarchy) Method

Definition

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

C++
public:
 int GetProjectOfGuid(Guid % rguidProjectID, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ % ppHierarchy);

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:

cpp#
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

製品 バージョン
Visual Studio SDK 2015, 2017, 2019, 2022