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

# SaveToMemory Method

This method saves the contents of the object into the global memory. The method returns an HGLOBAL handle of the memory area allocated for the object as the [**Handle**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/handle.md) object. This object manages memory allocation and releases resources when they are no longer in use.

## Syntax

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

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

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

## Parameters

**Result**

\[out, retval] A pointer to **IHandle\*** pointer variable that receives interface pointer of the resulting [**Handle**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/handle.md) object.

## 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 following objects provide this method:

* [**Region**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/region.md)
* [**JpegExtendedParams**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/jpegextendedparams.md)

## See also

[**LoadFromMemory**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/loadfrommemory.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)
