Chi Tai wrote:
Cool, thanks a lot :)
this is absolutely the better solution.
The "struct" module is a very helpful tool when you're doing Win32 API
programming like this, especially with the new changes that make it more
difficult to manipulate binary values as dwords. It would be worth your
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. Y
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("
ret = Devi
On Sun, 03 Apr 2005 13:32:01 +0200, Chi Tai <[EMAIL PROTECTED]> wrote:
i've found the faulty.
For those interested in: win32file.DeviceIoControl transfers a string or
character array, thus a numerical value like a handle is also transfered
as a character array and the cast operation within the driv
i've found the faulty.
For those interested in: win32file.DeviceIoControl transfers a string or
character array, thus a numerical value like a handle is also transfered
as a character array and the cast operation within the driver does not
result in a valid handle.
str(ReadEvent) would give you a
> Python:
> ReadEvent = CreateEvent ( None, 0, 0, None )
> ret = DeviceIoControl (hDevice, IOCTL_SET_READ_EVENT, str(ReadEvent),
> 0, None)
str(ReadEvent) would give you a string with something like ''.
It seems unlikely to me that this is your intention. Maybe
str(int(ReadEvent)) - this would ju
Hello list,
maybe someone can help me. I am writing an application, which uses the
win32event.CreateEvent to create a synchronisation event which handle is
then stored in a PyHANDLE.
This handle is then submitted with DeviceIoControl to a Driver which
calls the Function ObReferenceObjectByHandle to