If a program is designed to get the information about the dial-up connection or a virtual private network by using the Win32_NetworkAdapterConfiguration class on Windows XP, it may not work on Windows Vista and later.
For more information about the Win32_NetworkAdapterConfiguration class, see the following MSDN documentation:
Microsoft has confirmed that this to be a problem in our product.
It would be highly appreciated if you consider that either of the following method is acceptable.
1. Use the .NET Framework NetworkInterface class.
Use the NetworkInterface.GetAllNetworkInterfaces method to get a NetworkInterface array. Then, go through the NetworkInterface array to find a NetworkInterface instance that has the NetworkInterface.NetworkInterfaceType property set as Ppp. Each value of a PPPoE or VPN connection can be retrieved by referencing each property that this instance has.
For more information on the NetworkInterface class or the sample code for this, see the following MSDN documentation:
For more information on each property of the NetworkInterface class, see the following MSDN documentation:
2. Use the GetAdaptersAddresses API.
Use the GetAdaptersAddresses API to get the IP_ADAPTER_ADDRESSES structure. Then, go through the linked list of IP_ADAPTER_ADDRESSES structures to find an element that has the IfType member set as IF_TYPE_PPP. Each value of a PPPoE or VPN connection can be retrieved by referencing each member of the element.
For more information on the GetAdaptersAddresses API or the sample code for this, see the following MSDN documentation:
For more information on each member of the IP_ADAPTER_ADDRESSES structure, see the following MSDN documentation:
Raksta ID: 2549091. Pēdējo reizi pārskatīts: 2011. gada 10. maijs. Pārskatījums: 1