> > One big thing with VB is that it _doesn't_ support > multi-threading. Multi > > threading happens if you use callback functions (like pcap_loop). > > This is wrong: pcap_loop (and all the other APIs for > receiving packets) do > not make use of any thread: they are simply blocking, and > they execute your > callback whenever a packet is received from the kernel driver.
OK, I didn't remember that. Windows API callbacks use multi-threading. > Regarding PacketGetAdapterNames, beware two important things: > > 1. I don't know the marshaling provided by VB, but pStr is > NOT a single > string, it's a bunch of ANSI strings, terminated by a double NULL. VB string is something like char array. --- Dim adapters as string Dim adapters_lenght as long Adapters = space(1024) Adapters_lenght = 1024 PacketGetAdapterNames(adapters, adapters_lenght) --- Then just split adapters at chr(0) and parse. Anssi ================================================================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/[EMAIL PROTECTED]/ To unsubscribe use mailto: [EMAIL PROTECTED] ==================================================================