PURPOSE
• Enables interrupt handling in the Kernel Plugin.
PROTOTYPE
DWORD WD_IntEnable(HANDLE hWD, WD_INTERRUPT *pInterrupt);
PARAMETERS
DESCRIPTION
RETURN VALUE
Returns
WD_STATUS_SUCCESS(0) on success, or
an appropriate error code otherwise [
A].
REMARKS
-
If a valid handle to a Kernel PlugIn is passed to this function, the
interrupts will be handled in the Kernel PlugIn. In such a case, the
KP_IntEnable callback will execute as a result of the call to
WD_IntEnable, and upon receiving the interrupt your
kernel-mode high-IRQL interrupt handler function –
KP_IntAtIrql (legacy interrupts)
or KP_IntAtIrqlMSI (MSI-MSI-X)
– will execute. If this function returns a
value greater than zero, your Deferred Procedure Call (DPC) handler –
KP_IntAtDpc
(legacy interrupts) or KP_IntAtDpcMSI
(MSI-MSI-X) – will be called.
-
For information regarding the additional
pInterrupt fields,
refer to the description of the pInterrupt parameter of the
WD_IntEnable function in section 3.2.
EXAMPLE
WD_INTERRUPT Intrp;
BZERO(Intrp);
Intrp.hInterrupt = hInterrupt; /* From WD_CardRegister() */
/* From WD_KernelPlugInOpen(): */
Intrp.kpCall.hKernelPlugIn = hKernelPlugIn;
WD_IntEnable(hWD, &Intrp);
if (!Intrp.fEnableOk)
printf ("failed enabling interrupt\n");