Windows — IPC (Inter Process Communication): Introduction

Shlomi Boutnaru, Ph.D.
2 min readJan 17, 2023

--

Due to the fact that each process in Windows has its memory address space we can’t pass pointers between threads in different processes and expect to see the same data in the same virtual address. It could be that the virtual address is not valid in one of the address spaces or we have a different data stored there (they are of other cases also). For more information about memory management I suggest going over the following link https://medium.com/@boutnaru/linux-memory-management-part-1-introduction-896f376d3713.

In order to allow different threads (in different processes) to pass data between them we need to use an IPC (Inter Process Communication) mechanism — an illustration of that is seen in the diagram below (https://www.geeksforgeeks.org/inter-process-communication-ipc/). Moreover, each OS has its own IPC mechanisms. On Windows we have the following mechanisms: clipboard, Windows Messages, COM (Component Object Model), DDE (Dynamic Data Exchange), Shared Memory, File Mapping, Mailslots, Pipes, RPC (Remote Procedure Call), ALPC (Advance Local Procedure Call) and sockets (https://www.slideshare.net/mfsi_vinothr/ipc-mechanisms-in-windows). In the next writeups of this series we will go over each one of those.

There are also folks that say we can use files on the filesystem for IPC but it is not a specific mechanism of Windows so I won’t speak about it for now. Lastly, when talking about IPC we should also talk about synchronization objects, however I will leave it for a future discussion.

See you next time ;-) You can also follow me on twitter — @boutnaru (https://twitter.com/boutnaru).

--

--