LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Use COM from LabWindows CVI gives "Operation not available" error

Solved!
Go to solution

Dear all, 

 

I'm trying to use a third party DCOM server from my LabWindows/CVI. This would allow me to control remotely the software.

The software abobe and my application are both running on the same machine, for the moment at least.

I've installed and activated DCOM on the PC.

To get the hande to the remote interface I've used the following API CA_GetActiveObjectByClassIdEx(...).

The clsid and appid have been obtained by looking in the registry and via dcomcnfg.exe respectively.

Currently I'm always getting  the error value -2147221021 which translates on the "Operation not available" error message (returned by CA_DisplayErrorInfo(...)), and unless I'm mistaken it doesn't even match with the codes listed in ActiveX Library Error Codes help page.

 

Do you guys have any hints for me on the topic?

 

Thanks in advance

All the best

 

 

 

0 Kudos
Message 1 of 4
(2,721 Views)

According to this forum post from a few years ago, it seems like this error will pop up if the server is already in use for another operation, which sounds like it might be happening from the way you described the software setup for your application since everything is running on the same computer.

 

"-2147221021 Operation not available" https://forums.ni.com/t5/LabWindows-CVI/2147221021-Operation-Unavailable/td-p/1922841

 

Applications Engineering
National Instruments
0 Kudos
Message 2 of 4
(2,692 Views)
Solution
Accepted by topic author TheKid77

Hi Daniel, 

 

thanks for your reply. 

I solved my problem by creating an instrument driver for my ActiveX server  ( Tools >> Create ActiveX Controller...).

So far it is working properly.

 

Thanks

Best Regards

Francesco

0 Kudos
Message 3 of 4
(2,687 Views)

Glad to hear it! Feel free to mark your last post as the solution so other users can more easily find the answer to this issue in the future.

Applications Engineering
National Instruments
0 Kudos
Message 4 of 4
(2,679 Views)