Hi.. I'm looking at some Direct2D examples and cannot find this.. function macro/listing.
example:>> invoke vf(g_brush,......)
If anyone knows which file it's in... pleeeeze show me!!
thanks
Van
For the case that the WinInc (http://www.japheth.de/) include files are used, take a look in winasm.inc (which is included through windows.inc).
;-------------------------------------------------------------------
; vf() is used to call a virtual method.
; it is intended to be used internally. MIDL will create C helper
; macros to access virtual methods with the following syntax:
; #define Interface_Method() (This)->lpVtbl->Method(This,...)
; h2incx will translate this to:
; Interface_Method macro This, ...
; exitm <vf(This, Interface, Method), ...>
; endm
;-------------------------------------------------------------------
; edx/r11 is used, so it cannot be used as a parameter!
; and global textequate ??thisreg is used
;-------------------------------------------------------------------
vf macro @this:req,interface,func:req
ifdef _WIN64
ifidni <@this>,<r11>
??thisreg equ <r10>
else
??thisreg equ <r11>
endif
else
ifidni <@this>,<edx>
??thisreg equ <ecx>
else
??thisreg equ <edx>
endif
endif
mov ??thisreg,@this
mov ??thisreg,[??thisreg].interface.lpVtbl
exitm <[??thisreg].&interface&Vtbl.&func&,@this>
endm
Quote from: qWord on August 15, 2013, 02:04:47 AM
.. take a look in winasm.inc (which is included through windows.inc).
Ah!!! thanks.. I missed that one... Thought I was really losing it !!
:t