IVsComponentEnumeratorFactory2.GetComponents 方法

定义

为包中的所有组件提供枚举器。

public:
 int GetComponents(System::String ^ bstrMachineName, int lEnumType, int bForceRefresh, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IEnumComponents ^ % pEnumerator);
public:
 int GetComponents(Platform::String ^ bstrMachineName, int lEnumType, int bForceRefresh, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IEnumComponents ^ &  pEnumerator);
int GetComponents(std::wstring const & bstrMachineName, int lEnumType, int bForceRefresh, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IEnumComponents const & & pEnumerator);
public int GetComponents (string bstrMachineName, int lEnumType, int bForceRefresh, out Microsoft.VisualStudio.Shell.Interop.IEnumComponents pEnumerator);
abstract member GetComponents : string * int * int * IEnumComponents -> int
Public Function GetComponents (bstrMachineName As String, lEnumType As Integer, bForceRefresh As Integer, ByRef pEnumerator As IEnumComponents) As Integer

参数

bstrMachineName
String

中保留,必须是 null

lEnumType
Int32

中包含枚举类型的长整数。 此的值来自 CompEnum 枚举。

bForceRefresh
Int32

中保留,必须是 false

pEnumerator
IEnumComponents

弄指向枚举器对象的指针。 这会返回组件列表。 此列表可以是 COM 组件、Visual Studio 程序集,也可以是 Visual Studio 查找引用的目录列表。 列出的组件类型由确定 lEnumType

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

实现

注解

COM 签名

从 compsvcspkg:

HRESULT IVsComponentEnumeratorFactory2::GetComponents(  
   [in] BSTR bstrMachineName,  
   [in] LONG lEnumType,  
   [in] BOOL bForceRefresh,  
   [out] IEnumComponents** pEnumerator  
);  

适用于