MemCopySwap (FUN)

FUNCTION MemCopySwap

Function copies memory and swaps automatically,

when running on motorolla byte order.

This function copies “dwSize” number of bytes

from adress “pbySrc” to “pbyDst”, while the data is swapped, when running on a CPU with motorola byte order.

The range which is swapped is not aligned within any data type, as this is not known by the function. The function simply swaps the whole buffer, which size is defined by the parameter “dwSize”.

Note, that this function (similar to memcpy in C) makes no additional checks of input parameters. The caller has to take care about the validity of pointers and sizes, passed to this function.

As the function implements no error handling, the exact count of “dwSize” bytes is copied to “pbyDst”.

InOut:

Scope

Name

Type

Comment

Input

pbyDst

POINTER TO BYTE

Pointer to destination memory

pbySrc

POINTER TO BYTE

Pointer to source memory

dwSize

DWORD

Number of bytes to copy