lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


The short answer is FuBi, or Function Binding Interface.  I first found out
about it in an article in Game Programming Gems by Scott Bilas.  He
presented it at GDC 2001 and he has information on it on his website as
well.  It parses export information from the binary file (EXE or DLL),
demangles the function names, and parses the function definition in to a
database along with the pointer to the location of the function in memory.
The lookup is a simple search of the database for a matching function name.
(Database is a bit of an exaggeration, it is just a std::set<> of function
definitions).  My callback function hand builds the call stack, then I jump
to the right location in memory.  There are a lot of little issues involved
with this, if anyone wants more information, feel free to contact me
offline.

jwesslin@mediaone.net

-- Jens Wessling
----- Original Message -----
From: "Brian Hook" <public@pyrogon.com>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Tuesday, October 09, 2001 9:14 PM
Subject: RE: Registering function


> > I register all of my C++ functions so they call the same
> > callback handler. Then I look up the name of the function
> > that was called in a database of all
> > C++ functions and use the function database to validate all of the
> > arguments, then call the appropriate function.
>
> Could you explain your lookup mechanism (e.g. how do you build the
> database, etc.)?
>
> Thanks,
>
> Brian
>