Question

I'm controlling a third party piece of software using its COM interface, but there is no type library for that interface. It's old software that isn't supported anymore, so getting an updated version isn't a possibility.

Without the type library, I can access everything just fine in VBScript:

Set spc = CreateObject( "WinAcquisit.Spectrum" )
spc.TransmitExperiment

or Python (through win32):

import win32com.client as cl
spc = cl.Dispatch("WinAcquisit.Spectrum")
spc.TransmitExperiment()

However, I'm controlling the software through LabVIEW, which seems to require a type library (TL) to select methods/variables (everything gets turned into dropdown lists based on what's in the TL). So I can't use anything in my LabVIEW code.

How can I use this interface in LabVIEW, without a matching TL? Or, is there a simple way to create a TL and link it to the existing COM interface?

Was it helpful?

Solution

If you have the actual interface definition (without type library), the easiest would perhaps to write a thin wrapper over this COM class. The wrapper will be with type library and usable for scripting purposes. Getting the calls on wrapper, you will forward them to the third party interface in question. Native code wrapper might done flexibly enough to even take over the "WinAcquisit.Spectrum" ProgID.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top