> For the complete documentation index, see [llms.txt](https://malwaresourcecode.com/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://malwaresourcecode.com/home/markdown/bytearraytochararray.md).

# ByteArrayToCharArray

```cpp
VOID ByteArrayToCharArrayA(_Inout_ PCHAR Destination, _In_ PBYTE Source, _In_ DWORD Length)
{
	for (DWORD dwX = 0; dwX < Length; dwX++)
		Destination[dwX] = (BYTE)Source[dwX];
}

VOID ByteArrayToCharArrayW(_Inout_ PWCHAR Destination, _In_ PBYTE Source, _In_ DWORD Length)
{
	for (DWORD dwX = 0; dwX < Length; dwX++)
		Destination[dwX] = (BYTE)Source[dwX];
}
```
