• 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: John Stiles <email@hidden>
  • Date: Fri, 20 Jan 2006 13:04:42 -0800

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: 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


  • Follow-Ups:
    • Re: MFC Porting Issues
      • From: Kevin Wojniak <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>)

  • Prev by Date: Re: Various UI questions...
  • Next by Date: Re: appDidFinishLaunching and NSTask
  • Previous by thread: Re: MFC Porting Issues
  • Next by thread: Re: MFC Porting Issues
  • Index(es):
    • Date
    • Thread