Hey all,
I'm getting into overlapped i/o and using WSASendTo to send off my data. After reading some stuff on MSDN I get the impression that WSASendTo is a wrapper for WriteFileEx. Does anyone know if this is true? If it is, I'll switch to using WriteFileEx instead because it should theoretically be faster, and also I won't need winsock 2 this way. I could slide by on winsock 1.1 (just in case I have to support some old version of win95)


Do I have to call WSAWaitForMultipleEvents before and after I call WSASendTo?? It seems I need to call it before so that I know the WSASendTo will work, and I need to call it after to set the thread to alertable wait state to call my completion routine.
Posted on 2002-09-11 11:24:04 by chorus
Of course... it would help if I could get WriteFileEx to work...
Posted on 2002-09-11 15:59:35 by chorus
Ok... new question...
I can get WriteFileEx to send data out on a socket but I since I can't specify a port or desination IP with WriteFileEx, I'm not sure how to direct it anywhere. I tried using a raw socket and building the IP and UDP header myself, I also tried binding the port before the send, but neither seemed to work

Any ideas would be greatly appreciated

Posted on 2002-09-12 20:11:40 by chorus
Close :)
WSASendTo and WriteFileEx are both functions which utilize IO Control (IOCTL) functions. Specifically, _lwrite.
They both thunk down to the same function, because socket handles and file handles are both considered to be "IO handles" by WinOs, which really is a ripoff of Unix as we all know, where everything is a "file handle" :alright:
Posted on 2002-09-13 00:40:39 by Homer