This documentation is archived and is not being maintained.

IVsSolution.GetProjectEnum Method

Returns an enumerator for all the projects in the solution.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

int GetProjectEnum (
	[InAttribute] uint grfEnumFlags,
	[InAttribute] ref Guid rguidEnumOnlyThisType,
	out IEnumHierarchies ppenum
)
int GetProjectEnum (
	/** @attribute InAttribute() */ UInt32 grfEnumFlags, 
	/** @attribute InAttribute() */ /** @ref */ Guid rguidEnumOnlyThisType, 
	/** @attribute OutAttribute() */ /** @ref */ IEnumHierarchies ppenum
)
JScript does not support passing value-type arguments by reference.

Parameters

grfEnumFlags

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

rguidEnumOnlyThisType

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

ppenum

[out] Pointer to the project enumerator.

Return Value

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

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:

Show: