On Fri, Nov 19, 2010 at 11:27 AM, Dongsheng Song
<[email protected]> wrote:
> On Fri, Nov 19, 2010 at 16:56, Jeroen Asselman <[email protected]> wrote:
>> Hello,
>>
>> Currently I am porting an existing Linux program to windows which is
>> heavily network oriented.
>> Almost all code is ported, however I also need a replacement for the
>> recvmsg method in linux. Searching the MSDN docs I found WSARecvMsg,
>> allthough it is included in mingws mswsock.h I can't succesfully compile
>> it because the reference to the method is missing:
>>
>> undefined reference to `wsarecv...@20'
>>
>> The libraries linked are:
>>  -lwsock32 -lregex -lz -liconv -lws2_32 -lmswsock
>>
>> Is it at all possible to use WSARecvMsg? Or am I forgetting another
>> library I should link against.
>>
>> - Jeroen
>>
>
> According MSDN page:
>  http://msdn.microsoft.com/en-us/library/ms741687%28VS.85%29.aspx
>
> WSARecvMsg in mswsock since Windows Server 2003,
> but It's very strange both mingw32 and mingw-w64 not include it.

On the page you referred, it says:
"Note  The function pointer for the WSARecvMsg function must be
obtained at run time by making a call to the WSAIoctl function with
the SIO_GET_EXTENSION_FUNCTION_POINTER opcode specified. The input
buffer passed to the WSAIoctl function must contain WSAID_WSARECVMSG,
a globally unique identifier (GUID) whose value identifies the
WSARecvMsg extension function. On success, the output returned by the
WSAIoctl function contains a pointer to the WSARecvMsg function. The
WSAID_WSARECVMSG GUID is defined in the Mswsock.h header file."

As you can see in mswsock.h, it is only prototyped as a function
pointer, ie.  LPFN_WSARECVMSG.

--
O.S.

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to