NWScanSemaphoresByConn

Scans information about the semaphores opened by a specified connection

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:Synchronization

Syntax

  #include <nwsync.h> 
  or 
  #include <nwcalls.h> 
   
  N_EXTERN_LIBRARY( NWCCODE )NWScanSemaphoresByConn  ( 
     NWCONN_HANDLE            conn,  
     NWCONN_NUM               connNum,  
     pnint16                  iterHandle,  
     CONN_SEMAPHORE  NWPTR    semaphore,  
     CONN_SEMAPHORES  NWPTR   semaphores);
  

Delphi Syntax

  uses calwin32 
   
  Function NWScanSemaphoresByConn 
    (conn : NWCONN_HANDLE; 
     connNum : NWCONN_NUM; 
     iterHandle : pnint16; 
     Var semaphore : CONN_SEMAPHORE; 
     Var semaphores : CONN_SEMAPHORES 
  ) : NWCCODE;
  

Parameters

conn
(IN) Specifies the NetWare server connection handle.
connNum
(IN) Specifies the connection number of the logged-in object to be scanned.
iterHandle
(IN/OUT) Points to the number of the next record to be scanned; should be set to 0 initially.
semaphore
(OUT) Points to CONN_SEMAPHORE (optional).
semaphores
(OUT) Points to CONN_SEMAPHORES.

Return Values

These are common return values; see Return Values (NDK: Connection, Message, and NCP Extensions) for more information.

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x890A

NLM_INVALID_CONNECTION

0x88FF

Scan Completed

0x8996

SERVER_OUT_OF_MEMORY

Remarks

For 3.x, you must have console operator privileges to call NWScanSemaphoresByConn or NO_CONSOLE_PRIVILEGES will be returned.

For 4.x and above, a client can call NWScanSemaphoresByConn to return information about its connection without needing console operator privileges. To return information about other connection numbers, you must have console rights. A client with console privileges can pass any valid connection number to NWScanSemaphoresByConn and receive information about that connection.

iterHandle returns -1 upon completion, and should not be changed during the scan.

If semaphore is a NULL pointer, semaphores returns the records in a group, instead of one by one.

NWScanSemaphoresByConn returns SUCCESSFUL even when connNum is invalid. Call NWGetFileServerInformation to return the maxConns supported for the specific server. Only use connNum in the range of zero- maxConns.

NCP Calls

See Also

NWCCGetConnRefInfo, NWGetObjectConnectionNumbers (NDK: Connection, Message, and NCP Extensions)