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> fsprefconget() / fsprefconset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FSPrefConGet() / FSPrefConSet()
------------------------------------------------------------------------------
 Purpose:
 Get / set the preferred file server by connection ID.

 Syntax:
 iPrefServer = FSPrefConGet()
 iPrefServer = FSPrefConSet( iConnID )

 Parameters:
 iConnID The file server connection ID.

 Returns:
 A numeric value from 0 to 8 (signed short int).

 Description:
 FSPrefConGet() returns the connection ID number 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, FSPrefConGet()
 returns 0 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,
 FSPrefConSet() allows calls to be directed specifically to any of
 them via iConnID.
 FSPrefConSet() will return the previous server connection ID number
 if successful. FSPrefConSet() returns NOVERRINT if an error occurs.

 Example:
 // To return the name of the file server where all NOVLIB
 // calls are currently being directed:
 iServer = FSPrefConGet()
 do case
    case iServer != NOVERRINT
       ? "Current preferred server ID is ", iServer
    case iServer = 0
       ? "There is no preferred server."
    otherwise
       ? "Error"
 endcase
 // To direct all further NOVLIB calls to file server SERVER_4:
 iServer = FSPrefConSet( FSConIDGet("SERVER_4") )
 if iServer != NOVERRINT
    ? "Preferred 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