CFile::Read for readonly files
-
Hi all, I am trying to read a file having read-only property checked. i am not able to read the file and it is showing some exception from the file wincore.cpp stating "Accessing filepath\filename was denied".. Is it a problem with CFile::moderead?? thanks, rakesh.
-
Hi all, I am trying to read a file having read-only property checked. i am not able to read the file and it is showing some exception from the file wincore.cpp stating "Accessing filepath\filename was denied".. Is it a problem with CFile::moderead?? thanks, rakesh.
Can you at least show the relevant code?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Hi all, I am trying to read a file having read-only property checked. i am not able to read the file and it is showing some exception from the file wincore.cpp stating "Accessing filepath\filename was denied".. Is it a problem with CFile::moderead?? thanks, rakesh.
Most decidedly, this has nothing to do with
CFile
itself, but that you're doing something wrong. Can you show us your code?“Follow your bliss.” – Joseph Campbell
-
Hi all, I am trying to read a file having read-only property checked. i am not able to read the file and it is showing some exception from the file wincore.cpp stating "Accessing filepath\filename was denied".. Is it a problem with CFile::moderead?? thanks, rakesh.
Without seeing your code, most likely you're trying to open the file with read/write access, which will fail. If you show your code, perhaps we can be more helpful.
Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193