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

# DocumentLicense.activateBuffer Method

Module: DocumentLicense

## Definition

Retrieves a license file buffer using customer credentials and a product reference and returns the license in a data buffer.

Python

    @staticmethod
    activate_buffer(hardware_code: str, login: str, password: str, product_reference: str, commentary: str) -> bytearray

Parameters

> `hardware_code` str
> in The hardware code on which the license file will be attached, to be retrieved using the GetHostHardwareCode function.
> `login` str
> in The customer login.
> `password` str
> in The customer password.
> `product_reference` str
> in The requested product reference.
> `commentary` str
> in Commentary associated to this license activation, generally the host name.

Returns

> `bytearray`
> The license data.

Exceptions

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

Dart

    static Uint8List activateBuffer(String? hardwareCode, String? login, String? password, String? productReference, String? commentary)

Parameters

> `hardwareCode` String
> in The hardware code on which the license file will be attached, to be retrieved using the GetHostHardwareCode function.
> `login` String
> in The customer login.
> `password` String
> in The customer password.
> `productReference` String
> in The requested product reference.
> `commentary` String
> in Commentary associated to this license activation, generally the host name.

Returns

> `Uint8List`
> The license data.

Exceptions

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

C#

    public static byte[] ActivateBuffer(string hardwareCode, string login, string password, string productReference, string commentary)

Parameters

> `hardwareCode` string
> in The hardware code on which the license file will be attached, to be retrieved using the GetHostHardwareCode function.
> `login` string
> in The customer login.
> `password` string
> in The customer password.
> `productReference` string
> in The requested product reference.
> `commentary` string
> in Commentary associated to this license activation, generally the host name.

Returns

> `byte[]`
> The license data.

Exceptions

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

Java

    public static byte[] activateBuffer(String hardwareCode, String login, String password, String productReference, String commentary) throws DocumentException

Parameters

> `hardwareCode` String
> in The hardware code on which the license file will be attached, to be retrieved using the GetHostHardwareCode function.
> `login` String
> in The customer login.
> `password` String
> in The customer password.
> `productReference` String
> in The requested product reference.
> `commentary` String
> in Commentary associated to this license activation, generally the host name.

Returns

> `byte[]`
> The license data.

Exceptions

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

Swift

    public static func activateBuffer(hardwareCode: String, login: String, password: String, productReference: String, commentary: String) throws -> [UInt8]

Parameters

> `hardwareCode` String
> in The hardware code on which the license file will be attached, to be retrieved using the GetHostHardwareCode function.
> `login` String
> in The customer login.
> `password` String
> in The customer password.
> `productReference` String
> in The requested product reference.
> `commentary` String
> in Commentary associated to this license activation, generally the host name.

Returns

> `[UInt8]`
> The license data.

Exceptions

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

C

    int id3DocumentLicense_ActivateBuffer (
        const char * hardwareCode,
        const char * login,
        const char * password,
        const char * productReference,
        const char * commentary,
        unsigned char * licenseFileBuffer,
        int * licenseFileBufferSize)

Parameters

> `hardwareCode` const char *
> in The hardware code on which the license file will be attached, to be retrieved using the GetHostHardwareCode function.
> `login` const char *
> in The customer login.
> `password` const char *
> in The customer password.
> `productReference` const char *
> in The requested product reference.
> `commentary` const char *
> in Commentary associated to this license activation, generally the host name.
> `licenseFileBuffer` unsigned char *
> out The license data.
> `licenseFileBufferSize` int *
> in Size of the ‘licenseFileBuffer’ buffer. Receives the number of elements in the ‘licenseFileBuffer’ array.

Returns

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