Aw user data set

From ActiveWiki
Revision as of 09:28, 26 October 2008 by Macavity (talk | contribs) (Added in, cleanup)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Minimum requirements
Added in version 3.3
SDKbuild 24


int aw_user_data_set (void *data)

Description

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

Callback

None (returns immediately)

Notes

This method and aw_user_data 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 SDK instance handles back 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.

Arguments

data
Pointer to data.

Argument attributes

None

Return values

RC_SUCCESS
RC_NOT_INITIALIZED
RC_NO_INSTANCE

Returned attributes

None

See also