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

# ApuHeapGetState

> ApuHeapGetState

# ApuHeapGetState

APU 物理ヒープの現在の状態を照会します。

## 構文

```cpp theme={null}
HRESULT ApuHeapGetState(  
         ApuHeapState* apuHeapState,  
         UINT32 flags = APU_ALLOC_CACHED  
)  
```

### パラメーター

*apuHeapState*   \_Out\_\
型: [ApuHeapState\*](/reference/audio/apu/structs/apuheapstate)

ヒープの現在の状態。

*flags*   \
型: UINT32

照会するヒープ: キャッシュ ヒープの場合は `APU_ALLOC_CACHED`、非キャッシュ ヒープの場合は `APU_ALLOC_NONCACHED`。

### 戻り値

型: HRESULT

| 戻り値コード                       | 説明                  |
| :--------------------------- | :------------------ |
| S\_OK                        | 成功                  |
| APU\_E\_HEAP\_NOT\_ALLOCATED | APU ヒープが割り当てられていません |
| E\_INVALIDARG                | 無効な引数               |

## 解説

この関数は [ApuHeapState](/reference/audio/apu/structs/apuheapstate) 構造体を返します。

APU ヒープを作成するには、[ApuCreateHeap](/reference/audio/apu/functions/apucreateheap) を呼び出します。APU ヒープはプロセスの有効期間中保持されます。

## 要件

**ヘッダー:** apu.h

**ライブラリ:** acphal.lib

**サポート対象プラットフォーム:** XBOX One ファミリー本体、XBOX Series 本体

## 関連項目

[ApuHeapState](/reference/audio/apu/structs/apuheapstate)\
[APU](/reference/audio/apu/apu_members)


## Related topics

- [ApuHeapState](/ja-jp/reference/audio/apu/structs/apuheapstate.md)
- [APU (Audio Processing Unit)](/ja-jp/reference/audio/apu/apu_members.md)
- [ApuCreateHeap](/ja-jp/reference/audio/apu/functions/apucreateheap.md)
- [XApuStateOptions](/ja-jp/reference/audio/xapu/enums/xapustateoptions.md)
- [XApuProcessType](/ja-jp/reference/audio/xapu/enums/xapuprocesstype.md)
