Hello
Generally it's not a good idea to change the priority of your application, in case it hangs and your entire system starts to lock up. If this is just to make your application more responsive, try taking out time consuming tasks out of the UI thread and distribute the busy work to other threads so that the UI does not have to wait.
With all that said, you use this function, add windows.h as the very first include in your list of includes. And then call this function in main early on before you actually do major work:
#include
#include
.
.
static int panelHandle;
int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
SetPriorityClass(GetC
urrentProcess(),HIGH_PRIORITY_CLASS);
if ((panelHandle = LoadPanel (0, "test.uir", PANEL)) < 0)
return -1;
DisplayPanel (panelHandle);
RunUserInterface ();
DiscardPanel (panelHandle);
return 0;
}
You can verify that the task priority change by using the task manager.
Hope this helps
Bilal Durrani
NI
Hope this helps
Bilal Durrani
NI