FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper Clipper 5.2e and OS_ISWTSCLIENT() ??
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Clipper 5.2e and OS_ISWTSCLIENT() ??
Posted: Thu Feb 26, 2009 08:58 AM

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 & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Clipper 5.2e and OS_ISWTSCLIENT() ??
Posted: Thu Feb 26, 2009 01:00 PM

Hakan,

You may use:

define SM_REMOTESESSION 4096

MsgInfo( GetSysMetrics( SM_REMOTESESSION ) )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Clipper 5.2e and OS_ISWTSCLIENT() ??
Posted: Thu Feb 26, 2009 02:59 PM

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 & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Clipper 5.2e and OS_ISWTSCLIENT() ??
Posted: Thu Feb 26, 2009 03:27 PM

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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Clipper 5.2e and OS_ISWTSCLIENT() ??
Posted: Thu Feb 26, 2009 03:29 PM

Hakan,

Maybe this may help you:

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

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

&

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Clipper 5.2e and OS_ISWTSCLIENT() ??
Posted: Thu Feb 26, 2009 03:50 PM
Thanks Antonio,

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

Can anybody translate it to English.
Code (fw): Select all Collapse
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 & MSVC 2022 & FWH 23.06
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Clipper 5.2e and OS_ISWTSCLIENT() ??
Posted: Thu Feb 26, 2009 07:05 PM
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

Continue the discussion