How to not drive partition/volume information query?
Time:10-23
Problem is put forward for Windows is not assigned drive disk partitions, such as ESP, want to read the information, such as file format (FAT32?) , size, volume label, etc.,
Now I can FindFirstVolume, FindNextVolume cycle for all partitions information (contain no allocation of drive partition, but no ESP area ), and use QueryDosDevice become the words \ Device \ HarddiskVolume1 data,
But, the question comes, how further?
I can be changed by GetVolumePathNamesForVolumeName \ Device \ HarddiskVolume1 into drive, but can only get a drive,
Originally GetVolumeInformation can get what I want the file and volume label, but the first parameter is the GetVolumeInformation "C: " is on their Path.
Please help to develop ideas, 40 on the distribution,
PS: VC6 + Win10, good pain, many advanced features are not,,,,,,,,
CodePudding user response:
Now report new problems:
Because is GPT format the hard disk, hidden partition is more, so I made a mistake a problem: FindFirstVolume, FindNextVolume cycle did get no assigned drive area, which is OEM partition, but instead of ESP area (starting area) ,
That is to say: FindFirstVolume, FindNextVolume enumeration didn't normally get to ESP, to ask: are there any other API can get? Administrator privileges I also tried, should not a permissions problem,,,
About GetVolumeInformation, I solved, find GetVolumeInformation VolumeName the way of the first parameter can be a GUID, sweat! .
CodePudding user response:
CodePudding user response:
The question you said I have never heard of, can only come and watch the,