I'm trying to get the physical location of a file on the disk. This is the current code:
import win32file
import winioctlcon
handle = win32file.CreateFile(raw_input("File: "), win32file.GENERIC_READ, win32file.FILE_SHARE_READ | win32file.FILE_SHARE_WRITE, None, win32file.OPEN_EXISTING, win32file.FILE_ATTRIBUTE_NORMAL | win32file.FILE_FLAG_OVERLAPPED,None)
loc = win32file.DeviceIoControl(handle, winioctlcon.FSCTL_GET_RETRIEVAL_POINTERS,"",8192,None)
When I try to run the code, I get this error:
pywintypes.error: (87, 'DeviceIoControl', '\xfe\xfe\xe4\xf4\xf8\xee\xe8\xf8 \xf9
\xe2\xe5\xe9.')
This error is "Invalid Parameters". What parameters did I use wrong?