Please see my comment to the question.
SendMessage
suggests that you want to develop on Windows. Only just forget
SendMessage
.
One option is using sockets. This is how it looks on Windows:
Windows Sockets 2 (Windows)[
^],
Getting Started with Winsock (Windows)[
^],
Creating a Basic Winsock Application (Windows)[
^].
In most cases, you have to work at the transport layer, using TCP. This CodeProject article can also be useful:
Programming Windows TCP Sockets in C++ for the Beginner[
^].
I hope you understand that sockets is the universal interface available on nearly all platforms which can be used on the same machine or a network. Another facility of this sort is named pipes:
CreateNamedPipe function (Windows)[
^],
ConnectNamedPipe function (Windows)[
^],
CallNamedPipe function (Windows)[
^];
for examples, see also:
Multithreaded Pipe Server (Windows)[
^],
Named Pipe Client (Windows)[
^].
Now we can discuss higher-level communications. Actually, I'm not sure what do you mean by "C++". If this includes C++/CLI, you can use .NET "classic" remoting or WPF. Both approaches are abstracted from the nature of channel, which can be replaced and include sockets and named pipes; also, virtually any higher-level protocol can be plugged in.
One such higher-level facility is Microsoft message-oriented MSMQ:
Microsoft Message Queuing — Wikipedia, the free encyclopedia[
^],
Message Queuing (MSMQ)[
^].
There are a lot more systems and protocols, at different levels of standardization covering different subset of platforms. For more detail, please see:
Message queue — Wikipedia, the free encyclopedia[
^].
Certainly, there is a lot to learn. Probably, you need to learn basics first, do some minimalistic prototyping, and then decide what best fits your ultimate purposes.
The architecture of the application-level systems with communication is not very trivial task. You need to make it efficient, importantly, avoid polling (
pull technology) and focus on
push technology, to avoid wasting resources and design responsible system. One of the most useful and productive paradigms is
published-subscriber architecture. And so long…
Please see some of my past answers:
an amateur question in socket programming[
^],
How Do I Get To Know If A A Tcp Connection Is Over[
^],
Application 'dashboard' for website accounts[
^],
How Do I Control My Client Computers By Server Computer[
^].
These answers are not specifically for C++, but they can give you a good idea what is it all about.
See also:
Pull technology — Wikipedia, the free encyclopedia[
^],
Push technology — Wikipedia, the free encyclopedia[
^],
Client–server model — Wikipedia, the free encyclopedia[
^],
Publish–subscribe pattern — Wikipedia, the free encyclopedia[
^].
—SA