This example illustrates how to lock and unlock a file.
local integer tfid
local int success
local string temp_file
try
temp_file = "./my.pix"
delete temp_file noerror
call CopyFile( GetPCIHOME() + "/demo/irvine.pix", \
temp_file)
tfid = DBOpen(temp_file, "r+")
success = LockFile(tfid, 1)
print "Success ", Success
success = UnlockFile(tfid)
print "Success ", Success
call DBClose (tfid)
onerror
print "Error: "+ GetLastErrorMessage()
endonerror
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.