2.1 Attaching to Servers and Opening Connections

You need not be concerned with actually attaching to a given server. The client/library manages these connections. You must simply open a connection and get a connection handle. The client makes the attachment if required and maintains a use count on each connection, ensuring that a connection is not closed if existing connection handles are still active.

The following functions return connection handles:

Each of these functions has an openState parameter to specify if the connection is licensed or unlicensed (see Section 5.7, NWCC_INFO_LICENSE_STATE Values).

NOTE:Getting a connection handle does not give you rights to a server as a particular user. You must authenticate to the server as a user by calling NWLoginToFileServer if logging in to a bindery or NWDSAuthenticate if logging in to NDS.

See openconn.c for sample code.