You're not passing in a host name above, which is what the method is looking for.
ftp:// is the protocal, not part of the host name. The above code will work with just "www.codeproject.com", but you can't be sure that there is an IP address.
If you're lucky - that is to say, if the host name for ftp is indeed "ftp" and you can guess the port they would be using - then you write some
nslookup[
^] code and get the list of hostnames for the domain.
If "ftp" appears in the hostname you could look that up with your code above (less the "ftp://").
Finally, for the ISP and address you'll need to look that up with ARIN.
Cheers.