NWGetPreferredConnName

Gets the name of the preferred connection.

NetWare Server:N/A
Platform:NLM, Windows NT, Windows 95, Windows 98, Windows 2000, Windows XP
Library:Cross-Platform NDS (NET*.*)
Service:NDS

Syntax

C

  #include <nwnet.h> 
  or 
  #include <nwndscon.h> 
   
  N_EXTERN_LIBRARY (NWDSCCODE)  NWGetPreferredConnName  ( 
     pnuint8   preferredName,  
     pnuint8   preferredType); 
  

Pascal

  uses netwin32 
   
  Function NWGetPreferredConnName 
    (preferredName : pnuint8;   
     preferredType : pnuint8 
  ) : NWCCODE;
  

Parameters

preferredName

(OUT) Points to the buffer where the preferred name is stored.

preferredType

(OUT) Points to the preferred name type set [NWNDS_CONNECTION = 1 (Preferred Tree Name) or 0 (Preferred Server)].

Return Values

These are common return values; see NDS Return Values for more information.

0x0000 0000

SUCCESSFUL

Remarks

NWGetPreferredConnName will work only if VLMs are loaded; it will not work with NETX.

If both preferredType names are set by API calls or net.cfg, the order is determined at VLM load time.

Defaults are Preferred Tree Name, then Preferred Server.

If a Preferred Tree Name is not specified, the Preferred Server will be returned and preferredType will be zero (Preferred Server). However, if a Preferred Tree Name is specified in net.cfg, or if NWSetPreferredDSTree is called, preferredName will be the Preferred Tree Name and the server type will be set to NWNDS_CONNECTION = 1 (Preferred Tree Name). If bind.vlm is loaded before nds.vlm, the opposite is true.

NCP Calls

See Also

NWSetPreferredDSTree