GetFileAttributes does not work on files opened exclusively, e.g. C:\pagefile.sys ; neither does GetFileAttributesEx. The only way I could get attributes of such files is by using FindFirstFile, in which case the dwFileAttributes field is filled correctly, but that hardly seems like the intended way of doing it.
Is it really the only way to go, and what are the reasons for this behavior?