#ifndef _NTLPCAPI_H
/**
* The NtImpersonateClientOfPort routine impersonates the client that sent a message.
*
* \param PortHandle Handle to the communication port.
* \param Message Pointer to the message from the client to impersonate.
* \return NTSTATUS Successful or errant status.
*/
NTSYSCALLAPI
NTSTATUS
NTAPI
NtImpersonateClientOfPort(
_In_ HANDLE PortHandle,
_In_ PPORT_MESSAGE Message
);
View code on GitHub#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwImpersonateClientOfPort(
_In_ HANDLE PortHandle,
_In_ PPORT_MESSAGE Message
);
View code on GitHubNo description available.
NtImpersonateClientOfPort is called by LPC server process to get security context of client. That means: client's Token Object is associated with calling server thread (like NtSetInformationThread with ThreadImpersonationToken information class).
HANDLE to Port Object opened with NtAcceptConnectPort call.
Pointer to LPC_MESSAGE structure contains reason of impersonation.