Reputation: 1087
I want to identify disk in c++ in my windows application. For example: I have a disk on E:\ Then I changed the disk, and replace it with another one. the name is still E:\ How can I know the disk is changed, it is not the original one?
If I have no administrator priority in win7, Can I still use some method to identy different disks?
Many thanks!
Upvotes: 0
Views: 473
Reputation: 44193
Probably the relevant methods are:
GetVolumeInformation will give you the serial number. If this isn't enough you will probably have to resort to WMI_PhysicalMedia. I believe all of this should work without Administrator privileges.
A page listing a bunch of relevant functions is here: http://msdn.microsoft.com/en-us/library/aa365730(v=VS.85).aspx
Upvotes: 4