Board index » cppbuilder » hoxto? process priority

hoxto? process priority


2006-07-17 04:47:46 PM
cppbuilder38
hello,
I use BCB v5.0 on win XP pro.
I would like to launch my application with lower CPU priority than normal.
Is this possible, via C++ programming , or launch command line option?
(the use of the task manager does fit to me).
thanks,
luiji.
 
 

Re:hoxto? process priority

luiji pari < XXXX@XXXXX.COM >wrote:
Quote
I use BCB v5.0 on win XP pro.
I would like to launch my application with lower CPU priority than normal.

Is this possible, via C++ programming , or launch command line option?
(the use of the task manager does fit to me).
If so, it will be via the Windows API, so try asking in the
borland.public.cppbuilder.nativeapi newsgroup
Alan Bellingham
--
ACCU Conference: 11-14 April 2007 - Paramount Oxford Hotel
 

Re:hoxto? process priority

If you want o do that because you have some loop in your program that takes
all system resources than try to put these 2 lines inside your loop.
Application->ProcessMessages();
Sleep(3);
It will slow your program down and pass some resources back to the OS.
"luiji pari" < XXXX@XXXXX.COM >wrote in message
Quote
hello,

I use BCB v5.0 on win XP pro.
I would like to launch my application with lower CPU priority than normal.

Is this possible, via C++ programming , or launch command line option?
(the use of the task manager does fit to me).

thanks,

luiji.
 

{smallsort}

Re:hoxto? process priority

"luiji pari" wrote:
Quote
I use BCB v5.0 on win XP pro.
I would like to launch my application with lower CPU priority than normal.

Is this possible, via C++ programming , or launch command line option?
(the use of the task manager does fit to me).

c:\>start /low your_app.exe
or equivalent via system().
CreateProcess() allows to specify priority
in greater detail.
/Pavel
 

Re:hoxto? process priority

If you can put the code into the application itself, look up the functions
SetProcessPriorityBoost
and
GetProcessPriorityBoost
. Ed
Quote
luiji pari wrote in message
news: XXXX@XXXXX.COM ...

I use BCB v5.0 on win XP pro.
I would like to launch my application with lower CPU priority than normal.

Is this possible, via C++ programming , or launch command line option?
(the use of the task manager does fit to me).