Fonction pour monter les droits de IRQL à DISPATCH_LEVEL (Visual C++ 2003)
Hello world
Je travaille toujours sur un vieux projet qui nécessite d'utiliser VSC++ 2003. à un moment intervient ce bout de code que je ne comprend absolument pas, pourriez vous m'eclairer:
Code:
1 2 3 4
|
KIRQL(*KeRaiseIrqlToDpcLevelFix)(void) = &KeRaiseIrqlToDpcLevel;
VOID(*KfLowerIrqlFix)( KIRQL NewIrql ) = &KfLowerIrql;
KIRQL l = KeRaiseIrqlToDpcLevelFix(); |
Declaration et definitions:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
// IRQL
typedef UCHAR KIRQL, *PKIRQL;
#define PASSIVE_LEVEL 0 // Passive release level
#define LOW_LEVEL 0 // Lowest interrupt level
#define APC_LEVEL 1 // APC interrupt level
#define DISPATCH_LEVEL 2 // Dispatcher level
// KeRaiseIrql:
// Raises IRQL to some value.
//
// Differences from NT: None.
#define KeRaiseIrql KfRaiseIrql
NTSYSAPI
EXPORTNUM(190)
VOID
__fastcall
KfRaiseIrql(
IN KIRQL NewIrql,
OUT PKIRQL OldIrql
);
// KeRaiseIrqlToDpcLevel:
// Raises IRQL to DISPATCH_LEVEL. Like KeRaiseIrql except returns old level directly.
//
// Differences from NT: None.
NTSYSAPI
EXPORTNUM(129)
KIRQL
NTAPI
KeRaiseIrqlToDpcLevel(
VOID
);
// KeLowerIrql:
// Lowers IRQL.
#define KeLowerIrql KfLowerIrql
NTSYSAPI
EXPORTNUM(161)
VOID
__fastcall
KfLowerIrql(
IN KIRQL NewIrql
); |
De plus a la compilation j'ai cette erreur:
Code:
1 2
|
error C2440: 'initializing' : cannot convert from 'KIRQL (__stdcall *)(void)' to 'KIRQL (__cdecl *)(void)' This conversion requires a reinterpret_cast, a C-style cast or function-style cast |
pourriez vous m'aider svp?
Merci