> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XMemGetWin32HeapStatistics

> XMemGetWin32HeapStatistics

# XMemGetWin32HeapStatistics

取得指定堆積的統計資料。

## 語法

```cpp theme={null}
BOOL XMemGetWin32HeapStatistics(
    _In_ HANDLE Heap,
    _Out_ PWIN32_HEAP_STATISTICS Statistics
    );
```

### 參數

*Heap*   \_In\_\
類型：HANDLE

要擷取統計資料的堆積控制代碼

*Statistics*   \_Out\_\
類型：PWIN32\_HEAP\_STATISTICS

指向將包含統計資料之 [WIN32\_HEAP\_STATISTICS](https://docs.xbox.com/zh-TW/reference/system/xmem/structs/win32_heap_statistics.md) 結構的指標。

### 傳回值

類型：BOOL

如果可以填入 [WIN32\_HEAP\_STATISTICS](https://docs.xbox.com/zh-TW/reference/system/xmem/structs/win32_heap_statistics.md) 結構，則傳回 `TRUE`；否則傳回 `FALSE`。

## 備註

此函式會傳回統計資料，例如 Win32 堆積中的認可大小。傳回的認可大小是 Win32 堆積所耗用總記憶體的估計值。

## 需求

**標頭：** xmem.h

**程式庫：** xmem.lib

**支援的平台：** XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[診斷與記憶體追蹤](https://docs.xbox.com/zh-TW/build/console-features/memory/system-memory-diagnostics.md)\
[WIN32\_HEAP\_STATISTICS](https://docs.xbox.com/zh-TW/reference/system/xmem/structs/win32_heap_statistics.md)\
[XMem](https://docs.xbox.com/zh-TW/reference/system/xmem/xmem_members.md)


## Related topics

- [WIN32_HEAP_STATISTICS](https://docs.xbox.com/zh-TW/reference/system/xmem/structs/win32_heap_statistics.md)
- [XMemGetWin32HeapName](https://docs.xbox.com/zh-TW/reference/system/xmem/functions/xmemgetwin32heapname.md)
- [XMemSetWin32HeapName](https://docs.xbox.com/zh-TW/reference/system/xmem/functions/xmemsetwin32heapname.md)
- [XMemCreateWin32Heap](https://docs.xbox.com/zh-TW/reference/system/xmem/functions/xmemcreatewin32heap.md)
- [XMemSetWin32HeapTrackingHooks](https://docs.xbox.com/zh-TW/reference/system/xmem/functions/xmemsetwin32heaptrackinghooks.md)
