I have converted my packet analyzer program from vbPCap to winpkfil and it runs much better with less code. However, I have run across a snag when running it under Vista. I store the index for adlist in the registry, but the order of the interfaces reported by GetTcpipBoundAdaptersInfo seems to change in Vista. Sometimes it is the second device, and sometimes it is the third device. Is this an issue in Vista only?
In common the order of network adapters reported by WinpkFilter is not permanent. Network adapters are added into the list in the order of their initialization by the system, in most cases it is always the same for the particular system, but it is not guaranteed to be.
It is better to identify network interfaces by their internal names instead of the index in the network adapters list.
I have used this technique without a problem on XP, but Microsoft has completely rewritten the TCP/IP stack software and added support for IPv6. It is NDISWANIPV6 that seems to be causing the problem. It can take up a different position without even logging off (i.e. when waking up).