Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> fsnameget()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FSNameGet()
------------------------------------------------------------------------------
 Purpose:
 Get the file server name.

 Syntax:
 lpszServer = FSNameGet( iServConID )

 Parameters:
 iServConID The workstation's server table number (range 1 to 8 or
            special case zero).

 Returns:
 A character string of length 8.

 The CA-Clipper name for this function is:
 FSNmeGet()

 Description:
 FSNameGet() called with iServConID set to zero returns a string containing
 the name of the default file server. If iServConID is non-zero, FSNameGet()
 returns the file server name which is currently attached to the workstation
 and is in the workstation's file server connection table. iServConID (range
 1 to 8), is the entry number in the file server table.

 The file server connection table is an internal table kept on the
 workstation that keeps information about the file servers to which the
 workstation is currently attached. Under NetWare 2.x and 3.x a workstation
 can be attached to up to 8 file servers simultaneously. The names of these
 file servers are kept in the workstation's server table, and are given a
 number from 1 to 8.

 Returns an empty string if an error occurs.

 Example:
 // To display the name of the default file server:
 lpszCurrName = FSNameGet(0)
 if ( !empty( lpszCurrName ) )
    ? "The current file server is", CurrName
 endif
 // To return a list of the file servers to which the workstation is
 // currently attached:
 for i = 1 to 8
    lpszServer = FSNameGet( i )
    if !empty( lpszServer )
       ? lpszServer
    endif
 next

 Notes:
 The workstation's file server table can become fragmented with
 repeated attaches to and detaches from servers. All 8 connections should be
 tested to determine whether a particular server is attached.

See Also: FSPreferredNameGet() / FSPreferredNameSet() FSConnIDGet() CapFSGet()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson