NWGetServerConnInfo

Returns connection information in a NetWare server for a given connection number.

Local servers:blocking
Remote servers:
NetWare Server:5.x, 6.x
Platform:NLM, Windows 95, Windows NT
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:Server Environment

Syntax

  #include <nwfse.h> 
  or 
  #include <nwcalls.h> 
   
  int NWGetServerConnInfo ( 
     NWCONN_HANDLE                     conn, 
     nuint32                           retInfoMask, 
     nuint32                           connectionNumber, 
     SERVER_AND_VCONSOLE_INFO N_FAR   *serverTimeAndVConsoleInfo, 
     puint16                           reserved, 
     NWFSE_NETWORK_ADDRESS N_FAR      *networkAddress, 
     NWFSE_LOGIN_TIME N_FAR           *loginTime, 
     NWFSE_LOGIN_NAME N_FAR           *loginName, 
     NWFSE_LOCK_INFO N_FAR            *lockInfo, 
     NWFSE_PRINT_INFO N_FAR           *printInfo, 
     NWFSE_STATS_INFO N_FAR           *statsInfo, 
     NWFSE_ACCT_INFO N_FAR            *acctInfo, 
     NWFSE_AUTH_INFO N_FAR            *authInfo); 
  

Delphi Syntax

  uses calwin32 
   
  Function NWGetServerConnInfo 
    (conn : NWCONN_HANDLE;
     retInfoMask : nuint32;
     connectionNumber : nuint32;
     Var serverTimeAndVConsoleInfo : SERVER_AND_VCONSOLE_INFO;
     reserved : pnuint16;
     Var networkAddress : NWFSE_NETWORK_ADDRESS;
     Var loginTime : NWFSE_LOGIN_TIME;
     Var loginName : NWFSE_LOGIN_NAME;
     Var lockinfo : NWFSE_LOCK_INFO;
     Var printInfo : NWFSE_PRINT_INFO;
     Var statusInfo : NWFSE_STATS_INFO;
     Var acctInfo : NWFSE_ACCT_INFO;
     Var authInfo : NWFSE_AUTH_INFO
  ) : NWCCODE; 
  

Parameters

conn
(IN) Specifies the NetWare server connection handle.
retInfoMask
(IN) Specifies the connection information to be returned.
connectionNumber
(IN) Specifies the number of a connection to return information for.
serverTimeAndVConsoleInfo
(OUT) Points to SERVER_AND_VCONSOLE_INFO, which contains the console and server versions.
reserved
Is reserved for future use.
networkAddress
(OUT) Points to NWFSE_NETWORK_ADDRESS, which contains information about the connection address.
loginTime
(OUT) Points to NWFSE_LOGIN_TIME, which contains the server login time.
loginName
(OUT) Points to NWFSE_LOGIN_NAME, which contains the login name for the server.
lockInfo
(OUT) Points to NWFSE_LOCK_INFO, which contains information about the logical and record locks of the server.
printInfo
(OUT) Points to NWFSE_PRINT_INFO, which contains the printing information.
statsInfo
(OUT) Points to NWFSE_STATS_INFO, which contains statistical information about the server.
acctInfo
(OUT) Points to NWFSE_ACCT_INFO, which contains accounting information about the server.
authInfo
(OUT) Points to NWFSE_AUTH_INFO, which contains authentication information about the server.

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x880E

NWE_BUFFER_OVERFLOW

0x8977

NEW_BUFFER_TOO_SMALL

0x897E

NCP_BOUNDARY_CHECK_FAILED

Remarks

Before calling NWGetServerConnInfo, allocate memory for the address pointer used in NWFSE_NETWORK_ADDRESS and set the addressSize field to a valid value.

If the passed in addressSize value is smaller than expected, addressSize is set to the required value and NWGetServerConnInfo returns NWE_BUFFER_OVERFLOW.

WARNING:If memory isn't allocated and invalid information is passed to networkAddress, the server might abend.

retInfoMask can have the following values (all can be ORed with the exception of CONN_INFO_ALL_MASK):

Value

Delphi

Definition

0x00000001

$00000001

CONN_INFO_TRANS_MASK specifies to return NWFSE_NETWORK_ADDRESS.

0x00000002

$00000002

CONN_INFO_LOGIN_TIME_MASK specifies to return NWFSE_LOGIN_TIME.

0x00000004

$00000004

CONN_INFO_LOGIN_NAME_MASK specifies to return NWFSE_LOGIN_NAME.

0x00000008

$00000008

CONN_INFO_LOCK_MASK specifies to return NWFSE_LOCK_INFO.

0x00000010

$00000010

CONN_INFO_PRINT_MASK specifies to return NWFSE_PRINT_INFO.

0x00000020

$00000020

CONN_INFO_STATS_MASK specifies to return NWFSE_STATS_INFO.

0x00000040

$00000040

CONN_INFO_ACCT_MASK specifies to return NWFSE_ACCT_INFO.

0x00000080

$00000080

CONN_INFO_AUTH_MASK specifies to return NWFSE_AUTH_INFO.

0xFFFFFFFF

 

CONN_INFO_ALL_MASK specifies that all structures are to be returned.

NCP Calls