🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8581

sizeof(BITMAPFILEHEADER) == 16 ?

#8581
From: Tony Benham
Date: Wed, 06 Oct 2004 17:22
21 lines
1354 bytes
Why is it so? (on BCB6, Win XP)
whereas I get 14bytes size on BCB3 Win98

This has the effect of making the fread() read incorrectly

BITMAPFILEHEADER  fileHdrR;
 fread(&fileHdrR, sizeof(fileHdrR), 1,i_t);

In wingdi.h we have the following:-

#include <pshpack2.h>
typedef struct tagBITMAPFILEHEADER {
WORD bfType;
DWORD bfSize;
WORD bfReserved1;
WORD bfReserved2;
DWORD bfOffBits;
} BITMAPFILEHEADER, FAR *LPBITMAPFILEHEADER, *PBITMAPFILEHEADER;
#include <poppack.h>

Tony
Technical Details
Message-ID: <416429d8@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4e41fe90d46034f0,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Tony Benham" <tony_b50@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: sizeof(BITMAPFILEHEADER) == 16 ?
Date: Thu, 7 Oct 2004 03:22:28 +1000
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: 203.122.68.111
Message-ID: <416429d8@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1097083352 203.122.68.111 (6 Oct 2004 10:22:32 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail