S
sudhakar3697
Guest
Hi,
I want to read the FILE_VOLUME_IS_COMPRESSED for my C drive.
uint serialNum, serialNumLength, flags;
StringBuilder volumename = new StringBuilder(256);
StringBuilder fstype = new StringBuilder(256);
bool ok = false;
foreach (string drives in Environment.GetLogicalDrives())
{
ok = GetVolumeInformation(drives, volumename, (uint)volumename.Capacity - 1, out serialNum,
out serialNumLength, out flags, fstype, (uint)fstype.Capacity - 1);
if (ok)
{
Console.WriteLine(" Volume Information of " + drives);
Console.WriteLine("SerialNumber of is..... " + serialNum.ToString());
if (volumename != null)
{
Console.WriteLine("VolumeName is..... " + volumename.ToString());
}
if (fstype != null)
{
Console.WriteLine("FileType is..... " + fstype.ToString());
}
Console.WriteLine("Flags....." + flags.ToString());
}
}
Continue reading...
I want to read the FILE_VOLUME_IS_COMPRESSED for my C drive.
uint serialNum, serialNumLength, flags;
StringBuilder volumename = new StringBuilder(256);
StringBuilder fstype = new StringBuilder(256);
bool ok = false;
foreach (string drives in Environment.GetLogicalDrives())
{
ok = GetVolumeInformation(drives, volumename, (uint)volumename.Capacity - 1, out serialNum,
out serialNumLength, out flags, fstype, (uint)fstype.Capacity - 1);
if (ok)
{
Console.WriteLine(" Volume Information of " + drives);
Console.WriteLine("SerialNumber of is..... " + serialNum.ToString());
if (volumename != null)
{
Console.WriteLine("VolumeName is..... " + volumename.ToString());
}
if (fstype != null)
{
Console.WriteLine("FileType is..... " + fstype.ToString());
}
Console.WriteLine("Flags....." + flags.ToString());
}
}
Continue reading...