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

# IsValidArchive

> 測試檔案路徑是否為有效的封存，傳回要讀取的檔案量，並開啟封存。

測試檔案路徑是否為有效的封存，傳回要讀取的檔案量，並開啟封存。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
size_t IsValidArchive(  
         const wchar_t* ArchiveFilePath  
)  
```

<a id="parametersSection" />

### 參數

*ArchiveFilePath*   \
類型: wchar\_t\*

封存檔案的路徑。

<a id="retvalSection" />

### 傳回值

類型: size\_t

傳回要讀取的檔案量。

<a id="remarksSection" />

## 備註

`XBTCArchiveReader_IsValidArchive` 會測試檔案是否存在，以及是否代表有效的 XBTC 封存。
此方法應搭配 `OpenFromFile()` 使用。
如需 OpenFromFile() 方法的詳細資訊，請參閱 [XBTCArchiveReader\_OpenFromFile](/zh-TW/reference/graphics/xbtc/interfaces/XBTCArchiveReader/methods/xbtcarchivereader_openfromfile)。

<a id="requirementsSection" />

## 需求

**標頭:** XBTC.h

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

<a id="seealsoSection" />

## 另請參閱

[XBTCArchiveReader](/zh-TW/reference/graphics/xbtc/interfaces/XBTCArchiveReader/xbtcarchivereader)
[XBTC](/zh-TW/reference/graphics/xbtc/xbtc_members)


## Related topics

- [NDA topic directory - live Microsoft Learn links](/nda/nda-topic-directory.md)
- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [NDA 主题目录 - Microsoft Learn 在线链接](/zh-CN/nda/nda-topic-directory.md)
- [NDA トピック ディレクトリ - Microsoft Learn 公開版へのリンク](/ja-jp/nda/nda-topic-directory.md)
- [xbCopy (xbcopy.exe)](/tools/tools-console/commandlinetools/xbcopy.md)
