get_app_data

Returns a pointer to the registered library's data area.

Library:LibC
Service:Library

Syntax

  #include <library.h> 
   
  void *get_app_data (
     int    lib_id);
  

Parameters

lib_id

(IN) Specifies the ID of the registered library.

Return Values

Returns a valid pointer if successful. Otherwise, it returns zero.

Remarks

get_app_data returns a pointer to the calling applications' internal data (as used by the registered library).

Call get_app_data first to determine if a data area has been allocated for the calling application. If zero is returned, allocate the necessary data structures and record their pointers by calling set_app_data.

For sample code, see Library.c.

See Also