## Virtual Device Driver Reference for OS/2

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

### VDHInstallFaultHook - Parameters

VDMHandle (HVDM) DOS session handle. If the parameter contains a 0 (zero), use the currently active DOS session.

StartingAddress (PVOID) Starting linear address.

Pages (ULONG) Number of pages.

PageFaultHandlerFcnPtr (PFAULTHOOK) Page fault handler function.

The PageFaultHandlerFcnPtr function pointer contains the address of a function with the following interface:

     VOID  HOOKENTRY PageFaultHandler(pVDM)

           ENTRY PARAMETERS  pVDM - Address of the page in which fault occurred

           EXIT-SUCCESS      None

           EXIT-FAILURE      None

           CONTEXT           DOS session-task

OptionFlag (BOOL) Options bit flag.

Possible value:

VDHIFH_ADDR If set, pVDM is a byte-granular address. Otherwise, pVDM is a page-granular address.

rc (BOOL) - returns

Success If the function is 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 any of the input parameters are invalid, a system halt occurs.