2020-04-09 12:53:04 UTC
I'm Using Borlands Tasm32 v5, and am calling a procedure by pointer (a
callback). The problem is that it doesn't (can't) do any assemble-time
checking of the provided arguments, while this does happen when calling the
function by value.
;-- Definition of the procedure
TheFunction PROCDESC @@lArgOne:DWORD,@@lArgTwo:DWORD
;-- A by-pointer call
mov [@@pFunction],offset [TheFunction]
call [@@pFunction], eax, 42, -1 ;<- Too many arguments, but not detected.
;-- A by-value call
call TheFunction, eax, 42, -1 ;<- detected
My question, (how) can I tell the by-pointer call which procedure it is
targetting, so that its (number and type of) arguments can be checked ?