extern "C" { AS_API asIScriptEngine * asCreateScriptEngine(asDWORD version); AS_API const char * asGetLibraryVersion(); AS_API const char * asGetLibraryOptions(); AS_API asIScriptContext * asGetActiveContext(); AS_API int asThreadCleanup(); }
asIScriptEngine *asCreateScriptEngine(asDWORD version);
Exported as "_asCreateScriptEngine".
Creates a new script engine object, based on the version specified.
version |
The engine version wanted. |
Returns a pointer to the engine object if successful, or 0 if the version is not supported or memory couldn't be allocated.
const char *asGetLibraryVersion();
Exported as "_asGetLibraryVersion".
Use this to verify library version.
Returns a pointer to a constant string holding the library version.
const char *asGetLibraryOptions();
Exported as "_asGetLibraryOptions".
This can be used to verify with which options the library was compiled.
Returns a pointer to a constant string holding the name of the compiler options, separated by spaces.
asIScriptContext *asGetActiveContext();
Exported as "_asGetActiveContext".
This function is used to retrieve the context interface from within system functions that need it, e.g to set script exceptions.
Returns a pointer to the script context currently executing, or 0 if no context is executing.
int asThreadCleanup();
Exported as "_asThreadCleanup".
If you are using multiple threads it is a good idea to call this function just before terminating a thread. It will allow AngelScript to cleanup some memory that is local to the current running thread.
If the cleanup couldn't be performed, e.g. if a context is currently active, the function returns a negative value.