From: Henry N. <Henry.Ne@Arcor.de> - 2007-06-04 20:15:27
|
Ming-Ching Tiew wrote: > Any pointer to how to programmatically enumerate Windows > Local area network connections ? > > This registry seems to hold the connection names :- > > [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325- > 11CE-BFC1-08002BE10318}\{07209320-113C-4A5F-9F22-D393FDCFAB25}] > > But it seems to hold some old connections which I have already removed > already. > > In a computer where I have 2 network cards, there are some older entries > which I have already removed. > > Where else I should search in the registery for the current connections > available ? Your registry path is ok, coLinux use this as NETWORK_CONNECTIONS_KEY. Think, you can not get it by registry only. This are the names only, not the connection state. See into source of coLinux src/colinux/os/winnt/user/conet-bridged-daemon/main.c The function "pcap_init" does search a connected interfaces, if no name was given. See also the function 'GetInterfaceInfo' on MSDN and the return as IP_INTERFACE_INFO->Adapter[i].Name -- Henry |