Initall commit
This commit is contained in:
39
fasmw172/INCLUDE/MACRO/COM64.INC
Normal file
39
fasmw172/INCLUDE/MACRO/COM64.INC
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
; Macroinstructions for interfacing the COM (Component Object Model) classes
|
||||
|
||||
macro cominvk object,proc,[arg]
|
||||
{ common
|
||||
assert defined object#.com.object ; must be a COM object
|
||||
macro call dummy
|
||||
\{ mov rax,[rcx]
|
||||
call [rax+object#.#proc] \}
|
||||
fastcall ,[object],arg
|
||||
purge call }
|
||||
|
||||
macro comcall handle,interface,proc,[arg]
|
||||
{ common
|
||||
assert defined interface#.com.interface ; must be a COM interface
|
||||
macro call dummy
|
||||
\{ mov rax,[rcx]
|
||||
call [rax+interface#.#proc] \}
|
||||
fastcall ,handle,arg
|
||||
purge call }
|
||||
|
||||
macro interface name,[proc]
|
||||
{ common
|
||||
struc name \{
|
||||
match , @struct \\{ define field@struct .,name, \\}
|
||||
match no, @struct \\{ . dq ?
|
||||
virtual at 0
|
||||
forward
|
||||
.#proc dq ?
|
||||
common
|
||||
.\#\\.com.object = name#.com.interface
|
||||
end virtual \\} \}
|
||||
virtual at 0
|
||||
forward
|
||||
name#.#proc dq ?
|
||||
common
|
||||
name#.com.interface = $ shr 3
|
||||
end virtual }
|
||||
|
||||
Reference in New Issue
Block a user