[interfacekit] Re: little help, again
- From: "Erik Jaesler" <erik@xxxxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Fri, 18 Apr 2003 17:30:59 -0700
>> > msg->FindInt32("field", (int32*)&field);
>> >
>> > Not nice, but since there is no FindUInt32, there are not that many
>> > options (the other one is to use FindData() -- not really better,
>> > I'd say).
>
>You managed to confuse me. :-) I would expect, both int32 and uint32 to
>be 32 bits wide (otherwise they were utterly misnamed ;-), so there
>shouldn't be any difference here.
>
>> Are there
>> endian-ness issues to deal with when doing this=3F
>
>Not on the same machine or on different machines with the same
>endianess. Not even on machines with different endianess, as long as
>you are aware of this difference and swap the bytes.
There are no endianess issues because bytes are swapped as necessary
when the message is unflattened; which covers it being sent over a port
and flattened into a file.
And I think doing the cast is a little hackish, but add FindUxxx()
methods seems silly as well.
e
Necessity is the plea for every infringement of human freedom. It is the
argument of tyrants; it is the creed of slaves.
-William Pitt, British prime-minister (1759-1806)
Other related posts: