Terminal server - unique client ID

Posted on 2002-03-20
Last Modified: 2012-06-27
how can i get a unique client id ?
is there an api ?

i tried the following :

WTS_INFO_CLASS WTSInfoClass = WTSClientBuildNumber;
int rc = QuerySessionInformation(WTS_CURRENT_SERVER_HANDLE,WTS_CURRENT_SESSION,WTSInfoClass,&pBuffer,&pBytesReturned);

but its not a unique because 2 computers that connected with terminal server had the same number.

Question by:hgil
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

omk earned 300 total points
ID: 6884372
And why not to use user specific functions?
it is like 1-2-3
1.The WTSEnumerateSessions function retrieves a list of sessions on a specified terminal server.
WTS_SESSION_INFO structures. Each structure in the array contains information about a session on the specified terminal server
2.The WTSQueryUserToken function obtains the primary access token of the logged-on user specified by the session ID
3.The WTSQueryUserConfig and WTSSetUserConfig functions enable you to set and retrieve configuration information for a specified user account. The WTS_CONFIG_CLASS enumeration type defines the user configuration parameters.
LVL 11

Expert Comment

ID: 8905177
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
[accept omk]
Please leave any comments here within the next seven days.
EE Cleanup Volunteer

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Loss of RDP via 4 256
Domain Controller all of a sudden stop replicating 3 466
Corrupted W2K  serverregistry 2 164
Repair old Windows 2000 boot 15 250
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
The goal of this blog is: - To define the incident management process - To go over the key elements of an incident management system - To look into incident alert management tools that integrate with ConnectWise.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question