Clipper 5.2e and OS_ISWTSCLIENT() ??

Post Reply
Horizon
Posts: 997
Joined: Fri May 23, 2008 1:33 pm

Clipper 5.2e and OS_ISWTSCLIENT() ??

Post 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,
Regards,

Hakan ONEMLI

Harbour & VS 2019 & FWH 20.12
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

Post by Antonio Linares »

Hakan,

You may use:

#define SM_REMOTESESSION 4096

MsgInfo( GetSysMetrics( SM_REMOTESESSION ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Horizon
Posts: 997
Joined: Fri May 23, 2008 1:33 pm

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

Post by Horizon »

Thanks Antonio,

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

Hakan ONEMLI

Harbour & VS 2019 & FWH 20.12
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

Post by Antonio Linares »

Hakan,

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

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

Post by Antonio Linares »

Hakan,

Maybe this may help you:

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

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

Antonio Linares
www.fivetechsoft.com
Horizon
Posts: 997
Joined: Fri May 23, 2008 1:33 pm

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

Post 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

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... 
 
Regards,

Hakan ONEMLI

Harbour & VS 2019 & FWH 20.12
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

Post 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 ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply