Contexts

Contexts represent execution contexts for Cahute. They are composed of:

  • Logging configuration, including the current logging level, callback and options.

  • System and external library contexts and resources used by the current execution context, such as shared objects and libraries (DLL, so).

This resource allows multiple components in the same process to use Cahute simultaneously without interfering with each other, and allows the library not to use any read-write data section. They are analogous to libusb contexts.

A context is created using cahute_create_context(), and destroyed using cahute_destroy_context(). It is required for at least the following: