How do I return a Client Name in my code (vb)?
Whether your code calls the GetComputerName() API or
System.Environment.MachineName, I think the key is what computer is actually
running the code. If you're already logged into the term server, these will
give you the name of the term server, I think. If you want to get the name
of the remote computer that's logged into term server, you'll have to go
another way.
If there is an SDK for Terminal Services (I don't know) you might find a
library for T/S that can give you the name of the remote client because it
seems to me that T/S should know who's connected.