Bewerken

Delen via


FltApplyPriorityInfoThread function (fltkernel.h)

The FltApplyPriorityInfoThread routine is used by a minifilter driver to apply priority information to a thread.

Syntax

NTSTATUS FLTAPI FltApplyPriorityInfoThread(
  [in]            PIO_PRIORITY_INFO InputPriorityInfo,
  [out, optional] PIO_PRIORITY_INFO OutputPriorityInfo,
  [in]            PETHREAD          Thread
);

Parameters

[in] InputPriorityInfo

A pointer to an IO_PRIORITY_INFO structure that is used to set the priority state of the given thread. This IO_PRIORITY_INFO structure must have its members set by an appropriate routine - see the following Remarks section. This parameter is required and cannot be NULL.

[out, optional] OutputPriorityInfo

An optional pointer to an IO_PRIORITY_INFO structure used to receive the priority state of the thread before the InputPriorityInfo priority information is applied to the thread by FltApplyPriorityInfoThread. This parameter is optional and can be NULL.

[in] Thread

A pointer to the thread in which to apply the InputPriorityInfo priority information to. This parameter is required and cannot be NULL.

Return value

If the thread priority information, pointed to by the InputPriorityInfo parameter, is successfully applied to the given thread, the FltApplyPriorityInfoThread routine returns STATUS_SUCCESS. Otherwise, it returns an appropriate NTSTATUS value, such as one of the following:

Return code Description
STATUS_INVALID_PARAMETER_1
The structure pointed to by the InputPriorityInfo parameter was initialized but one or more of its member values are invalid. This is an error code.

Remarks

This routine is available starting with Windows Vista.

The FltApplyPriorityInfoThread routine sets the I/O priority, paging priority and thread priority of the given thread based on the member values of the IO_PRIORITY_INFO structure pointed to by the InputPriorityInfo parameter. This allows a previously saved set of priority information, acquired by the FltRetrieveIoPriorityInfo or FltApplyPriorityInfoThread routine, to be applied to a thread.

The original values of the target thread, before the InputPriorityInfo priority values are applied by the FltApplyPriorityInfoThread routine, can be saved if a valid OutputPriorityInfo pointer is supplied. Note that the structure pointed to by the OutputPriorityInfo parameter need not be initialized.

It is safe to provide the same pointer to a single IO_PRIORITY_INFO structure for both the InputPriorityInfo and OutputPriorityInfo parameters.

Note   If the member values of the IO_PRIORITY_INFO structure pointed to by the InputPriorityInfo parameter have not been set, you must set these members, prior to calling the FltApplyPriorityInfoThread routine, by using one of the following methods:
  • Call the FltRetrieveIoPriorityInfo routine.
  • Ensure that the current InputPriorityInfo parameter was the OutputPriorityInfo parameter in a prior call to the FltApplyPriorityInfoThread routine.
 

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows Vista and later versions of Windows operating systems.
Target Platform Universal
Header fltkernel.h (include Fltkernel.h)
Library Fltmgr.lib
IRQL <= DISPATCH_LEVEL

See also

FLT_CALLBACK_DATA

FltGetIoPriorityHint

FltGetIoPriorityHintFromCallbackData

FltGetIoPriorityHintFromFileObject

FltGetIoPriorityHintFromThread

FltRetrieveIoPriorityInfo

FltSetIoPriorityHintIntoCallbackData

FltSetIoPriorityHintIntoFileObject

FltSetIoPriorityHintIntoThread

IO_PRIORITY_INFO