Article View: borland.public.cppbuilder.nativeapi
Article #1462Re: priority
From: mk
Date: Mon, 06 Aug 2007 16:42
Date: Mon, 06 Aug 2007 16:42
26 lines
1433 bytes
1433 bytes
"Dennis Jones" <nospam@nospam.com> wrote:
>
>"mk" <mkreuter@kmccontrols.com> wrote in message
>news:46b73889$1@newsgroups.borland.com...
>>
>> How to set an application's priority level?
>
>See:
>
>SetPriorityClass and SetThreadPriority.
>
>- Dennis
>
>
This code does not error out but Task Manager does not show the priority as high ....
if ( !SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_HIGHEST ))
{
result = GetLastError();
sprintf( buffer, "Error [%d]", result );
Application->MessageBox( buffer, APP_TITLE, MB_OK );
}
if I use Application->Handle, it errors out and reports a bad handle ...
Technical Details
Message-ID:
<46b74f74$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<46b73889$1@newsgroups.borland.com> <46b7478c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d3a0c32a860a203e X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "mk" <mkreuter@kmccontrols.com> Sender: "mk" <mkreuter@kmccontrols.com> Reply-To: "mk" <mkreuter@kmccontrols.com> Subject: Re: priority Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 66.170.45.71 References: <46b73889$1@newsgroups.borland.com> <46b7478c$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <46b74f74$1@newsgroups.borland.com> Date: 6 Aug 2007 09:42:28 -0700 X-Trace: newsgroups.borland.com 1186418548 207.105.83.66 (6 Aug 2007 09:42:28 -0700) Lines: 28 Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail