LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems seeing functions in activeX server

I have a whole series of dll's that have COM wrappers around them making their functions available via activeX... If I use the CVI activeX automation wizard to create instrument drivers, then I get the following error... 'Server contains no objects (dispatch interfaces) Check type library'. Now I know that the objects are available, as they are visable and work using either Visual basic or labview, so the problem seems to lie with CVI... Any ideas gratefully received...
Cheers - John
0 Kudos
Message 1 of 6
(3,424 Views)
It's possible that you have custom COM interfaces on these objects. The current version of CVI doesn't support custom COM interfaces, which means you have to provide an IDispatch interface or Dual Interface for the objects.

Best Regards,

Chris Matthews
Measurement Studio Support Manager
0 Kudos
Message 2 of 6
(3,424 Views)
Any hints on where I can get information on creating an IDispatch Interface or Dual Interface...

Cheers

Chris
0 Kudos
Message 3 of 6
(3,424 Views)
When you create an ActiveX server, it will usually have an IDispatch interface since this is the basic interface of ActiveX. When you make COM objects, you can derive your interface from IUnknown instead of IDispatch. Then, our wizard will not detect those COM objects. You can learn about IUnknown, IDispatch, and ActiveX in many books such as Understanding ActiveX and OLE by David Chapell. The next major release of CVI will be able to create ActiveX servers with objects and interfaces such as this.

Best Regards,

Chris Matthews
Measurement Studio Support Manager
0 Kudos
Message 4 of 6
(3,424 Views)
Thanks for your earlier replies. Now I have explored the situation a little more, and would like your comments...
The objects I am trying to communicate do have an IDispatch interface... I have been experimenting with CVI, and have been able to create an instance, query the IDispatch interface to get a handle, get the ID's of other methods in the module, and indeed invoke these methods. This is true of components that are recognised via the activex wizard, and those that are not...
I also used the microsoft OLE/COM viewer to look at these components. Both the working and none working (from the ActiveX Wizard perspective) show IDispatch interfaces. The difference between working and non-working components shows up when you query the type lib of the
IDispatch interface... A working one has a list of the available methods under a Method key, whereas the non-working ones do not have a Method key, but just show the available methods at the top level display... It seems to point to some subtle difference in the compilation of the components, but it still does show that the activex wizard needs more than just the presence of the IDispatch interface...
We tried to access these components from labview and teststand as well... labview could see them, but teststand couldn't.
Finally, you mention support being included in the next version of CVI.. any timescales available?
0 Kudos
Message 5 of 6
(3,424 Views)
Thanks...
0 Kudos
Message 6 of 6
(3,424 Views)