Click here to Skip to main content
15,891,607 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: zero copy in windows Pin
enhzflep2-Jul-13 12:08
enhzflep2-Jul-13 12:08 
AnswerRe: zero copy in windows Pin
Erudite_Eric4-Jul-13 2:23
Erudite_Eric4-Jul-13 2:23 
GeneralRe: zero copy in windows Pin
Satya1447-Jul-13 23:44
professionalSatya1447-Jul-13 23:44 
GeneralRe: zero copy in windows Pin
Erudite_Eric11-Jul-13 6:12
Erudite_Eric11-Jul-13 6:12 
QuestionProblem in returning the used defined data type using structure Pin
Manoj73901-Jul-13 18:48
Manoj73901-Jul-13 18:48 
QuestionProblem in returning the used defined data type using structure Pin
Manoj73901-Jul-13 18:47
Manoj73901-Jul-13 18:47 
QuestionRe: Problem in returning the used defined data type using structure Pin
Richard MacCutchan1-Jul-13 20:42
mveRichard MacCutchan1-Jul-13 20:42 
AnswerRe: Problem in returning the used defined data type using structure Pin
Stefan_Lang3-Jul-13 0:33
Stefan_Lang3-Jul-13 0:33 
QuestionHow to get the process's DLL module address? Pin
SetHookCurrent1-Jul-13 18:45
SetHookCurrent1-Jul-13 18:45 
AnswerRe: How to get the process's DLL module address? Pin
Richard MacCutchan1-Jul-13 22:08
mveRichard MacCutchan1-Jul-13 22:08 
AnswerRe: How to get the process's DLL module address? Pin
Santhosh G_2-Jul-13 5:37
Santhosh G_2-Jul-13 5:37 
AnswerRe: How to get the process's DLL module address? Pin
Ghosuwa Wogomon2-Jul-13 7:30
Ghosuwa Wogomon2-Jul-13 7:30 
Questionis it possible to update a specific column in listview? Pin
JoneLe861-Jul-13 16:37
JoneLe861-Jul-13 16:37 
SuggestionRe: is it possible to update a specific column in listview? Pin
David Crow2-Jul-13 2:49
David Crow2-Jul-13 2:49 
QuestionCFile reads comma delimited text automatically? Pin
Vaclav_1-Jul-13 13:03
Vaclav_1-Jul-13 13:03 
AnswerRe: CFile reads comma delimited text automatically? Pin
SoMad1-Jul-13 14:47
professionalSoMad1-Jul-13 14:47 
QuestionRe: CFile reads comma delimited text automatically? Pin
Vaclav_2-Jul-13 4:04
Vaclav_2-Jul-13 4:04 
SuggestionRe: CFile reads comma delimited text automatically? Pin
David Crow2-Jul-13 4:09
David Crow2-Jul-13 4:09 
AnswerRe: CFile reads comma delimited text automatically? Pin
SoMad2-Jul-13 20:44
professionalSoMad2-Jul-13 20:44 
Sorry for the delay Vaclav, it has been one of those days.

I think you should do this with CStdioFile and get the text parsing all straightened out first. Follow David's advice for the read loop.

If you still want to do some testing with your current code, you need to clean up some things. You say you hope to read the whole file in and then process it. Well, then that is what you should do instead of doing both reading and processing in the loop.

I will recommend you use a CByteArray for the read buffer (I like its flexibility). Use CFile to check the size of the file, call SetSize() on the CByteArray object with that value, read the file in a single call (for now let's just assume your files will not be too large for that) and close the file. Then you use the loop to go through the buffer without doing anymore file handling.

Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty

QuestionGetting the Command Line of Another Process Pin
Richard Andrew x641-Jul-13 10:58
professionalRichard Andrew x641-Jul-13 10:58 
AnswerRe: Getting the Command Line of Another Process Pin
Garth J Lancaster1-Jul-13 12:47
professionalGarth J Lancaster1-Jul-13 12:47 
GeneralRe: Getting the Command Line of Another Process Pin
Richard Andrew x641-Jul-13 13:14
professionalRichard Andrew x641-Jul-13 13:14 
GeneralRe: Getting the Command Line of Another Process Pin
Garth J Lancaster1-Jul-13 13:18
professionalGarth J Lancaster1-Jul-13 13:18 
SuggestionRe: Getting the Command Line of Another Process Pin
David Crow2-Jul-13 2:56
David Crow2-Jul-13 2:56 
GeneralRe: Getting the Command Line of Another Process Pin
Richard Andrew x642-Jul-13 10:15
professionalRichard Andrew x642-Jul-13 10:15 

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.