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

# BeginScan Method of the ScanSource Object

This method starts an asynchronous scanning operation and returns immediately. Scanning can take a lot of time, and this method can be useful when you do not want the program to wait for the completion of a long scanning operation. It takes a pointer to the [**IScanCallback**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/iscancallback.md) scanning management interface as an input parameter.

> [!WARNING]
>
> You cannot start another scanning operation until the current one is completed, even if you select some other scanning source. Its completion will be signalled by [**OnScanComplete**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/iscancallback-onscancomplete.md) notification.

## Syntax

```vb Visual Basic .NET theme={null}
Sub BeginScan( _
  OptionsInterfaceType As ScanOptionsInterfaceTypeEnum, _
  Folder As String, _
  ByRef Callback As IScanCallback _
)
```

```cpp C++ theme={null}
HRESULT BeginScan(
  ScanOptionsInterfaceTypeEnum OptionsInterfaceType,
  BSTR                 Folder,
  IScanCallback*       Callback
);
```

## Parameters

**OptionsInterfaceType**

\[in] This variable specifies the interface type which is to be used for setting the scanning options as [**ScanOptionsInterfaceTypeEnum**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/scanoptionsinterfacetypeenum.md).

**Folder**

\[in] This variable determines the path to the folder where the scans should be saved. Please note that this folder must already exist.

**Callback**

\[in] This variable is used to pass the pointer to the [**IScanCallback**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/iscancallback.md) callback interface. This interface is used for scanning progress and completion notifications, or for errors that may occur during scanning. This parameter is optional. If you do not want to receive the notifications, pass NULL.

## Return values

This method may return the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## See also

[**ScanSource**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/scansource.md)
