jgonzale
May 25th, 2001, 03:13 PM
Hi, all. First time I saw this forum. I'm a newbie to Active X programming and have only been doing VB for a couple of months. Anyway...
Here's what I Want:
I want to monitor two networks simultaneously using two network adapter cards in the PC. I have to sniff the networks, meaning I can't use anybody's controls because, I need to see UDP broadcast and point to point. I found out Winsock 2 has a parameter for WSAIoctrl - RCV_ALL, that allows this.
What I am doing: (may not be correct...any suggestions)
I am coding in raw Win sockets but for Winsock 2. I am converting/translating all API function calls in the Platform SDK to VB (FUN :( since I can't use/find a control that will see everything/sniff. So far everything is going well, I only started on Monday. But, since I need two instances, one for each network adapter card, I coded it so far as an ActiveX DLL. I am almost at point of receiving data.
Here is the question. If I am creating two instances of my ActiveX object from my Main application form, are they running in seperate threads from my Process thread which should be the main form???? I hope this is the case because I would like the ActiveX dll objects to be blocking, only receive data and notify my Main with a receive event. then I can get the data from that object and move into a local buffer for processing, or send the data as a string within the raised event. Will this work?
If they are not separate threads then I expect that the Main application program GUI and form will appear to be locked up and I'll have to do something different.
Here's what I Want:
I want to monitor two networks simultaneously using two network adapter cards in the PC. I have to sniff the networks, meaning I can't use anybody's controls because, I need to see UDP broadcast and point to point. I found out Winsock 2 has a parameter for WSAIoctrl - RCV_ALL, that allows this.
What I am doing: (may not be correct...any suggestions)
I am coding in raw Win sockets but for Winsock 2. I am converting/translating all API function calls in the Platform SDK to VB (FUN :( since I can't use/find a control that will see everything/sniff. So far everything is going well, I only started on Monday. But, since I need two instances, one for each network adapter card, I coded it so far as an ActiveX DLL. I am almost at point of receiving data.
Here is the question. If I am creating two instances of my ActiveX object from my Main application form, are they running in seperate threads from my Process thread which should be the main form???? I hope this is the case because I would like the ActiveX dll objects to be blocking, only receive data and notify my Main with a receive event. then I can get the data from that object and move into a local buffer for processing, or send the data as a string within the raised event. Will this work?
If they are not separate threads then I expect that the Main application program GUI and form will appear to be locked up and I'll have to do something different.