Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# DocumentLicense.activateActivationKey Method

Module: DocumentLicense

## Definition

Activates a license file using an activation key and saves the license to a file.

Python

    @staticmethod
    activate_activation_key(hardware_code: str, activation_key: str, commentary: str, path: str) -> None

Parameters

> `hardware_code` str
> in The hardware code on which the license file will be attached, to be retrieved using the GetHostHardwareCode function.
> `activation_key` str
> in The activation key.
> `commentary` str
> in Commentary associated to this license activation, generally the host name.
> `path` str
> in Path to the retrieved license file.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Dart

    static void activateActivationKey(String? hardwareCode, String? activationKey, String? commentary, String? path)

Parameters

> `hardwareCode` String
> in The hardware code on which the license file will be attached, to be retrieved using the GetHostHardwareCode function.
> `activationKey` String
> in The activation key.
> `commentary` String
> in Commentary associated to this license activation, generally the host name.
> `path` String
> in Path to the retrieved license file.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C#

    public static void ActivateActivationKey(string hardwareCode, string activationKey, string commentary, string path)

Parameters

> `hardwareCode` string
> in The hardware code on which the license file will be attached, to be retrieved using the GetHostHardwareCode function.
> `activationKey` string
> in The activation key.
> `commentary` string
> in Commentary associated to this license activation, generally the host name.
> `path` string
> in Path to the retrieved license file.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Java

    public static void activateActivationKey(String hardwareCode, String activationKey, String commentary, String path) throws DocumentException

Parameters

> `hardwareCode` String
> in The hardware code on which the license file will be attached, to be retrieved using the GetHostHardwareCode function.
> `activationKey` String
> in The activation key.
> `commentary` String
> in Commentary associated to this license activation, generally the host name.
> `path` String
> in Path to the retrieved license file.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Swift

    public static func activateActivationKey(hardwareCode: String, activationKey: String, commentary: String, path: String) throws

Parameters

> `hardwareCode` String
> in The hardware code on which the license file will be attached, to be retrieved using the GetHostHardwareCode function.
> `activationKey` String
> in The activation key.
> `commentary` String
> in Commentary associated to this license activation, generally the host name.
> `path` String
> in Path to the retrieved license file.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C

    int id3DocumentLicense_ActivateActivationKey (
        const char * hardwareCode,
        const char * activationKey,
        const char * commentary,
        const char * path)

Parameters

> `hardwareCode` const char *
> in The hardware code on which the license file will be attached, to be retrieved using the GetHostHardwareCode function.
> `activationKey` const char *
> in The activation key.
> `commentary` const char *
> in Commentary associated to this license activation, generally the host name.
> `path` const char *
> in Path to the retrieved license file.

Returns

> `int`
> An error code.
> See id3DocumentError file for the list of possible error codes.