6.4. WD_IntEnable()

Purpose

Enables interrupt handling in the Kernel PlugIn.

Prototype
DWORD WD_IntEnable(HANDLE hWD, WD_INTERRUPT *pInterrupt);
Parameters
NameTypeInput/Output
hWDHANDLEInput
pInterruptWD_INTERRUPT* 
• kpCallWD_KERNEL_PLUGIN_CALL 
 * hKernelPlugInHANDLEInput
 * dwMessageDWORDN/A
 * pDataPVOIDInput
 * dwResultDWORDN/A
Description
NameDescription
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
Return Value

Returns WD_STATUS_SUCCESS (0) on success, or an appropriate error code otherwise [A].

Remarks
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");