Assumption: The filename extension contains no more than 3 characters.

I make this assumption most often when I am trying to filter files based on the file extension (the file type) or when I am stripping off the file extension. The assumption is true in the FAT file system, but if you are running under VFAT, HPFS, or NTFS, you can best determine the maximum length by a call to GetVolumeInformation.