Programming Guide |
Gets the handle of the most recently loaded active LDB
int sm_ldb_get_active(void);
- 0 Success: The integer handle of the most recently activated LDB.
sm_ldb_get_active
searches the stack of loaded LDBs and returns the integer handle of the topmost LDB that is marked as active. If multiple LDBs are active, the most recently loaded one always has precedence during LDB write-through. Use this function together with sm_ldb_get_next_active to iterate over all active LDBs in order of most to least recently loaded. For example:int h;
for (
h = sm_ldb_get_active();
h != -1;
h = sm_ldb_get_next_active() )
{
/* Do stuff with h */
}Note: The order in which LDBs are activated can be different from the order in which they were loaded.