Waits for an interrupt.
DWORD WD_IntWait(
HANDLE hWD,
WD_INTERRUPT *pInterrupt);
| Name | Type | Input/Output |
|---|---|---|
| hWD | HANDLE | Input |
| pInterrupt | WD_INTERRUPT* | |
| • hInterrupt | HANDLE | Input |
| • dwOptions | DWORD | N/A |
| • Cmd | WD_TRANSFER* | N/A |
| • dwCmds | DWORD | N/A |
| • kpCall | WD_KERNEL_PLUGIN_CALL | N/A |
| • fEnableOk | DWORD | N/A |
| • dwCounter | DWORD | Output |
| • dwLost | DWORD | Output |
| • fStopped | DWORD | Output |
| • dwLastMessage | DWORD | Output |
| • dwEnabledIntType | DWORD | N/A |
| Name | Description |
|---|---|
| hWD | Handle to WinDriver's kernel-mode driver as
received from WD_Open() |
| pInterrupt | Pointer to an interrupt information structure: |
| • hInterrupt |
Interrupt handle. The handle is returned by WD_CardRegister()pCardReg->Card.Item[i].I.Int.hInterrupt.
|
| • dwCounter | Number of interrupts received |
| • dwLost | Number of interrupts that were acknowledged in the kernel mode but not yet handled in the user mode |
| • fStopped |
Set 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() |
| • dwLastMessage |
Relevant 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. |
Returns WD_STATUS_SUCCESS (0) on success, or an appropriate
error code otherwise
for (;;)
{
WD_IntWait(hWD, &Intrp);
if (Intrp.fStopped)
break;
ProcessInterrupt(Intrp.dwCounter);
}