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.