Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Win32 Rez writes Big Endian (Mac Style) numbers?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Win32 Rez writes Big Endian (Mac Style) numbers?



On 11/16/00 10:34 PM, Mark Coniglio (email@hidden) said:

>obviously, in big endian format inside the file.
>
>What is interesting is that calling
>GetResource(FOUR_CHAR_CODE('MBAR'), 128), the data that is returned
>is correct, i.e, 0x1234 is indeed 0x1234 instead of 0x3412. This
>would seem to indicate that QTW is actually doing the big->little
>endian conversion for resource types it knows about.
>
>However, when I read the data for my resource, it is not converted
>correctly (as would be expected since QTW doesn't know about my
>resource type) and requires that I swap the bytes.
>
>Is this right?
Yep that's right. The only piece you are missing is that there is a way
to teach QuickTime about your resource type, so we can flip your
resources automatically, too. See Ice Floe note 25
<http://developer.apple.com/quicktime/icefloe/dispatch025.html>, entitled
"Resource Endian Flippers".

Enjoy!

Greg Chapman
QuickTime Engineering
email@hidden




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.