Hi there,
I am writing a program that runs in a loop to check if there is any USB
flesh memory stick (removable disk) plugged in.
If yes, then it should ask me to connect one of them, and then to open a
file on this selected removable disk for read and write.
I went to Apple web site and found the sample code on
http://developer.apple.com/documentation/DeviceDrivers/Conceptual/USBBoo
k/index.html
For my case, I need to know if any removable disks (flash memory stick)
are plugged in regardless vendorID and productID.
Here is the sample code to set the matching dictionary:
//Add the vendor and product IDs to the matching dictionary.
//This is the second key in the table of device-matching keys of the
//USB Common Class Specification
CFDictionarySetValue(matchingDict, CFSTR(kUSBVendorName),
CFNumberCreate(kCFAllocatorDefault,
kCFNumberSInt32Type, &usbVendor));
CFDictionarySetValue(matchingDict, CFSTR(kUSBProductName),
CFNumberCreate(kCFAllocatorDefault,
kCFNumberSInt32Type, &usbProduct));
My question is:
If I just want to search the DeviceClass=Mass-Storage( 8) and
DeviceSubClass=Reduced Block Commands (RBC =
1),
(I guess these conditions are sufficient for searching flash memory
stick or removable disk)
How I can replace the above statement? and what else I should do?
Thanks for any help,
Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden
This email sent to email@hidden