Showing results for September 2014 - Page 3 of 3 - The Old New Thing

Sep 5, 2014
0
0

You can use a file as a synchronization object, too

Raymond Chen
Raymond Chen

A customer was looking for a synchronization object that had the following properties: Can be placed in a memory-mapped file. Can be used by multiple processes simultaneously. Bonus if it can even be used by different machines simultaneously. Does not leak resources if the file is deleted. It turns out there is already a synchronization ob...

Code
Sep 4, 2014
0
0

Aha, I have found a flaw in the logic to detect whether my program is running on 64-bit Windows

Raymond Chen
Raymond Chen

Some time ago, I described how to detect programmatically whether you are running on 64-bit Windows, and one of the steps of the algorithm was "If you are a 64-bit program, then you are running on 64-bit Windows, because 32-bit Windows cannot run 64-bit programs." Every so often, somebody will claim that they found a flaw in this logic: "This alg...

Code
Sep 3, 2014
0
0

Why does the timestamp of a file increase by up to 2 seconds when I copy it to a USB thumb drive?

Raymond Chen
Raymond Chen

We saw some time ago that the FAT file system records timestamps in local time to only two-second resolution. This means that copying a file to a FAT-formatted device (typically a floppy drive or a USB thumb drive) can increase the timestamp by up two seconds. And even after the file is copied, the timestamp is not stable. The timestamp changes ...

Tips/Support