#ifndef _NTLPCAPI_H
//
// Port connection (server)
//
/**
* The NtListenPort routine waits for a connection request from a client.
*
* \param PortHandle Handle to the named port.
* \param ConnectionRequest Receives the details of the connection request.
* \return NTSTATUS Successful or errant status.
*/
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 GitHubNo description available.
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_MESSAGENtAcceptConnectPortNtConnectPortNtCreatePort