GetSessionInfo Function
Description
Retrieves information regarding a session context.
Syntax
hasp_status_t HASP_CALLCONV hasp_get_sessioninfo(
hasp_handle_t handle,
const char * format,
char ** info
)
Parameters
|
Handle for the session |
|
|
Definition of the data to be returned by the function,
in XML format. |
|
|
|
Return Values
Usage Notes
When using the
The retrieved session information applies to:
>A deployed Sentinel protection key
>The current or a specific login session
>Various updates, including license updates, firmware updates, and memory updates.
This function allocates memory for the information it retrieves. To release allocated memory resources, use the Free function. To convert a returned time value to the current date and time, use the HaspTimeToDateTime function.
NOTE To defeat a protection key emulator attempting to bypass software protection, you can check periodically that the protection key is available and that a session for the key exists. This should not be done using GetSessionInfo (this function does not detect a remote broken session). Instead, use one of the following functions: Encrypt, Decrypt, Read, Write. These functions will return HASP_BROKEN_SESSION if a session for the protection key does not exist.