共用方式為


IVsSolution.GetProjectEnum(UInt32, Guid, IEnumHierarchies) Method

Definition

Returns an enumerator for all the projects in the solution.

public:
 int GetProjectEnum(System::UInt32 grfEnumFlags, Guid % rguidEnumOnlyThisType, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IEnumHierarchies ^ % ppenum);
public int GetProjectEnum (uint grfEnumFlags, ref Guid rguidEnumOnlyThisType, out Microsoft.VisualStudio.Shell.Interop.IEnumHierarchies ppenum);
abstract member GetProjectEnum : uint32 * Guid * IEnumHierarchies -> int
Public Function GetProjectEnum (grfEnumFlags As UInteger, ByRef rguidEnumOnlyThisType As Guid, ByRef ppenum As IEnumHierarchies) As Integer

Parameters

grfEnumFlags
UInt32

[in] Specifies the projects to enumerate within a solution. For a list of grfEnumFlags values, see __VSENUMPROJFLAGS.

rguidEnumOnlyThisType
Guid

[in] If the EPF_MATCHTYPE flag is specified, the enumerator iterates projects of this type only. Otherwise, this parameter is ignored.

ppenum
IEnumHierarchies

[out] Pointer to the project enumerator.

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::GetProjectEnum(  
   [in] VSENUMPROJFLAGS grfEnumFlags,  
   [in] REFGUID rguidEnumOnlyThisType,  
   [out] IEnumHierarchies **ppEnum  
);  

This method enumerates all projects that are known by the solution, including virtual projects, if specified. The IEnumHierarchies interface contains the following methods in Vtable order:

Applies to