Previous Next

RtlCopyMemory

The RtlCopyMemory routine copies the contents of one buffer to another.

VOID 
  RtlCopyMemory(
    IN VOID UNALIGNED  *Destination,
    IN CONST VOID UNALIGNED  *Source,
    IN SIZE_T  Length
    );

Parameters

Destination
Pointer to the destination of the move.
Source
Pointer to the memory to be copied.
Length
Specifies the number of bytes to be copied.

Return Value

None

Headers

Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.

Comments

RtlCopyMemory runs faster than RtlMoveMemory. However, the (Source + Length) cannot overlap the Destination range passed in to RtlCopyMemory.

Callers of RtlCopyMemory can be running at any IRQL if both memory blocks are resident. Otherwise, the caller must be running at IRQL < DISPATCH_LEVEL.

See Also

RtlMoveMemory