}
Size = sizeof(QUEUEDMESSAGE);
- if (LpcReply && LpcReply->u1.s1.TotalLength > sizeof(PORT_MESSAGE))
+ if (LpcReply && LpcReply->u1.s1.TotalLength > (CSHORT)sizeof(PORT_MESSAGE))
{
Size += LpcReply->u1.s1.TotalLength - sizeof(PORT_MESSAGE);
}
* REVISIONS
*/
NTSTATUS STDCALL
-NtReplyWaitReceivePortEx(IN HANDLE PortHandle,
- OUT PULONG PortId,
- IN PPORT_MESSAGE LpcReply,
- OUT PPORT_MESSAGE LpcMessage,
- IN PLARGE_INTEGER Timeout)
+NtReplyWaitReceivePortEx(IN HANDLE PortHandle,
+ OUT PVOID *PortContext OPTIONAL,
+ IN PPORT_MESSAGE ReplyMessage OPTIONAL,
+ OUT PPORT_MESSAGE ReceiveMessage,
+ IN PLARGE_INTEGER Timeout OPTIONAL)
{
PEPORT Port;
KIRQL oldIrql;
PreviousMode = ExGetPreviousMode();
DPRINT("NtReplyWaitReceivePortEx(PortHandle %x, LpcReply %x, "
- "LpcMessage %x)\n", PortHandle, LpcReply, LpcMessage);
+ "LpcMessage %x)\n", PortHandle, ReplyMessage, ReceiveMessage);
if (PreviousMode != KernelMode)
{
_SEH_TRY
{
- ProbeForWrite(LpcMessage,
+ ProbeForWrite(ReceiveMessage,
sizeof(PORT_MESSAGE),
1);
}
/*
* Send the reply, only if port is connected
*/
- if (LpcReply != NULL && !Disconnected)
+ if (ReplyMessage != NULL && !Disconnected)
{
Status = EiReplyOrRequestPort(Port->OtherPort,
- LpcReply,
+ ReplyMessage,
LPC_REPLY,
Port);
KeReleaseSemaphore(&Port->OtherPort->Semaphore, IO_NO_INCREMENT, 1,
{
_SEH_TRY
{
- ProbeForWrite((PVOID)(LpcMessage + 1),
+ ProbeForWrite((PVOID)(ReceiveMessage + 1),
CRequest->ConnectDataLength,
1);
- RtlCopyMemory(LpcMessage,
+ RtlCopyMemory(ReceiveMessage,
&Header,
sizeof(PORT_MESSAGE));
- RtlCopyMemory((PVOID)(LpcMessage + 1),
+ RtlCopyMemory((PVOID)(ReceiveMessage + 1),
CRequest->ConnectData,
CRequest->ConnectDataLength);
}
}
else
{
- RtlCopyMemory(LpcMessage,
+ RtlCopyMemory(ReceiveMessage,
&Header,
sizeof(PORT_MESSAGE));
- RtlCopyMemory((PVOID)(LpcMessage + 1),
+ RtlCopyMemory((PVOID)(ReceiveMessage + 1),
CRequest->ConnectData,
CRequest->ConnectDataLength);
}
{
_SEH_TRY
{
- ProbeForWrite(LpcMessage,
+ ProbeForWrite(ReceiveMessage,
Request->Message.u1.s1.TotalLength,
1);
- RtlCopyMemory(LpcMessage,
+ RtlCopyMemory(ReceiveMessage,
&Request->Message,
Request->Message.u1.s1.TotalLength);
}
}
else
{
- RtlCopyMemory(LpcMessage,
+ RtlCopyMemory(ReceiveMessage,
&Request->Message,
Request->Message.u1.s1.TotalLength);
}
* REVISIONS
*/
NTSTATUS STDCALL
-NtReplyWaitReceivePort (IN HANDLE PortHandle,
- OUT PULONG PortId,
- IN PPORT_MESSAGE LpcReply,
- OUT PPORT_MESSAGE LpcMessage)
+NtReplyWaitReceivePort(IN HANDLE PortHandle,
+ OUT PVOID *PortContext OPTIONAL,
+ IN PPORT_MESSAGE ReplyMessage OPTIONAL,
+ OUT PPORT_MESSAGE ReceiveMessage)
{
- return(NtReplyWaitReceivePortEx (PortHandle,
- PortId,
- LpcReply,
- LpcMessage,
- NULL));
+ return NtReplyWaitReceivePortEx(PortHandle,
+ PortContext,
+ ReplyMessage,
+ ReceiveMessage,
+ NULL);
}
/**********************************************************************