• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MFC Porting Issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MFC Porting Issues


  • Subject: Re: MFC Porting Issues
  • From: Kevin Wojniak <email@hidden>
  • Date: Fri, 20 Jan 2006 16:20:53 -0500

Thanks John. However, that didn't appear to make any difference. The values are still not correct.

What I noticed though, on the 2nd iteration of the loop, "width", "d2", and "blockLen" are the same, but the rest are different. Except w1 on the Mac == bitDepth on the PC.. so that's very odd... it doesn't make sense why the first time it works perfectly, and then after that it gets messed up..

Kevin


On Jan 20, 2006, at 4:04 PM, John Stiles wrote:

Try this

#pragma pack(1)
typedef struct
{
       BYTE b1[8];
       DWORD height;
       DWORD width;
       WORD w1;
       WORD bitDepth;
       DWORD d2;
       DWORD blockLen;
} IPOD_PICTURE_HEADER;
#pragma pack()


Kevin Wojniak wrote:
Oops, yes WORD = unsigned short, sorry.

I'm not sure what you mean by structure packing..

Also, no matter what value the loop starts off at (0, 4, 16, etc), the structure appears identical to its PC equivalent at that same iteration of the loop. But as soon as it increments and goes to the next part of the loop, the values aren't correct. So I'm not sure what's going on there..

Kevin


On Jan 20, 2006, at 3:52 PM, Shawn Erickson wrote:

On 1/20/06, Kevin Wojniak <email@hidden> wrote:

Here's the structure:

typedef struct
{
        BYTE b1[8];
        DWORD height;
        DWORD width;
        WORD w1;
        WORD bitDepth;
        DWORD d2;
        DWORD blockLen;
} IPOD_PICTURE_HEADER;


BYTE = unsigned char DWORD = unsigned long WORD = unsigned char

What is sizeof(WORD) on Windows? I think is it larger the a byte.

Also what structure packing is being used or expected?

-Shawn



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com


This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >MFC Porting Issues (From: Kevin Wojniak <email@hidden>)
 >Re: MFC Porting Issues (From: Shawn Erickson <email@hidden>)
 >Re: MFC Porting Issues (From: Kevin Wojniak <email@hidden>)
 >Re: MFC Porting Issues (From: John Stiles <email@hidden>)

  • Prev by Date: UI for nonuniform Core Data object hierarchy
  • Next by Date: Re: MFC Porting Issues
  • Previous by thread: Re: MFC Porting Issues
  • Next by thread: Re: MFC Porting Issues
  • Index(es):
    • Date
    • Thread