Re: [python-win32] 8G USB sector number

2012-08-09 Thread Jane Chen
My bad. I should use 'Q' instead of 'LL'. Thank you Tim! Jane Jane Chen wrote: Hi all, I would like to get total sector number of my disk. However, I found that I cannot get 8G sectors because of the buffer size.   I only got 4G.           buf_fmt='LL'                             

[python-win32] 8G USB sector number

2012-08-08 Thread Jane Chen
Hi all, I would like to get total sector number of my disk. However, I found that I cannot get 8G sectors because of the buffer size. I only got 4G. buf_fmt='LL' buf_size=struct.calcsize(buf_fmt) buf=win32file.DeviceIoControl(h, winioctlcon.IOCTL_DISK_GET_LENGTH_INFO, None, buf_size, None)

Re: [python-win32] 8G USB sector number

2012-08-08 Thread Tim Roberts
Jane Chen wrote: Hi all, I would like to get total sector number of my disk. However, I found that I cannot get 8G sectors because of the buffer size. I only got 4G. buf_fmt='LL' buf_size=struct.calcsize(buf_fmt)