General information
Category:
Coding, syntax & commands
Yeah, amigo Bozzo... I've read that solution before but if my client is so "scamp" for seeing my application and close it He will close the vigilante too...
>>Hi friends:
>>
>>ON SHUT DOWN lets me do anything when someone restart or turn off the PC but doesn't work when other someone know how avoiding normal and harmonious flowing of my software specially when that harmony tries to oblige him to input any authorised code...
>>
>>Do you know any way to at least can write a record indicating this has happened?
>>
>>Or better, which is the secret to restart an application. That would solve both.
>>
>>Thank you.
>>
>> Héctor
>
>Hi Hector:
>
>You can use a flag file to know if your app is closed in proper or no proper way. In example, you can set a "1" in a flag file when your app starts and a "0" when it closes properly, so when starting if you find a "1" is becose did not close properly (you can elaborate on the flag value, but got the idea). The only thing you don't know, in case of abnormal termination, is the reason ,because can be originated by a user killing it with task manager or a power down or others.
>
>About the restarting, you can have a "monitor" program (or service) that checks every XX seconds if the main program is in memory, and restart it if not.
>
>Regards.-
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only