LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to stop MS Windows tasks

Is there a way in LabWindows/CVI to stop all Microsoft windows (XP) tasks? I need to do real time acquisitions!
0 Kudos
Message 1 of 2
(3,127 Views)
It is not a particularly good idea to stop other tasks. The best solution is possibly to raise the priority of your process above [most of] the other processes in the system.

The Windows API function SetPriorityClass() is used to do this, e.g.:

success = SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);

or

success = SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);

If you do this, important Windows processes will get reduced or no time, so you should normally return the process priority to 'normal' as soon as possible:

success = SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);

You can find more information about this function here.

--
Martin.
--
Martin
Certified CVI Developer
0 Kudos
Message 2 of 2
(3,127 Views)