Issue 70 in cassia: Add a property to ITerminalServicesSession to fetch the session's virtual IP address

5 views
Skip to first unread message

cas...@googlecode.com

unread,
Jul 18, 2013, 7:48:44 PM7/18/13
to cassi...@googlegroups.com
Status: Accepted
Owner: danports
Labels: Type-Enhancement Priority-Medium Milestone-2.1

New issue 70 by danports: Add a property to ITerminalServicesSession to
fetch the session's virtual IP address
http://code.google.com/p/cassia/issues/detail?id=70

Like this:

// VirtualIP.cpp : Defines the entry point for the console application.

#pragma comment(lib,"Wtsapi32.lib") // Library for WTS functions

#include "stdafx.h"
#include "windows.h"
#include "Wtsapi32.h"

int _tmain(int argc, _TCHAR* argv[])
{

PWTS_SESSION_ADDRESS wAddr = NULL;
DWORD dwBytes = 0;

// Use WTS_CURRENT_SERVER_HANDLE and
// WTS_CURRENT_SESSION to get just our virtual address

if(WTSQuerySessionInformation(WTS_CURRENT_SERVER_HANDLE,
WTS_CURRENT_SESSION, WTSSessionAddressV4,
(LPWSTR*)&wAddr, &dwBytes))
{

//wAddr->AddressFamily is always 2 (AF_INET)
printf("Family: %d\n",wAddr->AddressFamily);
printf("Address: %d.%d.%d.%d\n",wAddr->Address[2],
wAddr->Address[3],wAddr->Address[4],wAddr->Address[5]);
} else
{
printf("WTSQuerySessionInformation failed.
GLE=%d\n",GetLastError());
}
return 0;

}

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

cas...@googlecode.com

unread,
Jul 18, 2013, 9:56:49 PM7/18/13
to cassi...@googlegroups.com
Updates:
Status: Duplicate
Mergedinto: 49

Comment #1 on issue 70 by danports: Add a property to
ITerminalServicesSession to fetch the session's virtual IP address
http://code.google.com/p/cassia/issues/detail?id=70

(No comment was entered for this change.)
Reply all
Reply to author
Forward
0 new messages