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

# XMemSetWin32HeapName

> XMemSetWin32HeapName

Sets the name of a Win32 Heap

## Syntax

```cpp theme={null}
BOOL XMemSetWin32HeapName(
  HANDLE Heap,
  PCSTR Buffer,
  SIZE_T SizeOfBuffer
)
```

### Parameters

*Heap*   \_In\_\
Type: HANDLE

Heap Handle

*Buffer*   \_In\_\
Type: PCSTR

Buffer containing the name to set

*SizeOfBuffer*   \_In\_\
Type: SIZE\_T

Size in bytes of Buffer

### Return value

Type: BOOL

On success XMemSetWin32HeapName returns TRUE. If the function fails, the return value is FALSE.  To get extended error information, call [GetLastError](https://msdn.microsoft.com/library/windows/desktop/ms679360\(v=vs.85\).aspx).

## Remarks

The heap name is limited to 8 characters not including the NULL terminator.  XMemSetWin32HeapName will truncate the supplied name at the character limit.

## Requirements

**Header:** xmem.h

**Library:** xmem.lib

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[xmem members](https://docs.xbox.com/reference/system/xmem/xmem_members.md)


## Related topics

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