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

 Syntax:
 iPrimServer = FSPrimaryConnGet()
 iPrimServer = FSPrimaryConnSet( iConnID )

 Parameters:
 iConnID The file server connection ID.

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

 The CA-Clipper names for these functions are:
 FSPrimConGet() / FSPrimConSet()

 Description:
 FSPrimaryConnGet() 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, FSPrimaryConnGet() 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,
 FSPrimaryConnSet() allows calls to be directed specifically to any of them
 via iConnID.
 FSPrimaryConnSet() 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 = FSPrimaryConnGet()
 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 = FSPrimaryConnSet( FSConnIDGet("SERVER_4") )
 if iServer != NOVERRINT
    ? "Primary server is now SERVER_4"
 endif

See Also: FSConnIDGet() FSPrimaryNameGet() / FSPrimaryNameSet()

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