Filip Navara wrote:
I think that
is a bug in the rpcrt4 implementation. The receive and send
functions do check for a pending io request in a wrong way.
It's not impossible, but the code works just fine on Windows and
Wine... Can you point me to the code you think is wrong?
rpc_message calls ReadFile/WriteFile for pipes which are open for
asynchronous requests. ReadFile/WriteFile can fail for an pending
request. If it fails, the caller must check the last status
(GetLastError()) for ERROR_IO_PENDING. An other problem is the using of
the overlapped structure. The same structure is used for read and write
requests. Sometimes the results from a write request is interpreted as a
result from a read request. It is also a bug in GetOverlappedResult.
GetOverlappedResult must always check if the event is signaled. The
status value may contain the result from the previous request.
- Hartmut