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

This method restores the contents of the object from the global memory. The method takes as an input parameter an HGLOBAL handle, which should be obtained from the [**HandleAsInt64**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/handle.md#handleasint64) property of the **Handle** object. The **Handle** object is returned by the [**SaveToMemory**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/savetomemory.md) method of an object of the same type as the current one.

## Syntax

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

## Parameters

**HGlobal**

\[in] This parameter specifies the HGLOBAL handle of the memory from where the object contents should be loaded. The handle is passed as [**\_\_int64**](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md).This handle should be the one obtained from the [**SaveToMemory**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/savetomemory.md) method of an object of the same type as the current one, and should be valid (not freed). .

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## Remarks

* The size of the memory area that the object allocates can be obtained by calling the **GlobalSize** function.
* The following objects provide this method:
  * [**JpegExtendedParams**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/jpegextendedparams.md)
  * [**Region**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region.md)

## See also

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

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

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