Live Scores
Shareware
Movie Stars
Programming
Multimedia
Mobile
Database
Enterprise
in
Other
Storage
(Entire Site)
Questions and answers to issues related to Hardware: Apple, Components, Monitors, Handhelds, Laptops, motherboard, Networking, Storage.
»
Storage
»
Other
»
Problem: 16MB Compact Flash Card states wrong geometry data (half size only) - How to determine capacity properly?
16MB Compact Flash Card states wrong geometry data (half size only) - How to determine capacity properly?
Hi everybody,
I have a very strange phenomenon here. I took two CF cards, one 16MB, the other 512MB and tried to determine their storage capacity programmatically. To do so, I used two different methods (all experiments done on Windows 2000 with latest updates):
1) Determine size of logical drive with GetDiskFreeSpace and GetVolumeInformation.
This delivers the proper size on both cards but obviously only when the cards are properly formatted.
2) Open a handle to the physical device with CreateFile, then use DeviceIoControl with the control code IOCTL_DISK_GET_DRIVE_GEOME
TRY. This should work as long as Windows can see a card in the card reader.
However, for this method, the 16MB card returns a structure which would outline an 8MB card!
I did some searching on the website and found some WMI script for enumerating all the hard discs in a computer. This delivers the wrong value of 8MB as well!
My first assumption was that the card is broken somehow, but I tried another card and it shows the same effect. Both cards are completely okay, my Digicam detects them as 16MB card as well and it is possible to use the whole 16MB for data, too.
So here are my questions:
Is this behaviour common? How do I determine the proper size? (My digicam can, so should Windows!) And is there another, more reliable method of determining the card size regardless of a working file system on it?
I am pretty clueless at present, any ideas and suggestions are welcome :D
Solution: 16MB Compact Flash Card states wrong geometry data (half size only) - How to determine capacity properly?
PAQed with points refunded (500)
modulo
Community Support Moderator
Popular Tags
Tags:
2003
5
access
arcserve
backup
cisco
citrix
dell
disk
drive
error
exec
file
hard
microsoft
partition
pix
PowerConnect 5424 GigE Switch
raid
sata
server
tape
TCP/IP
usb
veritas
vpn
windows
Windows Server 2003 R2 SP2
xp
Browse All Tags