Initializes a new API Context, which may be used to open and manipulate a license file.
The API context returned in the context parameter must be freed from memory! The SK_ApiContextDispose function is recommended for this purpose.
If your application is multi-threaded, it is important that the first call to this function occurs on your application's main thread and specifies the SK_FLAGS_APICONTEXTINITIALIZE_MAINTHREAD flag. Failing to do so can cause global data for dependencies to be initialized on other threads, which may cause erroneous behavior and memory leaks. Calling this function with the SK_FLAGS_APICONTEXTINITIALIZE_MAINTHREAD flag more than once is not supported, and may also cause erroneous behavior.
All possible return values are included in the SK_ResultCode enumeration. Return codes to expect include:
Result Code | Description |
---|---|
SK_ResultCode.SK_ERROR_NONE | No error. |
SK_ResultCode.SK_ERROR_INVALID_ARGUMENTS | Some or all of the arguments are invalid. |
SK_ResultCode.SK_ERROR_MEMORY_ALLOCATION | Memory could not be allocated. |