Listing partitions (on win32)

Roger Upole rupole at hotmail.com
Sun Jan 15 08:04:24 EST 2006


"Claude Henchoz" <claude.henchoz at gmail.com> wrote in message news:1137286353.204837.31580 at z14g2000cwz.googlegroups.com...
> Hi
>
> Is there any way of listing partitions on a (win32) computer without
> using WMI?
>
> Cheers, Claude
>

Using win32file.DeviceIOControl with IOCTL_DISK_GET_DRIVE_LAYOUT
as the control code should be able to retrieve the partitions
defined on a disk.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/ioctl_disk_get_drive_layout.asp
Unpacking the output buffer may get a little messy, though.

    hth
         Roger 



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----



More information about the Python-list mailing list