Original Post
Hi all, I have an mfc GUI application, which I need to control externally. What I'd like to do is provide a python api (using the excellent boost.python library) and control it using a python script. I have the api defined, but I need some way of tying the script to a running instance of the app, so that api calls affect the running instance of the application. so what I have is app.exe, appAPI.dll (this exposes the python interface) and a python script that calls methods of the api. what I need is something like
class PyAPI // exported to python
{
AppDlg* appInst;
PyAPI()
{
appInst = GetPointerToRunningInstanceOfApp();
}
void dosomething()
{
appInst->dosomething();
}
}
any ideas? is this even possible? would I be better off using some sort of IPC? all suggestions appreciated.