On Feb 27, 2006, at 11:58 AM, Phil M wrote:

You can also assign a string like this:

    Dim mb As MemoryBlock = b.Read(b.Length)    // b is a BinaryStream

This is because there is an automatic conversion between string and MemoryBlock (REALbasic 5.5 and higher), so a MemoryBlock will be created to

Thanks Phil, that worked like a charm and beats the heck out of reading it byte by byte. Not sure I would have ever thought to try doing this within the Dim statement.

In case anyone has followed this thread the following example from Brian does not work, giving a "This method or property does not exist on the last line:

j = theFile.Length
mb = New MemoryBlock(j)

mb.String(0, j) = b.Read(j)

=== A Mac addict in Tennessee ===

_______________________________________________
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