NWOpenConnByName(3nw)


NWOpenConnByName -- resolves the given name to a network address and creates a service connection to the address

Synopsis

   #include <nwconnec.h> 
   

NWCCODE N_API NWOpenConnByName (NWCONN_HANDLE startConn, pnstr8 pName, nuint nameFormat, nuint connFlags, NWCONN_HANDLE N_FAR * pConnHandle);

Description

The parameters are as follows:

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

pName
(IN) Points to the name of the file server to connect to.

nameFormat
(IN) Specifies the format of the given name.

connFlags
(IN) Specifies whether the connection is public or private.

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

Return values

0x0000
SUCCESSFUL

Transport Not Loaded
Name Not Found
No Local Connections
No Remote Connections
No Response Received
Out Of Memory

Notices

If startConn is a bindery name, the requester will scan the bindery of the given connection for the required address. startConn can be NULL if you do not care which connection is used to resolve the name.

pName is NULL terminated, contains no wild cards and is a maximum of 512 characters long (maximum of 1024 bytes if encoded in UNICODE).

connFlags can have the following values:

0x0001 NWC_OPEN_LICENSED
0x0002 NWC_OPEN_UNLICENSED
0x0004 NWC_OPEN_PRIVATE
0x0008 NWC_OPEN_PUBLIC

connFlags must reflect both the license state and the public state of the connection. For example, the value NWC_OPEN_PUBLIC | NWC_OPEN_LICENSED would be used to open public licensed connection.

nameFormat can have the following values:

C Values Name
0x0001 NWCONN_NAME_FORMAT_NDS
0x0002 NWCONN_NAME_FORMAT_BIND
0x0004 NWCONN_NAME_FORMAT_BDP
0x0008 NWCONN_NAME_FORMAT_NDS_TREE

 
 ----------------------------------------- 
| C Values|  Name                        | 
|---------|------------------------------| 
| 0x0001  |  NWCONN_NAME_FORMAT_NDS      | 
|---------|------------------------------| 
| 0x0002  |  NWCONN_NAME_FORMAT_BIND     | 
|---------|------------------------------| 
| 0x0004  |  NWCONN_NAME_FORMAT_BDP      | 
|---------|------------------------------| 
| 0x0008  |  NWCONN_NAME_FORMAT_NDS_TREE | 
|---------|------------------------------| 

Services

Connection

NCP calls

0x2222 23 17 Get File Server Information
0x2222 23 22 Get Station's Logged Info (old)
0x2222 23 28 Get Station's Logged Info
0x2222 104 1 Ping for NDS NCP

References

NWCCOpenConnByAddr(3nw), NWCCOpenConnByRef(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.