NWScanPhysicalLocksByConnFile

Scans for all physical record locks by a specified connection on a specified file

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) NWScanPhysicalLocksByConnFile ( 
     NWCONN_HANDLE               conn,  
     NWCONN_NUM                  connNum,  
     NWDIR_HANDLE                dirHandle,  
     const nstr8 N_FAR          *path,  
     nuint8                      dataStream,  
     pnint16                     iterHandle,  
     CONN_PHYSICAL_LOCK N_FAR   *lock,  
     CONN_PHYSICAL_LOCKS N_FAR  *locks);
  

Delphi Syntax

  uses calwin32 
   
  Function NWScanPhysicalLocksByConnFile 
    (conn : NWCONN_HANDLE; 
     connNum : NWCONN_NUM; 
     dirHandle : NWDIR_HANDLE; 
     path : pnstr8; 
     dataStream : nuint8; 
     iterHandle : pnint16; 
     Var lock : CONN_PHYSICAL_LOCK; 
     Var locks : CONN_PHYSICAL_LOCKS 
  ) : NWCCODE;
  

Parameters

conn
(IN) Specifies the NetWare server connection handle.
connNum
(IN) Specifies the connection number of the logged-in object to be scanned.
dirHandle
(IN) Specifies the directory handle associated with the desired directory path.
path
(IN) Points to a full file path (or a path relative to dirHandle) specifying the file to be checked. The last item must be a file name.
dataStream
(IN) Specifies the Macintosh name space (for 3.11 and above only) or set to 0:
  • 0 Resource Fork
  • 1 Data Fork
iterHandle
(IN/OUT) Points to the number of the next record to be scanned (set to 0 initially).
lock
(OUT) Points to the CONN_PHYSICAL_LOCK structure.
locks
(OUT) Points to the CONN_PHYSICAL_LOCKS structure.

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

0x89FD

BAD_STATION_NUMBER

0x89FF

FILE_NAME_ERROR, NO_FILES_FOUND_ERROR

Remarks

For 3.x, a client must have console operator rights to call NWScanPhysicalLocksByConnFile or NO_CONSOLE_PRIVILEGES will be returned.

For 4.x and above, a client can call NWScanPhysicalLocksByConnFile 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 NWScanPhysicalLocksByConnFile and receive information about that connection.

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

If lock is a NULL pointer, locks returns the records in groups, instead of one by one.

NCP Calls