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

# WriteArchiveToFile

> 將封存內容儲存至檔案。

將封存內容儲存至檔案。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT WriteArchiveToFile(  
         const wchar_t* filePath,  
         size_t* fileSize= nullptr  
)  
```

<a id="parametersSection" />

### 參數

*filePath*   \
類型: wchar\_t\*

已儲存之封存檔案的目的地。

*fileSize*   \
類型: size\_t\*

選擇性地傳回寫入的大小。

<a id="retvalSection" />

### 傳回值

類型: HRESULT

HRESULT 成功或錯誤碼。

<a id="remarksSection" />

## 備註

`XBTCArchiveWrtier_WriteArchiveToFile` 會將封存內容儲存至檔案。它也可以傳回已寫入檔案的大小。
如需 `XBTCArchiveWriter` 的詳細資訊，請參閱 [XBTCArchiveWriter](/zh-TW/reference/graphics/xbtc/interfaces/XBTCArchiveWriter/xbtcarchivewriter)。

<a id="requirementsSection" />

## 需求

**標頭:** XBTC.h

**支援的平台**: XBOX One 系列主機與 XBOX Series 主機

<a id="seealsoSection" />

## 另請參閱

[XBTCArchive](/zh-TW/reference/graphics/xbtc/interfaces/XBTCArchive/xbtcarchive)
[XBTC](/zh-TW/reference/graphics/xbtc/xbtc_members)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [WdDeleteSearchOptions](/zh-TW/reference/remoting/structs/wddeletesearchoptions.md)
- [Flat File Install 概觀](/zh-TW/build/core-features/common/packaging/packaging-flatfileinstall.md)
- [google-gson 授權](/zh-TW/services/playfab/sdks/java/Licenses/google-gson-license.md)
- [MicrosoftGame.config 元素 - DisableFilesystemWriteVirtualization (已淘汰)](/zh-TW/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-disablefilesystemwritevirtualization.md)
