Platform SDK: Memory

CopyMemory

The CopyMemory function copies a block of memory from one location to another.

VOID CopyMemory(
  PVOID Destination,   // copy destination
  CONST VOID *Source,  // memory block
  SIZE_T Length        // size of memory block
);

Parameters

Destination
[in] Pointer to the starting address of the copied block's destination.
Source
[in] Pointer to the starting address of the block of memory to copy.
Length
[in] Specifies the size, in bytes, of the block of memory to copy.

Return Values

This function has no return value.

Remarks

If the source and destination blocks overlap, the results are undefined. For overlapped blocks, use the MoveMemory function.

MAPI: For more information, see Syntax and Limitations for Win32 Functions Useful in MAPI Development.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Winbase.h; include Windows.h.

See Also

Memory Management Overview, Memory Management Functions, FillMemory, MoveMemory, ZeroMemory