The jomGetLockStatus call, shown in the following example, is used to get the status of a lock on an object. If the process doing the call has the object locked, this call returns the lock information.
int jomGetLockStatus(const DskHandle *pHandle,
const DskObjectId *pOid,
BYTE *type,
BYTE *duration,
DskObjectId *pLockedBy,
UInt32 lineNo)
The parameters passed to this call from the lock placed on the object are listed in the following table.
| Parameter | Description |
|---|---|
| pHandle | Pointer to a handle structure that is loaded by the JADE Object Manager |
| pOid | Oid of the object that has the lock |
| type | Type of lock operation |
| duration | Duration of the lock; that is, if the object is automatically unlocked at the end of transaction or at the end of the current session if no manual unlocks are issued |
| pLockedBy | Pointer to the process object that has the lock |
| lineNo | Line number in which an exception occurred |
For details about the lock parameters, see "Locking an Object", earlier in this chapter.