Interprocess communication between C# and C++

前端 未结 3 1357
悲哀的现实
悲哀的现实 2021-02-06 00:03

I\'m writing a bot for a game, which has a C++ API interface (ie. methods in a Cpp dll get called by the game when events occur, the dll can call back methods in the game to tri

3条回答
  •  太阳男子
    2021-02-06 00:30

    There are lots of different ways of doing IPC in Windows. For C# to C++, I'd be tempted to use Sockets as the API under both C++ (WinSock is OK once you get your head around it) and C# is pretty easy.

    Named Pipes might be better though if you don't want to use sockets, and were designed specifically for IPC. The API under C++ seems pretty simple, example here.

提交回复
热议问题