Am Sam, 2002-11-23 um 02.11 schrieb Ryan Reading:
The software that I have is using Overlapped (asynchronous) I/O for communication of an IR port. The software makes WriteFile(), ReadFile(), and GetOverlappedResult() calls. However, before making any of the calls, the software does NOT initialize the hEvent member of the OVERLAPPED structure that is passed to the functions (it just zeroes the entire structure). Apparently the Win32 implementation of this is OK, but it is pretty obvious that the Wine implementation will not work with hEvent == 0.
What we could (relatively) easily do is
1 ) Do not return an error condition if hEvent == NULL. 2 ) Handle hEvent == NULL correctly elsewhere ( in particular, in the async handler where the event would normally be set ). 3 ) In GetOverlappedResult(), simply skip the waiting for hEvent == NULL.
This may not be enough though.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/bas...
says that for NT/2000,XP, "if the hEvent member of the OVERLAPPED structure is NULL, the system uses the state of the hFile handle to signal when the operation has been completed". I doubt that wine can (easily) support this behavior, but I'm not sure.
Please tell me if you think 1-3 would suffice for you.
Martin
PS: Please use plain-text email next time.