Table of Contents
Barcode DLL reports two kinds of errors: operational errors and encoding errors. They are handled in different ways in Barcode DLL.
Operational errors occur when an operation fails or a property is set to an invalid value. The error is reported through the return code of the function. Your program can then retrieve the error message through GetLastBarcodeError function.
You can tell if the function operates as expected by comparing the return code with zero. If the return code is a negative number, the operation fails.
For performance reasons Barcode DLL does not attempt to encode every time that a property changes, especially for two dimensional symbologies. There is no fixed algorithm to tell whether the size specified can hold the data until the program encodes with all the properties specified. The encoding errors are reported at the time of the actual rendering. An image containing the error codes and messages is rendered in the place of the barcode, as the image below illustrates:

The error message tells that the size specified is too small to hold the data encoded. It also tells you in order to encode the current data, the minimum size ID is 11 (mbxDMTargetSize_40X40). Normally you handle encoding errors at design time by modifying the properties.
Operational Error codes specific to Barcode DLL are listed below:
Table 9.1. Error Codes (Operational)
Value | Description |
---|---|
6101 | This symbology is not supported by the current version of Morovia Barcode DLL. |
6102 | The message is either empty or contains invalid character for the chosen symbology. |
6103 | The measurement unit must be either English (0) or Metric (1). |
6104 | The Zoom Ratio should ranged between 0.1 and 100 |
6105 | The NarrowToWideRatio should be between 2.0 and 3.0 |
6107 | Failed to overwrite file or create the new file. It may be caused by insufficient privilege or disk is full. |
6108 | Invalid Raster Image Resolution. The resolution must be greater than 50. |
6109 | The label size you specified is invalid, or you can not edit the size under the current mode. |
6112 | The current symbology required fixed length. The length you specified does not meet this requirement. |
6113 | The message string contains characters that can not be encoded under the current symbology. |
6114 | The object can not be loaded from the media specified. See Error Log for details. |
6115 | The object failed to save itself to the specified media. |
6116 | Invalid value for BarHeight property. |
6117 | The MaxicodeZipCode property must consist a valid zip code with up to 6 alpha-numeric characters. |
6118 | The MaxicodeCountryCode must between 000 and 999 |
6119 | The value range for MaxicodeMode must be between 2 and 6. |
6120 | The value range for MaxicodeClass must be between 000 and 999. |
6121 | Error happens during the PDF417 encoding process. For more information retrieve the Error object. |
6122 | Can not generate bitmap handle. Possible reasons include insufficient memory, too big size of the bitmap etc. |
Table 9.2. Error Codes (Encoding)
Value | Description |
---|---|
10 | The AI portion of an EAN-128 structure must be numeric. (EAN-128) |
11 | The data portion of the EAN-128 data must be alpha-numeric. (EAN-128) |
12 | Invalid UCC/EAN-128 structure. Check whether the AI and field ID are enclosed with parenthesis. (EAN-128) |
13 | The length of the data portion of the EAN-128 is incorrect. (EAN-128) |
14 | Based on the AI, the data portion must be numeric. However, this is not the case in the message encoded. (EAN-128) |
20 | No control block was found in the message. (PDF417) |
21 | Invalid Raster Image Resolution. The resolution must be greater than 50. |
22 | Error in the segment index. Either the segment index is not numeric, or the index is bigger than the total segment count. (PDF417) |
23 | Error in total segment count field. (PDF417) |
24 | Incorrect MacroPDF417 optional field format. (PDF417) |
30 | The size required is too small to hold the data. (PDF417, Data Matrix) |
40 | GLI must be 6 digits in the range between 0 and 811,799. (PDF417) |
41 | The security level is too high to encode all the data. (PDF417) |
50 | A required structural append field is missing. (Data Matrix Structural Append) |
51 | No control block was found in the message. (Data Matrix Structural Append) |
52 | Error in the sequence indicator field. Either it is not numeric, or the value is out of range. (Data Matrix Structural Append) |
53 | Error in the total number of total symbols field. This field can only be a number between 1 and 16. (Data Matrix Structural Append) |
54 | Invalid file ID. Either it contains invalid characters, or the value is out of range. (Data Matrix Structural Append) |
60 | Error in the specified ECI. Either it contains invalid characters, or the value is out of range. (Data Matrix ECI) |
70 | Macro 05 or Macro 06 should appear at the first position of the input and should not be used in conjunction with structural append. (Data Matrix Macro) |
71 | Reader programming ~3 should appear at the first position of the input and should not be used in conjunction with structural append. (Data Matrix Reader Programming) |
200 | Carrier message prefix detected but not all required fields are present. (MaxiCode) |