Locks and unlocks a range of an open file.
#define INCL_DOSFILEMGR
#include <os2.h>
HFILE hFile; /* File handle. */
PFILELOCK pflUnlock; /* Address of the structure containing the offset and length of a range to be unlocked. */
PFILELOCK pflLock; /* Address of the structure containing the offset and length of a range to be locked. */
ULONG timeout; /* The maximum time, in milliseconds, that the process is to wait for the requested locks. */
ULONG flags; /* Flags that describe the action to be taken. */
APIRET ulrc; /* Return Code. */
ulrc = DosSetFileLocks(hFile, pflUnlock, pflLock,
timeout, flags);