[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
* function: xms_unlock()
*
* description: xms_unlock() tells the driver to unlock the handle.  Once
*     the handle is unlocked, it's address is no longer necessarily valid,
*     since unlocked blocks can move around.  The driver keeps a count of
*     how many times the block has been locked, so xms_unlock() returns
*     the lock count for the handle.
*-------------------------------------------------------------------------
FUNCTION INT xms_unlock
   PARAMETERS INT handle

   VARDEF
      UINT  ax,bx,cx,dx,ds,si,es,di,bp
   ENDDEF

   ax = &XMS_UNLOCK_HND
   dx = handle
   call_driver( xms_get_driver(), ax, bx, cx, dx, si, di, bp, ds, es)
   xms_set_error( ax, bx )
   if xms_get_error() = 0
      if ax = 1               && Is it unlocked?
         return 0
      else
         ax = &XMS_HND_INFO
         dx = handle
         call_driver( xms_get_driver(), ax, bx, cx, dx, si, di, bp, ds, es)
         return loword( bx )
      endif
   endif

   return -1

ENDPRO


See Also: xms_installed() xms_avail() xms_get_driver() xms_get_version() xms_alloc() xms_free() hma_alloc() hma_free() xms_copy() xms_
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson