home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / nfsrc21.zip / ISSHARE.PRG < prev    next >
Text File  |  1991-08-16  |  2KB  |  92 lines

  1. /*
  2.  * File......: ISSHARE.PRG
  3.  * Author....: Glenn Scott (from Tom Leylan C source)
  4.  * Date......: $Date:   15 Aug 1991 23:03:48  $
  5.  * Revision..: $Revision:   1.3  $
  6.  * Log file..: $Logfile:   E:/nanfor/src/isshare.prv  $
  7.  * 
  8.  * This is an original work by tom leylan and is placed in the
  9.  * public domain.
  10.  *
  11.  * Modification history:
  12.  * ---------------------
  13.  *
  14.  * $Log:   E:/nanfor/src/isshare.prv  $
  15.  * 
  16.  *    Rev 1.3   15 Aug 1991 23:03:48   GLENN
  17.  * Forest Belt proofread/edited/cleaned up doc
  18.  * 
  19.  *    Rev 1.2   14 Jun 1991 19:52:06   GLENN
  20.  * Minor edit to file header
  21.  * 
  22.  *    Rev 1.1   12 Jun 1991 02:14:56   GLENN
  23.  * Documentation adjustment and checking ft_int86() call for compatibility
  24.  * with new return value.
  25.  * 
  26.  *    Rev 1.0   01 Apr 1991 01:01:34   GLENN
  27.  * Nanforum Toolkit
  28.  *
  29.  */
  30.  
  31.  
  32. /*  $DOC$
  33.  *  $FUNCNAME$
  34.  *      FT_ISSHARE()
  35.  *  $CATEGORY$
  36.  *      DOS/BIOS
  37.  *  $ONELINER$
  38.  *      Determine if DOS "Share" is installed
  39.  *  $SYNTAX$
  40.  *      FT_ISSHARE() -> nRetCode
  41.  *  $ARGUMENTS$
  42.  *      None
  43.  *  $RETURNS$
  44.  *      nRetcode will be set as follows on exit:
  45.  *
  46.  *          0 if SHARE not loaded but ok to load
  47.  *          1 if SHARE not loaded and not ok to load
  48.  *        255 if SHARE loaded
  49.  *  $DESCRIPTION$
  50.  *      Uses DOS interrupt 2Fh (MultiPlex interrupt), service 10h
  51.  *      to determine if DOS SHARE.COM is loaded.
  52.  *  $EXAMPLES$
  53.  *     IF FT_ISSHARE() != 255
  54.  *        Qout("SHARE must be loaded!")
  55.  *     ENDIF
  56.  *  $SEEALSO$
  57.  *     FT_INT86()
  58.  *  $END$
  59.  */
  60.  
  61. #include "FTINT86.CH"
  62.  
  63. #ifdef FT_TEST
  64.   function main()
  65.      local nLoaded := ft_isshare()
  66.  
  67.      do case
  68.         case nLoaded == 0
  69.            Qout("Share not loaded, but ok to load")
  70.         case nLoaded == 1
  71.            Qout("Share not loaded, but NOT ok to load!")
  72.         case nLoaded == 255
  73.            Qout("Share is loaded!")
  74.      endcase
  75.  
  76.      Qout("Retcode: " + str( nLoaded ) )
  77.  
  78.   return nil
  79. #endif
  80.  
  81. FUNCTION ft_isshare()
  82.   local aRegs[ INT86_MAX_REGS ]          // Declare the register array
  83.  
  84.   aRegs[ AX ] := makehi(16)              // share service
  85.   aRegs[ CX ] := 0                       // Specify file attribute
  86.  
  87.   FT_Int86( 47, aRegs)                   // multiplex interrupt
  88.  
  89. RETURN lowbyte( aRegs[AX] ) 
  90.  
  91.  
  92.