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

Reply via email to