NWClearFileLock2(3nw)


NWClearFileLock2 -- unlocks the specified file and removes it from the log table

Synopsis

   #include <nwfile.h> 
   or 
   #include <nwcalls.h> 
   

NWCCODE N_API NWClearFileLock2 (NWCONN_HANDLE conn, NWDIR_HANDLE dirHandle, pnstr8 path);

Description

The parameters are as follows:

conn
(IN) Specifies the NetWare server connection handle.

dirHandle
(IN) Specifies the directory handle of the new directory's root directory.

path
(IN) Points to the string containing the name and path of the new directory.

Return values

0x0000
SUCCESSFUL

0x8801
INVALID_CONNECTION

0x8996
SERVER_OUT_OF_MEMORY

0x8998
VOLUME_DOES_NOT_EXIST

0x899B
BAD_DIRECTORY_HANDLE

0x899C
INVALID_PATH

0x89A1
DIRECTORY_IO_ERROR

0x89FD
BAD_STATION_NUMBER

0x89FF
LOCK_ERROR

Notices

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.

2.x servers will also return INVALID_PATH when a bad directory handle is passed.

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 

Services

Synchronization

NCP calls

0x2222 07
Clear File

References

NWClearFileLockSet(3nw), NWLogPhysicalRecord(3nw), NWLogFileLock2(3nw),
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.