E.g. say I have a struct in $0 that looks like this:
(NMHDR, dwFlags, RECT)
I can pass $0 directly to a macro / function / copy/paste bit of code to handle NMHDR. But let's say I have a similar macro / function /copy/paste bit of code to handle RECTs.. but I can't pass i t $0 because it's got the NMHDR and dwSomething in front.
I could be hacky and offset $0 by the size of NMHDR+dwSomething, but I'd imagine that may be architecture-specific and, well, hacky.
But what would be the best practice? Put the relevant bits on the stack, pop into a newly allocated struct, free that struct when done?
e.g.
System::Call "*$0(i, i, i, i, i.s, i.s, i.s, i.s)" /* presuming I don't care about nmhdr/dwFlags */
System::Alloc "*(is, is, is, is).r1"
[parse the RECT struct in $1 now]
System::Free $1 Or is there a more appropriate method?