I am trying to write a generic file read programe that accept either a CFile or a file handle.
However, when testing it, I sometimes get error because the file was open in an unexpected mode (like write only etc), hence, I would like to examine the CFile or file handle that is passed to the me and see if it is open appropriately. However, I find that there is NO way to examine the way the file was opened (like with 'r' or 'w' etc).
Can any one tell me if there is a way ( as easy as possible) to examine the mode that was used to open this particular file? to avoid errors.