Click here to Skip to main content
15,899,026 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: any idea for "auto-cast"ing? Pin
Aescleal10-Aug-10 10:11
Aescleal10-Aug-10 10:11 
GeneralRe: any idea for "auto-cast"ing? Pin
Chris Losinger10-Aug-10 10:33
professionalChris Losinger10-Aug-10 10:33 
GeneralRe: any idea for "auto-cast"ing? Pin
Aescleal10-Aug-10 19:53
Aescleal10-Aug-10 19:53 
GeneralRe: any idea for "auto-cast"ing? Pin
Moak10-Aug-10 23:33
Moak10-Aug-10 23:33 
GeneralRe: any idea for "auto-cast"ing? Pin
Chris Losinger11-Aug-10 1:08
professionalChris Losinger11-Aug-10 1:08 
QuestionLINK : fatal error LNK1104: cannot open file 'MyCplusplusWithSTL.lib' after converting VS2008 to VS2010 Pin
Chesnokov Yuriy9-Aug-10 22:43
professionalChesnokov Yuriy9-Aug-10 22:43 
AnswerRe: LINK : fatal error LNK1104: cannot open file 'MyCplusplusWithSTL.lib' after converting VS2008 to VS2010 Pin
Richard MacCutchan10-Aug-10 0:01
mveRichard MacCutchan10-Aug-10 0:01 
GeneralRe: LINK : fatal error LNK1104: cannot open file 'MyCplusplusWithSTL.lib' after converting VS2008 to VS2010 Pin
Chesnokov Yuriy10-Aug-10 0:17
professionalChesnokov Yuriy10-Aug-10 0:17 
GeneralRe: LINK : fatal error LNK1104: cannot open file 'MyCplusplusWithSTL.lib' after converting VS2008 to VS2010 Pin
Richard MacCutchan10-Aug-10 0:46
mveRichard MacCutchan10-Aug-10 0:46 
GeneralRe: LINK : fatal error LNK1104: cannot open file 'MyCplusplusWithSTL.lib' after converting VS2008 to VS2010 Pin
Chesnokov Yuriy10-Aug-10 0:56
professionalChesnokov Yuriy10-Aug-10 0:56 
GeneralRe: LINK : fatal error LNK1104: cannot open file 'MyCplusplusWithSTL.lib' after converting VS2008 to VS2010 Pin
Richard MacCutchan10-Aug-10 1:40
mveRichard MacCutchan10-Aug-10 1:40 
Questionshell32.dll Pin
dilara semerci9-Aug-10 22:27
dilara semerci9-Aug-10 22:27 
AnswerRe: shell32.dll Pin
«_Superman_»9-Aug-10 22:37
professional«_Superman_»9-Aug-10 22:37 
AnswerRe: shell32.dll Pin
ThatsAlok9-Aug-10 22:45
ThatsAlok9-Aug-10 22:45 
AnswerRe: shell32.dll Pin
Aescleal10-Aug-10 0:15
Aescleal10-Aug-10 0:15 
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 

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.