NWClearFileLock2
Unlocks the specified file and removes it from the log table
#include <nwfile.h> or #include <nwcalls.h> N_EXTERN_LIBRARY(NWCCODE) NWClearFileLock2 ( NWCONN_HANDLE conn, NWDIR_HANDLE dirHandle, const nstr8 N_FAR *path);
uses calwin32 Function NWClearFileLock2 (conn : NWCONN_HANDLE; dirHandle : NWDIR_HANDLE; const path : pnstr8 ) : NWCCODE;
These are common return values; see Return Values (NDK: Connection, Message, and NCP Extensions) for more information.
To avoid deadlock, a workstation must request those resources it needs to lock by making an entry in the File Log Table at the NetWare server. Once the log table is complete, the application attempts to lock those records. Locking works only if all records in the table are available. If some of the logged resources cannot be locked, the lock fails and none of the resources are locked.
If the file is open, NWClearFileLock2 causes it to be closed on the server. The application should close the associated file on the workstation to clear the local file handle correctly.
path can specify either a file’s complete path name or a path relative to the current working directory. For example, if a file’s complete path name is SYS:ACCOUNT/DOMEST/TARGET.DAT and the directory handle mapping is SYS:ACCOUNT, path could point to either of the following:
SYS:ACCOUNT/DOMEST/TARGET.DAT DOMEST/TARGET.DAT