On Apr 04, 2006, at 3:15 PM, Joel Newport wrote:

When I read in the first 256 bytes of my file, the first byte is missing.

Why would that be?

Here is my code.

  Dim ReadFromFile as BinaryStream
  Dim f as FolderItem
  f=GetOpenFolderItem("")
  oldHeader = newmemoryBlock(256)
  If f <> Nil Then
    ReadFromFile=f.OpenAsBinaryFile
    oldHeader.stringValue(0,256) = readFromFile.read(256)
    ReadFromFile.close
  End If

  editfield1.text = oldHeader.pString(0)

Sorry if it is obvious.

Because the first byte defines the length when you use pString and so it is NEVER displayed

if you just want to look at the bytes try using StringValue instead


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to