| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Places a lock on the root area of a BLOB file.
BlobRootLock() --> lSuccess
The return value is .T. (true) if the root area is successfully locked, otherwise .F. (false) is returned.
BlobRootLock() is the only function that can place a lock on the root area of a BLOB file. A lock is required to avoid concurrency conflicts when a BLOB file is open in SHARED mode. It must be released later with BlobRootUnlock().
Note: the file Blob.ch must be #included for BlobRootLock() to work.
| See also: | BlobRootGet(), BlobRootPut(), BlobRootUnlock() |
| Category: | Blob functions , Database functions |
| Header: | blob.ch |
| Source: | rdd\dbcmd.c, rdd\dbffpt\dbffpt1.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example demonstrates the coding pattern that must be used to
// read the root area of a shared BLOB file.
#include "Blob.ch"
REQUEST DBFCDX
PROCEDURE Main
LOCAL xBlobRoot
USE PhotoArchive ALIAS Photos VIA "DBFCDX" SHARED
IF BlobRootLock()
xBlobRoot := BlobRootGet()
BlobRootUnlock()
? Valtype( xBlobRoot )
ELSE
Alert( "Unable to lock the root area" )
ENDIF
USE
RETURN
http://www.xHarbour.com