Calling function from another process on Windows
I have two Windows applications (EXEs). I would like to do this:
开发者_如何学运维A:
void foo(int a)
{
MessageBox(a);
}
B:
p = CreateProcess("A.exe");
CallFunction(p, "foo", 15);
How this "CallFunction" can be done?
You will need to use an IPC (Inter-Process Communication) method. There are a number of options for this, including DCOM, named pipes, and Windows messages.
精彩评论