by AlexSchaft » Wed Jun 14, 2006 2:38 am
Hi,
Thanks for that.
I'm also trying out WTSQuerySessionInformation for the client's ip address, but dont' seem to come right (c is not my strong point).
Below a snippet of my attempt.
#pragma begindump
#include <WinTen.h>
#include <Windows.h>
#include <ClipApi.h>
#ifdef __FLAT__
#include <ShellApi.h>
#endif
#ifdef __HARBOUR__
#include <hbapiitm.h>
#include <hbdate.h>
#include <hbset.h>
#endif
#include "wtsapi32.h"
LPWSTR AnsiToWide( char * );
HB_FUNC( GETIPADDRESS )
{
BOOL bReturn;
WTS_CLIENT_ADDRESS *ClientAddress;
DWORD BytesReturned;
bReturn = WTSQuerySessionInformation(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, 16384, (char * *) ClientAddress, &BytesReturned);
}
#pragma enddump