- Local Procedure Call
The local procedure call (LPC) facility is a service provided by the
Microsoft Windows NT kernel for light weightmessage queue between processes on the same computer. The LPC interface is part of Windows NT's undocumentedNative API , although it can be used indirectly in applications via the documentedremote procedure call system using the NCALRPC transport (which is implemented by LPC).Implementation
LPC is implemented using kernel "port" objects. A server process first creates a port object with a well known name, and waits for clients to connect. A client process then connects by opening that port and sending a connect message. If the server accepts the connection, a new unnamed port object is created for the connection. Port objects are securable kernel objects that allow a process to identify the process on the other side of the connection.
For short messages (fewer than 304 bytesFact|date=July 2008) the kernel copies the message buffers between processes. Longer messages require the creation of a shared memory section to transfer data, which the LPC service maps between the processes instead.
A related method of
inter-process communication known as "Quick LPC" uses shared memory for data transfer and special event pair objects for synchronization. Event pairs allow the called thread to continue the current quantum, reducing scheduling overhead and latency. A standard port object (or some other IPC mechanism) is needed for initial communication.References
* Prasad Dabak, Milind Borate, Sandeep Phadke. "Undocumented Windows NT."
Hungry Minds , 1999. ISBN 0-7645-4569-8
* David A. Solomon, Mark E. Russinovich. "Inside Windows 2000." Microsoft Press. ISBN 0-7356-1021-5External links
* [http://www.windowsitlibrary.com/Content/356/08/toc.html Local Procedure Call] - Includes explanation of undocumented functions
* [http://www.zezula.net/en/prog/lpc.html LPC Communication]
Wikimedia Foundation. 2010.