Article View: borland.public.cppbuilder.nativeapi
Article #13708Re: alignment
From: Bob Gonder
Date: Thu, 18 Sep 2003 20:51
Date: Thu, 18 Sep 2003 20:51
20 lines
1866 bytes
1866 bytes
Antonio Farfan wrote:
Do these 2 things: Use the pragma to ensure the packing, and use
typedef.
#pragma pack(push,4)
/* define sub-structures before the struct that includes them */
typedef struct sOtherStruct{
your structure data here
}OtherStruct;
typedef struct sTPS_Settings{
your structure data here
OtherStruct fOther;
}TPS_Settings;
#pragma pack(pop)
TPS_Settings fTPS_Settings;
Technical Details
Message-ID:
<db5kmvkiu2v8i0eppln56gvb6v3u30ihb3@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!216.166.71.118.MISMATCH!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3f673746@newsgroups.borland.com> <3f674494$1@newsgroups.borland.com> <3f6749b2$1@newsgroups.borland.com> <3f676a91@newsgroups.borland.com> <3f688407@newsgroups.borland.com> <3F688926.EF20C0EF@sbcglobal.net> <3f688cb6$1@newsgroups.borland.com> <kb6hmv0pa8o95ursa78l00hjlem1ghsu8q@4ax.com> <3f69671b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,a9334a47483d8c0e X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-18 14:08:08 PST From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: alignment Date: Thu, 18 Sep 2003 13:51:06 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <db5kmvkiu2v8i0eppln56gvb6v3u30ihb3@4ax.com> References: <3f673746@newsgroups.borland.com> <3f674494$1@newsgroups.borland.com> <3f6749b2$1@newsgroups.borland.com> <3f676a91@newsgroups.borland.com> <3f688407@newsgroups.borland.com> <3F688926.EF20C0EF@sbcglobal.net> <3f688cb6$1@newsgroups.borland.com> <kb6hmv0pa8o95ursa78l00hjlem1ghsu8q@4ax.com> <3f69671b$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.31.166.38 X-Trace: newsgroups.borland.com 1063918262 67.31.166.38 (18 Sep 2003 13:51:02 -0700) Lines: 23 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!216.166.71.118.MISMATCH!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail