#ifndef _NTLPCAPI_H
// Port connection (server)
NTSYSCALLAPI
NTSTATUS
NTAPI
NtListenPort(
_In_ HANDLE PortHandle,
_Out_ PPORT_MESSAGE ConnectionRequest
);
View code on GitHub
#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwListenPort(
_In_ HANDLE PortHandle,
_Out_ PPORT_MESSAGE ConnectionRequest
);
View code on GitHub
NtListenPort
is used by LPC server.
HANDLE
to named Port Object, created with NtCreatePort
.
Result of call - pointer to structure LPC_MESSAGE
filled with incoming connection data.
Server process should create new thread starting from execution of NtAcceptConnectPort
. Main thread should call NtListenPort
again to make possible for other processes to connect to port.
LPC_MESSAGE
NtAcceptConnectPort
NtConnectPort
NtCreatePort