File Lock Functions 

PxIORecordUnlock

 

Description

Unlocks a previously locked record of a file

Format

int PxIORecordUnlock(PxIOFileHandle handle);

Where:

handle

The handle of an open file containing the record to unlock

Return Value

If the function succeeds, a value of PXIO_SUCCESS_STATUS is returned; otherwise, an error value is returned. More information on the nature of the error can be found by calling PxIOGetError.

Note:
The record in question must have been previously locked by the caller using the PxIORead, PxIOKeyRead, PxIOIndexRead, or PxIORecordRead functions with the READ_TYPE_LOCK readType parameter. Since a thread can only lock one record at a time, there is no parameter in this function to indicate the record to be unlocked, as it is assumed that the last record locked is the record in question. This will NOT unlock a record that was locked via another file handle.