## Virtual Device Driver Reference for OS/2

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

### VDHLockMem - Format

This function verifies that a specified region is accessible in the requested manner, and locks the memory in the requested manner.

    #include mvdm.h

    PVOID    StartingLinAddr;   /*  Starting address of region in user process */

    ULONG    NumBytes;          /*  The size of the region to lock, in bytes. */

    ULONG    OptionFlag;        /*  Access option flags */

    ULONG    PagelistArrayPtr;  /*  Pointer to array of VDHPageList_s structures */

    ULONG    ArrayCountPtr;     /*  Points to count of VDHPageList_selements */

    HLOCK    rc;

    rc = VDHLockMem(StartingLinAddr, NumBytes,

           OptionFlag, PagelistArrayPtr, ArrayCountPtr);