Page 1 of 1

Clipper 5.2e and OS_ISWTSCLIENT() ??

PostPosted: Thu Feb 26, 2009 8:58 am
by Horizon
Hi,

I use OS_ISWTSClient() function to Check if the application is running on a Windows Terminal Server client in my application that compiled in xHarbour Builder+FWH.

But I need it in my 16 bit application. Is it possible? Is there any function to check it?

Thanks,

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

PostPosted: Thu Feb 26, 2009 1:00 pm
by Antonio Linares
Hakan,

You may use:

#define SM_REMOTESESSION 4096

MsgInfo( GetSysMetrics( SM_REMOTESESSION ) )

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

PostPosted: Thu Feb 26, 2009 2:59 pm
by Horizon
Thanks Antonio,

My 16 bit DOS app. does not use fwh. Can I extract this function from it? Is GetSysMetrics() from Fwh.

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

PostPosted: Thu Feb 26, 2009 3:27 pm
by Antonio Linares
Hakan,

GetSysMetrics() is a shortname for the Windows API function GetSystemMetrics().

It won't work from a MsDos 16 bis app.

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

PostPosted: Thu Feb 26, 2009 3:29 pm
by Antonio Linares
Hakan,

Maybe this may help you:

getenv("CLIENTNAME")
getenv("SESSIONNAME")

http://www.pctoledo.com.br/forum/viewto ... f=4&t=6225

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

PostPosted: Thu Feb 26, 2009 3:50 pm
by Horizon
Thanks Antonio,

I already check CLIENTNAME and SESSIONNAME. But some VISTA computers behaves different.

Can anybody translate it to English.
Code: Select all  Expand view
A getenv("CLIENTNAME") no terminal service retorna o nome da máquina, beleza, já me ajuda... porém na rede local retorna "console", já a getenv("SESSIONNAME"), na rede local me retorna também "console", no terminal service, retorna: RDP-Tcp#... isso eu não entendi...

Posso conseguir o que quero com a variável CLIENTNAME... Mas, se alguém tiver uma forma de poder pegar o IP, seria melhor...
 

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

PostPosted: Thu Feb 26, 2009 7:05 pm
by Antonio Linares
Hakan,

Google translator produces this:

The getenv ( "clientname") in terminal service returns the name of the machine, beauty, I help ... But on the local network returns "console", since the getenv ( "SESSIONNAME"), returns on the local network I also "console" in the terminal service, returns: RDP-Tcp # ... I do not understand this ...

Can I achieve what I want with the clientname variable ... But if someone has a form you can get the IP, it would be better ...