From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX error: Class not registered in test.vi

I am having trouble accessing an ActiveX object. I did not write this ActiveX object, but it came with the support materials for my hardware (force/moment sensor).

I have a vi that contains:

Automation Refnum, which is pointing to the correct location of my ActiveX class

The refnum is passed to Automation open, which, and then passed on to a property node and invoke node.

The reference is then closed.

I have an error trace running through the VI, and I get an error after Automation Open, "-2147221164 Class not registered in test.vi". I know that the ocx file is registered, because I confirmed it using COM Explorer. I've confirmed that this OCX file exists only in one directory, and that it is properly registered. Within Automation Refnum, I am pointing to the right directory and file name.

Yet I'm STILL getting this "Class not registered" error - can anyone advise on other potential problems or troubleshooting to perform?
0 Kudos
Message 1 of 9
(4,570 Views)
Hello Jonsakai,
The following discussion forum discusses a very similar topic. You may wish to take a look at this thread if you haven’t already. Hope this helps!

Best Regards,
Chris J

http://forums.ni.com/ni/board/message?board.id=170&message.id=66827&requireLogin=False
Message 2 of 9
(4,546 Views)
Thanks for the response, Chris. I had seen the post that you mentioned, and I have tried un-registering and re-registering the OCX. Clearly the error message points to this as the problem, however I used a piece of shareware called COM Explorer and verified that it was registered, linked correctly to supporting DLLs and that there were no duplicates on the hard drive. Any other suggestions from anyone?
0 Kudos
Message 3 of 9
(4,537 Views)
hi there

have you tried to use a ActiveX container instead?

best regards
chris
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 4 of 9
(4,531 Views)
Thanks Chris. I did try to use a container, however when I created one and went to select my ActiveX control, I received some sort of permission error... I can't recall the wording, but something about the class not being licensed for that sort of access. I didn't write the OCX, so I don't know why that limitation might exist. Thoughts? Thank you for your reponse.
0 Kudos
Message 5 of 9
(4,531 Views)
hi there

the same thing happens if you try to insert some of the Microsoft Common Controls like "Microsoft Toolbar Control" into a ActiveX Container without a so called "Developers License". This license is shipped with the Microsoft IDEs like VC++. To create a executable using such a control you need a license (no matter what language you use), but to run it you just need the ocx, but not the license. You can assign a license to a ActiveX control during programming (just a registry key i think).

is the ocx you want to use a documented part of a SDK or just of an application written by the supplier? in the latter case i think the supplier wanted to prevent people from using the ocx in their own applications.

best regards
chris

btw: can you post the ocx?
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 6 of 9
(4,524 Views)
chrisger - I don't know if you are still monitoring this post - but I have attached the OCX in question. The OCX is publicly available (http://robotics.dem.uc.pt/norberto/jr3pci/). I realized that I was using an old version of the driver for this PCI card, so I upgraded it, however the OCX will still not work. Now again, when I try to create an ActiveX container, I get that permission error that you explained:

"Error inserting ActiveX object: Class is not licensed for use"

Somehow, I was able to insert this object in a container in the past, so I don't know why this is happening now. I am going to talk to the hardware vendor, as I think this is just a driver issue.
0 Kudos
Message 7 of 9
(4,493 Views)
hi there,

same behaviour on my machine..

maybe the license becomes invalid after some days.....

best regards & good luck
chris
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 8 of 9
(4,479 Views)
Interesting.... thanks for checking though - I appreciate your suggestions.
0 Kudos
Message 9 of 9
(4,472 Views)