Where:
1) The OS is XP or Vista 2) The device is not attached via any USB gizmo. It works only in a card reader attached directly to the PCI bus. (Can scsi pass through get around this? It's not an ATA or SCSI command...) 3) Admin privileges...
What not to do:
1) IOCTL_DISK_GET_STORAGEID 2) GetFileInformationByHandle
As both these return a number assigned when the volume is created. It will change next time the drive is formatted. What I did:
Use IOCTL_SFFDISK_DEVICE_COMMAND to send command 10 (see the SD spec).
Read Secure Digital (SD) Card Serial Number from CID
Read CID and CSD C# implementation
Pocket PC?
The Future?
Feedback I got by mail from someone:
ReplyDelete"I did a bit of debugging and found out the "GetPhysicalDriveStrings" is not working for me, it does not "give back" the correct device, thus the variable "result" is false, I had to set the physicalDrives variable manually, and the rest worked great, it retrieved the correct SID, first program on windows able to do that :)"
So - it's a bit buggy, but does work for others!
This is not working for me.
ReplyDeleteI get a blank dos command screen until i hit any key and the dos screen goes away.
Looks like the program is runing but nothing is happening.
Any siggestions
Anyone has this as a compiled .exe file?
ReplyDeleteHey jo0ls
ReplyDeleteMay I use some of your code in a freeware application I am developing? I will make mention of you on the app.
hey...i jus found a way to get the cid number through command prompt,,and it says NONE for cod number...wat should i do...and wat is actually the problem ???
ReplyDeleteI found your article at first, then also found Nexcopy who has a 20 target system to do this in bulk. This blog did the write up about it. www.getusb.info/how-to-read-cid-on-sd-card/ or the factory is nexcopy.com
ReplyDeleteHi could someone provide the source code. I don't seem to be able to find the link. Thanks.
ReplyDelete