private void EstablishReference(long id)
{
try {
lock (fixedList) {
// Update the record in the fixed list.
IArea block = fixedList.GetRecord(id);
var recordPos = block.Position;
int status = block.ReadInt4();
if (status != 1)
throw new Exception("Assertion failed: record is not static.");
int refCount = block.ReadInt4();
// Set the fixed blob record as complete.
block.Position = recordPos + 4;
block.WriteInt4(refCount + 1);
block.Flush();
}
} catch (IOException e) {
throw new Exception("IO Error: " + e.Message);
}
}