## Virtual Device Driver Reference for OS/2

[prev][next][parent][TOC]

### VDHOpenVIRQ - Parameters

IRQNumber (IRQN) Number of the IRQ to open.

EOIHandler (PFN) Address of End-Of-Interrupt (EOI) handler.

Linear address of the handler to be called when EOI is received by VPIC from a DOS session for the IRQ. If this is not desired, put a 0 (zero) in this parameter. Note that the IRQ is no longer "in service" (the ISR bit has been cleared) when the virtual device driver's EOI handler is called. The interface to the EOI handler is:

    VOID HOOKENTRY EOIHdlr(pcrf)

        ENTRY   pcrf - Pointer to client register frame

        EXIT    None

        USES    EAX, ECX, EDX, FS, GS, Flags

        CONTEXT DOS session-task

IRETHandler (PFN) Address of Interrupt Return (IRET) handler.

Linear address of the handler to be called when the IRET in the DOS session 's interrupt code is executed for this IRQ. If this is not desired, set the parameter to 0 (zero). The interface for the IRET routine is:

    VOID HOOKENTRY IRETHdlr(pcrf)

         ENTRY   pcrf - Pointer to client register frame

         EXIT    None

         USES    EAX, ECX, EDX, FS, GS, Flags

         CONTEXT DOS session-task

Timeout (ULONG) IRET timeout value in milliseconds. When the timeout expires, the virtual device driver's IRET handler is called as if the IRET had occurred. A value of -1 indicates that no timeout occurs.

OptionFlag (ULONG) Option flag. Indicates whether the IRQ can be shared.

Possible value:

VPIC_SHARE_IRQ Indicates that the virtual device driver is willing to share the IRQ with another virtual device driver. All virtual device drivers that virtualize the same IRQ must pass this flag. Whether a particular IRQ is shared or unshared is determined by the setting of OptionFlag by the first virtual device driver to open the IRQ.

rc (HIRQ) - returns

Success If the function is successful, it returns an IRQ handle.

Failure If the function fails, it returns 0 (zero). VDHGetError should be called to determine the nature of the problem. If IRQNumber, EOIHandler, IRETHandler, or OptionFlag are invalid, a system halt occurs.