NWCCOpenConnByName
Resolves the given server or tree name to a network address then creates a connection to that address
#include <nwclxcon.h>
N_EXTERN_LIBRARY NWRCODE NWCCOpenConnByName (
NWCONN_HANDLE startConnHandle,
const nstr8 N_FAR *name,
nuint nameFormat,
nuint openState,
nuint tranType,
pNWCONN_HANDLE pConnHandle);
uses clxwin32
Function NWCCOpenConnByName
(startConnHandle : NWCONN_HANDLE;
name : pnstr8;
nameFormat : nuint;
openState : nuint;
tranType : nuint;
Var pConnHandle : NWCONN_HANDLE
) : NWRCODE;
These are common return values; see Return Values (Return Values for C) for more information.
startConnHandle is the connection to use when resolving a name. For instance, if the name is a bindery name, the requester will scan the bindery of the given connection for the required server name.
startConnHandle can also be zero if you do not care which connection is used to resolve the name.
name points to the structure containing the name of the server to which to connect. The format and length of these strings are defined by nameFormat.
For the tranType parameter, Novell recommends passing NWCC_TRAN_TYPE_WILD and letting the underlying system use the type best suited for the connection it is making. The other type values remain available, however.
NOTE:Under NETX and VLM, tranType can only be set to either NWCC_TRAN_TYPE_IPX or NWCC_TRAN_TYPE_WILD. Otherwise, NWCCOpenConnByName will return NWE_UNSUPPORTED_TRAN_TYPE.
See openconn.c for sample code.