CopyMemory
Copy memory, the first parameter is the destination address, the second parameter is the source address, and the third parameter is the size of the copied data, unit bytes, and the source memory area cannot overlap. If it overlaps, you can use the MoveMemory() function. The function prototype is as follows:
void CopyMemory(
PVOID Destination,
const VOID * Source,
SIZE_T Length);
FillMemory
Fill memory, fill a piece of memory with the same value. The first parameter is the memory address that needs to be filled, the second parameter is the size of the fill, unit bytes, the third parameter is the value of the fill, BYTE type, FillMemory will Use this value to fill the specified memory.
void FillMemory(
PVOID Destination,
SIZE_T Length,
BYTE Fill);
MoveMemory
To copy memory, the first parameter is the destination address, the second parameter is the source address, and the third parameter is the size of the copied data, in bytes, and the source memory area and the destination memory area can overlap. The function prototype is as follows: void MoveMemory(
PVOID Destination,
const VOID * Source,
SIZE_T Length);
ZeroMemory
Clears the specified memory, the first parameter is the memory address, and the second parameter is the size of the memory area, unit bytes. The function prototype is as follows:
void ZeroMemory(
PVOID Destination,
SIZE_T Length);