Board index » cppbuilder » IOStream

IOStream


2005-08-12 07:44:49 PM
cppbuilder48
I have the following snippet of code:
std::auto_ptr<TMemoryStream>IOStream(new TMemoryStream);
IOStream->Write(HEADER, 5); // Write STX and address
IOStream->Write(Buffer, BufSize); // Copy all of the message into the
txbuffer
BYTE chksum=CalcChecksum(IOStream->Memory, IOStream->Size);
What I want to know is is there anyway to see the contents of the IOStream
in the watch window, so that I can make sure the correct data is being
written into it? If so.... how?
thanks,
Phil
 
 

Re:IOStream

"Phil V" < XXXX@XXXXX.COM >wrote in message
Quote
is there anyway to see the contents of the IOStream in the watch window
Have the watch keep track of the stream's Memory property. Set the watch to
"memory dump" and use the repeat count to specify the size of the memory.
Every time you write something to the stream, you will have to examine the
new Size value for the stream and then update the watch's repeat count
accordingly.
Gambit