> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OnError Method of the IScanCallback Interface

<Note>
  This method is implemented in FRE for Windows.
</Note>

This method is implemented on the client-side. It is called by ABBYY FineReader Engine each time an image is scanned. It delivers information about the course of scanning operation and allows it to be terminated if necessary.

## Syntax

### C++

```cpp theme={null}
HRESULT OnImageScanned(
   BSTR SourceName,
   BSTR Message
);
```

### C\#

```csharp theme={null}
void OnImageScanned(
   string SourceName,
   string Message
);
```

### Visual Basic .NET

```vb theme={null}
Sub OnImageScanned( _
  SourceName As String, _
  Message As String _
)
```

## Parameters

SourceName

\[in] This parameter specifies the name of the scanning source from which the scanned image has been received.

Message

\[in] This parameter specifies the path to the resultant image file.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

## See also

[IScanCallback](/fine-reader/engine/api-reference/mechanism-objects/iscancallback)
