Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Terminal Services / Citrix
Message
De
09/01/2007 12:05:20
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00573467
Message ID:
01183836
Vues:
25
FINALLY!

Other solutions only detect whether the system "SUPPORTS" TS but not whether the current session is a TS. I could find no direct reference to detect if a session was being run in a TS session. But after some digging and noggin scratching I came up with this simple function:
DECLARE integer ProcessIdToSessionId IN WIN32API integer, integer @
DECLARE INTEGER GetCurrentProcessId IN WIN32API
local lnProcessid, lnTsSessionid 
lnProcessid =  GetCurrentProcessId ()
lnTsSessionid = lnProcessid - lnProcessid
=ProcessIdToSessionId(lnProcessid,@lnTsSessionId)
RETURN lnTsSessionid <> 0
Glenn


>Take a look at Thread #534050.
>
>>Hi All,
>>
>>I am just wondering if anybody knows of a way to detect if a program
>>is being run from a terminal server.
>>
>>Is there an API that can be called or something like that ?
>>
>>TIA for any help
>>
>>Chris.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform