Aw instance set

From ActiveWiki
Jump to: navigation, search


Minimum requirements
Added in version 2.1
SDKbuild 13


int aw_instance_set (void *instance)

Description

Sets the current instance.

Callback

None (returns immediately)

Notes

One instance will always be the current instance at any given moment. In multi-instance applications the current instance will constantly change in response to calls to the API and for events or callbacks. At any given time an application can change the current instance by calling this method.

All API methods operate on the current instance, which means a multi-instance application must typically call aw_instance_set before any other method in order to indicate which instance the call is for.

See Multiple instances for more information.

Arguments

instance
Pointer to an instance to set as current, or NULL to not have any current instance.

Argument attributes

None

Return values

RC_SUCCESS
RC_NOT_INITIALIZED
RC_NO_INSTANCE
The instance pointer did not match the address of an instance that has been created by the SDK.

Returned attributes

None

See also