IVsComponentEnumeratorFactory2.GetComponentsOfPath 方法

定义

枚举本地计算机上的组件。

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

参数

bstrMachineName
String

中保留,必须是 null

lEnumType
Int32

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

bForceRefresh
Int32

中保留,必须是 false

bstrPath
String

中包含组件路径的字符串。

pEnumerator
IEnumComponents

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

返回

Int32

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

注解

COM 签名

从 compsvcspkg:

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

如果 lEnumType 设置为 "CompEnumType_AssemblyPaths",则 " 添加引用 " 对话框仅显示指定的路径。

适用于