OHM,
As Peter suggests, when you log into Terminal Server, the Terminal Server IS
the netbois machine name the user is logged into!
Do you mean the client PC where the Terminal Server client is running?
I have not tried it, but the WTSQuerySessionInformation API looks promising.
To get information from Terminal Server I understand you need to use
Terminal Services, which can be found at "Windows Development - Windows Base
Services - Terminal Services" it part of the Win32 API set. I really don't
know if the above is already exposed in the Framework or not.
Hope this helps
Jay
"OHM" <Me@NoWhere.Com> wrote in message
news:uz**************@tk2msftngp13.phx.gbl...
Hi Peter,
Basically we need to find the name of the User and the Netbios machine
name who has logged on to the terminal server. Ideally, the solution should be
a VB6 solution because thats what the code is written in, but if we can only
find a solution in .NET then we can user interop to get the info.
Cheers - OHM
""Peter Huang"" <v-******@online.microsoft.com> wrote in message
news:4T**************@cpmsftngxa10.phx.gbl... Hi Terry,
I do not understand your meaning very well. When we terminal to a remote
terminal server, all the process run in the terminal session is just
like we do when we logon to the terminal server locally. So if we call the
Getusername and getmachinename we will get the same result just as we do
locally on the server.
So can you tell me what do you want to do? What is your expected
behavior?
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no
rights.