beautypg.com

Retmemcalculatechecksum, Syntax, Remarks – Rockwell Automation 6182 SDK User Manual

Page 94: Return value, Portability, See also

background image

4–54

RAC6182-Specific Extensions to the CE API

Publication 6182-UM002B-EN-P

RetMemCalculateChecksum

This function calculates retentive memory checksum. It is prototyped in
RetentiveMemAPI.h.

Syntax

#include
#include

BOOL RetMemCalculateChecksum (void)

Remarks
This function recalculates the checksum of retentive memory and writes
it as the master checksum.

ATTENTION: If any data in the retentive memory are
corrupt, as indicated by a return of FALSE from a call to
RetMemVerifyMemory, the corruptions should be
repaired before calling this function. Any data in the
memory that are corrupt at the time this function is called
will remain corrupt, and the recalculated master
checksum based on the corrupt data will render the
corruptions invisible to subsequent calls of
RetMemVerifyMemory.

If the caller cannot repair corruptions, because they have to do with data
maintained by other applications, the caller should at least ensure that all
other applications are informed that their data may not be valid prior to
issuing this call. Otherwise, some applications might interpret bad data
as if it were good.

Return Value
Returns TRUE if the checksum is recalculated. Returns FALSE if
another process has locked memory.

Portability
This function is specific to the RAC6182 hardware.

See Also
RetMemVerifyMemory

This manual is related to the following products: