LoginScope Function
Description
Logs into a Feature to establish a session, according to predefined search parameters.
All Licensing API functions are compatible with remote License Managers and with the local License Manager, depending on the scope specified.
Syntax
hasp_status_t HASP_CALLCONV hasp_login_scope(
hasp_feature_t feature_id,
const char * scope,
hasp_vendor_code_t vendor_code,
hasp_handle_t * handle)
Parameters
|
|
Unique identifier for a specific Feature stored in a Sentinel protection key. |
|
|
Definition of the data that is to be searched for the Sentinel LDK licenses, in XML format. For more information, see Scope Input XML Tags. |
|
|
Bytes that contain the Vendor Code |
|
|
Pointer to the resulting session handle |
Return Values
HASP_FEATURE_INSUFFICIENT_EXECUTION_COUNT
HASP_IDENTITY_RATE_LIMIT_EXCEEDED
HASP_IDENTITY_RATE_LIMIT_EXCEEDED
HASP_FEATURE_START_DATE_NOT_REACHED
HASP_IDENTITY_TEMPORARILY_NOT_ACCESSIBLE
Usage Notes
This function is used to specify conditions that specify where login information is to be searched for.
If the Feature license expires while the login session is active, the login session (and therefore, the application) is allowed to continue. This is due to the fact that terminating the session may result in corruption of the application output or data.
The required Vendor Codes are stored in a VendorCodes folder in your system. Without the correct Vendor Code, the function call cannot succeed.
You can open simultaneous login sessions.
This function does not work with legacy Sentinel HASP Features.
NOTE When this function is called for a Feature with a license type of Execution Count, Expiration Date, or Time Period, a write cycle is performed for the Sentinel protection key. Sentinel HL keys are certified to withstand a specific number of write cycles. For information on the number of write cycles for which Sentinel HL keys are certified, see the Sentinel HL Data Sheet.
If detaching of licenses is enabled, an automatic detach occurs when the LoginScope function is called.
You can perform an on-demand detach by calling the Transfer function. For details, see:
>Using XML Tags to Define Scope (Examples for Cloud Licensing)
> Detaching an SL AdminMode or SL UserMode License
High-Availability Client Redirection and Failover
In high-availability configurations, client applications call hasp_login() or hasp_login_scope() to consume network seats. When configured with the hostnames or IP addresses of the participating License Managers in the client configuration file (hasp_<vendorID>.ini or hasplm.ini), the client API automatically negotiates connection with the current leader License Manager.
>Automatic Failover: If the active leader fails, subsequent API calls or new login requests automatically discover and reconnect to the newly elected leader without requiring client application restarts.
>Automatic Retries: If a login call occurs during an active leader election, the client API automatically retries the operation until leader election resolves or the operation times out.
>Quorum Not Met: If fewer than two License Managers are reachable, the API returns status code 117 (HASP_HA_QUORUM_NOT_MET). License consumption remains suspended until the quorum is re-established.
