I once visited an ancient tower in China. A sign said "tread carefully for you bear the weight of history on your shoulders". Our guide explained that the tower was over 800 years old! Oh yes, he said, it was built 800 years ago, had burnt to the ground three times in its history, had been moved to completely different locations twice, but it still counted as 800 years old.
Back in VB land I was making two different calls into some framework, and each call gave me back a filename, and I needed to judge whether the two results were talking about the same file. But how? The framework docs didn't give any guarantee that they'd give back filenames in the same format. What if one call returned long filenames and the other returned it with different casing? or 8.3 format? Or UNC? Or long UNC?
The following function is the best I could come up with. I think it only makes sense to compare filenames if they point to an existing file. And I called the function "DidFileNamesPointToSameFile", in the past tense, because by the time the function returns then they might no longer point to the same file anymore!
If anyone has suggestions for neater ways to accomplish the same task, I'd love to hear.
Module
End