Gets the name of the preferred connection.
#include <nwnet.h> or #include <nwndscon.h> N_EXTERN_LIBRARY (NWDSCCODE) NWGetPreferredConnName ( pnuint8 preferredName, pnuint8 preferredType);
uses netwin32 Function NWGetPreferredConnName (preferredName : pnuint8; preferredType : pnuint8 ) : NWCCODE;
(OUT) Points to the buffer where the preferred name is stored.
(OUT) Points to the preferred name type set [NWNDS_CONNECTION = 1 (Preferred Tree Name) or 0 (Preferred Server)].
These are common return values; see NDS Return Values
for more information.
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.