The GetSession method returns a pointer to the LLM_SESSION
structure allocated by the CreateSession method and used by the
ConnectEx method to establish a connection. An session
structure is used when the application requires more precise control
over how the connection to the service provider is established and
what parameters are used when interacting with the model.
It is important to note that the session created by the
CreateSession method is owned and managed by the class instance.
Although you may use this method to access the structure members, you
should not modify them. The memory allocated for the structure will be
automatically released when the class destructor is called. You can
also call the DeleteSession method if you wish to free the
structure immediately, although this is not necessary.
If your project is built using the Unicode character set, this
method will return a structure where the string members will point to
wide (UTF-16) characters. If your project uses the Multi-Byte
character set, the string members will point to UTF-8 encoded strings.
If the CreateSession method has not been called, this method
will return NULL.