Click here to Skip to main content
15,892,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionzero copy in windows Pin
Satya1441-Jul-13 20:20
professionalSatya1441-Jul-13 20:20 
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 
Soren, thanks for your help.
Here is the read code.
I did add \n after the comma to the write text.
The file as around 230 bytes, ten string entries (sample "WS2EEE,\n") and even with the iReadBytes set to 250 it get only the first string with comma attached.
I am also having some problems with using Seek to next "record", but I can work on that later.
I was hoping to read the entire file and than process it , but I'll try the CStdioFile and read one line instead.

char pbuf[1000];
UINT nBytesRead;
UINT iRunningTotal = 0;
CString strField, strExcluded;
int iReadBytes = 250;
do
{
nBytesRead = pFile->Read( pbuf, iReadBytes );
TRACE("\nBuffer %s", pbuf);
// extract to delimiting comma
strField = pbuf; // kluge need to learn how to use CString buffer
strExcluded = strField .SpanExcluding( ";,.- :");
int iLenght = strExcluded.GetLength();
iReadBytes = iLenght + 2;
pFile->Seek(iLenght +1 ,CFile::current);
iRunningTotal += nBytesRead;
}while ( iRunningTotal < dwFileLength);
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 
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 

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.