Einzelnen Beitrag anzeigen

Benutzerbild von Remko
Remko

Registriert seit: 10. Okt 2006
Ort: 's-Hertogenbosch, Die Niederlande
222 Beiträge
 
RAD-Studio 2010 Arc
 
#1

WTSQuerySessionInformation IPv6 address

  Alt 14. Nov 2007, 13:39
With the MSDN-Library durchsuchenWTSQuerySessionInformation API you can get the Client IP address of a Terminal Server client. On Vista and Windows Server 2008 this returns an IPv6 address in a pointer to a WtsClientAddress structure:
Code:
  _WTS_CLIENT_ADDRESS = record
    AddressFamily: DWORD;          // AF_INET, AF_IPX, AF_NETBIOS, AF_UNSPEC
    Address: array [0..19] of BYTE; // client network address
  end;
I want to convert the Address to a string but don't know how. I tried to use MSDN-Library durchsuchenRtlIpv6AddressToString API this succeeds but returns bogus.

My IPConfig:
IPv6 Address. . . . . . . . . . . : 1111:2222:1111:2222:1111:2222:1111:2222
Link-local IPv6 Address . . . . . : fe80::fd16:38fb:af7a:66c4%10

Dump of the Address byte array:
182530000010000000000710
Hex Dump: 7C F4 12 00 8B 1D 49 00 38 F4 12 00 AF 1E 49 00 7C F4 12 00

Anyone?
  Mit Zitat antworten Zitat