void setReadOnly(bool value);

The function setReadOnly() forces the library to open files in read-only mode. It is useful if you do not want to modify your file accidenatly.
The function isReadOnly() allows you to get current mode.
You have to call setReadOnly before openning a file.

bool isReadOnly();


{
    CDBFapi dbf = new CDBFapi();
    if (!dbf || !dbf.libraryLoaded()) return;
    dbf.setReadOnly(true);
    if (dbf.openDBFfile("c:\\tmp\\example.dbf"))
    {
        // your code
        dbf.closeDBFFile();
    }
    dbf = nil;
}