next up previous contents
Next: 3.4 WD_IntCount() Up: 3. Low Level WD_xxx Previous: 3.2 WD_IntEnable()   Contents


3.3 WD_IntWait()


PURPOSE

$\bullet$Waits for an interrupt.


PROTOTYPE

DWORD WD_IntWait(
    HANDLE hWD,
    WD_INTERRUPT *pInterrupt);


PARAMETERS

Name Type Input/Output
$\bullet$hWD HANDLE Input
$\bullet$pInterrupt WD_INTERRUPT*  
$\gg$hInterrupt HANDLE Input
$\gg$dwOptions DWORD N/A
$\gg$Cmd WD_TRANSFER* N/A
$\gg$dwCmds DWORD N/A
$\gg$kpCall WD_KERNEL_PLUGIN_CALL N/A
$\gg$fEnableOk DWORD N/A
$\gg$dwCounter DWORD Output
$\gg$dwLost DWORD Output
$\gg$fStopped DWORD Output
$\gg$dwLastMessage DWORD Output
$\gg$dwEnabledIntType DWORD N/A


DESCRIPTION

Name Description
hWD Handle to WinDriver's kernel-mode driver as received from WD_Open() [5.2]
pInterrupt Pointer to an interrupt information structure:
$\bullet$ hInterrupt Interrupt handle. The handle is returned by WD_CardRegister() [2.8] in pCardReg->Card.Item[i].I.Int.hInterrupt.
$\bullet$ dwCounter Number of interrupts received
$\bullet$ dwLost Number of interrupts that were acknowledge in kernel mode but not yet handled in user mode
$\bullet$ fStopped Set by the function to any of the following values:
$\bullet$0 - an interrupt occurred.
$\bullet$INTERRUPT_STOPPED - an interrupt was disabled while waiting for interrupts.
$\bullet$INTERRUPT_INTERRUPTED - while waiting for an interrupt, WD_IntWait() [3.3] was interrupted without an actual hardware interrupt (see also Remark 3.3 below).
$\bullet$ dwLastMessage Relevant only for MSI/MSI-X interrupts on Windows Vista (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);
}


next up previous contents
Next: 3.4 WD_IntCount() Up: 3. Low Level WD_xxx Previous: 3.2 WD_IntEnable()   Contents