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

# Scan Method of the ScanSource Object

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

This method performs scanning of one or more images. It returns a collection of the names of the resulting image files.

One of the input parameters of this method receives a pointer to the [IScanCallback](/fine-reader/engine/api-reference/mechanism-objects/iscancallback) scanning management interface.

This method does not return until scanning is completed. If you want to scan asynchronously, i.e., without blocking the execution of your program, use the [BeginScan](/fine-reader/engine/api-reference/mechanism-objects/scansource/beginscan-method) method of the same object.

## Syntax

### C++

```cpp theme={null}
HRESULT Scan(
  ScanSourceUITypeEnum UserInterfaceType,
  BSTR                 Folder,
  IScanCallback*       callback,
  IStringsCollection** Result
);
```

### C\#

```csharp theme={null}
IStringsCollection Scan(
  ScanSourceUITypeEnum UserInterfaceType,
  BSTR                 Folder,
  IScanCallback*       callback
);
```

### Visual Basic .NET

```vb theme={null}
Function Scan( _
  UserInterfaceType As ScanSourceUITypeEnum, _
  Folder As String, _
  callback As IScanCallback _
) As IStringsCollection
```

## Parameters

UserInterfaceType

\[in] This variable specifies the user interface type which is to be used for setting the scanning options as the [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 the [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.

Result

\[out, retval] A pointer to the IStringsCollection\* pointer variable that receives the interface pointer of the [StringsCollection](/fine-reader/engine/api-reference/supplementary-objects-and-methods/stringscollection) object which will contain the file names of the scanned images.

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