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

# XMemSetWin32HeapName

> 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 <a href="https://msdn.microsoft.com/library/windows/desktop/ms679360(v=vs.85).aspx">GetLastError</a>.

## 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](/reference/system/xmem/xmem_members)


## Related topics

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