Aw user data

From ActiveWiki
Jump to: navigation, search

Minimum requirements
Added in version 3.3
SDKbuild 24

void* aw_user_data (void)


Returns the user-defined data pointer of the current instance.


This method and aw_user_data_set allow the application to store and retrieve a pointer to extra, user-defined data with each instance. The user data pointer can then be queried during callbacks and event handlers for easy access to the extra application data. This relieves SDK applications of the burden of having to implement their own mechanism for mapping instance handles to the application's per-instance data.

The contents of the user data is up to the application. The SDK does not access the user data pointer in any way. If the user data points to allocated memory then it is the application's responsibility to free that memory.



Argument attributes


Return values

Pointer to data
A pointer has been set for the current instance using aw_user_data_set.
No pointer has been set. Or there is no current instance (i.e. aw_instance () returns NULL).

Returned attributes


See also