Solved

Layered Service Provider for Windows(LSP)

Posted on 2004-08-19
3
341 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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
An article on effective troubleshooting
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

816 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now