NWScanPhysicalLocksByFile

Scans for all record locks in a specified physical 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) NWScanPhysicalLocksByFile ( 
     NWCONN_HANDLE          conn,  
     NWDIR_HANDLE           dirHandle,  
     const nstr8 N_FAR     *path,  
     nuint8                 dataStream,  
     pnint16                iterHandle,  
     PHYSICAL_LOCK N_FAR   *lock,  
     PHYSICAL_LOCKS N_FAR  *locks);
  

Delphi Syntax

  uses calwin32 
   
  Function NWScanPhysicalLocksByFile 
    (conn : NWCONN_HANDLE; 
     dirHandle : NWDIR_HANDLE; 
     path : pnstr8; 
     dataStream : nuint8; 
     iterHandle : pnint16; 
     Var lock : PHYSICAL_LOCK; 
     Var locks : PHYSICAL_LOCKS 
  ) : NWCCODE;
  

Parameters

conn
(IN) Specifies the NetWare server connection handle.
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.
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 next record to be scanned; must be set to 0 initially.
lock
(OUT) Points to PHYSICAL_LOCK (optional).
locks
(OUT) Points to PHYSICAL_LOCKS.

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

0x8998

VOLUME_DOES_NOT_EXIST

0x899B

BAD_DIRECTORY_HANDLE

0x899C

INVALID_PATH

0x89C6

NO_CONSOLE_PRIVILEGES

0x89FD

BAD_STATION_NUMBER

0x89FF

NO_FILES_FOUND_ERROR

Remarks

The client must have console operator rights to call NWScanPhysicalLocksByFile.

iterHandle returns -1 upon completion, and should 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