Article View: borland.public.cppbuilder.nativeapi
Article #12200Problem with struct sizes
From: nicolasr
Date: Sun, 21 Dec 2003 04:13
Date: Sun, 21 Dec 2003 04:13
16 lines
1446 bytes
1446 bytes
Hi, using BCB6 I try to read/write bitmaps. The bitmaps I save to file are always invalid. I now found that there is something wrong with the structure sizes. For example I read/write the BITMAPFILEHEADER by reading/writing as many bytes as sizeof() tells me but sizeof() says that BITMAPFILEHEADER is 16 bytes while the docs say it's 14. Seems like there is any problem with structure byte alignment. What should I do to fix this? thanks, Nick
Technical Details
Message-ID:
<3fe51de3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,157400ec2d2e1eab,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-12-20 20:33:33 PST From: "nicolasr" <nicolasrNOSPAMATSIGNgmx.net> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Problem with struct sizes Date: Sun, 21 Dec 2003 05:13:20 +0100 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 80.133.162.167 Message-ID: <3fe51de3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1071980003 80.133.162.167 (20 Dec 2003 20:13:23 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!216.166.71.14!border3.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