RECVFROM

Announcements and discussion for PInvoke

Moderators: Luke Jefferson, Robert

RECVFROM

Postby Blop » Wed May 14, 2014 8:14 am

Hello,

I didn't found the recvfrom function at pinvoke.net, so I thought it would be nice to add it since there already is the sendto function present (see http://pinvoke.net/default.aspx/ws2_32/SendTo.html).

This is what I think should be correct, however, I am not sure about the last parameter :

Code: Select all
        [DllImport("ws2_32.dll")]
        public static extern int recvfrom(IntPtr Socket, IntPtr buf, int len, SendDataFlags flags, ref SockAddr from, IntPtr fromlen);

        public static int recvfrom(IntPtr Socket, IntPtr buf, int len, SendDataFlags flags, ref SockAddr from)
        {
            return recvfrom(Socket, buf, len, flags, ref from, IntPtr.Zero);
        }


I am basing the import on this signature : http://msdn.microsoft.com/en-us/library/windows/desktop/ms740120%28v=vs.85%29.aspx

And please, tell me when I am wrong. Bye !
Blop
 
Posts: 2
Joined: Wed May 14, 2014 8:02 am

Postby Blop » Wed May 14, 2014 8:27 am

Ok... I was just too stupid to see the 'Create Page' button on the p/invoke site.
Now, I created the page for recvfrom, still, it requires a checker because I am not sure about what I posted (@http://pinvoke.net/default.aspx/ws2_32/RecvFrom.html).
Blop
 
Posts: 2
Joined: Wed May 14, 2014 8:02 am


Return to PInvoke.Net

Who is online

Users browsing this forum: No registered users and 0 guests