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> fsprimarynameget() / fsprimarynameset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FSPrimaryNameGet() / FSPrimaryNameSet()
------------------------------------------------------------------------------
 Purpose:
 Get or set the primary file server by name.

 Syntax:
 lpszPrimServer = FSPrimaryNameGet()
 lpszPrimServer = FSPrimaryNameSet( lpszServerName )

 Parameters:
 lpszServerName The file server name.

 Returns:
 A character string of length 47.

 The CA-Clipper names for these functions are:
 FSPrimNmeGet() / FSPrimNmeSet()

 Description:
 FSPrimaryNameGet() returns the bindery object name of the file server
 to which all NOVLIB calls are directed, provided that no preferred server
 is set and the current working drive is local. This is normally the
 default file server.

 NetWare allows a workstation to be attached to a maximum of 8 file servers
 simultaneously. If there is no primary server, FSPrimaryNameGet() returns
 an empty string and NWErrorGet() is set to -3, indicating that all NetWare
 calls will be directed to the default server.
 If a workstation is attached to more than one file server,
 FSPrimaryNameSet() allows calls to be directed specifically to any of them
 via lpszServerName.
 FSPrimaryNameSet() will return the previous server name if successful, or
 an empty string if an error occurs.

 Example:
 // To return the name of the primary file server:
 lpszServer = FSPrimaryNameGet()
 do case
    case !empty( lpszServer )
       ? "Current primary server name is ", lpszServer
    otherwise
       ? "There is no primary server"
 endcase
 // To set the primary file server to SERVER_4:
 lpszServer = FSPrimaryNameSet( "SERVER_4" )
 if !empty( lpszServer )
    ? "Primary server is now SERVER_4"
 endif

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

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