3.3  WD_IntWait

PURPOSE
• Waits for an interrupt.
PROTOTYPE
DWORD WD_IntWait(
    HANDLE hWD,
    WD_INTERRUPT *pInterrupt);
PARAMETERS
NameTypeInput/Output
hWDHANDLEInput
pInterruptWD_INTERRUPT* 
• hInterruptHANDLEInput
• dwOptionsDWORDN/A
• CmdWD_TRANSFER*N/A
• dwCmdsDWORDN/A
• kpCallWD_KERNEL_PLUGIN_CALLN/A
• fEnableOkDWORDN/A
• dwCounterDWORDOutput
• dwLostDWORDOutput
• fStoppedDWORDOutput
• dwLastMessageDWORDOutput
• dwEnabledIntTypeDWORDN/A
DESCRIPTION
NameDescription
hWDHandle to WinDriver's kernel-mode driver as received from WD_Open [5.2]
pInterruptPointer to an interrupt information structure:
• hInterruptInterrupt handle. The handle is returned by WD_CardRegister [2.8] in pCardReg->Card.Item[i].I.Int.hInterrupt.
• dwCounterNumber of interrupts received
• dwLostNumber of interrupts that were acknowledge in kernel mode but not yet handled in user mode
• fStoppedSet by the function to any of the following values:
• 0 – an interrupt occurred.
INTERRUPT_STOPPED – an interrupt was disabled while waiting for interrupts.
INTERRUPT_INTERRUPTED – while waiting for an interrupt, WD_IntWait [3.3] was interrupted without an actual hardware interrupt (see also remark below).
• dwLastMessageRelevant only for MSI/MSI-X interrupts on Windows Vista and higher (see information in the WinDriver PCI Manual):
When an interrupt occurs, WinDriver's kernel-mode interrupt handler sets this field to the interrupt's message data.
RETURN VALUE
Returns WD_STATUS_SUCCESS(0) on success, or an appropriate error code otherwise [A].
REMARKS
EXAMPLE
for (;;)
{
    WD_IntWait(hWD, &Intrp);
    if (Intrp.fStopped)
        break;

    ProcessInterrupt(Intrp.dwCounter);
}