Xojo Conferences
XDCMay2019MiamiUSA

Re: Structures (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Runtime.ObjectCount incorrect?
Next thread: Fastest way to exchange data between applications.


Re: Structures   -   William Shank
  Structures   -   AMDD/A4D

Re: Structures
Date: 10.08.09 14:29 (Mon, 10 Aug 2009 06:29:41 -0700)
From: William Shank
On Mon, Aug 10, 2009 at 6:04 AM, Miller, James T. (AMDD/A4D) <
<email address removed>> wrote:

> Question, how do I read the binary data into the structure so I can use
> the structure to parse the message (i.e., I do not want to parse the binary
> data into the structure first. If I do that, I do not need the structure).
>

Haven't played with Structures yet but they have a StringValue 'item' and
BinaryStream implements the Readable interface. So something like...

bs.Position = messageStart
MyStructure.StringValue(bs.LittleEndian) = bs.Read(messageSize)

...maybe, I'm not certain on the syntax. w
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Structures
Date: 10.08.09 14:04 (Mon, 10 Aug 2009 09:04:11 -0400)
From: AMDD/A4D

I am reading a binary file made up of a number of messages in random order. I can read and parse the file to the message level, and would like to use a structure to parse the individual messages (each message type has a different structure). Question, how do I read the binary data into the structure so I can use the structure to parse the message (i.e., I do not want to parse the binary data into the structure first. If I do that, I do not need the structure).

Thanks.

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>