Does somebody know how to resolve an IP address into a PC name and vice versa using calls to WINS or DNS?

I have IP addresses which I want o have names instead. I want to use VB code (or API calls) to call the WINS to (reverse) resolve this IP address into a PC name.

Thanks in advance.