Hi,

I'm currently writing a bitmap compression routine and trying to send a byte
stream which behind the scenes contains a structure of information (see
below).  This byte stream is being sent from the PC to the Palm.  I know
there's a problem with byte alignment with structures and therefore, tried
to byte swap the information on both sides.  For some reason, something
isn't working right.  Does anyone have any suggestions for sending
structures as byte streams from the PC to the Palm.

Note:  Either a byte stream of a CompARecordType record is being sent to the
Palm or of type CompNoneRecordType.

I'm using MSVC++ v6 and Metrowerks for Palm development v6.

Thanks,
  Jane

---
Jane Halfond
Synergy Solutions, Inc.
http://www.synsolutions.com
a BarPoint.com Company
http://www.barpoint.com
1-212-461-2292

// Because MSVC doesn't support UInt8, we need to use byte
#ifdef MSVC_COMPILED
#define UInt8 byte
#endif

enum CompStyle { eCompNone = 0, eCompA };

typedef struct CompHeaderTypeTag
{
        CompStyle     eCompStyle;
        unsigned long rawSize;               // raw size of the uncompressed data
        unsigned long numBlocks;        // number of CompATypes appearing in the
compressed structure
} CompHeaderType;

typedef struct CompABlockTypeTag
{
    UInt8 token;
    UInt8 repeat;
} CompABlockType;

typedef struct CompARecordTypeTag
{
   CompHeaderType hdr;
   CompABlockType blocks[];
} CompARecordType;

typedef struct CompNoneRecordTypeTag
{
   CompHeaderType hdr;
   UInt8                  buffer[];
} CompNoneRecordType;


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to