LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to make a CVI program run as a service

I found the message below unanswered from Oct 2000. I thought that the ability to create a service was added in CVI 5.5??? How can I do it?


I wrote a server program using LW/CVI 5.5. I want to install it on NT/2000
OS and running as NT/2000 services. I know SRVANY.EXE can do this, but I
want to one step do this using INSTSRV.EXE or using install utility to modify
registry keys.
0 Kudos
Message 1 of 4
(4,328 Views)
Creating a program that will run as a Windows NT/2000 service is not a simple task and is not included in the standard native functions of LabWindows/CVI libraries. Basically, you have to architect your program to be setup to handle a certain set of system events to load, unload, and handle system messages from the OS. There are service functions in the Windows SDK that you would have to use and instructions in the Windows SDK help about creating service applications. In CVI, go to Help->Windows SDK. Then go to Contents->Base Services->DLLs, Processes, and Threads->Services.

Best Regards,

Chris Matthews
Measurement Studio Support Manager
Message 2 of 4
(4,327 Views)
I have written an installable NT service using CVI,
including the installation and remove applets.
I find that the service hangs when RunUserInterface() is called. The timers, and PostDeferredCallback()'s do not work at all, and QuitUserInterface() fails to
terminate the RunUserInterface() function. Oh how I
wish that there was RunUserInterface() that would work correctly when called from the NT Service manager.
Meantime it is back to raw Win32!
0 Kudos
Message 3 of 4
(4,327 Views)
Services should not have a user interface. If you need a timer, use the asynctmr.fp control, it's designed to be used outside of normal UI event processing.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 4 of 4
(4,327 Views)