I have an ActiveX/COM DLL. It contains many methods and properties. I would like to be able to ask it if it has a particular symbol, as per the following snippet:
If HasMethod( "StdLib.DLL", "ReadFileE" ) Then
...
End If
Is there a way to do this from, say, VBScript or JScript? If not, where do I go to get the information I need?
After Googling around not quite finding what I wanted, I remembered the Edanmo site which got me thinking about TLBINF32.DLL, downloading Microsoft's TLBINF32.CHM and reading up on GetMembersWithSubStringEx. Below is the implementation of it (done in VB6 with a reference to TLBINF32.DLL), some demo VBScript and output, and the wrapping of that functionality in some VBA.
VBScript demo. The above code was included in my StdLib DLL in the Registry coclass.
Output from the demo (script was run in SciTE).
Finally, the VBA code. A cell has a symbol in it and this routine finds it or returns an error string.
Looking back on it now, I think I might pass in the path to the DLL/OCX as the first parameter.