Re: Big Endian Byte Ordering

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Jonathan Wood (jwood_at_softcircuits.com)
Date: 01/11/05


Date: Tue, 11 Jan 2005 10:01:26 -0700

Okay, so addressing to structure members is not affected by big-endian byte
ordering.

Thanks.

-- 
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm
"Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp> wrote in message
news:O03eBXS9EHA.1260@TK2MSFTNGP12.phx.gbl...
> Jonathan Wood wrote:
> > I have a question about big-endian byte ordering.
> >
> > I know that with, for example, a WORD value, big endian byte ordering
puts
> > the two bytes in the reverse order that little endian does, which is
used by
> > Intel processors.
> >
> > What I don't know is what happens in the case of structures. For
example, I
> > know each member in the structure has its bytes reversed. But are all
bytes
> > of the structure reversed?
> >
> > I'm trying to figure out how to convert a structure data type fo big
endian
> > and I don't know if I can simply reverse all the bytes, or if I need to
do
> > something more complicated like just reverse the bytes of each member.
> >
> > Thanks for any tips!
> >
>
> The endian-ness affects individual members only and is determined by the
> CPU.  Structure packing and arrangement is determined by the compiler.
>
> -- 
> Scott McPhillips [VC++ MVP]
>


Relevant Pages

  • Re: Big Endian Byte Ordering
    ... so addressing to structure members is not affected by big-endian byte ... Jonathan Wood ... >> I know that with, for example, a WORD value, big endian byte ordering ... >> and I don't know if I can simply reverse all the bytes, ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Big Endian Byte Ordering
    ... so addressing to structure members is not affected by big-endian byte ... Jonathan Wood ... >> I know that with, for example, a WORD value, big endian byte ordering ... >> and I don't know if I can simply reverse all the bytes, ...
    (microsoft.public.vc.mfc)
  • Re: Shortcut for Converting Table to Class
    ... Jonathan Wood ... "bruce barker" wrote in message ... the members, and then write code to read the database, and finally to copy ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Noob questions about Python
    ... I'm afraid not. ... If you really want to reverse the list (i. e. ... If you just want to have all its members in reverse order, ... builtin reversed(which is an iterator giving you li's members ...
    (comp.lang.python)
  • Re: Local Administrators Group
    ... You just have to reverse your process;) ... If I add a group to the restricted groups ... machine for 'members'. ... Prev by Date: ...
    (microsoft.public.windows.server.active_directory)