NWCCOpenConnByPref

Opens an initial connection using the configured preferred settings

NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform Client (CLX*.*)
Service:Connection

Syntax

C

  #include <nwclxcon.h> 
   
  N_EXTERN_LIBRARY NWRCODE NWCCOpenConnByPref ( 
     nuint            tranType,  
     nuint            openState,  
     nuint            reserved,  
     pNWCONN_HANDLE   pConnHandle);
  

Delphi

  uses clxwin32 
   
  Function NWCCOpenConnByPref ( 
     tranType : nuint; 
     openState : nuint;  
     reserved : nuint;  
     pConnHandle : pNWCONN_HANDLE               
  ) : NWRCODE;
  

Parameters

tranType
(IN) Specifies the preferred or required transport type to be used (see Section 5.12, Transport Type Values).
openState
(IN) Specifies the state of the connection (see Section 5.2, Connection State Values).
reserved
(IN/OUT) Reserved for future use (set to NWCC_RESERVED).
pConnHandle
(OUT) Points to the connection handle to be returned.

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

0x0000

SUCCESSFUL

0x8801

NWE_CONN_INVALID

0x8808

NWE_SERVER_NO_SLOTS

0x880A

NWE_SERVER_NO_ROUTE

0x883F

NWE_CONN_TABLE_FULL

0x8847

NWE_SERVER_NOT_FOUND

0x8867

NWE_INSUFFICIENT_RESOURCES

0x8869

NWE_ACCESS_VIOLATION

0x8870

NWE_UNSUPPORTED_TRAN_TYPE

0x890A

NLM_INVALID_CONNECTION

Remarks

NWCCOpenConnByPref is similar to NWCCOpenConnByName, which uses the preferred server or preferred tree name, except that NWCCOpenConnByPref uses the configured preferences of the requester to establish an initial connection to a server.

NOTE:In the event that a connection to the preferred tree or server cannot be established, another connection may be returned.

NWCCOpenConnByPref will return NWE_CONN_INVALID if the platform being run is not Windows 95 since NWCCOpenConnByPref is only successful on Windows 95.

See Also

NWCCCloseConn, NWCCOpenConnByName, NWCCOpenConnByRef