Below is two UDFs that do basically the same thing as Glenn's UDF does, it just gets the data differently.

EnmumNetworkConnections - http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=139601#Post139601
GetIPOptions - http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=159170#Post159170

How to use UDFs -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=81943#Post81943

The rest of the UDFs are here -
http://www.kixtart.org/forums/ubbthreads.php?ubb=postlist&Board=7&page=1

The second example in GetIPOptions() header should be a very good start to get you going. I'd also be interested in what line 104 is in your code that you had the error. Glenn doesn't generally post buggy UDFs.