I try to reading file with overlapped io, but it always fail.:(
1. I open a file in overlapped mode with CreateFile. Thats works fine.
2. I fill the ovl. ofs1,ofs2,hEvent tags to 0.
3. ReadFile(hFile, addr buff, sizeof buff, addr BytesRead, addr ovl);
this returns 0.
GetLastError returns 57h==>ERROR_INVALID_PARAMETER.
On MSDN in the ReadFile section i founded that on W98/ME ovl struct must be null, else the function returns
fail.I tryed it on XP but this doesn't work on it.
Can somebody help to me:confused:
1. I open a file in overlapped mode with CreateFile. Thats works fine.
2. I fill the ovl. ofs1,ofs2,hEvent tags to 0.
3. ReadFile(hFile, addr buff, sizeof buff, addr BytesRead, addr ovl);
this returns 0.
GetLastError returns 57h==>ERROR_INVALID_PARAMETER.
On MSDN in the ReadFile section i founded that on W98/ME ovl struct must be null, else the function returns
fail.I tryed it on XP but this doesn't work on it.
Can somebody help to me:confused:
At first glance it seems like you're doing things correctly. Is the ovl structure aligned to a 4-byte boundary? A lot of structures must be 4-byte aligned if you want your apps to work correctly under NT.
Code
... proc ...
LOCAL vars:DWORD
align dword
ovl:OVERLAPPED
...
This doesn't work. I programming in W98SE and i try the code in (&) XP prof.
ReadFile.GetLastError always return 57h. I tryed with CreateEvent, but this not work.:mad:
... proc ...
LOCAL vars:DWORD
align dword
ovl:OVERLAPPED
...
This doesn't work. I programming in W98SE and i try the code in (&) XP prof.
ReadFile.GetLastError always return 57h. I tryed with CreateEvent, but this not work.:mad: