ConnectedStorageSpace.CreateContainer Method

Creates a named ConnectedStorageContainer object that can be used to read or write data within this ConnectedStorageSpace.

Syntax

public:
ConnectedStorageContainer^ CreateContainer(
         String^ containerName
)  

Parameters

containerName
Type: String 

 The name of the container to create.

Valid characters for the path portion of the container name (up to and including the final forward slash) includes uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), underscore (_), and forward slash (/). The path portion may be empty.

Valid characters for the file name portion (everything after the final forward slash) include uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), underscore (_), period (.), and hyphen (-). The file name may not be empty, end in a period or contain two consecutive periods.

The maximum length for the container name is 256 characters.

Return value

Type: ConnectedStorageContainer 

Returns the created container.

If containerName is invalid, returns InvalidContainerName - 0x80830001.

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.

Note A container is not finalized until SubmitUpdatesAsync has been called for it. Until SubmitUpdatesAsync has been called, the container will not show up in the results of CreateContainerInfoQuery.

Requirements

Namespace: Windows.Xbox.Storage

Metadata: windows.winmd

See also

Reference

ConnectedStorageSpace Class

ConnectedStorageSpace Members

Windows.Xbox.Storage Namespace