Click here to Skip to main content
16,011,585 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: fread crash Pin
David Crow19-Jul-05 7:40
David Crow19-Jul-05 7:40 
GeneralRe: fread crash Pin
Chris Losinger19-Jul-05 8:03
professionalChris Losinger19-Jul-05 8:03 
GeneralRe: fread crash Pin
David Crow19-Jul-05 8:52
David Crow19-Jul-05 8:52 
GeneralRe: fread crash Pin
Chris Losinger19-Jul-05 9:27
professionalChris Losinger19-Jul-05 9:27 
GeneralRe: fread crash Pin
sfeldi19-Jul-05 20:39
sfeldi19-Jul-05 20:39 
GeneralRe: fread crash Pin
sfeldi19-Jul-05 21:09
sfeldi19-Jul-05 21:09 
GeneralRe: fread crash Pin
Chris Losinger20-Jul-05 1:11
professionalChris Losinger20-Jul-05 1:11 
GeneralRe: fread crash Pin
sfeldi19-Jul-05 20:38
sfeldi19-Jul-05 20:38 
Thanks David, for the tips,
this GetFileLength()was no problem at all, it did work the same with or without it, and yes, it is of no importance/help..... I did use CStdioFile as you recommended, the problem is just the same, it hangs when it tryes to read a cached file when yet no file content was cached,

<br />
	CStdioFile ioFile;<br />
	CFileException ex;<br />
	<br />
	CString strLine;	<br />
<br />
	glb_Log.DebugLog2(TRUE,"Opening OBL file=%s",m_oblIndFileName);<br />
	if (!ioFile.Open(m_oblIndFileName,CFile::modeRead | CFile::shareDenyNone | CFile::typeText,&ex))<br />
	{<br />
		ex.GetErrorMessage(strMsg.GetBuffer(1024), 1024);<br />
		strMsg.ReleaseBuffer();<br />
		glb_Log.DebugLog2(FALSE,"Error opening IOB file %s",strMsg);<br />
		return false;<br />
	}<br />
<br />
	glb_Log.DebugLog2(TRUE,"Start Reading File");<br />
	while(TRUE==ioFile.ReadString(strLine))<br />
	{<br />
               glb_Log.DebugLog2(TRUE,"Annoying Log");<br />
		// ....<br />
	}<br />
	glb_Log.DebugLog2(TRUE,"Read Finished, OBL file=%s",m_oblFileName); // <- I have this log too.. so I see if it has dropped out immediately at first ReadString....<br />
	ioFile.Close();<br />


and the last comment in debug before it blows up is
07:28:33 OK: Start Reading File

so it never gets to printing "Annoying Log" when it tryes to read an uncached file, but when the file contents not just the directory structure are cached it works flawlessly...

anyway thanks....
QuestionTextOut being clipped in Windows 2000? Pin
MacWarrior19-Jul-05 3:10
MacWarrior19-Jul-05 3:10 
AnswerRe: TextOut being clipped in Windows 2000? Pin
David Crow19-Jul-05 3:21
David Crow19-Jul-05 3:21 
GeneralReading REG_SZ from Win registry Pin
rudoq3219-Jul-05 3:09
rudoq3219-Jul-05 3:09 
GeneralRe: Reading REG_SZ from Win registry Pin
David Crow19-Jul-05 3:19
David Crow19-Jul-05 3:19 
GeneralRe: Reading REG_SZ from Win registry Pin
Blake Miller19-Jul-05 5:50
Blake Miller19-Jul-05 5:50 
GeneralRe: Reading REG_SZ from Win registry Pin
John R. Shaw20-Jul-05 9:53
John R. Shaw20-Jul-05 9:53 
QuestionHow to handle IE (ATL/COM/MFC) Pin
19-Jul-05 3:03
suss19-Jul-05 3:03 
GeneralInsert image or icon Pin
Halawlaws19-Jul-05 2:49
Halawlaws19-Jul-05 2:49 
GeneralRe: Insert image or icon Pin
David Crow19-Jul-05 2:55
David Crow19-Jul-05 2:55 
GeneralRe: Insert image or icon Pin
Halawlaws19-Jul-05 3:22
Halawlaws19-Jul-05 3:22 
GeneralRe: Insert image or icon Pin
David Crow19-Jul-05 3:27
David Crow19-Jul-05 3:27 
GeneralRe: Insert image or icon Pin
Halawlaws19-Jul-05 3:28
Halawlaws19-Jul-05 3:28 
GeneralRe: Insert image or icon Pin
David Crow19-Jul-05 5:30
David Crow19-Jul-05 5:30 
GeneralRe: Insert image or icon Pin
Halawlaws19-Jul-05 5:32
Halawlaws19-Jul-05 5:32 
GeneralRe: Insert image or icon Pin
David Crow19-Jul-05 5:38
David Crow19-Jul-05 5:38 
GeneralRe: Insert image or icon Pin
Halawlaws19-Jul-05 5:40
Halawlaws19-Jul-05 5:40 
GeneralRe: Change position Pin
Halawlaws19-Jul-05 5:51
Halawlaws19-Jul-05 5:51 

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.