Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting when user exits a VFP .exe improperly
Message
From
02/12/1996 06:05:03
 
 
To
25/11/1996 15:01:18
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00013353
Message ID:
00013910
Views:
30
> Improperly exiting a VFP.exe, con't

I think you guys got the right idea, but the problem still is not solved.

If you try this test, you'll see the real problem...

1. Open VFP on two networked win95 comps and map a drive from comp2 to comp1's c: drive. (say X:)
2. On comp2:
?FCREATE("X:\test.tmp") - returns "1"...okay
3. On comp1:
?FOPEN("C:\test.tmp") - returns "-1"...okay...user still logged on
4. On Comp2, end the VFP task (ctrl-alt-del), then on Comp1:
?FOPEN("C:\test.tmp") - returns "1"...okay...user exited improperly...delete file (and/or record) and cleanup.

This works great any way you do it (with low-level files or record locking), because Win95 (on Comp1) will close any open files used by Comp2 when Comp2 does the End-Task.

The problem comes when Comp2 just shuts-off, to demostrate:

1. Repeate steps 1 - 3 above.
2. Power down Comp2. Now on Comp1:
?FOPEN("C:\test.tmp") - return "-1"...not okay...like user is still logged on.

Also, if use the utility "Net Watcher", you'll notice that test.tmp is still opened by Comp1. But wait about 15 mins or so, and the file will close automatically. Interesting, huh?

What really need I think is a .dll to refresh the "Network Status" of all opened files before I check the locking or FOPEN status of the temporary files. BTW, the global timer idea works fine (it's what I've been doing), but it eats up resources like a cookie monster.

Thanks for the help,

Jim

P.S. New to the Universal Thread, sorry reply took so long... : )
Previous
Reply
Map
View

Click here to load this message in the networking platform