RtlCopyMemory - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntddstor.h

void RtlCopyMemory(
  Destination,
  Source,
  Length
);
View the official Windows Driver Kit DDI reference
// wdm.h

void RtlCopyMemory(
   void*       Destination,
   const void* Source,
   size_t      Length
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntddstor-rtlcopymemory)

RtlCopyMemory macro (ntddstor.h)

Description

The RtlCopyMemory routine copies the contents of a source memory block to a destination memory block.

Parameters

Destination

Datatype: void*. A pointer to the destination memory block to copy the bytes to.

Source

Datatype: const void*. A pointer to the source memory block to copy the bytes from.

Length

Datatype: size_t. The number of bytes to copy from the source to the destination.

Remarks

RtlCopyMemory runs faster than RtlMoveMemory. However, RtlCopyMemory requires that the source memory block, which is defined by Source and Length, cannot overlap the destination memory block, which is defined by Destination and Length. In contrast, RtlMoveMemory correctly handles the case in which the source and destination memory blocks overlap.

New drivers should use the RtlCopyMemory routine instead of RtlCopyBytes.

Callers of RtlCopyMemory can be running at any IRQL if the source and destination memory blocks are in nonpaged system memory. Otherwise, the caller must be running at IRQL <= APC_LEVEL.

See also

RtlMoveMemory


Windows Driver Kit DDI reference (nf-wdm-rtlcopymemory)

Description

The RtlCopyMemory routine copies the contents of a source memory block to a destination memory block.

Parameters

Destination [out]

A pointer to the destination memory block to copy the bytes to.

Source [in]

A pointer to the source memory block to copy the bytes from.

Length [in]

The number of bytes to copy from the source to the destination.

Syntax

void RtlCopyMemory(
   void*       Destination,
   const void* Source,
   size_t      Length
);

Remarks

RtlCopyMemory runs faster than RtlMoveMemory. However, RtlCopyMemory requires that the source memory block, which is defined by Source and Length, cannot overlap the destination memory block, which is defined by Destination and Length. In contrast, RtlMoveMemory correctly handles the case in which the source and destination memory blocks overlap.

New drivers should use the RtlCopyMemory routine instead of RtlCopyBytes.

Callers of RtlCopyMemory can be running at any IRQL if the source and destination memory blocks are in nonpaged system memory. Otherwise, the caller must be running at IRQL <= APC_LEVEL.

See also

RtlMoveMemory