[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   XPmaxHandles()
   Return the maximum # of open files
------------------------------------------------------------------------------

   Function:   XPmaxHandles()

               XPmaxHandles() function will return a number indicating how
               many files could be open at one time, making it possible for
               you to exit gracefully instead of some
               obscure message when there's no more handles left.

      Note:
      The function XPmaxHandles() is currently not working as it should.
      Currently, it always returns the setting of //F: (or SET CLIPPER=F..),
      and I haven't found a way to get this out. A closer look will have been
      taken into this matter before the next release.

      The best way to check for enough handles is to fopen("NUL",0) files
      until fopen() returns -1, remember to keep the handles in an array
      to be able to release them!

   Syntax:     XPmaxHandles() --> nMax

   Arguments:  None.

   Returns:    The max # of open files.

   Usage:      * - Check if Ok to open 70 files..
               if XPmaxHandles() < 70
                    ? 'Please adapt CONFIG.SYS and/or SET CLIPPER'
                    quit
               end
               * - This will allow you to open 30 databases
               * - with One index file each (for example)

See Also: XPgetHandles()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson