This article shows how to get to this info using WMI and old fashioned VB (page 3 mentions pipe configuration):
http://www.docstoc.com/docs/4204611/WMI-for-SQL-Server-Philip-Pursglove-SQL-Server-comes
this article shows how to use WMI from C#:
http://www.csharphelp.com/archives2/archive334.html
and this article...