Image

Imageyornick wrote in Imageru_python

win32file.WriteFile problem

Hi ppl
I use win32file to read to/write from a file
as usual I open handle and try to write like
WriteFile(h, 'test')
and get
pywintypes.error: (87, 'WriteFile', 'The parameter is incorrect.')
I guess the problem is that I use a string object
I can allocat b = AllocateReadBuffer(length)
and than it will be ok to run
WriteFile(h, b)
but how can I init b to be 'test'?
буду рад если кто-то подскажет как быть
Thanks