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

# IImageSource インターフェイスの IsEmpty メソッド

> ABBYY FineReader Engine API の IImageSource インターフェイスの IsEmpty メソッド — このメソッドはクライアント側で実装されています。

<Note>
  このメソッドは、Linux および Windows 向けの FRE に実装されています。
</Note>

このメソッドはクライアント側で実装されています。ソースの処理キューに画像ファイルが含まれているかどうかを判定します。

<div id="syntax">
  ## 構文
</div>

<div id="c">
  ### C++
</div>

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

### C\#

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

<div id="visual-basic-net">
  ### Visual Basic .NET
</div>

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

<div id="parameters">
  ## パラメーター
</div>

Result

\[out, retval] このパラメーターは、処理対象の画像ファイルが存在するかどうかを示します。このパラメーターが TRUE の場合、処理対象の画像はありません。

<div id="return-values">
  ## 戻り値
</div>

\[C++ のみ] このメソッドが S\_OK 以外の値を返した場合は、クライアント側でエラーが発生したことを示します。

<div id="remarks">
  ## 注記
</div>

このメソッドのクライアント実装では、メソッド内でスローされるすべての例外を確実にキャッチして処理し、例外がメソッドの外部に伝播しないようにする必要があります。例外がメソッドの外部に伝播すると、予期しない結果 (プログラムの終了など) を招くおそれがあります。

<div id="samples">
  ## サンプル
</div>

<Accordion title="C# コード">
  ```csharp theme={null}
  // 画像ファイルのキューを保持するカスタム画像ソースの実装例
  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>

<div id="see-also">
  ## 関連項目
</div>

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

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

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