Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.28 KB

28141-argument-lowers-irq-level.md

File metadata and controls

49 lines (36 loc) · 1.28 KB
title description keywords ms.date f1_keywords
C28141 Warning
Warning C28141 The argument causes the IRQ Level to be set below the current IRQL, and this function cannot be used for that purpose.
warnings listed WDK PREfast for Drivers
errors listed WDK PREfast for Drivers
04/20/2017
C28141

C28141

warning C28141: The argument causes the IRQ Level to be set below the current IRQL, and this function cannot be used for that purpose

Additional information

IRQL was last set to <IRQL> at line <line-number>"

A function call that lowers the IRQL at which a caller is executing is being used inappropriately. Typically, the function call lowers the IRQL as part of a more general routine or is intended to raise the caller's IRQL.

Example

The following code example elicits this warning.

KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
KeRaiseIrql(PASSIVE_LEVEL, &OldIrql);

The following code example avoids this warning.

KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
KeLowerIrql(OldIrql);