Skip to main content

vtable_bind

Utility for calling virtual functions on FFI objects. This variant works with Interfaces and doesn't require passing the this-pointer as the first argument every time.

vtable_bind(module_name: string, interface_name: string, index: number, typestring: string, ...): function

Arguments

NameDescriptionType
module_nameFilename of the module that contains the interfacestring
interface_nameName of the interfacestring
indexIndex of the virtual functionnumber
typestringA FFI type string, such as "int(__thiscall*)(void*, int)"string
argsAdditional arguments for the type (for use with parameterized types)unknown

Returns function