<s>
The	O
Local	B-Operating_System
Inter-Process	I-Operating_System
Communication	I-Operating_System
(	O
LPC	O
,	O
often	O
also	O
referred	O
to	O
as	O
Local	B-Operating_System
Procedure	I-Operating_System
Call	I-Operating_System
or	O
Lightweight	B-Operating_System
Procedure	I-Operating_System
Call	I-Operating_System
)	O
is	O
an	O
internal	O
,	O
undocumented	O
inter-process	B-Operating_System
communication	I-Operating_System
facility	O
provided	O
by	O
the	O
Microsoft	B-Device
Windows	I-Device
NT	I-Device
kernel	B-Operating_System
for	O
lightweight	O
IPC	B-Operating_System
between	O
processes	O
on	O
the	O
same	O
computer	O
.	O
</s>
<s>
As	O
of	O
Windows	B-Application
Vista	I-Application
,	O
LPC	O
has	O
been	O
rewritten	O
as	O
Asynchronous	B-Operating_System
Local	I-Operating_System
Inter-Process	I-Operating_System
Communication	I-Operating_System
(	O
ALPC	B-Operating_System
,	O
often	O
also	O
Advanced	O
Local	B-Operating_System
Procedure	I-Operating_System
Call	I-Operating_System
)	O
in	O
order	O
to	O
provide	O
a	O
high-speed	O
scalable	O
communication	O
mechanism	O
required	O
to	O
efficiently	O
implement	O
User-Mode	B-Application
Driver	I-Application
Framework	I-Application
(	O
UMDF	B-Application
)	O
,	O
whose	O
user-mode	O
parts	O
require	O
an	O
efficient	O
communication	O
channel	O
with	O
UMDF	B-Application
's	O
components	O
in	O
the	O
executive	O
.	O
</s>
<s>
The	O
(	O
A	O
)	O
LPC	O
interface	O
is	O
part	O
of	O
Windows	B-Device
NT	I-Device
's	O
undocumented	O
Native	B-Application
API	I-Application
,	O
and	O
as	O
such	O
is	O
not	O
available	O
to	O
applications	O
for	O
direct	O
use	O
.	O
</s>
<s>
when	O
using	O
the	O
Microsoft	B-General_Concept
RPC	I-General_Concept
API	O
to	O
communicate	O
locally	O
,	O
i.e.	O
</s>
<s>
(	O
A	O
)	O
LPC	O
is	O
implemented	O
using	O
kernel	B-Operating_System
"	O
port	O
"	O
objects	O
,	O
which	O
are	O
securable	O
(	O
with	O
ACLs	O
,	O
allowing	O
e.g.	O
</s>
<s>
only	O
specific	O
SIDs	O
to	O
use	O
them	O
)	O
and	O
allow	O
identification	O
of	O
the	O
process	B-Operating_System
on	O
the	O
other	O
side	O
of	O
the	O
connection	O
.	O
</s>
<s>
A	O
server	O
process	B-Operating_System
first	O
creates	O
a	O
named	O
server	O
connection	O
port	O
object	O
,	O
and	O
waits	O
for	O
clients	O
to	O
connect	O
.	O
</s>
<s>
The	O
client	O
receives	O
a	O
handle	O
to	O
the	O
client	O
communication	O
port	O
,	O
and	O
server	O
receives	O
a	O
handle	O
to	O
the	O
server	O
communication	O
port	O
,	O
and	O
the	O
inter-process	B-Operating_System
communication	I-Operating_System
channel	O
is	O
established	O
.	O
</s>
<s>
For	O
short	O
messages	O
(	O
fewer	O
than	O
256	O
bytes	O
)	O
the	O
kernel	B-Operating_System
copies	O
the	O
message	O
buffers	O
between	O
processes	O
,	O
from	O
the	O
address	B-General_Concept
space	I-General_Concept
of	O
the	O
sending	O
process	B-Operating_System
to	O
the	O
system	O
address	B-General_Concept
space	I-General_Concept
,	O
and	O
from	O
there	O
to	O
the	O
receiving	O
process	B-Operating_System
 '	O
address	B-General_Concept
space	I-General_Concept
.	O
</s>
<s>
a	O
small	O
message	O
,	O
using	O
the	O
first	O
method	O
of	O
(	O
A	O
)	O
LPC	O
)	O
to	O
the	O
receiving	O
process	B-Operating_System
pointing	O
to	O
the	O
sent	O
data	O
in	O
the	O
shared	O
memory	O
section	O
.	O
</s>
<s>
Server	O
can	O
directly	O
read	O
and	O
write	O
data	O
from	O
the	O
client	O
's	O
address	B-General_Concept
space	I-General_Concept
,	O
when	O
the	O
amount	O
of	O
data	O
is	O
too	O
large	O
to	O
fit	O
in	O
a	O
shared	O
section	O
.	O
</s>
<s>
ALPC	B-Operating_System
has	O
a	O
performance	O
advantage	O
over	O
the	O
former	O
LPC	O
interface	O
,	O
as	O
it	O
can	O
be	O
configured	O
to	O
use	O
I/O	B-Library
completion	I-Library
ports	I-Library
instead	O
of	O
synchronous	O
request/reply	O
mechanism	O
that	O
LPC	O
exclusively	O
uses	O
.	O
</s>
<s>
This	O
enables	O
ALPC	B-Operating_System
ports	O
high-speed	O
communication	O
which	O
automatically	O
balances	O
the	O
number	O
of	O
messages	O
and	O
threads	O
.	O
</s>
<s>
Additionally	O
,	O
ALPC	B-Operating_System
messages	O
can	O
be	O
batched	O
together	O
so	O
as	O
to	O
minimize	O
user-mode/kernel	O
-mode	O
switches	O
.	O
</s>
<s>
(	O
A	O
)	O
LPC	O
is	O
used	O
heavily	O
in	O
communication	O
between	O
internal	O
subsystems	O
in	O
Windows	B-Device
NT	I-Device
.	O
</s>
<s>
Quick	O
LPC	O
was	O
introduced	O
in	O
version	O
3.51	O
of	O
Windows	B-Device
NT	I-Device
to	O
make	O
these	O
calls	O
faster	O
.	O
</s>
<s>
This	O
method	O
was	O
largely	O
abandoned	O
in	O
version	O
4.0	O
in	O
favor	O
of	O
moving	O
the	O
performance	O
critical	O
server	O
portions	O
into	O
kernel	B-Operating_System
mode	O
(	O
win32k.sys	O
)	O
.	O
</s>
<s>
Winlogon	O
and	O
the	O
Security	B-Application
Reference	I-Application
Monitor	I-Application
use	O
it	O
to	O
communicate	O
with	O
the	O
LSASS	O
process	B-Operating_System
.	O
</s>
<s>
As	O
mentioned	O
,	O
Microsoft	B-General_Concept
RPC	I-General_Concept
can	O
use	O
(	O
A	O
)	O
LPC	O
as	O
a	O
transport	O
when	O
the	O
client	O
and	O
server	O
are	O
both	O
on	O
the	O
same	O
machine	O
.	O
</s>
<s>
The	O
implementation	O
of	O
remote	O
OLE	B-Operating_System
and	O
DCOM	B-Operating_System
in	O
many	O
cases	O
uses	O
(	O
A	O
)	O
LPC	O
for	O
local	O
communication	O
as	O
well	O
.	O
</s>
