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

# ImageDocument オブジェクトの SaveToMemory メソッド

このメソッドは、[**ImageDocument**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument.md) オブジェクトの内容をグローバルメモリに保存します。また、オブジェクト用に割り当てられたメモリ領域の HGLOBAL ハンドルを [**Handle**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/handle.md) オブジェクトとして返します。Handle オブジェクトはメモリ割り当てを管理し、不要になったリソースを解放します。

オブジェクトの内容は、[**IEngine::LoadImageDocFromMemory**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/engine-loadimagedocfrommemory.md) メソッドを使用して復元できます。

## 構文

```cpp C++ theme={null}
HRESULT SaveToMemory( IHandle** Result );
```

```csharp C# theme={null}
Handle SaveToMemory();
```

```vb Visual Basic .NET theme={null}
Function SaveToMemory() As Handle
```

## パラメーター

**Result**

\[out, retval] 関連付けられたビットマップのハンドルを表す、結果として得られる **Handle** オブジェクトのインターフェースポインターを受け取る [**IHandle**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/handle.md)\* ポインター変数へのポインター。

## 戻り値

このメソッドに固有の戻り値はありません。[ABBYY FlexiCapture SDK 関数の標準の戻り値](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/errorcodes.md)を返します。

## 関連項目

[**ImageDocument**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument.md)

[**IEngine::LoadImageDocFromMemory**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/engine-loadimagedocfrommemory.md)
