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_typeLicenseHardwareCodeTypein The requested hardware code type. Must be windowsUsb.external_drive_pathstrin On Windows to activate a license on a USB device, it must contain the path to the requested USB drive (e.g ‘G:').
Returns
strThe device hardware code.
Exceptions
An error has occurred during Devices Library execution.
static String getExternalDriveHardwareCode(LicenseHardwareCodeType hardwareCodeType, String? externalDrivePath)
Parameters
hardwareCodeTypeLicenseHardwareCodeTypein The requested hardware code type. Must be windowsUsb.externalDrivePathStringin On Windows to activate a license on a USB device, it must contain the path to the requested USB drive (e.g ‘G:').
Returns
StringThe device hardware code.
Exceptions
An error has occurred during Devices Library execution.
public static string GetExternalDriveHardwareCode(LicenseHardwareCodeType hardwareCodeType, string externalDrivePath=null)
Parameters
hardwareCodeTypeLicenseHardwareCodeTypein The requested hardware code type. Must be windowsUsb.externalDrivePathstringin On Windows to activate a license on a USB device, it must contain the path to the requested USB drive (e.g ‘G:').
Returns
stringThe device hardware code.
Exceptions
An error has occurred during Devices Library execution.
public static String getExternalDriveHardwareCode(LicenseHardwareCodeType hardwareCodeType, String externalDrivePath) throws DevicesException
Parameters
hardwareCodeTypeLicenseHardwareCodeTypein The requested hardware code type. Must be windowsUsb.externalDrivePathStringin On Windows to activate a license on a USB device, it must contain the path to the requested USB drive (e.g ‘G:').
Returns
StringThe 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
eHardwareCodeTypeid3DevicesLicenseHardwareCodeTypein The requested hardware code type. Must be windowsUsb.codechar *out The device hardware code.codeSizeint *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).externalDrivePathconst 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