Click here to Skip to main content
15,888,113 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: shell32.dll Pin
dilara semerci10-Aug-10 0:23
dilara semerci10-Aug-10 0:23 
QuestionRe: shell32.dll Pin
David Crow10-Aug-10 3:45
David Crow10-Aug-10 3:45 
AnswerRe: shell32.dll Pin
dilara semerci10-Aug-10 3:59
dilara semerci10-Aug-10 3:59 
QuestionUse document view in dialog box application in MFC Pin
MKC0029-Aug-10 22:07
MKC0029-Aug-10 22:07 
AnswerRe: Use document view in dialog box application in MFC Pin
«_Superman_»9-Aug-10 22:39
professional«_Superman_»9-Aug-10 22:39 
GeneralRe: Use document view in dialog box application in MFC Pin
MKC00210-Aug-10 2:37
MKC00210-Aug-10 2:37 
GeneralRe: Use document view in dialog box application in MFC Pin
Rick York11-Aug-10 11:42
mveRick York11-Aug-10 11:42 
QuestionHow to proper handle if file corrupted after CFile.Open? Pin
wcgan9-Aug-10 21:41
wcgan9-Aug-10 21:41 
Dear all,

I getting an exception error when file is missing or corrupted after it has been opened via CFile class. Below is the scenario.

Scenario:
1. Open file via CFile. (file is exist)
2. to simulate file corrupted (manually forced to delete it)
3. exception occurred.

CFile file; 
file.Open("C:\log.dat",CFile::modeWrite|CFile::modeCreate, NULL);
//[forced to deleted the file]
file.Close();


I also tried using file.Abort(), but also getting an exception error.

Is there any proper handling if the file is missing or corrupted after opened and before it close?

Thanks in advance.

Regards,
Wee Chong
AnswerRe: How to proper handle if file corrupted after CFile.Open? Pin
Richard MacCutchan9-Aug-10 22:10
mveRichard MacCutchan9-Aug-10 22:10 
GeneralRe: How to proper handle if file corrupted after CFile.Open? Pin
wcgan9-Aug-10 22:27
wcgan9-Aug-10 22:27 
GeneralRe: How to proper handle if file corrupted after CFile.Open? Pin
Richard MacCutchan9-Aug-10 23:55
mveRichard MacCutchan9-Aug-10 23:55 
QuestionCRectTracker & CScrollView [modified] Pin
mesajflaviu9-Aug-10 19:41
mesajflaviu9-Aug-10 19:41 
QuestionString Manipulation Pin
T.RATHA KRISHNAN9-Aug-10 19:12
T.RATHA KRISHNAN9-Aug-10 19:12 
AnswerRe: String Manipulation Pin
Aescleal9-Aug-10 19:36
Aescleal9-Aug-10 19:36 
GeneralRe: String Manipulation Pin
T.RATHA KRISHNAN9-Aug-10 19:48
T.RATHA KRISHNAN9-Aug-10 19:48 
GeneralRe: String Manipulation Pin
Aescleal9-Aug-10 21:54
Aescleal9-Aug-10 21:54 
GeneralRe: String Manipulation Pin
ThatsAlok10-Aug-10 1:32
ThatsAlok10-Aug-10 1:32 
GeneralRe: String Manipulation Pin
Aescleal10-Aug-10 2:20
Aescleal10-Aug-10 2:20 
Questionmax number of rows in ListControl Pin
Sakhalean9-Aug-10 19:11
Sakhalean9-Aug-10 19:11 
AnswerRe: max number of rows in ListControl Pin
«_Superman_»9-Aug-10 19:43
professional«_Superman_»9-Aug-10 19:43 
QuestionWhat does this runtime error exactly mean? Pin
includeh109-Aug-10 16:37
includeh109-Aug-10 16:37 
AnswerRe: What does this runtime error exactly mean? Pin
Peter_in_27809-Aug-10 16:57
professionalPeter_in_27809-Aug-10 16:57 
AnswerRe: What does this runtime error exactly mean? Pin
Aescleal9-Aug-10 19:33
Aescleal9-Aug-10 19:33 
QuestionHow to display vertical text using DrawText Pin
Mary Chennai9-Aug-10 8:41
Mary Chennai9-Aug-10 8:41 
QuestionRe: How to display vertical text using DrawText Pin
David Crow9-Aug-10 9:33
David Crow9-Aug-10 9:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.