GetThreadPriorityBoost function (Windows)

Switch View :
ScriptFree
GetThreadPriorityBoost function

Applies to: desktop apps only

Retrieves the priority boost control state of the specified thread.

Syntax

BOOL WINAPI GetThreadPriorityBoost(
  __in   HANDLE hThread,
  __out  PBOOL pDisablePriorityBoost
);

Parameters

hThread [in]

A handle to the thread. The handle must have the THREAD_QUERY_INFORMATION or THREAD_QUERY_LIMITED_INFORMATION access right. For more information, see Thread Security and Access Rights.

Windows Server 2003 and Windows XP:  The handle must have the THREAD_QUERY_INFORMATION access right.
pDisablePriorityBoost [out]

A pointer to a variable that receives the priority boost control state. A value of TRUE indicates that dynamic boosting is disabled. A value of FALSE indicates normal behavior.

Return value

If the function succeeds, the return value is nonzero. In that case, the variable pointed to by the pDisablePriorityBoost parameter receives the priority boost control state.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

WinBase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

OpenThread
Priority Boosts
Process and Thread Functions
Scheduling Priorities
SetThreadPriorityBoost
Threads

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Community Content

dmex
C# syntax
[DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern bool GetThreadPriorityBoost(IntPtr handle, out bool disabled);

dmex
vb.net syntax
<DllImport("kernel32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Public Shared Function GetThreadPriorityBoost(ByVal handle As IntPtr, <Out> ByRef disabled As Boolean) As Boolean End Function