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

 Syntax:
 lpszPrimServer = FSPrimNmeGet()
 lpszPrimServer = FSPrimNmeSet( lpszServerName )

 Parameters:
 lpszServerName The file server name.

 Returns:
 A character string of length 47.

 Description:
 FSPrimNmeGet() 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, FSPrimNmeGet() 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,
 FSPrimNmeSet() allows calls to be directed specifically to any of them
 via lpszServerName.
 FSPrimNmeSet() 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 = FSPrimNmeGet()
 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 = FSPrimNmeSet( "SERVER_4" )
 if !empty( lpszServer )
    ? "Primary server is now SERVER_4"
 endif

See Also: FSConIDGet() FSPrefNmeGet() / FSPrefNmeSet()

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