Files
harbour-core/doc/en/hbflock.txt
Viktor Szakats ec87fbc449 2013-03-24 20:22 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/hbct/doc/en/*.txt
  * contrib/hbgt/doc/en/hbgt.txt
  * contrib/hbmisc/doc/en/*.txt
  * contrib/hbziparc/doc/en/hbziparc.txt
  * contrib/rddads/doc/en/adsfuncs.txt
  * doc/en/*.txt
    ! space after comma
    ! unicode fix
    ! minor corrections

  * extras/template/tests/hbmk.hbm
    * cleaned recently added comment
2013-03-24 20:22:55 +01:00

109 lines
3.0 KiB
Plaintext

/* $DOC$
$TEMPLATE$
Function
$NAME$
hb_FLock()
$CATEGORY$
API
$SUBCATEGORY$
FileSys
$ONELINER$
Locks part or all of any file
$SYNTAX$
hb_FLock( <nHandle>, <nOffset>, <nBytes> [, <nType ] )
--> <lSuccess>
$ARGUMENTS$
<nHandle> Dos file handle
set> Offset of the first byte of the region to be locked.
<nBytes> Number of bytes to be locked.
e> The type (read or write) of lock requested.
$RETURNS$
<lSuccess> .T. if the lock was obtained, else .F.
$DESCRIPTION$
This function attempts to lock a region of the file whose file handle
is <nHandle>. This is a low level file function. To lock Harbour
data files use either the FLock() or RLock() function.
The value of <nHandle> is obtained from either a call to the FOpen()
or the FCreate() function.
<nOffset> is the offset (from the beginning of the file) to the first
of the region to be locked. (Offsets from the current position
nd of file are not currently supported.)
<nBytes> is the length of the region to be locked in bytes.
e> is the type of lock requested. There are two types of locks:
sive write locks ( <nType> = 0x0000 ) - the default, and shared
locks( <nType> = 0x0100 ). Additionally you can specify a
ing version of this function (that is it won't return until
r an error has occurred or the lock has been obtained) by
g Ox0200 to the above values.
$EXAMPLES$
refer to tests/tflock.prg
$STATUS$
R
$COMPLIANCE$
H
$PLATFORMS$
All
$FILES$
Library is core
$SEEALSO$
hb_FUnlock(), FOpen(), FCreate(), FError(), FClose()
$END$
*/
/* $DOC$
$TEMPLATE$
Function
$NAME$
hb_FUnlock()
$CATEGORY$
API
$SUBCATEGORY$
FileSys
$ONELINER$
Unlocks part or all of any file
$SYNTAX$
hb_FUnlock( <nHandle>, <nOffset>, <nBytes> ) --> <lSuccess>
$ARGUMENTS$
<nHandle> Dos file handle
set> Offset of the first byte of the region to be locked.
<nBytes> Number of bytes to be locked.
$RETURNS$
<lSuccess> .T. if the lock was removed, else .F.
$DESCRIPTION$
This function attempts to unlock a region of the file whose file
handle is <nHandle>. This is a low level file function. To
unlock Harbour data files use the dbUnlock() function.
The value of <nHandle> is obtained from either a call to the FOpen()
or the FCreate() function.
<nOffset> is the offset (from the beginning of the file) to the first
of the region to be unlocked. (Offsets from the current position
nd of file are not currently supported.)
<nBytes> is the length of the region to be unlocked in bytes.
$EXAMPLES$
refer to tests/tflock.prg
$STATUS$
R
$COMPLIANCE$
H
$PLATFORMS$
All
$FILES$
Library is core
$SEEALSO$
hb_FLock(), FOpen(), FCreate(), FError(), FClose()
$END$
*/