Clipper 5.2e and OS_ISWTSCLIENT() ??

Clipper 5.2e and OS_ISWTSCLIENT() ??

Postby Horizon » Thu Feb 26, 2009 8: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.04
Horizon
 
Posts: 1285
Joined: Fri May 23, 2008 1:33 pm

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

Postby Antonio Linares » Thu Feb 26, 2009 1:00 pm

Hakan,

You may use:

#define SM_REMOTESESSION 4096

MsgInfo( GetSysMetrics( SM_REMOTESESSION ) )
regards, saludos

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

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

Postby Horizon » Thu Feb 26, 2009 2: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.04
Horizon
 
Posts: 1285
Joined: Fri May 23, 2008 1:33 pm

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

Postby Antonio Linares » Thu Feb 26, 2009 3: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41206
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

Postby Antonio Linares » Thu Feb 26, 2009 3:29 pm

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
User avatar
Antonio Linares
Site Admin
 
Posts: 41206
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

Postby Horizon » Thu Feb 26, 2009 3:50 pm

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

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1285
Joined: Fri May 23, 2008 1:33 pm

Re: Clipper 5.2e and OS_ISWTSCLIENT() ??

Postby Antonio Linares » Thu Feb 26, 2009 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41206
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 5 guests