Click here to Skip to main content
15,902,938 members

Comments by vivek2414 (Top 1 by date)

vivek2414 25-Apr-18 10:36am View    
Thank you Richard. I have tried that but I get the same output. Here is the code:

if (WTSQuerySessionInformation(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSClientInfo, &ppBuffer, &dwSize))
{
    pWtsClientInfo = (PWTSCLIENTW)ppBuffer;
    for (int i = 0; i < 22; i++ )
        clientInfo += Convert::ToString(pWtsClientInfo->ClientName[i]);
}
else
{
    return "Failed";
}