Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A New Twist On Is App Running
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00409058
Message ID:
00409281
Views:
32
>>NO, NO, NO...I don't leverage anything from the event.
>>
>>Issuing a CloseHandle() with no other process holding an event handle makes the event object disappear, regardless of the state. If you forget to CloseHandle, issuing a CLOSE ALL, or QUITting VFP releases the handle and makes the event go away. I'm actually leveraging the CreateEvent() behavior rather than the Event itself; the existance of the Event serves as an indication that someone else already is running, and is still running.
>>
>>Try it. There's no causal link between PROGRAM(0) - it's just a name that's easily codified; presumably any instance of the program you're running will have the same PROGRAM(0), so even if you cancel out, a CLOSE ALL or calling CloseHandle() avoids the need to exit VFP. RTFMSDN
>
>OK, OK, I did, I did. What penance do you need me to do?< cower, cower >
>

You must bring us...a shrubbery...

>Another example of Foot in mouth Friday
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform