Advanced Local Procedure Call(ALPC) is a message-passing mechanism. A globally visible connection-port object is published by the server process. When a client wants services from a subsystem or service, it opens a handle to the server’s connection-port object and sends a connection request to the port. A channel is created by the server and returns a handle to the client. This channel consists of a pair of private communication ports: one for client-to-server messages and the other for server-to-client messages. Communication channels support a callback mechanism, so the client and server can accept requests when they would normally be expecting a reply. When an ALPC channel is created, one of three message-passing techniques is chosen −
The first one is suitable for small to medium messages (up to 63 KB). In this case, the port’s message queue is used as intermediate storage, and the messages are copied from one process to the other.
The second technique is for larger messages. In this case, a shared memory section object is created for the channel. Messages sent through the port’s message queue contain a pointer and size information referring to the section object. This avoids the need to copy large messages. Data is placed by the sender into the shared section, and the receiver views them directly.
In the third technique, it uses APIs that read and write directly into a process’s address space. ALPC provides functions and synchronization so that a server can access the data in a client. ALPC is normally used by RPC to achieve higher performance for specific scenarios.
The Win32 window manager uses its own form of message passing, which is independent of the executive ALPC facilities.