Share via


SD card CID reading in C#

Question

Sunday, July 3, 2016 3:51 AM

Hello all,

I want  some help in my task that is reading CID of an SD card inserted in a USB card reader. How can I read CID using C#? Is there an API available for such task?

Waiting for reply, thanks in advance.

All replies (3)

Sunday, July 3, 2016 5:44 AM âś…Answered

With regard to retrieiving CID of SD card via USB I could not find any code for this. I did find the below thread which seems to require low level access via C++ to get the information and the vendor of the SD card would need to provide information on how to retrieve the CID if their driver supports that apparently. From what I've read in other threads the same issue is present with Win7.

How to get SD card CID on WindowsXp

Also see Read secure digital (SD) card serial number from the CID which is old but probably still accurate for Win7 since other threads seem to verify this issue.

And I found this Access the SD card however I've no idea if the info at the bottom of this link about a file in the WPSystem folder in the root of the drive would have the CID in it and I believe this link is for Winows UWP for Win8 and above.

La vida loca


Sunday, July 3, 2016 4:17 AM

Hello all,

I want  some help in my task that is reading CID of an SD card inserted in a USB card reader. How can I read CID using C#? Is there an API available for such task?

Waiting for reply, thanks in advance.

What type system is this requirement for? PC or other and what OS?

La vida loca


Sunday, July 3, 2016 4:26 AM

Its a Desktop PC running windows7.