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> fsprimconget() / fsprimconset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FSPrimConGet() / FSPrimConSet()
------------------------------------------------------------------------------
 Purpose:
 Get / set the primary file server by connection ID.

 Syntax:
 iPrimServer = FSPrimConGet()
 iPrimServer = FSPrimConSet( iConnID )

 Parameters:
 iConnID The file server connection ID.

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

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

 Example:
 // To return the name of the file server where all NOVLIB
 // calls are currently being directed:
 iServer = FSPrimConGet()
 do case
    case iServer > 0
       ? "Current primary server ID is ", iServer
    case iServer = 0
       ? "There is no primary server."
    otherwise
       ? "Error"
 endcase
 // To direct all further NOVLIB calls to file server SERVER_4:
 iServer = FSPrimConSet( FSConIDGet("SERVER_4") )
 if iServer != NOVERRINT
    ? "Primary server is now SERVER_4"
 endif

See Also: FSConIDGet() FSPrimNmeGet() / FSPrimNmeSet()

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