NWCCOpenConnByName(3nw)


NWCCOpenConnByName -- resolves the given name to a network address then creates a connection to that address

Synopsis

   #include <nwclxcon.h> 
   

N_EXTERN_LIBRARY NWRCODE NWCCOpenConnByName (NWCONN_HANDLE startConnHandle, pnstr8 name, nuint nameFormat, nuint openState, nuint reserved, pNWCONN_HANDLE connHandle);

Description

The parameters are as follows:

startConnHandle
(IN) Specifies the connection to use when resolving the name.

name
(IN) Points to the name of the connection to which to connect.

nameFormat
(IN) Specifies the format of the file server name.

openState
(IN) Specifies the desired open state of the connection.

reserved
(IN) Reserved for future use. Set to NWCC_RESERVED.

connHandle
(OUT) Points to the connection handle to be returned and may be used for all requests directed to the connection.

Return values

0x0000
SUCCESSFUL

0x8801
NWE_INVALID_CONN

0x8808
NWE_SERVER_NO_SLOTS

0x880A
NWE_SERVER_NO_ROUTE

0x883F
NWE_CONN_TABLE_FULL

0x8841
NWE_TRAN_INVALID_TYPE

0x8847
NWE_SERVER_NOT_FOUND

0x8867
NWE_INSUFFICIENT_RESOURCES

0x8868
NWE_STRING_TRANSLATION

0x8869
NWE_ACCESS_VIOLATION

0x8870
NWE_UNSUPPORTED_TRAN_TYPE

Notices

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 don't care which connection should be used to resolve the name. This value can also be 1 which causes each connection to be used until the name is resolved successfully. Only existing connections are used when -1 is specified, except when no connections exist yet, one will be established.

name points to the structure containing the name of the file server to which to connect. The format and length of these strings are defined by nameFormat.

nameFormat can have the following values:

0x0001
NWC_NAME_FORMAT_NDS

0x0002
NWC_NAME_FORMAT_BIND

0x0004
NWC_NAME_FORMAT_PNW

0x0008
NWC_NAME_FORMAT_NDS_TREE

0x8000
NWC_NAME_FORMAT_WILD

NWC_NAME_FORMAT_WILD may be Ored with the other values or used alone. When ORed with another value, the wild value indicates an unmarked alternative is acceptable when the name cannot be found in the selected name server. When used alone, it indicates any name service may be used, but the preferred name service as configured in the client will be used first.

openState can have the following values:

0x0001
NWCC_OPEN_LICENSED

0x0002
NWCC_OPEN_UNLICENSED

nameFormat can have the following values:

0x0001
NWCC_NAME_FORMAT_NDS

0x0002
NWCC_NAME_FORMAT_BIND

0x0008
NWCC_NAME_FORMAT_NDS_TREE

Services

Connection


30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.