LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application as windows service asynchronous

Solved!
Go to solution

Greetings, I'm building a LabVIEW Application for Windows to execute as a Windows Service, This Applications has several layers of asynchronous processes wich most of them work fine, but I'm having some issues.

 

If I run the Application as a executable (doble click to the application icon), it works great, with no issues. Now If I run this same Application as a Windows Service some of the processes doesn't work properly, these are

  • A LabVIEW Web  service that runs with the Built Executable
  • A DDE Server wich is a Library that LabVIEW has already

It seems that these processes, wich occurs in parallel with the main application doesn't work properly with it is the case to run as a Windows Service, I hope any expert to help me with these

0 Kudos
Message 1 of 3
(2,712 Views)
Solution
Accepted by topic author carrasquel

Hi Carrasquel,

 

I suppose those processes interacts with user interfaces and other session based files and so on.

Since VISTA, the policy applied to Windows services is way more stric and u cannot interact directly with the desktop.

 

http://stackoverflow.com/questions/53232/how-can-i-run-a-windows-gui-application-on-as-a-service

https://msdn.microsoft.com/en-us/library/d56de412(v=vs.110).aspx

 

How to workaround :

 

https://msdn.microsoft.com/en-us/library/windows/desktop/ms683502(v=vs.85).aspx

 

Romain DUVAL || RF & Semiconductor Staff System Engineer || CLA || CTA
National Instruments France

0 Kudos
Message 2 of 3
(2,665 Views)

I read the links and in effect you are right, it seems that there is a session that needs to be logged in within the Service that need to have some interaction despite the user isn't aware of this, I could managed to run the Web Server in a LabVIEW Application as a Windows Service, but I couldn't run the DDE Server, I googled more about it and it seems there ir something called "Session 0 IsolationDDE As Windows Servicea a solution that they propose is to create another application just with the DDE Server, and execute this as a desktop application from the main Service, and this application hide it from the tray andhide the front panel also, and then communicate to this app with other comm technology, I will try to manage this.

 

Thanks for the hints 

0 Kudos
Message 3 of 3
(2,659 Views)