I've got the following structure declared:


BITMAP_FILE struct
bitmapfileheader BITMAPFILEHEADER <?>;contains the bitmapfile header
bitmapinfoheader BITMAPINFOHEADER <?>;all the info including the palette
palette PALETTEENTRY 256 dup (<?>);will store the palette here
lpBuffer dd ? ;pointer to the data
BITMAP_FILE ends
PBITMAP_FILE typedef ptr BITMAP_FILE

in the .data? section I define a variable


.data?
bitmap BITMAP_FILE {}

.data
pbitmap dd offset bitmap

in the code i pass


PBITMAP_FILE pbitmap.bitmapinfoheader

as an argument toa function but masm says the function isn't defined.
I've tried every possible variation and while i can get away with
PBITMAP_FILE pbitmap[0]

it's not the most readable method plus bitmapinfoheader is a structure
so you can see how things would quickly turn nasty. Any clues as to what I'm doing incorrectly?
thanks
Posted on 2002-07-11 16:20:46 by MArtial_Code
Ok the problem is the pointer
if i replace
PBITMAP_FILE pbitmap.bitmapinfoheader 

with
addr bitmap.bitmapfileheader
all is well.
I gues I'll have to use those structure pointers properly
Posted on 2002-07-11 16:36:37 by MArtial_Code
Don't declare it like:
bitmap BITMAP_FILE {}

Declare it like this:
bitmap BITMAP_FILE <?>
Posted on 2002-07-11 16:51:35 by comrade