>>Sergey, thanks for replying so quickly. How would performance compare between using STRTOFILE versus creating the file using fcreate, closing the file, then reopening in unbuffered write only mode and using fputs to write the data?
>
>I do all my logging this way (with the Additive parameter, of course, so whatever I write gets appended to the end of file). Just when I create the logger object, I append the existing log to an archive file, and create a new log file. So it never grows too big (to cause slowdowns) and I still have the archive of old logs if need be (which does happen once in a few months). Speed? Who cares, the things I was logging with this took much longer than the logging itself.
What about the original question, though - how do you detect the application being killed from the Task Manager? Would object's Destroy method still fire?
If it's not broken, fix it until it is.
My Blog