Click here to Skip to main content
15,886,016 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: copy/store to a file Pin
thathvamsi30-Aug-06 20:49
thathvamsi30-Aug-06 20:49 
GeneralRe: copy/store to a file Pin
kakan30-Aug-06 20:55
professionalkakan30-Aug-06 20:55 
GeneralRe: copy/store to a file Pin
thathvamsi30-Aug-06 21:00
thathvamsi30-Aug-06 21:00 
GeneralRe: copy/store to a file Pin
Rinu_Raj30-Aug-06 21:06
Rinu_Raj30-Aug-06 21:06 
GeneralRe: copy/store to a file Pin
kakan30-Aug-06 21:15
professionalkakan30-Aug-06 21:15 
GeneralRe: copy/store to a file Pin
thathvamsi30-Aug-06 21:34
thathvamsi30-Aug-06 21:34 
GeneralRe: copy/store to a file Pin
kakan30-Aug-06 22:20
professionalkakan30-Aug-06 22:20 
GeneralRe: copy/store to a file Pin
thathvamsi30-Aug-06 23:17
thathvamsi30-Aug-06 23:17 
i did the same for reading the file.
but I get the "assertion failed" error message in filecore.cpp at
the following line:
ASSERT(AfxIsValidAddress(lpBuf, nCount));

the code that i did is as follows:
unsigned char* Rx_Buf = new unsigned char[3000000];<br />
unsigned char* read = new unsigned char[3000000];<br />
<br />
// Copying the read data buffer in a file<br />
CFile TestFile;<br />
CString csFileName;<br />
CString csFileName_var;<br />
CTime ct = CTime::GetCurrentTime();<br />
csFileName = "File_" + ct.Format("%m%d%Y%H%M%S");<br />
csFileName_var = csFileName;					TestFile.Open(csFileName,CFile::modeCreate|CFile::modeWrite|CFile::typeBinary);<br />
TestFile.Write(Rx_Buf,3000000);<br />
TestFile.Close();<br />
<br />
//Reading back the file:<br />
TestFile.Open(csFileName_var,CFile::modeRead | CFile::typeBinary);<br />
TestFile.Read(&read,3000000);<br />
TestFile.Close();


i delete the two buffers at the end using delete operator.
I tried debugging but in vain. Do u have any suggestions?
GeneralRe: copy/store to a file Pin
kakan30-Aug-06 23:35
professionalkakan30-Aug-06 23:35 
GeneralRe: copy/store to a file Pin
thathvamsi30-Aug-06 23:41
thathvamsi30-Aug-06 23:41 
GeneralRe: copy/store to a file Pin
kakan30-Aug-06 23:45
professionalkakan30-Aug-06 23:45 
GeneralRe: copy/store to a file Pin
thathvamsi31-Aug-06 16:41
thathvamsi31-Aug-06 16:41 
GeneralRe: copy/store to a file Pin
kakan31-Aug-06 21:55
professionalkakan31-Aug-06 21:55 
GeneralRe: copy/store to a file [modified] Pin
kakan31-Aug-06 22:11
professionalkakan31-Aug-06 22:11 
GeneralRe: copy/store to a file Pin
Rinu_Raj30-Aug-06 19:13
Rinu_Raj30-Aug-06 19:13 
Questionreinterpret_cast to fill listview Pin
Jumpin' Jeff30-Aug-06 16:24
Jumpin' Jeff30-Aug-06 16:24 
QuestionRe: reinterpret_cast to fill listview Pin
prasad_som30-Aug-06 19:09
prasad_som30-Aug-06 19:09 
AnswerRe: reinterpret_cast to fill listview Pin
Jumpin' Jeff31-Aug-06 1:33
Jumpin' Jeff31-Aug-06 1:33 
GeneralRe: reinterpret_cast to fill listview Pin
prasad_som31-Aug-06 2:07
prasad_som31-Aug-06 2:07 
GeneralRe: reinterpret_cast to fill listview Pin
Jumpin' Jeff31-Aug-06 9:33
Jumpin' Jeff31-Aug-06 9:33 
GeneralRe: reinterpret_cast to fill listview Pin
prasad_som31-Aug-06 19:10
prasad_som31-Aug-06 19:10 
GeneralRe: reinterpret_cast to fill listview Pin
Jumpin' Jeff1-Sep-06 1:24
Jumpin' Jeff1-Sep-06 1:24 
GeneralRe: reinterpret_cast to fill listview Pin
prasad_som1-Sep-06 1:37
prasad_som1-Sep-06 1:37 
QuestionDLLMain and its usage. [modified] Pin
Jeremy Falcon30-Aug-06 12:05
professionalJeremy Falcon30-Aug-06 12:05 
QuestionProgram exception Pin
mdexch30-Aug-06 11:56
mdexch30-Aug-06 11: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.