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

# LoadFromMemory メソッド

このメソッドは、グローバルメモリからオブジェクトの内容を復元します。このメソッドは、入力パラメーターとして HGLOBAL ハンドルを受け取ります。このハンドルは、**Handle** オブジェクトの [**HandleAsInt64**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/handle.md#handleasint64) プロパティから取得してください。**Handle** オブジェクトは、現在のオブジェクトと同じ型のオブジェクトの [**SaveToMemory**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/savetomemory.md) メソッドから返されます。

## 構文

```cpp C++ theme={null}
HRESULT LoadFromMemory( __int64 HGlobal );
```

```csharp C# theme={null}
void LoadFromMemory(Int64 HGlobal );
```

```vb Visual Basic .NET theme={null}
Sub LoadFromMemory(HGlobal As Int64)
```

## パラメーター

**HGlobal**

\[in] このパラメーターには、オブジェクトの内容のロード元となるメモリの HGLOBAL ハンドルを指定します。ハンドルは [**\_\_int64**](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md) として渡されます。このハンドルは、現在のオブジェクトと同じ型のオブジェクトの [**SaveToMemory**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/savetomemory.md) メソッドで取得したものであり、かつ有効な (解放されていない) ものである必要があります。

## 戻り値

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

## 解説

* オブジェクトが割り当てるメモリ領域のサイズは、**GlobalSize** 関数を呼び出すことで取得できます。
* このメソッドは、次のオブジェクトで使用できます。
  * [**JpegExtendedParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/jpegextendedparams.md)
  * [**Region**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/region.md)

## 関連項目

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

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

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