Eryk,
Again, you expand my knowledge! It seems so obvious now after reading what you
wrote that I would not be able to get volume disk extents for a physical
partition but yet this is what I wanted to do because I was attempting to find
out the partition's offset on the disk.
Now, I think I s
On 2/9/21, Doug Campbell wrote:
>
> win32file.DeviceIoControl(hDevice,
> winioctlcon.IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS,
> None, extents, None)
> pywintypes.error: (1, 'DeviceIoControl', 'Incorrect function.')
>
> I have tried with all three of the disks on my system: \\.\PhysicalDrive0,
> \\.\
I am trying to get the disk extents given a disk number but I am getting back
the following error.
Traceback (most recent call last):
File "test2.py", line 29, in
win32file.DeviceIoControl(hDevice,winioctlcon.IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS,
None, extents, None)
pywintypes.error: (1
On 2/9/21, Doug Campbell wrote:
>
> That was exactly what I needed. I will have to read up on the _pack_
> directive to understand it but for now things are running the way they
> should be.
I'm glad I could help. Normally padding is added between fields of a
struct in order to support aligned a
Thanks Eryk!
That was exactly what I needed. I will have to read up on the _pack_ directive
to understand it but for now things are running the way they should be.
I did have one typo in what I originally pasted that made its way into what you
provided.
('volumeID', ctypes.c_wchar * VOLUME_ID