I try to find a syntax like this one:
AppelMoi PROTO :D3DVERTEXELEMENT9[3] ???
The only soluce i found is below.
Quote
D3DVERTEXELEMENT9 STRUCT
Stream WORD ? ; Stream index
offset1 WORD ? ; Offset in the stream in bytes
type1 BYTE ? ; Data type
Method BYTE ? ; Processing method
Usage BYTE ? ; Semantics
UsageIndex BYTE ? ; Semantic index
D3DVERTEXELEMENT9 ENDS
AGROUPE STRUCT
regroupe D3DVERTEXELEMENT9 3 dup (<>)
AGROUPE ENDS
;machin
AppelMoi PROTO :AGROUPE ; ----> D3DVERTEXELEMENT9[3] ?
.data
memostack dd 0
regroupe AGROUPE <>
.code
start:
mov eax,esp
mov memostack,eax
invoke AppelMoi,regroupe
invoke ExitProcess,0
;------- proc içi ------------
;################################################################
AppelMoi PROC untruc:AGROUPE
mov eax,memostack
lea edx,untruc
sub eax,edx ;3 * 8 = 18h
mov ecx,sizeof D3DVERTEXELEMENT9 ; 8
mov eax,sizeof regroupe ; 18h
FindeAppelMoi:
ret
AppelMoi endp
Assembles just fine:
AppelMoi PROTO :D3DVERTEXELEMENT9, :D3DVERTEXELEMENT9, :D3DVERTEXELEMENT9
include \masm32\include\masm32rt.inc
D3DVERTEXELEMENT9 STRUCT
Stream WORD ? ; Stream index
offset1 WORD ? ; Offset in the stream in bytes
type1 BYTE ? ; Data type
Method BYTE ? ; Processing method
Usage BYTE ? ; Semantics
UsageIndex BYTE ? ; Semantic index
D3DVERTEXELEMENT9 ENDS
;machin
AppelMoi PROTO :D3DVERTEXELEMENT9, :D3DVERTEXELEMENT9, :D3DVERTEXELEMENT9
.data
memostack dd 0
d3a D3DVERTEXELEMENT9 <>
d3b D3DVERTEXELEMENT9 <>
d3c D3DVERTEXELEMENT9 <>
.code
start:
mov eax,esp
mov memostack,eax
invoke AppelMoi, d3a, d3b, d3c
invoke ExitProcess,0
;------- proc içi ------------
;################################################################
AppelMoi PROC untrucA:D3DVERTEXELEMENT9, untrucB:D3DVERTEXELEMENT9, untrucC:D3DVERTEXELEMENT9
mov eax,memostack
lea edx,untrucA
sub eax,edx ;3 * 8 = 18h
mov ecx,sizeof D3DVERTEXELEMENT9 ; 8
mov eax, 3*sizeof untrucA
FindeAppelMoi:
ret
AppelMoi endp
end start
Thanks,it is one another soluce.