From: Remko on
With WTSQuerySessionInfo you can query the client address by passing in the
WTSClientAddress constant. This returns a _WTS_CLIENT_ADDRESS structure:
typedef struct _WTS_CLIENT_ADDRESS { DWORD AddressFamily; BYTE Address[20];
} WTS_CLIENT_ADDRESS, *PWTS_CLIENT_ADDRESS;

I tried using RtlIpv6AddressToString but that doesn't return a valid
address. Please suggest how to convert.
From: Kerem G�mr�kc� on
Hi Remko,

> I tried using RtlIpv6AddressToString but that doesn't return a valid
> address. Please suggest how to convert.

i am not sure but if the byte array is a array representing the address in
network byte order, then you can use the socket functions for the Winsock
API that comes with Windows Socket Library. As said: I am not sure, but
i think ity is in the network byte order. I've never used that function
before,...

There are functions like WSAAddressToString() or gethostbyaddr() and
somevmore that can help you and i think they will,...

Ah ok, my fault! Now i see wat kind of function this is. Did you try the
Ex-Version
or did you try to Get some Error Code? I dont know whether GetLastError()
will
work for this, since the documentation doesnt say anything about it, but a
return
value for the function which can be used for error lookup.

If it returns a error code try my tool for fast error code translation if
you want.
Very handy if you dont want to do extra coding for FormatMessage in such
situtations,...

http://entwicklung.junetz.de/projects/opensource/WindowsExceptionViewer/WindowsExceptionViewer.zip


Cheers,...

Kerem

---------
New Open Source Tools from me:
Calculate MD5 or SHA1 Hash for Files!
KHash Tools:
http://entwicklung.junetz.de/projects/opensource/khashtools/khashtools%20v.1.0.zip


---------

--


Beste Gr�sse / Best regards / Votre bien devoue

Kerem G�mr�kc�
kerem.g(a)arcor.de

Best Quote: "Ain't nobody a badass with a double dose
of rock salt...", Kill Bill Vol.2

Latest Open-Source Projects: http://entwicklung.junetz.de
Sign my guestbook: http://entwicklung.junetz.de/guestbook/

-----------------------
"This reply is provided as is, without warranty express or implied."


From: Remko on
The function returns success but the output is nonsense. Documentation states
that IP starts at an offset for 2 bytes but is unclear if this is for IPv4
only or also for IPv6.
From: Kerem G�mr�kc� on
Hi,

can you give us a memory dump from the returned
structure. It would be interessting what the structure
did return,...

Regards

Kerem

--
---------
New Open Source Tools from me:
Calculate MD5 or SHA1 Hash for Files!
KHash Tools:
http://entwicklung.junetz.de/projects/opensource/khashtools/khashtools%20v.1.0.zip
---------


Beste Gr�sse / Best regards / Votre bien devoue

Kerem G�mr�kc�
kerem.g(a)arcor.de

Best Quote: "Ain't nobody a badass with a double dose
of rock salt...", Kill Bill Vol.2

Latest Open-Source Projects: http://entwicklung.junetz.de
Sign my guestbook: http://entwicklung.junetz.de/guestbook/

-----------------------
"This reply is provided as is, without warranty express or implied."


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

Address part:
182530000010000000000710