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

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

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](/fine-reader/engine/api-reference/mechanism-objects/iscancallback) 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](/fine-reader/engine/api-reference/mechanism-objects/iscancallback/onscancomplete-method) notification.
</Warning>

## Syntax

### C++

```cpp theme={null}
HRESULT BeginScan(
  ScanSourceUITypeEnum UserInterfaceType,
  BSTR                 Folder,
  IScanCallback*       Callback
);
```

### C\#

```csharp theme={null}
void BeginScan(
  ScanSourceUITypeEnum UserInterfaceType,
  BSTR                 Folder,
  IScanCallback*       Callback
);
```

### Visual Basic .NET

```vb theme={null}
Sub BeginScan( _
  UserInterfaceType As ScanSourceUITypeEnum, _
  Folder As String, _
  ByRef Callback As IScanCallback _
)
```

## Parameters

UserInterfaceType

\[in] This variable specifies the user interface type which is to be used for setting the scanning options as [ScanSourceUITypeEnum](/fine-reader/engine/api-reference/enumerations/scansourceuitypeenum). Do not pass the [SSUIT\_All](/fine-reader/engine/api-reference/enumerations/scansourceuitypeenum#ssuit_all) constant as this parameter. If you do not wish to display a dialog box, pass [SSUIT\_None](/fine-reader/engine/api-reference/enumerations/scansourceuitypeenum#ssuit_none) constant.

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](/fine-reader/engine/api-reference/mechanism-objects/iscancallback) 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 the null pointer.

## Return values

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

## See also

[ScanSource](/fine-reader/engine/api-reference/mechanism-objects/scansource)
