CopyMemory
The CopyMemory function copies a block of memory from one location to another. VOID CopyMemory(
PVOID Destination, // pointer to address of copy destination
CONST VOID *Source, // pointer to address of block to copy
DWORD Length // size, in bytes, of block to copy
);
Parameters
Destination
Pointer to the starting address of the copied block's destination.
Source
Pointer to the starting address of the block of memory to copy.
Length
Specifies the size, in bytes, of the block of memory to copy.
Return Values
This function has no return value. Res
If the source and destination blocks overlap, the results are undefined. For overlapped blocks, use the MoveMemory function.
The CopyMemory function copies a block of memory from one location to another. VOID CopyMemory(
PVOID Destination, // pointer to address of copy destination
CONST VOID *Source, // pointer to address of block to copy
DWORD Length // size, in bytes, of block to copy
);
Parameters
Destination
Pointer to the starting address of the copied block's destination.
Source
Pointer to the starting address of the block of memory to copy.
Length
Specifies the size, in bytes, of the block of memory to copy.
Return Values
This function has no return value. Res
If the source and destination blocks overlap, the results are undefined. For overlapped blocks, use the MoveMemory function.
PVOID Destination, // 指向目的地址的指针
CONST VOID *Source, // 指向要复制的内存块地址的指针
DWORD Length // 要复制的内存块大小,字节数
);
参数
Destination
指向目的开始地址的指针
Source
指向要复制的内存块开始地址的指针
Length
指定大小, 字节数, 要复制的内存块
返回值
此函数无返回值备注
如果源与目的内存块交迭,结果未知。
对于交迭的内存块,应使用MoveMemory函数