int aw_user_data_set (void* data)


Sets the user data pointer of the current instance.

Notes

This method is new in SDK build 24.

aw_user_data_set 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 are up to the application. The SDK does not access the user data pointer in any way. If the user data points to allocated memory, it is the application's responsibility to free that memory before calling aw_destroy.

See Also

aw_user_data



Active Worlds™ is a trademark of Activeworlds Inc. Questions or problems regarding this product should be posted to the newsgroup news://news.activeworlds.com/sdk. Problems with this web page should be reported to the author.

Copyright © 1998-2005 Activeworlds Inc. All rights reserved.