D
Dave
Can someone tell me the best way to read fixed length string content from a
binary file. There are no delimiters between strings. I only know the
starting byte and that each string is 64 Bytes long. I was doing something
like the following but it seems as though I must be doing this the hard way?
Thanks in advance for your help.
Dave
BinaryReader *binaryInput;
FileStream *fileInput;
__wchar_t tHold;
String *testing;
fileInput = new FileStream( filename, FileMode::Open, FileAccess::Read );
binaryInput = new BinaryReader( fileInput );
// find beginning of comment data
fileInput->Seek( AppData->CommentStartByte , SeekOrigin::Begin );
for ( int i=1; i <= AppData->CommentByteLen; i++ ){
tHold = binaryInput->ReadChar();
testing = String::Concat( testing, tHold.ToString() );
}
binary file. There are no delimiters between strings. I only know the
starting byte and that each string is 64 Bytes long. I was doing something
like the following but it seems as though I must be doing this the hard way?
Thanks in advance for your help.
Dave
BinaryReader *binaryInput;
FileStream *fileInput;
__wchar_t tHold;
String *testing;
fileInput = new FileStream( filename, FileMode::Open, FileAccess::Read );
binaryInput = new BinaryReader( fileInput );
// find beginning of comment data
fileInput->Seek( AppData->CommentStartByte , SeekOrigin::Begin );
for ( int i=1; i <= AppData->CommentByteLen; i++ ){
tHold = binaryInput->ReadChar();
testing = String::Concat( testing, tHold.ToString() );
}