Is it possible in FASM to make a subj?
I mean a structure which contains a member with size depending on the value of the other member.
I mean a structure which contains a member with size depending on the value of the other member.
Hi longer,
do you mean something like:
do you mean something like:
struc SUBJ{
.first dd ?
.second dd ?
.third dd ?
}
virtual at 0
subj SUBJ
firstSUBJ = subj.first + 10
end virtual
Hi, sloppy!
Sorry, I can't understand what does the virtual piece of code do. :( Can you explain?
Here's what I exactly want:
The problem is that RGNDATA.Buffer seems to contain nCount RECTs.
So the question is: Can I declare RGNDATA structure in FASM?
Sorry, I can't understand what does the virtual piece of code do. :( Can you explain?
Here's what I exactly want:
struc RECT
{ .left dd ?
.top dd ?
.right dd ?
.bottom dd ? }
struc RGNDATAHEADER
{ .dwSize dd ?
.iType dd ?
.nCount dd ?
.nRgnSize dd ?
.rcBound RECT }
struc RGNDATA
{ .rdh RGNDATAHEADER
.Buffer ??? }
The problem is that RGNDATA.Buffer seems to contain nCount RECTs.
So the question is: Can I declare RGNDATA structure in FASM?
Try something like the following;
Then to access lets say the 6th RECT in the RGNDATA struc use
See this thread for more info.
struc RECT
{ .left dd ?
.top dd ?
.right dd ?
.bottom dd ?
.size = $ }
struc RGNDATAHEADER
{ .dwSize dd ?
.iType dd ?
.nCount dd ?
.nRgnSize dd ?
.rcBound RECT
.size = $ }
struc RGNDATA
{ .rdh RGNDATAHEADER
.Buffer = $ }
virtual at 0
RECT RECT
end virtual
virtual at 0
RGNDATAHEADER RGNDATAHEADER
end virtual
virtual at 0
RGNDATA RGNDATA
end virtual
Then to access lets say the 6th RECT in the RGNDATA struc use
;eax points to a RGNDATA struc
lea eax,[eax+RGNDATA.Buffer+RECT.size*5]
;eax points to the 6th RECT
See this thread for more info.
Thanks for your replies,
it seems I've got the idea. :alright:
it seems I've got the idea. :alright: