[python-win32] Does pywin32 support SD card operation(IOCTL_SFFDISK_QUERY_DEVICE_PROTOCOL)?
Tim Roberts
timr at probo.com
Wed Jul 18 19:54:48 CEST 2012
Jane Chen wrote:
>
> Thank you for your help.
> Could you please help me write better codes for GUID?
What are you going to do with it? You will get back a 20-byte string.
The last 16-bytes are the binary GUID. The way you handle that depends
on what you need to do with it.
> You are right. I was using USB.
> Based on your suggestion, I connected the SD drive directly to a PCI
> bus and set buf_fmt='HHLLLL'. However, I got another error message:
> (1, 'DeviceIoControl', 'Incorrect function'). I think I did not use
> the function correctly.
How are you specifying the volume? You should be using a string like
"\\\\.\\E:" to open the volume for the E: drive (where the backslashes
are doubled because of Python's string escaping).
I get "incorrect function" if I try to use this on a standard disk drive.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list