Your well on your way with COM and Active-X automation.
As for the macro's, i think you got me misunderstood. I ment inline to be used in this sort of case
; Stack push order ->
$NoPar(2) $Par(VT_BOOL, TRUE)
call [ebx].ComMethod
Which would produce the following code:
00401C77 |. 6A 00 PUSH 0
00401C79 |. 68 04000280 PUSH 80020004
00401C7E |. 6A 00 PUSH 0
00401C80 |. 6A 0A PUSH 0A
00401C82 |. 6A 00 PUSH 0
00401C84 |. 68 04000280 PUSH 80020004
00401C89 |. 6A 00 PUSH 0
00401C8B |. 6A 0A PUSH 0A
00401C8D |. 6A 00 PUSH 0
00401C8F |. 6A 01 PUSH 1
00401C91 |. 6A 00 PUSH 0
00401C93 |. 6A 0B PUSH 0B
00401C95 |. E8 DCFFFFFF CALL [ebx+04]
I hope this is more clear to you.
Below is the macros i used to produce the code above
NoPar macro Num:=<1>
LOCAL a1, a2
a1 equ <Num>
a2 = 0
while a1 ne a2
push 0
push DISP_E_PARAMNOTFOUND
push 0
push VT_ERROR
a2 = a2 + 1
endm
endm
Par MACRO v1:=<VT_I4>,v2:=<0>
if @InStr(1,v1,<VT_R8> ) NE 0
push 0
push DWORD PTR [v2]
push 0
push v1
else
push 0
push v2
push 0
push v1
endif
ENDM
VT_ERROR equ 10
DISP_E_PARAMNOTFOUND equ 80020004h
$Par MACRO v1:=<VT_I4>,v2:=<0>
Par v1, v2
EXITM <> ;; Return nothing at all
ENDM
$NoPar macro Num:=<1>
NoPar Num
EXITM <> ;; Return nothing at all
endm
Regards,
:NaN: