Switching WSAIoctl over to using overlapped I/O in VB6

已取消 已发布的 6 年前 货到付款
已取消 货到付款

I have a sample project that uses WSAIoctl and SIO_RCVALL to perform packet sniffing. However, it uses WSAAsyncSelect to send message to a window. This causes numerous issues for me because it's a form of subclassing, so I'd like to use switch to using a "completion routine" [url removed, login to view] lpCompletionRoutine is not NULL, the hEvent parameter is ignored and can be used by the application to pass context information to the completion routine. A caller that passes a non-NULL lpCompletionRoutine and later calls WSAGetOverlappedResult for the same overlapped I/O request may not set the fWait parameter for that invocation of WSAGetOverlappedResult to TRUE. In this case, the usage of the hEvent parameter is undefined, and attempting to wait on the hEvent parameter would produce unpredictable results.

About the WSAIoctl API:

[url removed, login to view](v=vs.85).aspx

I believe this is what I'm wanting, and this is from the link above:

---"If lpCompletionRoutine is not NULL, the hEvent parameter is ignored and can be used by the application to pass context information to the completion routine. A caller that passes a non-NULL lpCompletionRoutine and later calls WSAGetOverlappedResult for the same overlapped I/O request may not set the fWait parameter for that invocation of WSAGetOverlappedResult to TRUE. In this case, the usage of the hEvent parameter is undefined, and attempting to wait on the hEvent parameter would produce unpredictable results."---

Also please don't worry about outputting the data sample to that tree control. Just add a ListBox or something and fill it with data received from the completion routine. You can use a Timer control to cause the completion routine to fire if there are any incoming packets in the queue. I believe that's how it works.

Also, I'd like to see the options RCVALL_ON and RCVALL_IPLEVEL used so I can see the difference of what they output. They use a custom constant for their variable called SIO_RCVALL (in the sample app you can DL), but I want to see if RCVALL_IPLEVEL captures what I need and not need to enable promiscuous mode on the NIC. I would also like the SIO_RCVALL variable to be properly defined. Instead of being &H98000001, there should be a Type structure or something I assume and build SIO_RCVALL from that so I can see all of the different options to choose from.

I've included the current sample app source code. I disabled filling in the tree because it's very inefficient and locks up the app if too much network traffic is going through. That's one of the reasons I want to switch this over to a completion routine that I can control. But I do leave the counters so you can see something's happening. They're not slow like the tree control.

Although I shouldn't have to say it, I need this to be all VB6. No DLL's, no other languages whatsoever. Also, please don't bid over the budget amount of $120. It just wastes everyone's time, because $120 is all I can afford. And if you're sure you can do it, please bid $120. Thanks!

软件构架 Visual Basic

项目ID: #14579748

关于项目

3个方案 远程项目 活跃的6 年前

授予:

wangbeizou

Hello. How are you today. I have read and understood this task. Relevant Skills and Experience And I'm expert in VB Proposed Milestones $120 USD - milestone I wait for your good reply. Thanks.

$120 USD 在3天内
(69条评论)
5.7

有3名威客正在参与此工作的竞标,均价$131/小时

MetaoriginLab

Though I am new here but my team has 4 years of experience into Website Design and Development across all Platforms especially on . Can very well execute this Project and can start immediately.

$139 USD 在3天内
(2条评论)
1.8