【Winsock】Hook WSASend/WSARecv

MSDN: If both lpOverlapped and lpCompletionRoutine are NULL, the socket in this function will be treated as a nonoverlapped socket.

The way my target application(another process) uses is something like 'call WSASend(a, b, c, d, NULL, NULL)',
so it will be treated as a nonoverlapped socket.

But the application used WSAAsyncSelect and WSAEventSelect, as a result,
if I hook WSASend and replace it with Hook_WSASend(a filter, and in some cases it don't call original WSASend), I have to notify the app myself.

So I just want to know how WSASend send notification such as completion message, FD_XXXX events and so on?


Solutioncall WSASendDisconnect / WSARecvDisconnect before return.

你可能感兴趣的:(【Winsock】Hook WSASend/WSARecv)