Solved

Layered Service Provider for Windows(LSP)

Posted on 2004-08-19
3
365 Views
Last Modified: 2013-12-19
Hi,

I am creating a Layered Service Provider for windows to check outgoing packets.

When I am in the WSPSend function I look through the data and if it meets a certain condition,
I am interested in connecting the socket up to my listening server on Windows, so that instead of the packet
being sent out to the website, it goes to my server.

Do you by chance know how to reconnect the socket without causing errors in the programs that
made the connection, to the listening server I created. <-- want to reconnect the socket within the WSPSend function of my lsp dll, so the packet can be sent to my server instead.

 I tried connect, but throws a -1 error.

Thanks,
Matt
0
Comment
Question by:JaffaLink
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 37

Accepted Solution

by:
bbao earned 125 total points
ID: 11875283
"If no error occurs and the send operation has completed immediately, WSPSend returns zero. Note that in this case the completion routine, if specified, will have already been queued. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code is available in lpErrno. The error code WSA_IO_PENDING indicates that the overlapped operation has been successfully initiated and that completion will be indicated at a later time. Any other error code indicates that no overlapped operation was initiated and no completion indication will occur."

http://msdn.microsoft.com/library/en-us/winsock/winsock/wspsend_2.asp

so, which error code's value is -1, could you please clarify? thanks, bbao
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is in response to a question (http://www.experts-exchange.com/Networking/Network_Management/Network_Analysis/Q_28230497.html) here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question