开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜