LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Code as a Windows service fails to execute an active x control

Hi,

I'm using labview to capture video from an AXIS video server. They provide an ActiveX control that I use in order to get the videos and control the server. My code is built in a dll in order to make it run as a service (as described in http://members.cox.net/kuanchen/lvservice/index.html). It connects to a postgresql database to sore metadata concerning the videos captured. When I run my code in labview, everything works. however, when I use the service I have coded. It still writes to the database but seems to fail to execute the ActiveX correctly and gives me no video recordings. Anyone has an idea ?

Thank's a lot
0 Kudos
Message 1 of 5
(3,316 Views)
Hi Milas.  I'll take a guess; does the user you are running the service as have rights to the ActiveX control?

Matt
0 Kudos
Message 2 of 5
(3,307 Views)
Thank you for your reply. I however think it is not that as the user running the service is the LocalSystem user. If you don't see any other solution, do you know a way I can debug this while it is running as an executable ?
0 Kudos
Message 3 of 5
(3,285 Views)
There are things that LocalSystem doesn't have access to, like a default printer.  Don't know about ActiveX controls,
which is why I am guessing 🙂

For troubleshooting, I would build a logger .vi that will just write a timestamped string or error message to a text file.  Sprinkle
the .vi around various areas of your code until you isolate where it is breaking.  Tedious, but it does work.

Matt
0 Kudos
Message 4 of 5
(3,283 Views)
Checked on ms website, it seems that it's ok for the LocalSystem user to run active x. However I found something. If the vi that contains the acitve x is not apparent then it seem not to execute properly. I will search on that direction and if anyone has an idea it would be great to propose it.

Thank's a lot
0 Kudos
Message 5 of 5
(3,278 Views)