I need to retrieve the client process id in RPC callback which is using ncalrpc protocol. MSDN suggests to use RpcServerInqCallAttributes with RPC\_CALL\_ATTRIBUTES\_V2 structure. The document says the process id is returned as a handle

<https://msdn.microsoft.com/en-us/library/windows/desktop/aa378501(v=vs.85).aspx>

I couldn't get that. Is it pointing to a DWORD which has the process id or Is it a process handle where I can get the PID using GetProcessId API?

Also in both cases, who closes the handle or delete the memory allocated for DWORD?