GetInfo Function

Description

Retrieves information about system components, according to customizable search parameters, and presents it according to customizable formats.

Syntax

hasp_status_t HASP_CALLCONV hasp_get_info(
                    const char * scope,
                    const char * format,
                    hasp_vendor_code_t vendor_code,
                    char ** info
                    )

Parameters

scope

Definition of the data that is to be searched in XML format.

format

Definition of the data to be returned by the function in XML format.

vendor_code

Bytes that contain the Vendor Code

info

Pointer to the information that is retrieved in XML format.

Return Values

HASP_STATUS_OK

HASP_INV_FORMAT

HASP_INV_SCOPE

HASP_INSUF_MEM

HASP_SCOPE_RESULTS_EMPTY

HASP_LOCAL_COMM_ERR

HASP_REMOTE_COMM_ERR

HASP_BROKEN_SESSION

HASP_DEVICE_ERR

HASP_INV_VCODE   

HASP_UNKNOWN_VCODE

HASP_INVALID_PARAMETER

Usage Notes

You do not need to be logged in to a Feature in order to use this function.

This function is used to specify conditions about where to search for information. In addition, it enables you to specify conditions about the format in which the retrieved information is presented. If retrieved information is appropriately formatted, it can be used as a template in the LoginScope function.

The required Vendor Codes are stored in a VendorCodes folder in your system. Without the correct Vendor Code, the function call cannot succeed.

This function allocates memory for the information it retrieves. To release allocated memory resources, use the Free function.

You can use this function to retrieve a fingerprint only for these machines:

>the local machine

>a remote machine with a protection key that is visible to the machine where this function is performed.

NOTE   If the function retrieves an empty fingerprint, see Resolving an empty fingerprint issue.

This function cannot be used to retrieve legacy HASP Features.

High-Availability Fingerprint Collection

In high-availability configurations, hasp_get_info() retrieves the high-availability fingerprint XML for participating License Managers. The scope must specify the target License Manager hostnames or IP addresses, and the format must specify host_ha_fingerprint.

For XML syntax and examples, see High Availability Scope and Format XML Tags.

High-Availability C2V Collection

To retrieve a C2V file for a high-availability Sentinel protection key, call hasp_get_info() on any participating License Manager in the high-availability quorum. In the scope parameter, specify the network addresses or hostnames of all three participating License Managers and the Sentinel protection key ID:

<haspscope>
    <license_manager ip="192.168.0.11" />
    <license_manager ip="192.168.0.12" />
    <license_manager ip="192.168.0.13" />
    <hasp id="123456789123456789" />
</haspscope>

You must specify all three participating License Managers in the scope. If the scope contains fewer or more than three License Managers for a high-availability protection key, the function returns status code 36 (HASP_INV_SCOPE).

NOTE   You can generate a C2V file for a high-availability license only on a participating License Manager in the high-availability quorum, not on a machine outside the quorum.

For more information, see XML Scope for High-Availability C2V Generation (haspscope).

Related Topics

Scope Input XML Tags

Format XML Tags

GetSessionInfo Function

Free Function

LoginScope Function