Article View: borland.public.cppbuilder.nativeapi
Article #16515Re: Set priority of a process
From: Vladimir Afanasyev
Date: Mon, 12 May 2003 10:19
Date: Mon, 12 May 2003 10:19
24 lines
1453 bytes
1453 bytes
Hi,
May be your code incorrect.
What way do you use?
As a rule I use next:
bool res=SetPriorityClass(
GetCurrentProcess(), // handle to the process
REALTIME_PRIORITY_CLASS // priority class value
);
if(res ....)
bool res=SetPriorityClass(
GetCurrentProcess(), // handle to the process
NORMAL_PRIORITY_CLASS // priority class value
);
for current process. Or you want to do it for another
process?
Vladimir.
Technical Details
Message-ID:
<3ebf7520$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeeds.sol.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3ebf61a4$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,5c4b836bf3ccccb X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-05-12 03:34:12 PST From: "Vladimir Afanasyev" <avv@systema.kiev.ua> Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua> Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua> Subject: Re: Set priority of a process Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 62.244.14.114 62.244.14.114 X-Forwarded-For: 192.168.0.147 References: <3ebf61a4$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3ebf7520$1@newsgroups.borland.com> Date: 12 May 2003 03:19:12 -0700 X-Trace: newsgroups.borland.com 1052734752 207.105.83.65 (12 May 2003 03:19:12 -0700) Lines: 25 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeeds.sol.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail