## Virtual Device Driver Reference for OS/2

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

### VDHInstallIntHook - Parameters

Reserved (ULONG) Reserved. Must be set to 0.

Vector (ULONG) Number of the interrupt vector to hook (0-255).

HookFcn (PFNHOOK) Address of the hook routine.

OptionFlag (FLAGS) Interface options flag.

Possible values:

VDH_ASM_HOOK Use assembler language hook interface (for the assembler language interface refer to the function VDHInstallIOHook). Otherwise, use the calling convention in the function prototype VDHENTRY found in the MVDM .INC include file, which is included with the Toolkit.

VDH_PRE_HOOK If set, install handler as a pre-reflection hook; that is, call the hook routine before reflecting the interrupt to V86 mode.

C Language Interface for the interrupt hook routine:

     HookRoutine  PROC  NEAR

     ; PARAMETERS

     ;    ENTRY   EBX - pcrf - Client register frame pointer

     ;     EXIT   If carry flag set, chain to next virtual device driver

     ;            If carry flag clear, don't chain to the next virtual

     ;            device driver

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

     ;  CONTEXT   DOS Session-task

rc (BOOL) - returns

Success If the function was successful, it returns a nonzero value.

Failure If the function fails, it returns 0 (zero). VDHGetError should be called to determine the nature of the problem. If HookFcn is invalid or if Vector is out of range, a system halt occurs.