Funzione ExDeleteTimer (wdm.h)
La routine ExDeleteTimer elimina un oggetto timer allocato in precedenza dalla routine ExAllocateTimer.
BOOLEAN ExDeleteTimer(
[in] PEX_TIMER Timer,
[in] BOOLEAN Cancel,
[in] BOOLEAN Wait,
[in] PEXT_DELETE_PARAMETERS Parameters
);
[in] Timer
Puntatore a una struttura EX_TIMER. Questa struttura è un oggetto timer allocato in precedenza dalla routine ExAllocateTimer.
[in] Cancel
Indica se annullare il timer se è attualmente impostato. Se TRUE, la routine annulla il timer se il timer è impostato. Se FALSE, la routine non annulla il timer se è impostato. Se il chiamante imposta Wait su TRUE, Cancel deve essere TRUE; in caso contrario, si verifica un controllo dei bug.
[in] Wait
Indica se attendere il completamento della scadenza del timer se il timer ha già avviato il processo di scadenza. Se TRUE, la routine attende la scadenza del timer. Se FALSE, la routine non attende. Per altre informazioni, vedere Osservazioni.
[in] Parameters
Puntatore a una struttura EXT_DELETE_PARAMETERS. Il driver chiamante precedentemente denominato ExInitializeDeleteTimerParameters routine per inizializzare questa struttura.
Questa routine restituisce TRUE se Cancel è TRUE e il timer è stato annullato. In caso contrario, la routine restituisce FALSE. Per altre informazioni, vedere Osservazioni.
Dopo che il driver chiama questa routine, l'oggetto timer a cui punta Timer potrebbe non essere più valido. Tuttavia, il valore del parametro timer passato a una routine di callback ExTimerCallback, se il driver implementa questa routine, è sempre un puntatore valido a un oggetto timer.
Se Cancel è TRUE, un valore restituito di FALSE indica che il timer non è mai stato impostato o che il timer è stato impostato ma scaduto prima di poter essere annullato. Se Cancel è FALSE, la routine restituisce sempre FALSE.
Questa routine può bloccarsi se wait è TRUE. Se ExDeleteTimer viene chiamato dalla routine exTimerCallback del driver, chiamata in DISPATCH_LEVEL, il parametro wait in questa chiamata deve essere FALSE.
Se Wait è TRUE, la routine deve essere chiamata in IRQL <= APC_LEVEL. Se Wait è FALSE, la routine può essere chiamata in IRQL <= DISPATCH_LEVEL.
Per altre informazioni, vedere Eliminazione di un oggetto timer System-Allocated.
Requisito | Valore |
---|---|
client minimo supportato | Disponibile a partire da Windows 8.1. |
piattaforma di destinazione | Universale |
intestazione | wdm.h (include Wdm.h, Ntddk.h, Ntifs.h) |
libreria | Ntoskrnl.lib |
IRQL | Vedere la sezione Osservazioni. |