Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 19 of file connect.c.
Referenced by NtSecureConnectPort().
{ PVOID SectionToMap; PLPCP_MESSAGE ReplyMessage; /* Acquire the LPC lock */ KeAcquireGuardedMutex(&LpcpLock); /* Check if the reply chain is not empty */ if (!IsListEmpty(&CurrentThread->LpcReplyChain)) { /* Remove this entry and re-initialize it */ RemoveEntryList(&CurrentThread->LpcReplyChain); InitializeListHead(&CurrentThread->LpcReplyChain); } /* Check if there's a reply message */ ReplyMessage = LpcpGetMessageFromThread(CurrentThread); if (ReplyMessage) { /* Get the message */ *Message = ReplyMessage; /* Check if it's got messages */ if (!IsListEmpty(&ReplyMessage->Entry)) { /* Clear the list */ RemoveEntryList(&ReplyMessage->Entry); InitializeListHead(&ReplyMessage->Entry); } /* Clear message data */ CurrentThread->LpcReceivedMessageId = 0; CurrentThread->LpcReplyMessage = NULL; /* Get the connection message and clear the section */ *ConnectMessage = (PLPCP_CONNECTION_MESSAGE)(ReplyMessage + 1); SectionToMap = (*ConnectMessage)->SectionToMap; (*ConnectMessage)->SectionToMap = NULL; } else { /* No message to return */ *Message = NULL; SectionToMap = NULL; } /* Release the lock and return the section */ KeReleaseGuardedMutex(&LpcpLock); return SectionToMap; }