fs is a TFileStream
filename is a property of the TFileStream class
TFileStream is part of the delphi lib
so the only thing i can say, it is that maybe your older version of Delphi has no such thing property, and can't do nothing about it.
you may consider upgrading, though delphi 2006 is much bigger then delphi 7.
i remember SD_BOTH being not present in older versions of ICS lib. if you have problems with it, i can give you my exact version (the one reported in notes.txt).
the problems are not related.