xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

DisableWaitLocks()

Toggles the exclusive file opening mode.

Syntax

DisableWaitLocks( [<lNewMode>] ) --> lOldMode

Arguments

<lNewMode>
This is a logical value determining if an application should wait until it gains exclusive access when opening a file with FOpen().

Return

The function returns the previous mode for exclusive file opening as a logical value.

Description

DisableWaitLocks() is a low-level file function maintaining an internal setting for Fopen(). It is only relevant when a process requests exclusive access to file when opening it. By default, FOpen() waits if the requested file to open is currently in use by another process until it is closed. FOpen() returns only after exclusive access to the requested file is obtained. This behaviour can be changed by passing .T. (true) to DisableWaitLocks(). In this case, FOpen() returns immediately when exclusive access to a file to open is currently not possible, and a file open error is set (see FError()).

Info

See also:FError(), FOpen()
Category: File functions , Low level file functions , xHarbour extensions
Source:rtl\philes.c
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe