Thanks to all the commentators. I put your suggestions together and ended up with the following solution. This solution should work for Vista as well:
CString strDrive = _T("C:\\");
DWORD dwSysFlags;
TCHAR szFileSysName[1024];
ZeroMemory(szFileSysName, 1024);
if(GetVolumeInformation(strDrive, NULL, 0, NULL, NULL, &dwSysFlags, szFileSysName, 1024))
{
// The following check can be realized using GetVersionEx().
if(bIsWin7OrHigher())
{
if((dwSysFlags & FILE_SUPPORTS_HARD_LINKS) != 0)
{
// Hard links can be created on the specified drive.
}
else
{
// Hard links cannot be created on the specified drive.
}
}
else
{
if(_tcsicmp(szFileSysName, _T("NTFS")) == 0)
{
// Hard links can be created on the specified drive.
}
else
{
// Hard links cannot be created on the specified drive (maybe).
}
}
}
The nice thing about this solution is that
GetVolumeInformation()
provides all required information.