![]() |
GetPriority() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Public Function |
Declared in: Win32Thread.h |
Declarationvirtual CGenericThread::ThreadPriority GetPriority() const;
DescriptionGet the thread priority
Function Body
try
{
//Check if we have the thread
if (!m_hThread)
return CGenericThread::tpNormal;
int iPriority;
//Get the priority
iPriority=GetThreadPriority(m_hThread);
//And return the value
switch (iPriority)
{
case THREAD_PRIORITY_ABOVE_NORMAL:
return CGenericThread::tpAboveNormal;
case THREAD_PRIORITY_BELOW_NORMAL:
return CGenericThread::tpBelowNormal;
case THREAD_PRIORITY_HIGHEST:
return CGenericThread::tpHighest;
case THREAD_PRIORITY_IDLE:
return CGenericThread::tpIdle;
case THREAD_PRIORITY_LOWEST:
return CGenericThread::tpLowest;
case THREAD_PRIORITY_NORMAL:
return CGenericThread::tpNormal;
case THREAD_PRIORITY_TIME_CRITICAL:
return CGenericThread::tpTimeCritical;
default:
return CGenericThread::tpNormal;
}
}
ERROR_HANDLER_RETURN("GetPriority",CGenericThread::tpNormal)
See Also
This web site was generated
using Surveyor V4.50.811.1. Click
here
for more information. |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |