Enables interrupt handling in the Kernel PlugIn.
DWORD WD_IntEnable(HANDLE hWD, WD_INTERRUPT *pInterrupt);
| Name | Type | Input/Output |
|---|---|---|
| hWD | HANDLE | Input |
| pInterrupt | WD_INTERRUPT* | |
| • kpCall | WD_KERNEL_PLUGIN_CALL | |
| * hKernelPlugIn | HANDLE | Input |
| * dwMessage | DWORD | N/A |
| * pData | PVOID | Input |
| * dwResult | DWORD | N/A |
| Name | Description |
|---|---|
| hWD | Handle to WinDriver |
| pInterrupt | Pointer to an interrupt information structure: |
| • kpCall | Kernel PlugIn message structure: |
| * hKernelPlugIn | Handle to the Kernel PlugIn. If zero, no Kernel PlugIn interrupt handler is installed |
| * pData |
Pointer to data to pass to the KP_IntEnable callback in
the Kernel PlugIn
|
Returns WD_STATUS_SUCCESS (0) on success, or an appropriate
error code otherwise
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.
pInterrupt fields,
refer to the description of the pInterrupt parameter of the
WD_IntEnable() function in 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");