Ejemplo n.º 1
0
        private IPAddress GetClientIPAddress()
        {
            var clientAddress = NativeMethodsHelper.QuerySessionInformationForStruct <WTS_CLIENT_ADDRESS>(
                _server.Handle, _sessionId, WTS_INFO_CLASS.WTSClientAddress);

            return(NativeMethodsHelper.ExtractIPAddress(clientAddress.AddressFamily, clientAddress.Address));
        }
Ejemplo n.º 2
0
        private IPAddress GetSessionIPAddress()
        {
            var sessionAddress =
                NativeMethodsHelper.QuerySessionInformationForStruct <WTS_SESSION_ADDRESS>(_server.Handle, _sessionId,
                                                                                           WTS_INFO_CLASS.WTSSessionAddressV4);

            return(NativeMethodsHelper.ExtractIPAddress(sessionAddress.AddressFamily, sessionAddress.Address));
        }