USB Size [modified]
-
Use this. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Measuring tape? Iain.
-
Use this. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]I *knew* I should have refreshed the page before answering. Great minds think alike, eh? Iain.
-
I assume you mean disk space? If so use the
IOCTL_DISK_GET_LENGTH_INFO
control code withDeviceIoControl()
. The documentation can be found here Hope this helps, --Perspx"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
-
I *knew* I should have refreshed the page before answering. Great minds think alike, eh? Iain.
Iain Clarke wrote:
Great minds think alike, eh?
I suppose. :-D [added] BTW: maybe some physics exposure lead to such bents. [/addes]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Between my first answer and now, I've had a bit of a look for an answer for you. First - click on my name to go to an article I wrote about detecting drives being added / removed. It may be helpful for you. You've already been told about DEVICE_IO_CONTROL possible solution. The only other function I've found is GetDiskFreeSpaceEx - which doesn't tell you the total size, just the free space. But if free space is good enough information for you, it will be a lot easier to use. Good luck, Iain.
-
Between my first answer and now, I've had a bit of a look for an answer for you. First - click on my name to go to an article I wrote about detecting drives being added / removed. It may be helpful for you. You've already been told about DEVICE_IO_CONTROL possible solution. The only other function I've found is GetDiskFreeSpaceEx - which doesn't tell you the total size, just the free space. But if free space is good enough information for you, it will be a lot easier to use. Good luck, Iain.
-
Between my first answer and now, I've had a bit of a look for an answer for you. First - click on my name to go to an article I wrote about detecting drives being added / removed. It may be helpful for you. You've already been told about DEVICE_IO_CONTROL possible solution. The only other function I've found is GetDiskFreeSpaceEx - which doesn't tell you the total size, just the free space. But if free space is good enough information for you, it will be a lot easier to use. Good luck, Iain.