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

C / C++ / MFC

 
GeneralRe: deleting strings Pin
Le centriste24-Sep-02 6:50
Le centriste24-Sep-02 6:50 
GeneralRe: deleting strings Pin
Andreas Saurwein24-Sep-02 6:51
Andreas Saurwein24-Sep-02 6:51 
GeneralRe: deleting strings Pin
Zizilamoroso24-Sep-02 13:03
Zizilamoroso24-Sep-02 13:03 
GeneralRe: deleting strings Pin
Todd Smith24-Sep-02 7:13
Todd Smith24-Sep-02 7:13 
Generalprinting content in the specified position on document to printer Pin
vgkotha24-Sep-02 3:40
vgkotha24-Sep-02 3:40 
GeneralRe: printing content in the specified position on document to printer Pin
Roger Allen24-Sep-02 6:58
Roger Allen24-Sep-02 6:58 
QuestionError when use IDiskQuotaControl->FindUserName etc.? Pin
Anonymous24-Sep-02 3:38
Anonymous24-Sep-02 3:38 
Generalannoying carchive problem Pin
carrie24-Sep-02 3:16
carrie24-Sep-02 3:16 
This is a general problem for me that I've still not worked out properly even though I've been hitting it for the last couple of years. Reading files with CArchives I can never stop them reading too much of the file and causing a GPF. An example for just now would be I'm using CSockets, so I've got a CSocketFile and a CArchive object as well. I'm using it as part of an ftp client and at the moment its at the point of logging in to the ftp server. There is a big(20 line) welcome message on the server so I need to read this data from the CArchive. When I do a straight

archivein >> stringtxt;

I only get the first 3 lines of the welcome message. When I try

while(!archivein.IsBufferEmpty())
{
blah;
}

I get that the buffer is always empty so it never goes into the loop. As a last resort I tried changing it to make sure it looped.

while(archivein.IsBufferEmpty())
{
blah;
}
I know that code is wrong but it got into hte loop at least but obviously it went into an infinite loop so it was useless.

I tried using archivein.ReadString() but this always causes GPFs. A basic example is.
while(receivedFromServer = archivein.ReadString(buffer,100))
{
blah;
if(receivedFromServer == "")
return;
}

but that just totally craps out on me Frown | :(

Any hints on generally dealing with CArchives, using CArchives with CSockets or with reading files in general.

thanks for reading the most obscure and confused question ever Smile | :)
Generaldeleting a control from the form Pin
ns24-Sep-02 3:14
ns24-Sep-02 3:14 
GeneralRe: deleting a control from the form Pin
jmkhael24-Sep-02 3:15
jmkhael24-Sep-02 3:15 
GeneralRe: deleting a control from the form Pin
ns24-Sep-02 3:47
ns24-Sep-02 3:47 
GeneralRe: deleting a control from the form Pin
jhwurmbach24-Sep-02 4:02
jhwurmbach24-Sep-02 4:02 
GeneralRe: deleting a control from the form Pin
Tomasz Sowinski24-Sep-02 4:10
Tomasz Sowinski24-Sep-02 4:10 
GeneralRe: deleting a control from the form Pin
Pavel Klocek24-Sep-02 4:10
Pavel Klocek24-Sep-02 4:10 
Generalsendmessage to a modal dialog Pin
ns24-Sep-02 2:32
ns24-Sep-02 2:32 
GeneralRe: sendmessage to a modal dialog Pin
jmkhael24-Sep-02 2:32
jmkhael24-Sep-02 2:32 
Generalthank you! Pin
ns24-Sep-02 2:41
ns24-Sep-02 2:41 
GeneralRe: thank you! Pin
jmkhael24-Sep-02 2:47
jmkhael24-Sep-02 2:47 
GeneralRe: sendmessage to a modal dialog Pin
Phil J Pearson24-Sep-02 6:21
Phil J Pearson24-Sep-02 6:21 
QuestionWhich SP do I have installed? Pin
Anonymous24-Sep-02 2:18
Anonymous24-Sep-02 2:18 
AnswerRe: Which SP do I have installed? Pin
SteveKing24-Sep-02 3:46
SteveKing24-Sep-02 3:46 
QuestionHow to open MDB file without DSN Pin
Tili24-Sep-02 2:16
Tili24-Sep-02 2:16 
AnswerRe: How to open MDB file without DSN Pin
Tomasz Sowinski24-Sep-02 2:24
Tomasz Sowinski24-Sep-02 2:24 
AnswerRe: How to open MDB file without DSN Pin
jmkhael24-Sep-02 2:29
jmkhael24-Sep-02 2:29 
GeneralUnicode Controls Pin
waterbuffalo24-Sep-02 2:13
waterbuffalo24-Sep-02 2:13 

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.