/*++ Copyright (c) 2024, Quinn Stephens. Provided under the BSD 3-Clause license. Module Name: rtl.c Abstract: Runtime library routines. --*/ #include PVOID RtlCopyMemory ( PVOID Destination, CONST PVOID Source, ULONG Length ) /*++ Routine Description: Copies a block of memory from Source to Destination. Arguments: Destination - the address to copy to. Source - the address to copy from. Length - the number of bytes to copy. Return Value: Returns Destination. --*/ { for (ULONG Index = 0; Index < Length; Index++) { ((PCHAR)Destination)[Index] = ((PCHAR)Source)[Index]; } return Destination; } PVOID RtlZeroMemory ( PVOID Destination, ULONG Length ) /*++ Routine Description: Sets a block of memory to zero. Arguments: Destination - the address to zero at. Length - the number of bytes to set. Return Value: Returns Destination. --*/ { for (ULONG Index = 0; Index < Length; Index++) { ((PCHAR)Destination)[Index] = 0; } return Destination; }