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

# XBTCArchiveReader::GetResourceStreamCount

> XBTCArchiveReader::GetResourceStreamCount (xbtc) — 取得紋理的資料流數目。適用於 XBOX 遊戲開發的 Direct3D 12 圖形 API 參考。

取得紋理的資料流數目。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
int32_t GetResourceStreamCount(  
         uint32_t ResourceIdx  
)  
```

<a id="parametersSection" />

### 參數

*ResourceIdx*   \
類型: uint32\_t

紋理以零為起始的索引。

<a id="retvalSection" />

### 傳回值

類型: int32\_t

如果成功，則為與紋理相關聯的資料流數目；否則為 -1。

<a id="remarksSection" />

## 備註

`XBTCArchiveReader_GetResourceStreamCount` 會傳回與 XBTC 封存中指定紋理相關聯的資料流數目。
資料流數目的計算方式為前一個資源的 'NextIndex' 值與此資源的 'NextIndex' 之間的差值。
當此資源為第 0 個資源時，會假設前一個資源的 'NextIndex' 為 '0'。
如需 XBTC 封存內容與結構的詳細資訊，請參閱 [XBOX Texture Compressor (XBTC) 封存檔案規格](https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/graphics/newfeatures/xbtc/xbtc-archive-format)。

<a id="requirementsSection" />

## 需求

**標頭:** XBTC.h

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

<a id="seealsoSection" />

## 另請參閱

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


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [pre_encode_audio_stream::get_available_buffer_count](/zh-TW/reference/chat/gamechat2/classes/pre_encode_audio_stream/methods/pre_encode_audio_stream_get_available_buffer_count.md)
- [post_decode_audio_source_stream::get_available_buffer_count](/zh-TW/reference/chat/gamechat2/classes/post_decode_audio_source_stream/methods/post_decode_audio_source_stream_get_available_buffer_count.md)
- [XGameStreamingGetClientCount](/zh-TW/reference/system/xgamestreaming/functions/xgamestreaminggetclientcount.md)
- [PartyAudioManipulationSourceStream::GetAvailableBufferCount](/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyAudioManipulationSourceStream/methods/partyaudiomanipulationsourcestream_getavailablebuffercount.md)
