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> fsprefnmeget() / fsprefnmeset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FSPrefNmeGet() / FSPrefNmeSet()
------------------------------------------------------------------------------
 Purpose:
 Get / set the preferred file server by name.

 Syntax:
 lpszPrefServer = FSPrefNmeGet()
 lpszPrefServer = FSPrefNmeSet( lpszServerName )

 Parameters:
 lpszServerName The file server name.

 Returns:
 A character string of length 47.

 Description:
 FSPrefNmeGet() returns the bindery object name of the file server
 to which all NOVLIB calls are directed, usually the default file server.

 NetWare allows a workstation to be attached to a maximum of 8 file servers
 simultaneously. If there is no preferred server, FSPrefNmeGet()
 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,
 FSPrefNmeSet() allows calls to be directed specifically to any of
 them via lpszServerName.
 FSPrefNmeSet() will return the previous server name if successful.
 FSPrefNmeSet() returns an empty string if an error occurs.

 Example:
 // To return the name of the file server where all NOVLIB
 // calls are currently being directed:
 lpszServer = FSPrefNmeGet()
 do case
    case !empty( lpszServer )
       ? "Current preferred server name is ", lpszServer
    otherwise
       ? "There is no preferred server."
 endcase
 // To direct all further NOVLIB calls to file server SERVER_4:
 lpszServer = FSPrefNmeSet( "SERVER_4" )
 if !empty( lpszServer )
    ? "Preferred server is now SERVER_4"
 endif

See Also: FSConIDGet() FSPrimConGet() / FSPrimConSet()

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