Re: Stop user from installing more than 1 instance
From: Ch Löfberg (ch.lofberg_at_telia.com)
Date: 09/19/04
- Next message: Morningstar: "Re: Ocx Registration Q."
- Previous message: Sietse Wijnker: "Re: Ocx Registration Q."
- In reply to: Rick Bean: "Re: Stop user from installing more than 1 instance"
- Next in thread: Anders Altberg: "Re: Stop user from installing more than 1 instance"
- Reply: Anders Altberg: "Re: Stop user from installing more than 1 instance"
- Reply: Rick Bean: "Re: Stop user from installing more than 1 instance"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 19 Sep 2004 19:23:56 GMT
Hi Rick! and thank you!
I tried your solution to FLOCK() a file which is allready locked. But it
does´nt return .F. A file allready locke can be locked again and again an
FLOCK() returns .T. everytime.
In the help we can read "FLOCK() ...returns false (.F.) if the table or a
record in the table is already locked by another user".
Can you give us an example in code to explain your sugestion.
Best regards
Christina
"Rick Bean" <rgbean@unrealmelange-inc.com> skrev i meddelandet
news:uRxy4ARnEHA.3352@TK2MSFTNGP15.phx.gbl...
Christina,
There are multiple ways - here are a few I've used:
1) Lock a specific temp file and if it can't be locked, then the app is
already running. (FLOCK() is good for this.)
2) Use API calls to see if the main window is already open.
3) Use the mutex API object.
Rick
"Ch Löfberg" <ch.lofberg@telia.com> wrote in message
news:hvJ2d.3525$d5.27072@newsb.telia.net...
> Hi all!
>
> What is the best way to prevent an user to start an run more than one
> instance of a VFP-app?
>
> Best regards
> Christina
>
>
- Next message: Morningstar: "Re: Ocx Registration Q."
- Previous message: Sietse Wijnker: "Re: Ocx Registration Q."
- In reply to: Rick Bean: "Re: Stop user from installing more than 1 instance"
- Next in thread: Anders Altberg: "Re: Stop user from installing more than 1 instance"
- Reply: Anders Altberg: "Re: Stop user from installing more than 1 instance"
- Reply: Rick Bean: "Re: Stop user from installing more than 1 instance"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|