- Use correct, documented, LPC Message structures (PORT_VIEW,
REMOTE_PORT_VIEW). Fix all caller code to use new member names and
structure names.
Modified: trunk/reactos/include/ndk/lpctypes.h
Modified: trunk/reactos/include/ndk/zwfuncs.h
Modified: trunk/reactos/lib/ntdll/csr/lpc.c
Modified: trunk/reactos/ntoskrnl/lpc/connect.c
Modified: trunk/reactos/subsys/csrss/api/wapi.c
_____
Modified: trunk/reactos/include/ndk/lpctypes.h
--- trunk/reactos/include/ndk/lpctypes.h 2005-08-11 03:15:17 UTC
(rev 17276)
+++ trunk/reactos/include/ndk/lpctypes.h 2005-08-11 03:23:44 UTC
(rev 17277)
@@ -87,24 +87,22 @@
};
} PORT_MESSAGE, *PPORT_MESSAGE;
-/* FIXME: USE REAL DEFINITION */
-typedef struct _LPC_SECTION_WRITE
+typedef struct _PORT_VIEW
{
- ULONG Length;
- HANDLE SectionHandle;
- ULONG SectionOffset;
- ULONG ViewSize;
- PVOID ViewBase;
- PVOID TargetViewBase;
-} LPC_SECTION_WRITE, *PLPC_SECTION_WRITE;
+ ULONG Length;
+ LPC_HANDLE SectionHandle;
+ ULONG SectionOffset;
+ LPC_SIZE_T ViewSize;
+ LPC_PVOID ViewBase;
+ LPC_PVOID ViewRemoteBase;
+} PORT_VIEW, *PPORT_VIEW;
-/* FIXME: USE REAL DEFINITION */
-typedef struct _LPC_SECTION_READ
+typedef struct _REMOTE_PORT_VIEW
{
- ULONG Length;
- ULONG ViewSize;
- PVOID ViewBase;
-} LPC_SECTION_READ, *PLPC_SECTION_READ;
+ ULONG Length;
+ LPC_SIZE_T ViewSize;
+ LPC_PVOID ViewBase;
+} REMOTE_PORT_VIEW, *PREMOTE_PORT_VIEW;
/* FIXME: USE REAL DEFINITION */
typedef struct _LPC_MAX_MESSAGE
_____
Modified: trunk/reactos/include/ndk/zwfuncs.h
--- trunk/reactos/include/ndk/zwfuncs.h 2005-08-11 03:15:17 UTC (rev
17276)
+++ trunk/reactos/include/ndk/zwfuncs.h 2005-08-11 03:23:44 UTC (rev
17277)
@@ -27,8 +27,8 @@
HANDLE NamedPortHandle,
PPORT_MESSAGE ServerReply,
BOOLEAN AcceptIt,
- PLPC_SECTION_WRITE WriteMap,
- PLPC_SECTION_READ ReadMap
+ PPORT_VIEW WriteMap,
+ PREMOTE_PORT_VIEW ReadMap
);
NTSTATUS
@@ -350,8 +350,8 @@
PHANDLE PortHandle,
PUNICODE_STRING PortName,
PSECURITY_QUALITY_OF_SERVICE SecurityQos,
- PLPC_SECTION_WRITE SectionInfo,
- PLPC_SECTION_READ MapInfo,
+ PPORT_VIEW SectionInfo,
+ PREMOTE_PORT_VIEW MapInfo,
PULONG MaxMessageSize,
PVOID ConnectInfo,
PULONG ConnectInfoLength
@@ -363,8 +363,8 @@
PHANDLE PortHandle,
PUNICODE_STRING PortName,
PSECURITY_QUALITY_OF_SERVICE SecurityQos,
- PLPC_SECTION_WRITE SectionInfo,
- PLPC_SECTION_READ MapInfo,
+ PPORT_VIEW SectionInfo,
+ PREMOTE_PORT_VIEW MapInfo,
PULONG MaxMessageSize,
PVOID ConnectInfo,
PULONG ConnectInfoLength
_____
Modified: trunk/reactos/lib/ntdll/csr/lpc.c
--- trunk/reactos/lib/ntdll/csr/lpc.c 2005-08-11 03:15:17 UTC (rev
17276)
+++ trunk/reactos/lib/ntdll/csr/lpc.c 2005-08-11 03:23:44 UTC (rev
17277)
@@ -113,7 +113,7 @@
UNICODE_STRING PortName =
RTL_CONSTANT_STRING(L"\\Windows\\ApiPort");
ULONG ConnectInfoLength;
CSR_API_MESSAGE Request;
- LPC_SECTION_WRITE LpcWrite;
+ PORT_VIEW LpcWrite;
HANDLE CsrSectionHandle;
LARGE_INTEGER CsrSectionViewSize;
@@ -135,7 +135,7 @@
return(Status);
}
ConnectInfoLength = 0;
- LpcWrite.Length = sizeof(LPC_SECTION_WRITE);
+ LpcWrite.Length = sizeof(PORT_VIEW);
LpcWrite.SectionHandle = CsrSectionHandle;
LpcWrite.SectionOffset = 0;
LpcWrite.ViewSize = CsrSectionViewSize.u.LowPart;
@@ -155,7 +155,7 @@
NtClose(CsrSectionHandle);
CsrSectionMapBase = LpcWrite.ViewBase;
- CsrSectionMapServerBase = LpcWrite.TargetViewBase;
+ CsrSectionMapServerBase = LpcWrite.ViewRemoteBase;
/* Create the heap for communication for csrss. */
CsrCommHeap = RtlCreateHeap(0,
_____
Modified: trunk/reactos/ntoskrnl/lpc/connect.c
--- trunk/reactos/ntoskrnl/lpc/connect.c 2005-08-11 03:15:17 UTC
(rev 17276)
+++ trunk/reactos/ntoskrnl/lpc/connect.c 2005-08-11 03:23:44 UTC
(rev 17277)
@@ -240,15 +240,15 @@
NtConnectPort (PHANDLE
UnsafeConnectedPortHandle,
PUNICODE_STRING PortName,
PSECURITY_QUALITY_OF_SERVICE Qos,
- PLPC_SECTION_WRITE UnsafeWriteMap,
- PLPC_SECTION_READ UnsafeReadMap,
+ PPORT_VIEW UnsafeWriteMap,
+ PREMOTE_PORT_VIEW UnsafeReadMap,
PULONG
UnsafeMaximumMessageSize,
PVOID UnsafeConnectData,
PULONG UnsafeConnectDataLength)
{
HANDLE ConnectedPortHandle;
- LPC_SECTION_WRITE WriteMap;
- LPC_SECTION_READ ReadMap;
+ PORT_VIEW WriteMap;
+ REMOTE_PORT_VIEW ReadMap;
ULONG MaximumMessageSize;
PVOID ConnectData = NULL;
ULONG ConnectDataLength = 0;
@@ -297,11 +297,11 @@
_SEH_TRY
{
ProbeForWrite(UnsafeWriteMap,
- sizeof(LPC_SECTION_WRITE),
+ sizeof(PORT_VIEW),
1);
RtlCopyMemory(&WriteMap,
UnsafeWriteMap,
- sizeof(LPC_SECTION_WRITE));
+ sizeof(PORT_VIEW));
}
_SEH_HANDLE
{
@@ -318,10 +318,10 @@
{
RtlCopyMemory(&WriteMap,
UnsafeWriteMap,
- sizeof(LPC_SECTION_WRITE));
+ sizeof(PORT_VIEW));
}
- if (WriteMap.Length != sizeof(LPC_SECTION_WRITE))
+ if (WriteMap.Length != sizeof(PORT_VIEW))
{
return(STATUS_INVALID_PARAMETER_4);
}
@@ -457,7 +457,7 @@
SectionOffset,
WriteMap.ViewSize,
&WriteMap.ViewBase,
- &WriteMap.TargetViewBase,
+ &WriteMap.ViewRemoteBase,
&ReadMap.ViewSize,
&ReadMap.ViewBase,
&MaximumMessageSize,
@@ -579,14 +579,14 @@
{
RtlCopyMemory(UnsafeWriteMap,
&WriteMap,
- sizeof(LPC_SECTION_WRITE));
+ sizeof(PORT_VIEW));
}
if (UnsafeReadMap != NULL)
{
RtlCopyMemory(UnsafeReadMap,
&ReadMap,
- sizeof(LPC_SECTION_READ));
+ sizeof(REMOTE_PORT_VIEW));
}
if (UnsafeMaximumMessageSize != NULL)
@@ -613,14 +613,14 @@
{
RtlCopyMemory(UnsafeWriteMap,
&WriteMap,
- sizeof(LPC_SECTION_WRITE));
+ sizeof(PORT_VIEW));
}
if (UnsafeReadMap != NULL)
{
RtlCopyMemory(UnsafeReadMap,
&ReadMap,
- sizeof(LPC_SECTION_READ));
+ sizeof(REMOTE_PORT_VIEW));
}
if (UnsafeMaximumMessageSize != NULL)
@@ -658,8 +658,8 @@
HANDLE NamedPortHandle,
PPORT_MESSAGE LpcMessage,
BOOLEAN AcceptIt,
- PLPC_SECTION_WRITE WriteMap,
- PLPC_SECTION_READ ReadMap)
+ PPORT_VIEW WriteMap,
+ PREMOTE_PORT_VIEW ReadMap)
{
NTSTATUS Status;
PEPORT NamedPort;
@@ -799,11 +799,11 @@
}
SectionOffset.QuadPart = WriteMap->SectionOffset;
- WriteMap->TargetViewBase = 0;
+ WriteMap->ViewRemoteBase = 0;
CReply->ReceiveClientViewSize = WriteMap->ViewSize;
Status = MmMapViewOfSection(SectionObject,
CRequest->ConnectingProcess,
- &WriteMap->TargetViewBase,
+ &WriteMap->ViewRemoteBase,
0,
CReply->ReceiveClientViewSize,
&SectionOffset,
@@ -870,7 +870,7 @@
}
if (WriteMap != NULL)
{
- CReply->ReceiveClientViewBase = WriteMap->TargetViewBase;
+ CReply->ReceiveClientViewBase = WriteMap->ViewRemoteBase;
}
CReply->MaximumMessageSize = LPC_MAX_MESSAGE_LENGTH;
@@ -920,9 +920,9 @@
NtSecureConnectPort (OUT PHANDLE
ConnectedPort,
IN PUNICODE_STRING
PortName,
IN PSECURITY_QUALITY_OF_SERVICE Qos,
- IN OUT PLPC_SECTION_WRITE WriteMap
OPTIONAL,
+ IN OUT PPORT_VIEW WriteMap
OPTIONAL,
IN PSID
ServerSid OPTIONAL,
- IN OUT PLPC_SECTION_READ ReadMap
OPTIONAL,
+ IN OUT PREMOTE_PORT_VIEW ReadMap
OPTIONAL,
OUT PULONG
MaxMessageSize OPTIONAL,
IN OUT PVOID
ConnectInfo OPTIONAL,
IN OUT PULONG
UserConnectInfoLength OPTIONAL)
_____
Modified: trunk/reactos/subsys/csrss/api/wapi.c
--- trunk/reactos/subsys/csrss/api/wapi.c 2005-08-11 03:15:17 UTC
(rev 17276)
+++ trunk/reactos/subsys/csrss/api/wapi.c 2005-08-11 03:23:44 UTC
(rev 17277)
@@ -192,7 +192,7 @@
for (;;)
{
- LPC_SECTION_READ LpcRead;
+ REMOTE_PORT_VIEW LpcRead;
ServerPort = NULL;
Status = NtListenPort (hApiListenPort, & Request.Header);