C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
_vlock
 Summary Example                         Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The _vlock function loads a virtual memory block into DOS memory,
     locks it, and returns a far pointer to it. The argument <handle>
     points to a virtual memory block previously allocated through a
     call to _vmalloc or _vrealloc.
 
     A locked virtual memory block will not be swapped out until it is
     unlocked. A virtual memory block can be locked up to 255 times.
     The pointer returned by _vlock remains valid until an equal
     number of unlock operations is performed.
 
     Since DOS memory may be scarce, try to keep the number of blocks
     locked at one time to a minimum and use _vunlock to unlock them as
     soon as possible.
 
     Return Value
 
     The _vlock function returns a far pointer to DOS memory if the
     virtual memory block is successfully loaded and locked. If
     insufficient DOS memory is available, _vload returns NULL.
                                    -♦-