Author: hbelusca
Date: Mon Nov 7 01:06:24 2016
New Revision: 73163
URL:
http://svn.reactos.org/svn/reactos?rev=73163&view=rev
Log:
[NTOS:LPC]: Fix the function prototypes (reference: Process Hacker + how the parameters
are used in the code).
[NOTS][NDK]: Fix whitespace in header files.
[XDK]: Define PORT_MAXIMUM_MESSAGE_LENGTH before actually using it in the different
IO_ERROR_LOG_xxx #defines, for consistency purposes.
Modified:
trunk/reactos/ntoskrnl/include/internal/io_x.h
trunk/reactos/ntoskrnl/lpc/complete.c
trunk/reactos/ntoskrnl/lpc/connect.c
trunk/reactos/sdk/include/ndk/iotypes.h
trunk/reactos/sdk/include/ndk/lpcfuncs.h
trunk/reactos/sdk/include/xdk/iotypes.h
Modified: trunk/reactos/ntoskrnl/include/internal/io_x.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/io_x.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/io_x.h [iso-8859-1] Mon Nov 7 01:06:24 2016
@@ -11,7 +11,7 @@
VOID
IopLockFileObject(IN PFILE_OBJECT FileObject)
{
- /* Lock the FO and check for contention */
+ /* Lock the FO and check for contention */
InterlockedIncrement((PLONG)&FileObject->Waiters);
while (InterlockedCompareExchange((PLONG)&FileObject->Busy, TRUE, FALSE) !=
FALSE)
{
Modified: trunk/reactos/ntoskrnl/lpc/complete.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/complete.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/lpc/complete.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/lpc/complete.c [iso-8859-1] Mon Nov 7 01:06:24 2016
@@ -41,8 +41,8 @@
IN PVOID PortContext OPTIONAL,
IN PPORT_MESSAGE ReplyMessage,
IN BOOLEAN AcceptConnection,
- IN PPORT_VIEW ServerView,
- IN PREMOTE_PORT_VIEW ClientView)
+ IN OUT PPORT_VIEW ServerView OPTIONAL,
+ OUT PREMOTE_PORT_VIEW ClientView OPTIONAL)
{
NTSTATUS Status;
KPROCESSOR_MODE PreviousMode = KeGetPreviousMode();
Modified: trunk/reactos/ntoskrnl/lpc/connect.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/connect.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/lpc/connect.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/lpc/connect.c [iso-8859-1] Mon Nov 7 01:06:24 2016
@@ -79,7 +79,7 @@
NTAPI
NtSecureConnectPort(OUT PHANDLE PortHandle,
IN PUNICODE_STRING PortName,
- IN PSECURITY_QUALITY_OF_SERVICE Qos,
+ IN PSECURITY_QUALITY_OF_SERVICE SecurityQos,
IN OUT PPORT_VIEW ClientView OPTIONAL,
IN PSID ServerSid OPTIONAL,
IN OUT PREMOTE_PORT_VIEW ServerView OPTIONAL,
@@ -103,9 +103,9 @@
PAGED_CODE();
LPCTRACE(LPC_CONNECT_DEBUG,
- "Name: %wZ. Qos: %p. Views: %p/%p. Sid: %p\n",
+ "Name: %wZ. SecurityQos: %p. Views: %p/%p. Sid: %p\n",
PortName,
- Qos,
+ SecurityQos,
ClientView,
ServerView,
ServerSid);
@@ -588,17 +588,17 @@
NTAPI
NtConnectPort(OUT PHANDLE PortHandle,
IN PUNICODE_STRING PortName,
- IN PSECURITY_QUALITY_OF_SERVICE Qos,
- IN PPORT_VIEW ClientView,
- IN PREMOTE_PORT_VIEW ServerView,
- OUT PULONG MaxMessageLength,
- IN PVOID ConnectionInformation,
- OUT PULONG ConnectionInformationLength)
+ IN PSECURITY_QUALITY_OF_SERVICE SecurityQos,
+ IN OUT PPORT_VIEW ClientView OPTIONAL,
+ IN OUT PREMOTE_PORT_VIEW ServerView OPTIONAL,
+ OUT PULONG MaxMessageLength OPTIONAL,
+ IN OUT PVOID ConnectionInformation OPTIONAL,
+ IN OUT PULONG ConnectionInformationLength OPTIONAL)
{
/* Call the newer API */
return NtSecureConnectPort(PortHandle,
PortName,
- Qos,
+ SecurityQos,
ClientView,
NULL,
ServerView,
Modified: trunk/reactos/sdk/include/ndk/iotypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/ndk/iotypes.h?…
==============================================================================
--- trunk/reactos/sdk/include/ndk/iotypes.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/ndk/iotypes.h [iso-8859-1] Mon Nov 7 01:06:24 2016
@@ -722,7 +722,7 @@
ULONG IoControlCode;
LARGE_INTEGER DeviceOffset;
ULONG DumpData[1];
-}IO_ERROR_LOG_PACKET, *PIO_ERROR_LOG_PACKET;
+} IO_ERROR_LOG_PACKET, *PIO_ERROR_LOG_PACKET;
typedef struct _IO_ERROR_LOG_MESSAGE
{
Modified: trunk/reactos/sdk/include/ndk/lpcfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/ndk/lpcfuncs.h…
==============================================================================
--- trunk/reactos/sdk/include/ndk/lpcfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/ndk/lpcfuncs.h [iso-8859-1] Mon Nov 7 01:06:24 2016
@@ -56,8 +56,8 @@
_In_opt_ PVOID PortContext,
_In_ PPORT_MESSAGE ConnectionRequest,
_In_ BOOLEAN AcceptConnection,
- _In_opt_ PPORT_VIEW ServerView,
- _In_opt_ PREMOTE_PORT_VIEW ClientView
+ _Inout_opt_ PPORT_VIEW ServerView,
+ _Out_opt_ PREMOTE_PORT_VIEW ClientView
);
NTSYSCALLAPI
@@ -74,11 +74,11 @@
_Out_ PHANDLE PortHandle,
_In_ PUNICODE_STRING PortName,
_In_ PSECURITY_QUALITY_OF_SERVICE SecurityQos,
- _In_opt_ PPORT_VIEW ClientView,
- _In_opt_ PREMOTE_PORT_VIEW ServerView,
- _In_opt_ PULONG MaxMessageLength,
- _In_opt_ PVOID ConnectionInformation,
- _In_opt_ PULONG ConnectionInformationLength
+ _Inout_opt_ PPORT_VIEW ClientView,
+ _Inout_opt_ PREMOTE_PORT_VIEW ServerView,
+ _Out_opt_ PULONG MaxMessageLength,
+ _Inout_opt_ PVOID ConnectionInformation,
+ _Inout_opt_ PULONG ConnectionInformationLength
);
NTSYSCALLAPI
@@ -209,12 +209,12 @@
_Out_ PHANDLE PortHandle,
_In_ PUNICODE_STRING PortName,
_In_ PSECURITY_QUALITY_OF_SERVICE SecurityQos,
- _In_opt_ PPORT_VIEW ClientView,
- _In_opt_ PSID Sid,
- _In_opt_ PREMOTE_PORT_VIEW ServerView,
- _In_opt_ PULONG MaxMessageLength,
- _In_opt_ PVOID ConnectionInformation,
- _Out_opt_ PULONG ConnectionInformationLength
+ _Inout_opt_ PPORT_VIEW ClientView,
+ _In_opt_ PSID ServerSid,
+ _Inout_opt_ PREMOTE_PORT_VIEW ServerView,
+ _Out_opt_ PULONG MaxMessageLength,
+ _Inout_opt_ PVOID ConnectionInformation,
+ _Inout_opt_ PULONG ConnectionInformationLength
);
NTSYSCALLAPI
Modified: trunk/reactos/sdk/include/xdk/iotypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/xdk/iotypes.h?…
==============================================================================
--- trunk/reactos/sdk/include/xdk/iotypes.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/xdk/iotypes.h [iso-8859-1] Mon Nov 7 01:06:24 2016
@@ -1973,6 +1973,13 @@
IO_ERROR_LOG_PACKET EntryData;
} IO_ERROR_LOG_MESSAGE, *PIO_ERROR_LOG_MESSAGE;
+/* See ndk/lpctypes.h */
+#ifdef _WIN64
+#define PORT_MAXIMUM_MESSAGE_LENGTH 512
+#else
+#define PORT_MAXIMUM_MESSAGE_LENGTH 256
+#endif
+
#define ERROR_LOG_LIMIT_SIZE 240
#define IO_ERROR_LOG_MESSAGE_HEADER_LENGTH (sizeof(IO_ERROR_LOG_MESSAGE) - \
sizeof(IO_ERROR_LOG_PACKET) + \
@@ -1985,12 +1992,6 @@
PORT_MAXIMUM_MESSAGE_LENGTH)
#define ERROR_LOG_MAXIMUM_SIZE (IO_ERROR_LOG_MESSAGE_LENGTH - \
IO_ERROR_LOG_MESSAGE_HEADER_LENGTH)
-
-#ifdef _WIN64
-#define PORT_MAXIMUM_MESSAGE_LENGTH 512
-#else
-#define PORT_MAXIMUM_MESSAGE_LENGTH 256
-#endif
typedef enum _DMA_WIDTH {
Width8Bits,