Transfer Function

Description

Transfers a license from a Sentinel SL key.

NOTE   This function supersedes the Detach function.

Syntax

hasp_status_t HASP_CALLCONV hasp_transfer(
                const char *action,
                const char *scope,
                hasp_vendor_code_t vendor_code,
                const char *recipient,
                char **info
                )

Parameters

action

Rehost

Rehost operation parameters, in XML format. The following example specifies that the SL key with Key ID 12321 should be transferred.

<rehost> <hasp id=”12321”/> </rehost>

Detach

Detach operation parameters, in XML format. The following example specifies that a detached license for Product ID 12345 will expire after 604,800 seconds (one week):

<detach>

    <product id=”12345”>

        <duration>604800</duration>

    </product>

</detach>

Network_Detach

Detach a license with concurrency operation parameters, in XML format. The following example specifies that a license with 10 concurrent seats for Product ID 67876 will expire after 31,536,000 seconds (one year):

<network_detach>

    <product id=”67876”>

        <duration>31536000</duration>

        <seats>10</seats>

    </product>

</network_detach>

For more information, see Detaching a License With Concurrency.

Cancel_Detach

Cancel detach or network_detach operation parameters, in XML format. The following example specifies that the Sentinel SL key with Key ID “12321” for the detached license should be cancelled:

<cancel> <hasp id=”12321”/> </cancel>

scope

For Rehost or Cancel_Detach

Search parameters for the container that is to be rehosted or canceled. For more information, see Scope Input XML Tags.

For Detach

Search parameters for the Product that is to be detached. For more information, see Scope Input XML Tags.

vendor_code

Bytes that contain the Vendor Code

recipient

For Rehost or Detach

Definition in XML format of the recipient machine to which the transferred or  detached license or seats will be attached. Use either the GetInfo or GetSessionInfo function, together with the HASP_RECIPIENT predefined format template, to retrieve the recipient information.

For Cancel_Detach

Ignored (set to Null).

info

Pointer to the information that is retrieved as XML text. This information is an:

>H2H file (for the Rehost action)

>H2R file (for the Detach action)

>R2H file (for the Cancel_Detach action). If the detached Product is already expired, no buffer is returned.

To complete the operation, the file should be installed on the target machine using the Update function (or using the Admin Control Center or RUS utility). Use the Free function to release the pointer after use.

Return Values

HASP_STATUS_OK

HASP_INV_RECIPIENT

HASP_TOO_MANY_KEYS

HASP_ACCESS_DENIED

HASP_INSUF_MEM

HASP_DEVICE_ERR

HASP_LOCAL_COMM_ERR

HASP_OLD_LM

HASP_REHOST_NOT_ALLOWED

HASP_HASP_INACTIVE

HASP_IDENTITY_RATE_LIMIT_EXCEEDED

HASP_EXTENSION_NOT_ALLOWED

HASP_RECIPIENT_OLD_LM

Usage Notes

Performs one of the following functions:

>Removes a Sentinel SL key from its host machine and prepares it to be transferred ("rehosted") to a target machine. The protection key must be defined with rehosting allowed.

>Detaches a license for a Product from a Sentinel SL key (on the host machine), according to customizable parameters. Features defined as detachable and memory files that belong to the Product are detached.

>Cancels a detached license from the Sentinel SL key (on the recipient machine), typically before the detached license was due to expire.

You do not need to be logged in to a Feature or Sentinel protection key in order to use this function.

The required Vendor Codes are stored in a VendorCodes directory in the system. YOU CANNOT run the function if the correct Vendor Codes is not available.

Related Topics

Detaching a License With Concurrency

GetInfo Function

GetSessionInfo Function

Scope Input XML Tags

Format XML Tags

hasp_transfer XML Tags

XML Tags for the Transfer Function