CeSetThreadPriority

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function sets the priority for a real-time thread on a thread-by-thread basis.


BOOL CeSetThreadPriority(
  HANDLE hThread,
  int nPriority
);

hThread

[in] Handle to a thread.

nPriority

[in] Priority to set for the thread.

This value can range from zero through 255, with zero as the highest priority. The following list shows the symbolic names for some values of nPriority:

  • CE_THREAD_PRIO_256_TIME_CRITICAL
  • CE_THREAD_PRIO_256_HIGHEST
  • CE_THREAD_PRIO_256_ABOVE_NORMAL
  • CE_THREAD_PRIO_256_NORMAL
  • CE_THREAD_PRIO_256_BELOW_NORMAL
  • CE_THREAD_PRIO_256_LOWEST
  • CE_THREAD_PRIO_256_ABOVE_IDLE
  • CE_THREAD_PRIO_256_IDLE

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError.

When the priority of a blocked thread is increased, the change takes effect immediately.

When the priority of a blocked thread is decreased, the change does not take effect until the thread is no longer blocked.

The following list shows the symbolic priority names provided for SetThreadPriority, which must not be used with CeSetThreadPriority:

  • THREAD_PRIORITY_TIME_CRITICAL
  • THREAD_PRIORITY_HIGHEST
  • THREAD_PRIORITY_ABOVE_NORMAL
  • THREAD_PRIORITY_NORMAL
  • THREAD_PRIORITY_BELOW_NORMAL
  • THREAD_PRIORITY_LOWEST
  • THREAD_PRIORITY_ABOVE_IDLE
  • THREAD_PRIORITY_IDLE

For more information about priority levels in Windows Embedded CE, see Priority Levels.

Headerwinbase.h
LibraryNk.lib
Windows Embedded CEWindows CE 3.0 and later
Windows MobileWindows Mobile Version 5.0 and later
Show: