I would like an example of how to structure the TRY and CATCH blocks for reading or writing a CFile. I have made this work before, but it wouldn't handle exceptions, so if the file didn't exist, it crashed. If the file was read-only, it crashed. I need to know how to do this, and the MSDN examples are not all inclusive to handle this situation.

Can someone give me just a brief code example of handling the exceptions (the standard ones that CFile uses)? Thank you very much in advance..

- Troy