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

# IsEmpty Method of the IImageSource Interface

> IsEmpty method of the IImageSource Interface in the ABBYY FineReader Engine API — This method is implemented on the client-side.

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

This method is implemented on the client-side. This method determines if there are any image files in the processing queue of the source.

## Syntax

### C++

```cpp theme={null}
HRESULT IsEmpty( VARIANT_BOOL* Result );
```

### C\#

```csharp theme={null}
bool IsEmpty();
```

### Visual Basic .NET

```vb theme={null}
Function IsEmpty() As Boolean
```

## Parameters

Result

\[out, retval] This parameter specifies if there are any image files to process. If this parameter is TRUE, there is no images to process.

## Return values

\[C++ only] If this method returns a value other than S\_OK, it indicates that an error occurred on the client-side.

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

## Samples

<Accordion title="C# code">
  ```csharp theme={null}
  // Sample implementation of a custom image source which maintains a queue of image files
  public class ImageSourceCallback : FREngine.IImageSource
  {
     public ImageSourceCallback( string imageFilesDirectory )
     {
         imageFiles = ImageSourceHelper.LoadFilesNames( imageFilesDirectory );
         nextFileIndex = 0;
     }
     public bool IsEmpty()
     {
         return nextFileIndex >= imageFiles.Length;
     }
     public FREngine.IFileAdapter GetNextImageFile()
     {
         if( !IsEmpty() ) {
             return new FileAdapterCallback( imageFiles[nextFileIndex++] );
         }
         return null;
     }
     public FREngine.IImageDocument GetNextImageDocument()
     {
         ...
     }
     private string[] imageFiles;
     private int nextFileIndex;
  }
  public class FileAdapterCallback : FREngine.IFileAdapter
  {
      ...
  }
  public class ImageSourceHelper
  {
      ...
  }
  ```
</Accordion>

## See also

[IImageSource](/fine-reader/engine/api-reference/batch-processor/iimagesource)

[GetNextImageDocument](/fine-reader/engine/api-reference/batch-processor/iimagesource/getnextimagedocument-method)

[GetNextImageFile](/fine-reader/engine/api-reference/batch-processor/iimagesource/getnextimagefile-method)
