Skip to main content
gamedev.net
🔒 Locked

C++ function binding

Started by Jimfing 1 reply 1.4k views
Original Post
Jimfing
Jimfing
Hi guys - just found an interesting paper on binding C++ functions for scripting languages: http://www.drizzle.com/~scottb/gdc/fubi-paper.htm It uses the DLL exports from VC++ and name-unmangling to create a large table of all the functions which should be availible to the scripts. Pretty cool, although not cross-platform. Maybe someone would find it usefull...
Toes
Toes
That's exactly how CPB that does function bindings for LUA. It doesn't use dbghelp though, it uses the more up to date DIA SDK, which was released shortly after Scott wrote that paper.

Thomas

http://www.thomasandamy.com/projects/CPB
Clash
Clash
I do the exact same thing in a language I'm working on and it works great. However, I directly read out of the export table from the Portable Executable file (in memory) which the library is loaded from.

I imagine a similar thing can be done on any platform that supports dynamic libraries... which is all major ones, if I'm not mistaken.
Jason Citron- Programmer, Stormfront Studios- www.stormfront.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.