ws2_32: Add support and tests for WSARecvMsg and IP_PKTINFO.

Erich Hoover ehoover at
Wed Oct 20 22:40:16 CDT 2010

On Mon, Oct 18, 2010 at 8:58 PM, Mike Kaplinskiy
<mike.kaplinskiy at> wrote:
> On Sun, Oct 17, 2010 at 5:51 PM, Erich Hoover <ehoover at> wrote:
>> ...
>> That's why in the original version I had those parameters split out;
>> however, I realized that since the length parameter gets modified by
>> WSARecvMsg that it is impossible for the WSAMSG structure (or any of
>> its parameters) to disappear before WSARecvMsg completes.  I have
>> re-written the tests (see patch 4 at the end) to show that this
>> structure gets modified even when an overlapped request is used and
>> results in modification of the structure at a later time, the results
>> from the test bot can be found here:
> Fair enough. Would you mind adding a test to see if the flags are
> changed as well (and see if the flags returned by
> WSAGetOverlappedResult are of that sort as well)? If it doesn't you
> can drop lpFlags and just copy it from flags. Otherwise you may want
> to rename it to be less windows-y (like local_flags and flags).

I'm not entirely following you here, but if I understand you correctly
then the lpFlags is appropriate.  The flags in the WSAMSG structure
get modified while the WSAGetOverlappedResult flags do not (which
works "as is" since the overlapped version of the flags is not a
pointer).  I've changed the patch around a little so that the pointer
version is only used when appropriate (and added tests for this

Erich Hoover
ehoover at

More information about the wine-devel mailing list