> ## 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.

# OnProgress Method of the IZoomViewerEvents Interface

> OnProgress method of the IZoomViewerEvents Interface in ABBYY FineReader Engine Visual Components on Windows — This method is implemented on the client-side.

This method is implemented on the client-side. It is called by ABBYY FineReader Engine during analysis or recognition of the active page in [Zoom Viewer](/fine-reader/engine/visual-components-reference/zoomviewer). The process can be invoked in one of the following ways:

* using the following commands of Zoom Viewer:
  * [MI\_Read](/fine-reader/engine/visual-components-reference/zoomviewer/zoom-viewer-commands#mi_read)
  * [MI\_ReadBlock](/fine-reader/engine/visual-components-reference/zoomviewer/zoom-viewer-commands#mi_readblock)
  * [MI\_AnalyzeLayout](/fine-reader/engine/visual-components-reference/zoomviewer/zoom-viewer-commands#mi_analyzelayout)
  * [MI\_AnalyzeLayoutInBlock](/fine-reader/engine/visual-components-reference/zoomviewer/zoom-viewer-commands#mi_analyzelayoutinblock)

To find how these commands can be called, refer to the [Zoom Viewer Commands](/fine-reader/engine/visual-components-reference/zoomviewer/zoom-viewer-commands) list.

* using the following commands of [Image Viewer](/fine-reader/engine/visual-components-reference/imageviewer), synchronized with Zoom Viewer:
  * [MI\_Read](/fine-reader/engine/visual-components-reference/imageviewer/image-viewer-commands#mi_read)
  * [MI\_ReadBlock](/fine-reader/engine/visual-components-reference/imageviewer/image-viewer-commands#mi_readblock)
  * [MI\_AnalyzeLayout](/fine-reader/engine/visual-components-reference/imageviewer/image-viewer-commands#mi_analyzelayout)
  * [MI\_AnalyzeLayoutInBlock](/fine-reader/engine/visual-components-reference/imageviewer/image-viewer-commands#mi_analyzelayoutinblock)

To find how these commands can be called, refer to the [Image Viewer Commands](/fine-reader/engine/visual-components-reference/imageviewer/image-viewer-commands) list.

* using the commands of [Document Viewer](/fine-reader/engine/visual-components-reference/documentviewer), synchronized with Image Viewer:
  * [MI\_Read](/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands#mi_read)
  * [MI\_AnalyzeLayout](/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands#mi_analyzelayout)

To find how these commands can be called, refer to the [Document Viewer Commands](/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands) list.

* via FineReader Engine API

It delivers to the client approximate percentage of the operation. Its implementation may show a progress indicator. It may also process any system messages to help prevent the application from appearing unresponsive during long operations. This can be useful in applications with a user interface. With the help of this method it is possible to cancel the operation.

## Syntax

### C++

```cpp theme={null}
HRESULT OnProgress(
  int           Percentage,
  VARIANT_BOOL* Cancel
);
```

### C\#

```csharp theme={null}
void OnProgress(
  int      Percentage,
  out bool Cancel
);
```

### Visual Basic .NET

```vb theme={null}
Sub OnProgress( _
  Percentage As Integer, _
  ByRef Cancel As Boolean _
)
```

## Parameters

Percentage

\[in] Contains the percent of the work currently done. It is in the range from 0 to 100.

Cancel

\[out] You may set this variable to TRUE to indicate that the process should be terminated. In this case, the analysis or recognition process will be aborted.

## Return values

\[C++ only] If this method returns a value other than S\_OK, it indicates that an error occurred on the client-side, and in this case the value of the Cancel parameter is not taken into account.

## Remarks

The client implementation of this method must assure that all exceptions thrown inside the method are caught and handled and no exceptions are propagated outside the method. Propagation of an exception outside the method may lead to unpredictable results (such as program termination).

## See also

[ZoomViewer](/fine-reader/engine/visual-components-reference/zoomviewer)

[IZoomViewerEvents](/fine-reader/engine/visual-components-reference/izoomviewerevents)
