Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
License control with an app running on Citrix
Message
 
À
18/04/2000 06:56:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00360730
Message ID:
00361562
Vues:
15
Thanks Derek, it's a great idea. Wouldn't it be safer to lock the record instead of writing to it every x minutes? This way, no other program could undo the process and the unlock would be automatic if the session ends or crashes.

>The simplest way is by using a lookup table.
>
>This table would contain the same number of records as licence's required. When a session is started by the Citrix server, look through your licence table and populate the first record that has an empty date and time with the current date and time. If not empty records are found, there's no licences left. Client rings you for an activation key; this simply adds more records to your licence table.
>
>All you need do is create a timer event in your APP that periodically updates the date and time for the correct licence record in your table. Perhaps every 10 minutes. When the session is closed, remove the date and time from the relevant licence record in your table. Emptying the date and time will allow another session to use this licence record.
>
>If a session crashes, server fails, or the user goes for an 'ALT+CTRL+DEL', you've still got it covered. When you initially try to log on to your APP, and find that all licence records are populated with a date and time, you need to perform 1 extra check. Check each record and ensure that the date and time is no older than your timer interval. For example, if your timer updates the date and time every 10 minutes, yet you've found a record that has a date and time from yesterday, you know the session has ended abruptly. In which case you know it's safe to allocate this record in your licence table.
>
>The smaller the timer event, the more accurate the APP can distinguish between available licences. There's no need to make it too small, I set mine to 5 minutes. Provided the 'checking code' for the timer routine is small and efficient, you could set it to 1 minute. Try it and see......
>
>Clear ?!?! LOL !! It's not as tricky as it sounds, and it works !!!
>
>Derek
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform