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

# QueryContainers

> 返回与提供的名称前缀相匹配的容器名称向量。

# Microsoft.Xbox.Wrappers.XGameSave.Provider.QueryContainers

返回与提供的名称前缀相匹配的容器名称向量。

## 语法

```cpp theme={null}
ContainerNames QueryContainers(const std::string& prefix);
```

### 参数

*prefix*   \_In\_\
类型：std::string

要搜索的容器名称的前缀。如果为该前缀指定空字符串，则此方法将返回所有容器名称。

### 返回值

类型：ContainerNames

返回与搜索条件相匹配的容器名称向量。

## 备注

如果为该前缀指定空字符串，则此方法将返回所有容器名称。

你可以通过指定容器的完整名称（而不是其前缀）来搜索容器。

必须先调用 [Initialize](https://docs.xbox.com/zh-CN/reference/system/Wrappers/classes/provider/methods/xgamesave_wrapper_provider_initialize.md) 方法，然后才能调用 `Provider` 类中的任何其他方法。

## 要求

**标头：** xgamesavewrappers.hpp

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[Microsoft.Xbox.Wrappers.XGameSave.Provider](https://docs.xbox.com/zh-CN/reference/system/Wrappers/classes/provider/xgamesave_wrapper_provider.md)\
[XGameSave 包装器成员](https://docs.xbox.com/zh-CN/reference/system/Wrappers/xgamesave_wrapper_members.md)


## Related topics

- [QueryContainerBlobs](https://docs.xbox.com/zh-CN/reference/system/Wrappers/classes/provider/methods/xgamesave_wrapper_provider_querycontainerblobs.md)
- [将 Steam Cloud 存储移植到 XBOX GDK](https://docs.xbox.com/zh-CN/build/steam-porting-guide/features/steam-cloud.md)
- [Microsoft.Xbox.Wrappers.XGameSave.Provider 参考](https://docs.xbox.com/zh-CN/reference/system/Wrappers/classes/provider/xgamesave_wrapper_provider.md)
- [Query](https://docs.xbox.com/zh-CN/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_query.md)
- [BlobInfoSet](https://docs.xbox.com/zh-CN/reference/system/Wrappers/vectors/blobinfoset.md)
