> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XGameSave Provider Load method reference

> Reference for the XGameSave wrapper Provider.Load method, which reads the bytes of a named blob (file) from a save container into game memory.

# Microsoft.Xbox.Wrappers.XGameSave.Provider.Load

Loads the data from the given blob (file), from within the specified container.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
BlobData Load(const std::string& containerName,
              const std::string& blobName );
```

<a id="parametersSection" />

### Parameters

*containerName*   \_In\_<br />Type: std::string

The name of the container.

*blobName*  \_In\_<br />Type: std::string

The name of the blob from which to load data.

<a id="retvalSection" />

### Return value

Type: BlobData

This method returns a vector containing a bytewise copy of the contents of the blob.

<a id="exampleSection" />

### Example

The following example code demonstrates how to use the **Load** method.

```cpp theme={null}
using Microsoft::Xbox::Wrappers::GameSave;

Provider provider = new Provider();

if(SUCCEEDED(provider->Initialize(userHandle, mySCID))
{
   std::vector<std::string> containers = provider->QueryContainers("Save slot 1");
   
   if(containers.size() == 1)
   {
      BlobData data = provider->Load("Save_slot_1", "progress");
      
      if(!data.empty())
      {
         // Read the data into the game.
      }
      else
      {
         // Unexpected because there should be
         // only one blob in the container.
      }
   }
}
```

<a id="remarksSection" />

## Remarks

This method throws an exception if you call it on the UI thread.

If there is no match for the container and blob names, then the returned vector is empty.

You must call the [Initialize](/reference/system/Wrappers/classes/provider/methods/xgamesave_wrapper_provider_initialize) method before you can call any other method from the `Provider` class.

<a id="requirementsSection" />

## Requirements

**Header:** xgamesavewrappers.hpp

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

<a id="seealsoSection" />

## See also

[Microsoft.Xbox.Wrappers.XGameSave.Provider](/reference/system/Wrappers/classes/provider/xgamesave_wrapper_provider)<br />[XGameSave wrapper members](/reference/system/Wrappers/xgamesave_wrapper_members)


## Related topics

- [XGameSave Provider Save method reference](/reference/system/Wrappers/classes/provider/methods/xgamesave_wrapper_provider_save.md)
- [XGameSave Provider Initialize method reference](/reference/system/Wrappers/classes/provider/methods/xgamesave_wrapper_provider_initialize.md)
- [XGameSave Provider Delete(std::string&) method](/reference/system/Wrappers/classes/provider/methods/xgamesave_wrapper_provider_delete_string.md)
- [XGameSave Provider QueryContainers method](/reference/system/Wrappers/classes/provider/methods/xgamesave_wrapper_provider_querycontainers.md)
- [XGameSave Provider GetQuota method reference](/reference/system/Wrappers/classes/provider/methods/xgamesave_wrapper_provider_getquota.md)
