From: Martijn van Oosterhout (kleptog@cupid.suninternet.com)
Date: Sat 27 Nov 1999 - 16:55:48 IST
Great One wrote:
You should be using typedef here.
> #define BYTE unsigned char
> #define DWORD unsigned int
> #define LONG int
> #define UINT unsigned int
> #define WORD unsigned short int
>
> #define LPSTR char*
>
> #define BOOL int
> #define FALSE 0
> #define TRUE 1
>
> // MS-Windows bitmaps' definition:
Ok, this may be a long shot, but maybe the structure
padding is getting in your way?
> typedef struct tagBITMAPFILEHEADER
> {
> WORD bfType;
> DWORD bfSize;
> WORD bfReserved1;
> WORD bfReserved2;
> DWORD bfOffBits;
> } BITMAPFILEHEADER;
Try sticking __attribute((packed)); at the end
for example:
> DWORD bfOffBits;
> } BITMAPFILEHEADER __attribute__((packed));
HTH,
Martijn van Oosterhout
Australia
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:22 IST