From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI doesn't catch events from COM-Server

I've got an ActiveX COM-Server (Exe-File). With the CVI 6.0 Automation Controller wizard I've created an instrument to access it. It works fine with Methods and Properties. Testing an application to communicate with the server under VB 6.0 is working well - VB receives events from the server. But using the interface in CVI, my CVI application doesn't receive any events from the server. The implementation in my code is in a similar way as in the sample program for Excel-events delivered with Measurement Studio 6.0 (this means an event-callback is being registered after the start of the server).
What possible reasons are there that CVI doesn't catch events from the server ? And how is it possible to track down the causes ?
0 Kudos
Message 1 of 4
(2,799 Views)
Hello

Does this problem only occur with the server that you created or does it happen with all the servers you try to use with CVI?

Make sure that when you register the events, that you dont get any errors returned.

If you are still having problems with this COM server throwing events, if you could email in some sample code thru ni.com/ask (VB and CVI code). I could try it on my machine and let you know what I find.

Thanks

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 4
(2,799 Views)
Thanks for your answer.

I didn't create the server myself. It's a commercial third party product. I only created the ActiveX Controller for this server in CVI.

I send you code samples of
- the ActiveX Controller instrument created by CVI (it's called "Srv")
- a simple main programm where registration of events is implemented.

Events from the Server are being fired after commands like "Load File", "Evaluate" etc.

After registering the events I don't get errors returned.

Best regards.
0 Kudos
Message 3 of 4
(2,799 Views)
I guess it would be hard for for you to actaully send the server. But one thing to check out for is if the event prototypes generated by CVI match those that the server has specified. If the server is registered on your machine, you can use the OLE/COM Viewer ( its one of the tools provided with Visual Studio 6.0, can be found here) to view the event interface. You can see CVI's generated interface in Srv.c and see if they match up.

A problem like this did show up in CVI , but I cant be certain if this is indeed the same problem, without actaully having the COM server to test it out.

Bilal
Bilal Durrani
NI
0 Kudos
Message 4 of 4
(2,799 Views)