I looked in regards to whoami in hopes of finding the information from a different angle. Maybe you could parse the info from the actual 'whoami' command. Sloppy,I know, but...
>What I am trying to retreive is the name of the server that answered to the logon. I know there is an article at Microsoft (Q151774) that does waht I want but it only works on Windows NT, this is called NetUser GetInfo api.
~Joe Johnston USA
"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams