ConnectedStorageContainer.ReadAsync Method

Asynchronously reads blobs from the specified container.

Syntax

public:
IAsyncAction^ ReadAsync(
         IMapView<String^ , IBuffer^ >^ blobsToRead
)  

Parameters

blobsToRead
Type: IMapView<String^ , IBuffer^ > 

  A collection specifying the blobs to read and the buffers to place the results in. The buffers must have enough capacity to store the data that is read. The length property on the buffers can be used to determine how much data was actually read into a buffer.

Return value

Type: IAsyncAction 

Returns an IAsyncAction object that represents the state of the asynchronous operation. Completion of the asynchronous operation is signaled by using a handler that is passed to the IAsyncAction.Completed property.

Error codes are reported through the ErrorCode property of the IAsyncAction object. The following is a list of possible error codes:

Error Code Description
E_INVALIDARG A NULL buffer was provided.
ConnectedStorageErrorStatus.ProvidedBufferTooSmall he operation failed because the buffer provided to read a blob was too small to receive the blob.
ConnectedStorageErrorStatus.BlobNotFound The operation failed because a blob with the specified name was not found in the container.

Remarks

Note The Connected Storage API requires your title to have its title ID and service configuration ID (SCID) properly configured in order to work. For more information about these required IDs, see Setting Up Sandboxes for Xbox Live Development.

If you do not set your SCID and Title ID in the Package.appxmanifest properly, your Connected Storage API calls will fail with the following error code:

NoAccess - 0x80830002 - The operation failed because the title does not have write access to the container storage space.

If you do not have the ConnectedStorage service enabled for your SCID or you do not configure and publish your Xbox Live config properly, the Connected Storage API may present UI saying that it was unable to get your latest save data. See Xbox Live Services for more documentation.

Requirements

Namespace: Windows.Xbox.Storage

Metadata: windows.winmd

See also

Reference

ConnectedStorageContainer Class

ConnectedStorageContainer Members

Windows.Xbox.Storage Namespace