An application must call LlmInitialize successfully before
calling any other library functions. When it has finished using the
library, the application should call LlmUninitialize to release
resources allocated by the library. If this function is not called
explicitly, the library will release its resources when the application
terminates.
Initialization is reference counted. Each successful call to
LlmInitialize increments the library usage count, and each call
to LlmUninitialize decrements it. The library is not fully
uninitialized until the usage count reaches zero. When the usage count
reaches zero, LlmUninitialize will terminate all active client
sessions, close any open connections, and free memory associated with
the library. Any pending blocking operations are canceled and will
not complete.
This function should not be called while other threads are actively
using the library. Applications should ensure that all operations have
completed and that no additional calls will be made before
uninitializing the library.