?

Thanks.

--
William Fields
MCSD - Microsoft Visual FoxPro
US Bankruptcy Court
Phoenix, AZ

".dll hell - .rpm hell - whatever.
The grass is always greener"

Re: Detect the app is running under Terminal Services? by Josh

Josh
Wed Nov 30 12:51:50 CST 2005

http://www.jassing.com/binaries/tshelp.zip


On Wed, 30 Nov 2005 10:38:52 -0700, "William Fields"
<Bill_Fields@azb.uscourts.gov> wrote:

>?
>
>Thanks.


--- AntiSpam/harvest ---
Remove X's to send email to me.

RE: Detect the app is running under Terminal Services? by MichelRoy

MichelRoy
Wed Nov 30 13:07:03 CST 2005

PROCEDURE IsTerminalService
#DEFINE SM_REMOTESESSION 0x1000
* This system metric is used in a Terminal Services environment.
* If the calling process is associated with a Terminal Services client
session,
* the return value is nonzero.
* If the calling process is associated with the Terminal Server console
session,
* the return value is 0 (zero).
* The console session is not necessarily the physical console.
* For more information, see WTSGetActiveConsoleSessionId.
* Windows NT 4.0 SP3 and earlier and Windows Me/98/95: This value is not
supported.
DECLARE Integer GetSystemMetrics IN WIN32API Integer
RETURN GetSystemMetrics(SM_REMOTESESSION)
ENDPROC



"William Fields" wrote:

> ?
>
> Thanks.
>
> --
> William Fields
> MCSD - Microsoft Visual FoxPro
> US Bankruptcy Court
> Phoenix, AZ
>
> ".dll hell - .rpm hell - whatever.
> The grass is always greener"
>
>
>
>
>
>
>

Re: Detect the app is running under Terminal Services? by Josh

Josh
Wed Nov 30 15:39:38 CST 2005


I like it!

On Wed, 30 Nov 2005 11:07:03 -0800, "Michel Roy"
<MichelRoy@discussions.microsoft.com> wrote:

>PROCEDURE IsTerminalService
>#DEFINE SM_REMOTESESSION 0x1000
>* This system metric is used in a Terminal Services environment.
>* If the calling process is associated with a Terminal Services client
>session,
>* the return value is nonzero.
>* If the calling process is associated with the Terminal Server console
>session,
>* the return value is 0 (zero).
>* The console session is not necessarily the physical console.
>* For more information, see WTSGetActiveConsoleSessionId.
>* Windows NT 4.0 SP3 and earlier and Windows Me/98/95: This value is not
>supported.
> DECLARE Integer GetSystemMetrics IN WIN32API Integer
> RETURN GetSystemMetrics(SM_REMOTESESSION)
>ENDPROC
>
>
>
>"William Fields" wrote:
>
>> ?
>>
>> Thanks.
>>
>> --
>> William Fields
>> MCSD - Microsoft Visual FoxPro
>> US Bankruptcy Court
>> Phoenix, AZ
>>
>> ".dll hell - .rpm hell - whatever.
>> The grass is always greener"
>>
>>
>>
>>
>>
>>
>>


--- AntiSpam/harvest ---
Remove X's to send email to me.

RE: Detect the app is running under Terminal Services? by MichelRoy

MichelRoy
Mon Dec 05 08:09:02 CST 2005

hum! i just saw this while researching sys(602)
os(10) return a set of flags that can be tested
however 2 different bits say "terminal services is installed" values 16 and
256

if bittest(int(val(os(10))), 8)
? "Terminal services is installed"
endif

"William Fields" wrote:

> ?
>
> Thanks.
>
> --
> William Fields
> MCSD - Microsoft Visual FoxPro
> US Bankruptcy Court
> Phoenix, AZ
>
> ".dll hell - .rpm hell - whatever.
> The grass is always greener"
>
>
>
>
>
>
>