GetConnectionNumber
Returns the current connection number for the thread group that the running process belongs to
#include <nwconn.h> WORD GetConnectionNumber (void);
This function returns a connection number (0 to maximum connection number).
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.
#include <nwconn.h> WORD connectionNumber; connectionNumber = GetConnectionNumber ();