Hello
I use a macro but it give me this error messages
": warning A4006: too many arguments in macro call"
Macro Called From
Main Line Code
Initvars macro args:vararg
for arg,<args>
invoke Initvar,0
mov &arg,eax
endm
InitDestroys macro
for arg,<args>
invoke InitDestroy,&arg
endm
endm
exitm<>
endm
Initvars(buff)
InitDestroys()
Initvar proc argv:DWORD
;bla
ret
Initvar endp
InitDestroy proc argv:DWORD
;bla
ret
InitDestroy endp
Have your an idea?
Regards,
InitDestroys is a procedural macro, but you call it like a function. Either use EXITM <> in InitDestroys or remove the bracket in the call.
Thanks for your reply
Mean you this exitm<> here?
Initvars macro args:vararg
for arg,<args>
invoke Initvar,0
mov &arg,eax
endm
InitDestroys macro
for arg,<args>
invoke InitDestroy,&arg
endm
exitm<> ;<<<<<<<<<<<<<<<<<<<<<<
endm
exitm<>
endm
and must i define the buff varibale in InitDestroys or works without?
Initvars(buff)
InitDestroys()
Quote from: ragdog on January 28, 2013, 11:12:39 PMMean you this exitm<> here?
yes
Quote from: ragdog on January 28, 2013, 11:12:39 PM
and must i define the buff varibale in InitDestroys [...]?
does not sound useful.
Example
Must i use
InitDestroys() or InitDestroys(buff) ?
It is not clear what you want to do exactly.
Initvars macro args:vararg
for arg,<args>
;.data? ; alternative: define variables in macro
; arg dd ?
;.code
invoke Initvar,0
mov &arg,eax
endm
InitDestroys macro
for arg,<args>
invoke InitDestroy,&arg
endm
exitm <>
endm
exitm<>
endm
;...
.data?
buff1 dd ?
buff2 dd ?
.code
Initvars(buff1,buff2)
;...
InitDestroys()