I am using a 3rd party control to read barcode from a bitmap file. Below is the code for my method.
public void ShowBarcode(IntPtr img)
{
int nBarCode;
SoftekBarcodeLib2.BarcodeReader barcode = new SoftekBarcodeLib2.BarcodeReader();
barcode.ReadCode39 = 1;
barcode.ReadNumeric = 1;
nBarCode = barcode.ScanBarCodeFromBitmap(img);
for (int i = 1; i <= nBarCode; i++)
{
MessageBox.Show(barcode.GetBarString(i));
}
}
For some reason I am getting the above mentioned error at
barcode.ScanBarCodeFromBitmap the value of img is 65863972
I have received the same error message when dealing with Images in C#. The issue usually revolves around permissions. If the account running the application doesn’t have write permissions to where the temporary images are being stored on the file system, you will receive the mentioned error message.