GetPluginsEx

Purpose

Returns a collection of all plug-in objects, one object for each plug-in enabled.

This returns all plug-ins - use GetPlugins if you want a collection of all plug-ins that are known to support COM interop. Be aware that not all .NET plug-ins were written to support COM interop (e.g. They may not work with older scripts or other COM plug-ins - they may work only with VB.NET scripts and .NET plug-ins if they were not written to support COM interop.)  When a plug-in fails to provide a COM interface, the plug-in reference will still be included in the collection of plug-in objects, but calls to any of the properties or methods of the plug-in will fail.  A test procedure with error checking should be used to make sure your scripts do not unexpectedly abort due to this.

Parameters

None.

Returns

Return value: plug-in collection
Type: collection

Example

Sub Main()
       Dim pi
      
Dim p
      
Dim s

   
      
On Error Resume Next

       ' Get a list of All plug-ins, COM and .NET
       Set pi = hs.GetPluginsEx

       hs.WriteLog "Plugin List","There are " & pi.count & " plug-ins in the system."

       ' Now, list all COM plug-ins, or .NET plug-ins that have a COM interface.
       For Each p in pi
           Err.Clear
              s = p.Name
             
If (Err.Number <> 0) Or (Trim(s) = "") Then
                     'This is probably a .NET plug-in without a COM interface.
                     Err.Clear
             
Else
                     hs.WriteLog "Plug-in",s
             
End If
       Next
End Sub