Red Gate forums :: View topic - RECVFROM
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
PInvoke.Net
PInvoke.Net forum

RECVFROM

Search in PInvoke.Net forum
Post new topic   Reply to topic
Jump to:  
Author Message
Blop



Joined: 14 May 2014
Posts: 2

PostPosted: Wed May 14, 2014 8:14 am    Post subject: RECVFROM Reply with quote

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:

        [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 !
Back to top
View user's profile Send private message
Blop



Joined: 14 May 2014
Posts: 2

PostPosted: Wed May 14, 2014 8:27 am    Post subject: Reply with quote

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).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group