The common approach would be to simply compare file modification times. Anyways...
I don't know if there is a standard function available in Windows but one simple way to do this on your own would be to xor-sum up the file contents as in this pseudocode:
Code:
int hash= 0;
read complete or partial file to buffer.
int *buffer= your buffer;
int *loc= buffer;
int *end= buffer + size of your buffer in integers;
for (; loc < end; loc++)
hash^= *loc;
handle the up to three remaining bytes if buffersize % sizeof(int) != 0
if buffer did not contain all of the file, read next part to buffer, restart...
You could optimize it by using register variables for loc, end and hash and maybe unrolling the loop a bit. That way it should become pretty fast.
In any case, try to use a standard function if there is one available.