GetConnectionNumber

Returns the current connection number for the thread group that the running process belongs to

Local Servers:nonblocking
Remote Servers:nonblocking
Classification:3.x, 4.x, 5.x, 6.x
Service:Server-Based Connection

Syntax

  #include <nwconn.h>  
   
  WORD GetConnectionNumber (void); 
  

Return Values

This function returns a connection number (0 to maximum connection number).

Remarks

This function is provided primarily for compatibility with the NetWare workstation APIs. In the NLM environment, this function returns the current connection number.

When the server allocates a connection number, it assigns the first unused connection number. When logging out, the server marks the connection number as unused but reserved in anticipation of reattachment. A reserved logical connection number is not reassigned until it becomes the first unused connection number and the attaching object has no connection number reserved.

Use GetFileServerInformation (File Server Environment Services) to find out how many logical connections a server can support.

See Also

GetConnectionList

GetConnectionNumber Example

  #include <nwconn.h>  
  WORD   connectionNumber;  
  connectionNumber = GetConnectionNumber ();