Consider the following scenario:
- You are running a Windows Vista-based computer or a Windows Server 2008-based computer.
- The computer has multiple IP addresses.
- You run the gethostbyname function.
In this scenario, the gethostbyname function returns the IP addresses in numeric order. Therefore, the IP address that has the lowest number is returned first. You expect the primary IP address to be returned first.