https://learn.microsoft.com/en-us/windows/win32/api/rpcdce/nf-rpcdce-rpcimpersonateclient
RpcImpersonateClient function (rpcdce.h) - Win32 apps | Microsoft Learn
A server thread that is processing client remote procedure calls can call the RpcImpersonateClient function to impersonate the active client.
functionhappsmicrosoftlearn