[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
* function: xms_alloc()
*
* description: xms_alloc() allocates a block of XMS memory, of the given
*     length.  xms_alloc() will return TRUE if the driver was able to
*     allocate the block, and the block's handle will be returned through
*     the referenced first parameter.  If the driver was NOT able to
*     allocate the block, the error handler is notified, and FALSE is
*     returned.
*-------------------------------------------------------------------------
FUNCTION LOGICAL xms_alloc
   PARAMETERS INT handle, VALUE INT k_bytes

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

   ax = &XMS_ALLOC_MEM
   dx = k_bytes

   call_driver( xms_get_driver(), ax, bx, cx, dx, si, di, bp, ds, es)
   xms_set_error( ax, bx )

   if xms_get_error() <> 0
      handle = &NULL
      return &FALSE
   else
      handle = dx
   endif

   return &TRUE

ENDPRO


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