home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / clipper / nettos11.zip / FSERV / GETFSI.PRG < prev    next >
Text File  |  1993-03-30  |  3KB  |  107 lines

  1. /*
  2.  * File......: GETFSI.PRG
  3.  * Author....: Rodgers Moore
  4.  * CIS ID....: 75730,2244
  5.  * Date......: $Date$
  6.  * Revision..: $Revision$
  7.  * Log file..: $Logfile$
  8.  *
  9.  * This is an original work by Rodgers Moore and is placed in the
  10.  * public domain.
  11.  *
  12.  * Modification history:
  13.  * ---------------------
  14.  *
  15.  * $Log$
  16.  *
  17.  */
  18.  
  19. #include "netto.ch"
  20.  
  21. /*  $DOC$
  22.  *  $FUNCNAME$
  23.  *      FN_GETFSI()
  24.  *  $CATEGORY$
  25.  *      File Server
  26.  *  $ONELINER$
  27.  *      Get default File Server Information
  28.  *  $SYNTAX$
  29.  *
  30.  *      fn_GetFSI() -> aFS_Info
  31.  *
  32.  *  $ARGUMENTS$
  33.  *
  34.  *      None
  35.  *
  36.  *  $RETURNS$
  37.  *
  38.  *      An array of 17 elements containing the information about
  39.  *      the default File Server.
  40.  *
  41.  *        aFS_Info[1]   contains the File Server Name.
  42.  *        aFS_Info[2]   contains the Netware Major version number.
  43.  *        aFS_Info[3]   contains the Netware Minor version number.
  44.  *        aFS_Info[4]   contains the Max connections supported by server.
  45.  *        aFS_Info[5]   contains the connections currently in use.
  46.  *        aFS_Info[6]   contains the Max connected volumes.
  47.  *        aFS_Info[7]   contains the OS Revision Number.
  48.  *        aFS_Info[8]   contains the SFT Level.
  49.  *        aFS_Info[9]   contains the TTS Level.
  50.  *        aFS_Info[10]  contains the Peak connections used.
  51.  *        aFS_Info[11]  contains the Accounting Version.
  52.  *        aFS_Info[12]  contains the VAP Version.
  53.  *        aFS_Info[13]  contains the Queuing Version.
  54.  *        aFS_Info[14]  contains the Print Server Version.
  55.  *        aFS_Info[15]  contains the Virtual Console Version.
  56.  *        aFS_Info[16]  contains the Security Restrictions Level.
  57.  *        aFS_Info[17]  contains the Internetwork Bridge Version.
  58.  *
  59.  *      Returns an empty array if not logged in.
  60.  *
  61.  *
  62.  *  $DESCRIPTION$
  63.  *
  64.  *      This function implements the File Server API call GET FILE SERVER
  65.  *      INFORMATION.  Returns an array of 17 items of information.
  66.  *     
  67.  *  $EXAMPLES$
  68.  *
  69.  *      qout( "File Server Name is: " + fn_GetFSI()[1] )
  70.  *
  71.  *  $SEEALSO$
  72.  *
  73.  *  $INCLUDE$
  74.  *
  75.  *  $END$
  76.  */
  77.  
  78.  
  79. function fn_GetFSI()
  80.    local cReq, cRep, aReply 
  81.  
  82.    cReq   := I2BYTE( 17 )
  83.    cRep   := space(130)
  84.    aReply := {}
  85.  
  86.    if _fnReq( 227, cReq, @cRep ) == ESUCCESS
  87.      aadd( aReply, substr( cRep,1,48))
  88.      aadd( aReply, BYTE2I(substr( cRep,49,1)))
  89.      aadd( aReply, BYTE2I(substr( cRep,50,1)))
  90.      aadd( aReply, HILO2W(substr( cRep,51,2)))
  91.      aadd( aReply, HILO2W(substr( cRep,53,2)))
  92.      aadd( aReply, HILO2W(substr( cRep,55,2)))
  93.      aadd( aReply, BYTE2I(substr( cRep,57,1)))
  94.      aadd( aReply, BYTE2I(substr( cRep,58,1)))
  95.      aadd( aReply, BYTE2I(substr( cRep,59,1)))
  96.      aadd( aReply, HILO2W(substr( cRep,60,2)))
  97.      aadd( aReply, BYTE2I(substr( cRep,62,1)))
  98.      aadd( aReply, BYTE2I(substr( cRep,63,1)))
  99.      aadd( aReply, BYTE2I(substr( cRep,64,1)))
  100.      aadd( aReply, BYTE2I(substr( cRep,65,1)))
  101.      aadd( aReply, BYTE2I(substr( cRep,66,1)))
  102.      aadd( aReply, BYTE2I(substr( cRep,67,1)))
  103.      aadd( aReply, BYTE2I(substr( cRep,68,1)))
  104.    endif
  105.  
  106.    return ( aReply )
  107.