Rob Martin asked us:

> Our app has been displaying the NetBIOS name of each client computer
> in its log.  However in a Terminal Server environment the
> GetComputerName API (that we use to get the name) always returns the
> TS Server computer and is therefore the same for all TS users.  I
> have tried  GetComputerNameEx but that does not seem to provide the
> desired information either.  Does anybody have any suggestions as to
> how to achieve this?

You need to use the WTSQuerySessionInformation call located in the
wtsapi32.dll. Have a look at the relevant MSDN documentation for more on how
this stuff. From it you can extract the name of the machine that is
displaying the session that you are running in.

Cheers, Max.


_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to