<-- Previous || Up || Next -->

Checksum 32 File Function
File Operations Class

Public Function Checksum32File( _
    ByVal vFileName As Variant _
    ) As Variant

"32-bit File Checksum"
Finds the 32-bit checksum of a file.
The checksum is the sum of the ASCII values of all of the characters within the file.
Checksum is returned as a Double (precision floating-point) value that is a non-negative integer.
Uses modulo addition so that the function will return the 32 least significant bits of the sum.

Example:
    Assuming
       Checksum32("This is a test.") = 1315
       StringToFile("This is a test.", "C:\Test.Out") = True
    for example
       Checksum32File("C:\Test.Out") = 1315
See also:
    Checksum32 Function
    Checksum8File Function
    Checksum16File Function
    CRC32File Function
vFileName: Name of the file for which the checksum will be calculated. Function returns Null if vFileName is Null or cannot be fixed-up to a string. Function returns Null if there is any type of error, such as when the file does not exist.
Note: Checksum32File returns a Double (precision floating-point) value that happens to be a non-negative integer, while Checksum32 returns a Long (Integer) value.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.