Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for logged on users
Message
De
06/03/1998 14:20:17
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00082641
Message ID:
00083094
Vues:
30
>>Hi everyone,
>>
>>I want to restrict the number of users who can work on my multiuser VFP 5.0 executable simultaneously to a set number, for licensing purposes.
>>
>>One of the ways I've done that in the past is to use a password table and lock the record for the logged on user in that password table. My worry with this is that when a workstation crashes, the lock may not be released, leaving the user locked out.
>>
>>Does anyone have any ideas on the best way to achieve what I want to do? Thanks very much. Rene.
>
>Rene,
>I did something similar to this some years ago using C whereas my application contained some 'dummy' data which was then stored in the .exe file. My application then used this area in the exe to keep a log of users. Each time a user ran the app, every few seconds the app would place the time into this area in the exe - when another user comes along, the slots are checked for open spaces and, if none found, would check to see if any have an out-of-date time slot and use one up if it finds it. I think that this idea could be modified to work with VFP in some way.
Unless you have a static list of users, the locking of records in a shared table precludes the dynamic addition of new users. Suggest you consider external semaphore file named for the user, opened exclusively -- may be a table or low-level I/O file. Login checks for count of tables, erases those it can, and then checks for count of those left. Hope this helps.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform