LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX Controller Wizard ignores some of my interfaces

First, the specifics: LabWindows/CVI 6.0.

I'm trying to use the ActiveX Controller Wizard to access a COM object we wrote (in Visual C++). It's mostly very cool, but for some reason some, but not all, of the COM object's interfaces are not appearing. They don't appear in the Advanced Options dialog at all, nor in the generated source code. I have no idea what's special about these interfaces that makes the wizard ignore them. There's no error message or anything to indicate what's going on.

It may be some irregularity in the .IDL file in the COM object, but I can't see it. Microsoft's OLE/COM Object Viewer has no trouble with these interfaces.

Any suggestions what I should be looking for?
0 Kudos
Message 1 of 3
(3,008 Views)
There is an issue under investigation in CVI in which the CVI ActiveX Controller Wizard will not detect some interfaces which show up in other languages. You should try to check the object in as many other languages as possible (try it in LabVIEW if you have it) to make sure that it is not a problem with your implementation. We are as yet unsure what it is about the interfaces in question which makes them special, one possibility is that it is a problem with objects inheriting from IUnknown. You may still be able to use the low level ActiveX functions (Library->ActiveX->Low Level Functions) to access the interfaces. If you are unable to get it working please contact technical support via email or phone so that we can determine if this is related to the issue we are in
vestigating and so that we can add your information to the case if it is.
0 Kudos
Message 2 of 3
(3,008 Views)
I've got a bit farther with this problem. I believe the trouble is that CVI's Controller Wizard is somewhere halfway between ActiveX and COM. It supports the custom interfaces of COM, but not the full spectrum of data-types. It seems to ignore any interface that has any parameters that are not one of the simple (and extremely annoying, like VARIANT) OLE Automation types.

In my case, the ignored interfaces have parameters of type "char *" (instead of BSTR), "BYTE password[20]", and one that is a pointer to a struct. If those parameters are removed from the type-library or changed into compabible types, then the Wizard will recognize the interfaces.

Trouble is, the generated code is then not compatible with the real interface of the COM object.
What I'm trying to do now is hack up the type-library of our COM object to get the Wizard to parse it, and then manually edit the generated wrapper code to make it compatible again. It's a horrible kludge, but ya gotta do what ya gotta do.

We'll see how well it works.
0 Kudos
Message 3 of 3
(3,008 Views)