DevicesLicense.getExternalDriveHardwareCode Method

Module: DevicesLicense

Definition

Retrieves the hardware code of the external drive you run the library on. This function works on Windows only.

@staticmethod
get_external_drive_hardware_code(hardware_code_type: LicenseHardwareCodeType, external_drive_path: str=None) -> str

Parameters

hardware_code_type LicenseHardwareCodeType
in The requested hardware code type. Must be windowsUsb.

external_drive_path str
in On Windows to activate a license on a USB device, it must contain the path to the requested USB drive (e.g ‘G:').

Returns

str
The device hardware code.

Exceptions

An error has occurred during Devices Library execution.
static String getExternalDriveHardwareCode(LicenseHardwareCodeType hardwareCodeType, String? externalDrivePath)

Parameters

hardwareCodeType LicenseHardwareCodeType
in The requested hardware code type. Must be windowsUsb.

externalDrivePath String
in On Windows to activate a license on a USB device, it must contain the path to the requested USB drive (e.g ‘G:').

Returns

String
The device hardware code.

Exceptions

An error has occurred during Devices Library execution.
public static string GetExternalDriveHardwareCode(LicenseHardwareCodeType hardwareCodeType, string externalDrivePath=null)

Parameters

hardwareCodeType LicenseHardwareCodeType
in The requested hardware code type. Must be windowsUsb.

externalDrivePath string
in On Windows to activate a license on a USB device, it must contain the path to the requested USB drive (e.g ‘G:').

Returns

string
The device hardware code.

Exceptions

An error has occurred during Devices Library execution.
public static String getExternalDriveHardwareCode(LicenseHardwareCodeType hardwareCodeType, String externalDrivePath) throws DevicesException

Parameters

hardwareCodeType LicenseHardwareCodeType
in The requested hardware code type. Must be windowsUsb.

externalDrivePath String
in On Windows to activate a license on a USB device, it must contain the path to the requested USB drive (e.g ‘G:').

Returns

String
The device hardware code.

Exceptions

An error has occurred during Devices Library execution.
int id3DevicesLicense_GetExternalDriveHardwareCode (
    id3DevicesLicenseHardwareCodeType eHardwareCodeType,
    char * code,
    int * codeSize,
    const char * externalDrivePath)

Parameters

in The requested hardware code type. Must be windowsUsb.

code char *
out The device hardware code.

codeSize int *
in Size of the ‘code’ buffer. Receives the minimum required buffer size to hold the ‘code’ string if the given one is too small (including the terminating NULL character), otherwise receives the number of characters in ‘code’ (excluding terminating NULL character).

externalDrivePath const char *
in On Windows to activate a license on a USB device, it must contain the path to the requested USB drive (e.g ‘G:').

Returns

int
An error code.
See id3DevicesError file for the list of possible error codes.