Provides direct access to a plug-in. Some plug-ins may offer special properties and methods that are not available through the standard plug-in interface. This object allows direct access to a specific plug-in. The plug-in object is a collection of all installed plug-in's indexed by the plug-in name. One common interface function is the plug-in "name".
This returns a plug-in object reference that matches the plug-in name provided. 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 or have returns from properties and functions that do not extend to COM scripts and plug-ins.)
For access to all COM plug-ins, see GetPlugins, and for access to all plug-ins, both COM and .NET (for use with a .NET application or plug-in) please refer to GetPluginsEx.
Parameter: plug-in name
Return value: plug-in object reference or plug-in specific return
The following example gets the name from
the Applied Digital Ocelot plug-in, and in this case the call is made
into the plug-in and the return is the specific return from the plug-in,
in this case a string value:
(VB.NET Scripting Syntax Used)
Dim b_name As String
b_name = hs.Plugin("Applied Digital Ocelot").Name()
In this example, a plug-in specific procedure
is not provided, and so the returned value is the reference to the plug-in
object, which can then be used several times repeatedly for making other
calls into the plug-in:
(VB.NET Scripting Syntax Used)
Dim pObj As Object = Nothing
pObj = hs.Plugin("My Favorite Plug-In")
hs.WriteLog("Test","The Name is: " & pObj.Name())
hs.WriteLog("Test","My favorite plug-in's temp status is: " & pObj.GetMyStatus("Temperature"))