Synopsis
PDX_MSGT mda_LockEntity(long option, MDA_PTR db_ptr, void *ent)
Purpose
Lock an entity into memory.
Description
The specified entity will be locked into memory. A pointer to the entity's location in memory will be returned. The entity will remain at this location until it is explicitly unlocked with a call to mda_UnlockEntity. The content of the entity can be changed and made permanent by calling mda_UnlockEntity with the MDA_MODIFIED option or by calling the funcion mda_MarkEntityModified. See mda_UnlockEntity for further information. The application should take care not to lock an excessive number of entities in memory as this will tend to overflow the cache and result in somewhat degraded performance. If MDA_NO_CACHE is specified the entity will not be locked in the entity cache (this means that the entity will have to be swapped from disk if it is unlocked and then locked again). MDA_NO_CACHE should be specified whenever an entity will be locked for an extended duration so that it does not use up space in the cache. The same entity can be specified in multiple calls to this function so long as the same number of calls are made to mda_UnlockEntity or mda_UnlockEntity is called with the MDA_FORCE_UNLOCK option. Note that ent is the address of the pointer to the entity.
Input
option
MDA_NO_CACHE
This option is obsolete. No effect.
db_ptr
The entity to be locked in memory
ent
Address to store the pointer to the entity at
Output
ent
The entity structure
Return
MDA error code