What's the best way of getting an IP address from a DNS name?

I seem to remember a call GetRemoteAddress . . . .