IVsComponentEnumeratorFactory2.GetComponentsOfPath Method

Enumerates the components on the local machine.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)


Function GetComponentsOfPath ( _
    bstrMachineName As String, _
    lEnumType As Integer, _
    bForceRefresh As Integer, _
    bstrPath As String, _
    <OutAttribute> ByRef pEnumerator As IEnumComponents _
) As Integer
‘사용 방법
Dim instance As IVsComponentEnumeratorFactory2
Dim bstrMachineName As String
Dim lEnumType As Integer
Dim bForceRefresh As Integer
Dim bstrPath As String
Dim pEnumerator As IEnumComponents
Dim returnValue As Integer

returnValue = instance.GetComponentsOfPath(bstrMachineName, _
    lEnumType, bForceRefresh, bstrPath, _
int GetComponentsOfPath(
    string bstrMachineName,
    int lEnumType,
    int bForceRefresh,
    string bstrPath,
    out IEnumComponents pEnumerator
int GetComponentsOfPath(
    [InAttribute] String^ bstrMachineName, 
    [InAttribute] int lEnumType, 
    [InAttribute] int bForceRefresh, 
    [InAttribute] String^ bstrPath, 
    [OutAttribute] IEnumComponents^% pEnumerator
abstract GetComponentsOfPath : 
        bstrMachineName:string * 
        lEnumType:int * 
        bForceRefresh:int * 
        bstrPath:string * 
        pEnumerator:IEnumComponents byref -> int 
function GetComponentsOfPath(
    bstrMachineName : String, 
    lEnumType : int, 
    bForceRefresh : int, 
    bstrPath : String, 
    pEnumerator : IEnumComponents
) : int


  • bstrMachineName
    Type: System.String
     [in] Reserved, must be nulla null reference (Nothing in Visual Basic).
  • lEnumType
    Type: System.Int32
     [in] Long integer containing the enumeration type. The value for this is from the CompEnum enumeration.
  • bForceRefresh
    Type: System.Int32
     [in] Reserved, must be false.
  • bstrPath
    Type: System.String
     [in] String containing the path to the components.
  • pEnumerator
    Type: Microsoft.VisualStudio.Shell.Interop.IEnumComponents%
     [out] Pointer to an enumerator object. This returns the list of components. The list can be either COM-components, Visual Studio assemblies, or a list of directories in which Visual Studio looks for references. The type of components listed is determined by lEnumType.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.


COM Signature

From compsvcspkg.idl:

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

If lEnumType is set to CompEnumType_AssemblyPaths, the Add Reference dialog box displays the specified paths only.

.NET Framework Security

See Also


IVsComponentEnumeratorFactory2 Interface

IVsComponentEnumeratorFactory2 Members

Microsoft.VisualStudio.Shell.Interop Namespace