CLlmClient::GetSession Method  
 
LPLLM_SESSION GetSession();

The GetSession method returns the session structure allocated for the current instance of the class.

Parameters

None.

Return Value

This method returns a pointer to the LLM_SESSION structure that was allocated for the class instance. If no session structure has been created, it will return NULL.

Remarks

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.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csllmv12.lib
Unicode: Implemented as Unicode and ANSI versions

See Also