CheckInverseData (FUN)

FUNCTION CheckInverseData : BOOL

Checks if one buffer contains the inverse

of another.

This function compares the data at “pbyData1” of “udiLength” bytes with the data at “pbyData2”.

If the data is the exact inverse, the function returns TRUE. Otherwise the function returns FALSE.

If dwSize is 0, the function returns FALSE, as zero compared bytes can’t be inverse.

Note, that this function (similar to memcmp 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 “udiLength” bytes is compared.

InOut:

Scope

Name

Type

Comment

Return

CheckInverseData

BOOL

Input

pbyData1

POINTER TO BYTE

Pointer to data1

pbyData2

POINTER TO BYTE

Pointer to data2

udiLength

UDINT

number of bytes to compare