[python-win32] Handle to a Driver

Chi Tai me at chi-tai.info
Mon Apr 4 19:15:16 CEST 2005


Cool, thanks a lot :)

this is absolutely the better solution.

  Chi-Tai

Tim Roberts schrieb:

>  Chi Tai wrote:
>
> > Thanks Tim,
> >
> > i also tried this, but this call returns the following error:
> > "DeviceIoControl() argument 3 must be string or read-only buffer,
> > not int"
>
>
>
>  Yes, I should have realized. You need to convert this into a
>  4-byte string:
>
>  import struct handle = struct.pack("<L", ReadEvent.handle ) ret =
>  DeviceIoControl( hDevice, IOCTL_SET_READ_EVENT, handle, 0, None )
>



More information about the Python-win32 mailing list