Solved

Layered Service Provider for Windows(LSP)

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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
Configure File History in Windows 10 Pro 13 102
Exchange 2010 smtp and senderbase ratings 3 71
Download Speeds - Speedtest is fast, everything else is slow 31 155
AD Account Lockout 22 62
FIPS stands for the Federal Information Processing Standardisation and FIPS 140-2 is a collection of standards that are generically associated with hardware and software cryptography. In most cases, people can refer to this as the method of encrypti…
The Need In an Active Directory enviroment, the PDC emulator provide time synchronization for the domain. This is important since Active Directory uses Kerberos for authentication.  By default, if the time difference between systems is off by more …

740 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