开发者

Calling function from another process on Windows

开发者 https://www.devze.com 2023-03-30 14:16 出处:网络
I have two Windows applications (EXEs). I would like to do this: 开发者_如何学运维A: void foo(int a)

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

精彩评论

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