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:
00409207
Views:
25
>George,
>It appears that CreateEvent and CreateMutex behave the same way in this respect. From the WinSDK Help on CreateMutex:
>
>Use the CloseHandle function to close the handle. The system closes the handle automatically when the process terminates. The mutex object is destroyed when its last handle has been closed.
>
>From the WinSDK Help on CreateEvent:
>
>Use the CloseHandle function to close the handle. The system closes the handle automatically when the process terminates. The event object is destroyed when its last handle has been closed.
>
>The ReleaseMutex has a corresponding ResetEvent. It appears you would have to shut VFP down either way because the process would have to terminate in order for it to go away on its own.
>
>Just some thoughts from a WinAPI layman.
>
Nice catch, Larry. In fact, I just finished testing this and, unfortunately, like creating a mutex, you have to clear the Event, apparently using ResetEvent() followed by a close. Serves me right for opening my mouth before reading the SDK.< g >
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform