How to match 1 of several child structures

0 votes
asked Aug 13 by okachobi (120 points)
I have a file format that is divided into sections identified by guids.  Each section has a header and then some data.  The data can be one of several formats.  If a 16 byte guid matches one of a few structures, then I want to present the data as that structure.  If it matches none of them, I want to represent it as just bytes.

i got it partially work.  For the data element, I added a structure with a size and then used structure references under that structure to define the possible matches.  I set the top level structure to have a variable data element order, then added 2 references under it that were set from 0 to unlimited in counts. Those structures that are referenced each have 1 field at at the start that is a guid that has a must match attribute set.

I expected that the data element would match the appropriate structure, but it only matches if it matches the first child structure.  It doesn't appear to be matching the second despite the binary data showing that it matches the second.

What am I missing?

Please log in or register to answer this question.

...