virtual functions from another lib

Started by
3 comments, last by Bregma 10 years, 3 months ago

HI

I can, via virtual functions, access/use functions etc. from another x-plane plugin. Neat, but I wonder if/how I could do alike somehow without

using x-plane plugins but standalones exes.

Many thanks

Advertisement

You can do that on Windows with out of proc COM servers. That is mainly used for embedding documents in other documents (e.g. having a spreadsheet displayed in a word processor document).

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

Thanks, but it must be crossplatform and for using c++ functions etc.

Well the simple answer is no then. Less simple answer is you would have to call functions across process boundaries and you would probably have to reverse engineer the exe you are calling into to find the addresses and data structures you need.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

There is an entire industry dedicated to RPC (remote procedure calls) and the technology has been evolving for decades. Tech like "SOAP", "COM", "CORBA", "EJB" and now "API" are terms you can use to search for this. That's what those buzzwords mean.

If you can guarantee you're going to be running on the same machine using the same architecture and runtime between EXEs, it can get a little easier. This is exactly how a lot of infection viruses and trojans work. In the case of games doing this, an excellent example is the DwarfTherapist tool used as an adjunct to Dwarf Fortress. It's Free software, so you can download and study how it works. It doesn't actually make function calls (Dwarf Fortress itself is not Free), but it effectively has the same effect.

Stephen M. Webb
Professional Free Software Developer

This topic is closed to new replies.

Advertisement