GetObjectConnectionNumbers

Returns a list of connection numbers that indicates how many times an object is logged in to the server and the connection number used for each login

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

Syntax

  #include <nwconn.h>  
   
  int GetObjectConnectionNumbers (  
     char   *objectName,  
     WORD   objectType,  
     WORD   *numberOfConnections,  
     WORD   *connectionList,  
     WORD   maxConnections); 
  

Parameters

objectName
(IN) Specifies the name of the object for which connection numbers are to be returned (maximum 48 characters, including the NULL terminator).
objectType
(IN) Specifies the type of the object for which connection numbers are returned (OT_USER, OT_USER_GROUP, OT_PRINT_SERVER).
numberOfConnections
(OUT) Receives the number of connections under which the object is logged in (0 to maximum number of connections). Zero indicates the given objectName/ objectType is not connected.
connectionList
(OUT) Receives a list of connection numbers under which the object is logged in.
maxConnections
(IN) Contains the maximum number of connection numbers to return in the connectionList parameter.

Return Values

The following table lists return values and descriptions.

Value

Hex

Name

0

(0x00)

ESUCCESS

NetWare Error

EFAILURE

Remarks

This function passes the objectName, objectType, and maxConnections parameters and returns the numberOfConnections and connectionList parameters.

When an object is logged in to a server from a workstation, NLM, or other program, the server places the object’s ID number in a table. If an object logs in from three workstations and two NLM applications, its object ID number appears in the table five times.

The position of the workstation or NLM address in the table is a connection number. Each server can have a maximum number of connections. This function call returns a count and a list of the connection numbers under which the object is logged in.

If an NLM is logged in, its address is always the same as that of the server it is running on.

See Also

GetConnectionInformation, GetConnectionNumber, GetInternetAddress, GetMaximumNumberOfStations, GetStationAddress