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

# OpenFromFile

> 從檔案指標剖析封存標頭，並為標頭配置記憶體。

從檔案指標剖析封存標頭，並為標頭配置記憶體。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
bool OpenFromFile(  
         const wchar_t* ArchiveFilePath  
)  
```

<a id="parametersSection" />

### 參數

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

封存檔案的路徑。

<a id="retvalSection" />

### 傳回值

類型: bool

如果成功開啟封存檔案，則傳回 true；否則傳回 false。

<a id="remarksSection" />

## 備註

`XBTCArchiveReader_OpenFromFile` 會從檔案指標剖析封存標頭，並為標頭配置記憶體。\
此方法由 `XBTCArchiveReader_IsValid` 使用。\
如需 `XBTCArchiveReader_IsValid` 的詳細資訊，請參閱 [XBTCArchiveReader\_IsValid](/zh-TW/reference/graphics/xbtc/interfaces/XBTCArchiveReader/methods/xbtcarchivereader_isvalid)。

<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

- [IDStorageFactoryX::OpenFile](/zh-TW/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_openfile.md)
- [OpenExistingHeapFromFileMapping](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device3/methods/id3d12device3_openexistingheapfromfilemapping_public.md)
- [IDStorageFileX](/zh-TW/reference/system/dstorage/interfaces/IDStorageFileX/idstoragefilex.md)
- [IDStorageFileX::Close](/zh-TW/reference/system/dstorage/interfaces/IDStorageFileX/methods/idstoragefilex_close.md)
- [IDStorageFileX::GetHandle](/zh-TW/reference/system/dstorage/interfaces/IDStorageFileX/methods/idstoragefilex_gethandle.md)
