- Various fixes to headers, such as fixing some LPC prototypes, adding/correcting some structures, adding some missing definitions, etc...
Modified: trunk/reactos/include/ndk/dbgktypes.h
Modified: trunk/reactos/include/ndk/extypes.h
Modified: trunk/reactos/include/ndk/lpctypes.h
Modified: trunk/reactos/include/ndk/mmtypes.h
Modified: trunk/reactos/include/ndk/ntndk.h
Modified: trunk/reactos/include/ndk/rtlfuncs.h
Modified: trunk/reactos/include/ndk/rtltypes.h
Modified: trunk/reactos/include/ndk/setypes.h
Modified: trunk/reactos/include/ndk/umfuncs.h
Modified: trunk/reactos/include/ndk/zwfuncs.h
Modified: trunk/reactos/lib/ntdll/ldr/utils.c
Modified: trunk/reactos/ntoskrnl/ex/error.c
Modified: trunk/reactos/ntoskrnl/include/internal/port.h
Modified: trunk/reactos/ntoskrnl/lpc/reply.c
Modified: trunk/reactos/ntoskrnl/lpc/send.c
Modified: trunk/reactos/subsys/smss/smapi.c

Modified: trunk/reactos/include/ndk/dbgktypes.h
--- trunk/reactos/include/ndk/dbgktypes.h	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/include/ndk/dbgktypes.h	2005-09-04 18:00:59 UTC (rev 17638)
@@ -35,6 +35,7 @@
 } DEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION, *
 PDEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION;
 
+#ifndef NTOS_MODE_USER
 typedef struct _DBGK_DEBUG_OBJECT
 {
     KEVENT Event;
@@ -45,11 +46,12 @@
         ULONG Flags;
         struct
         {
-            UCHAR DebuggerInactive  :1;
-            UCHAR KillProcessOnExit :1;
+            UCHAR DebuggerInactive:1;
+            UCHAR KillProcessOnExit:1;
         };
     };
 } DBGK_DEBUG_OBJECT, *PDBGK_DEBUG_OBJECT;
+#endif
 
 typedef enum _DBG_STATE
 {
@@ -136,4 +138,21 @@
     } StateInfo;
 } DBGUI_WAIT_STATE_CHANGE, *PDBGUI_WAIT_STATE_CHANGE;
 
+typedef struct _DBGKM_MSG
+{
+    PORT_MESSAGE h;
+    ULONG Opcode;
+    ULONG Status;
+    union
+    {
+	    DBGKM_EXCEPTION Exception;
+        DBGKM_CREATE_THREAD CreateThread;
+        DBGKM_CREATE_PROCESS CreateProcess;
+	    DBGKM_EXIT_THREAD ExitThread;
+        DBGKM_EXIT_PROCESS ExitProcess;
+	    DBGKM_LOAD_DLL LoadDll;
+        DBGKM_UNLOAD_DLL UnloadDll;
+    };
+} DBGKM_MSG, *PDBGKM_MSG;
+
 #endif

Modified: trunk/reactos/include/ndk/extypes.h
--- trunk/reactos/include/ndk/extypes.h	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/include/ndk/extypes.h	2005-09-04 18:00:59 UTC (rev 17638)
@@ -37,6 +37,8 @@
 #define SEMAPHORE_QUERY_STATE   0x0001
 #endif
 
+#define MAXIMUM_HARDERROR_PARAMETERS 4
+
 /* ENUMERATIONS **************************************************************/
 
 /* TYPES *********************************************************************/

Modified: trunk/reactos/include/ndk/lpctypes.h
--- trunk/reactos/include/ndk/lpctypes.h	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/include/ndk/lpctypes.h	2005-09-04 18:00:59 UTC (rev 17638)
@@ -171,6 +171,24 @@
 } LPCP_CONNECTION_MESSAGE, *PLPCP_CONNECTION_MESSAGE;
 #endif
 
+typedef struct _HARDERROR_MSG
+{
+    PORT_MESSAGE h;
+    NTSTATUS Status;
+    LARGE_INTEGER ErrorTime;
+    ULONG ValidResponseOptions;
+    ULONG Response;
+    ULONG NumberOfParameters;
+    ULONG UnicodeStringParameterMask;
+    ULONG Parameters[MAXIMUM_HARDERROR_PARAMETERS];
+} HARDERROR_MSG, *PHARDERROR_MSG;
+
+typedef struct _CLIENT_DIED_MSG
+{
+    PORT_MESSAGE h;
+    LARGE_INTEGER CreateTime;
+} CLIENT_DIED_MSG, *PCLIENT_DIED_MSG;
+
 /* CONSTANTS *****************************************************************/
 
 #define PORT_MAXIMUM_MESSAGE_LENGTH 256

Modified: trunk/reactos/include/ndk/mmtypes.h
--- trunk/reactos/include/ndk/mmtypes.h	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/include/ndk/mmtypes.h	2005-09-04 18:00:59 UTC (rev 17638)
@@ -15,6 +15,10 @@
 /* EXPORTED DATA *************************************************************/
 
 /* CONSTANTS *****************************************************************/
+#ifdef NTOS_MODE_USER
+#define SEC_BASED       0x00200000
+#define SEC_NO_CHANGE   0x00400000
+#endif
 
 /* ENUMERATIONS **************************************************************/
 

Modified: trunk/reactos/include/ndk/ntndk.h
--- trunk/reactos/include/ndk/ntndk.h	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/include/ndk/ntndk.h	2005-09-04 18:00:59 UTC (rev 17638)
@@ -25,7 +25,6 @@
 #include "kdfuncs.h"        /* Kernel Debugger Functions */
 #include "cctypes.h"        /* Cache Manager Types */
 #include "potypes.h"        /* Power Manager Types */
-#include "dbgktypes.h"      /* User-Mode Kernel Debugging Types */
 #include "haltypes.h"       /* Hardware Abstraction Layer Types */
 #include "halfuncs.h"       /* Hardware Abstraction Layer Functions */
 #include "inbvfuncs.h"      /* Initialization Boot Video Functions */
@@ -34,7 +33,6 @@
 #include "mmfuncs.h"        /* Memory Manager Functions */
 #include "obfuncs.h"        /* Object Manager Functions */
 #include "psfuncs.h"        /* Process Manager Functions */
-#include "setypes.h"        /* Security Subsystem Types */
 #include "sefuncs.h"        /* Security Subsystem Functions */
 #endif /* !NTOS_MODE_USER */
 
@@ -50,10 +48,12 @@
 #include "obtypes.h"        /* Object Manager Types */
 #include "pstypes.h"        /* Process Manager Types */
 #include "lpctypes.h"       /* Local Procedure Call Types */
+#include "dbgktypes.h"      /* User-Mode Kernel Debugging Types */
 #include "zwtypes.h"        /* Native Types */
 #include "zwfuncs.h"        /* Native Functions (System Calls) */
 #include "rtltypes.h"       /* Runtime Library Types */
 #include "rtlfuncs.h"       /* Runtime Library Functions */
+#include "setypes.h"        /* Security Subsystem Types */
 #include "umfuncs.h"        /* User-Mode NT Library Functions */
 #include "i386/floatsave.h" /* Floating Point Save Area Definitions for i386 */
 #include "i386/segment.h"   /* Kernel CPU Segment Definitions for i386 */

Modified: trunk/reactos/include/ndk/rtlfuncs.h
--- trunk/reactos/include/ndk/rtlfuncs.h	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/include/ndk/rtlfuncs.h	2005-09-04 18:00:59 UTC (rev 17638)
@@ -53,6 +53,10 @@
 STDCALL
 RtlRaiseStatus(NTSTATUS Status);
 
+LONG
+STDCALL
+RtlUnhandledExceptionFilter(struct _EXCEPTION_POINTERS* ExceptionInfo);
+
 VOID
 STDCALL
 RtlUnwind(
@@ -231,6 +235,15 @@
 
 NTSTATUS
 STDCALL
+RtlAdjustPrivilege(
+    IN ULONG Privilege,
+    IN BOOLEAN NewValue,
+    IN BOOLEAN ForThread,
+    OUT PBOOLEAN OldValue
+);
+
+NTSTATUS
+STDCALL
 RtlAllocateAndInitializeSid(
     IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
     IN UCHAR SubAuthorityCount,

Modified: trunk/reactos/include/ndk/rtltypes.h
--- trunk/reactos/include/ndk/rtltypes.h	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/include/ndk/rtltypes.h	2005-09-04 18:00:59 UTC (rev 17638)
@@ -210,6 +210,9 @@
     sizeof(__SOURCE_STRING__), \
     (__SOURCE_STRING__) \
 }
+
+#define RtlEqualLuid(L1, L2) (((L1)->HighPart == (L2)->HighPart) && \
+                              ((L1)->LowPart  == (L2)->LowPart))
 #endif
 
 /* FIXME: Rename these */

Modified: trunk/reactos/include/ndk/setypes.h
--- trunk/reactos/include/ndk/setypes.h	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/include/ndk/setypes.h	2005-09-04 18:00:59 UTC (rev 17638)
@@ -14,11 +14,40 @@
 /* EXPORTED DATA *************************************************************/
 
 /* CONSTANTS *****************************************************************/
+#ifdef NTOS_MODE_USER
+#define SE_MIN_WELL_KNOWN_PRIVILEGE       (2L)
+#define SE_CREATE_TOKEN_PRIVILEGE         (2L)
+#define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE   (3L)
+#define SE_LOCK_MEMORY_PRIVILEGE          (4L)
+#define SE_INCREASE_QUOTA_PRIVILEGE       (5L)
+#define SE_UNSOLICITED_INPUT_PRIVILEGE    (6L)
+#define SE_MACHINE_ACCOUNT_PRIVILEGE      (6L)
+#define SE_TCB_PRIVILEGE                  (7L)
+#define SE_SECURITY_PRIVILEGE             (8L)
+#define SE_TAKE_OWNERSHIP_PRIVILEGE       (9L)
+#define SE_LOAD_DRIVER_PRIVILEGE          (10L)
+#define SE_SYSTEM_PROFILE_PRIVILEGE       (11L)
+#define SE_SYSTEMTIME_PRIVILEGE           (12L)
+#define SE_PROF_SINGLE_PROCESS_PRIVILEGE  (13L)
+#define SE_INC_BASE_PRIORITY_PRIVILEGE    (14L)
+#define SE_CREATE_PAGEFILE_PRIVILEGE      (15L)
+#define SE_CREATE_PERMANENT_PRIVILEGE     (16L)
+#define SE_BACKUP_PRIVILEGE               (17L)
+#define SE_RESTORE_PRIVILEGE              (18L)
+#define SE_SHUTDOWN_PRIVILEGE             (19L)
+#define SE_DEBUG_PRIVILEGE                (20L)
+#define SE_AUDIT_PRIVILEGE                (21L)
+#define SE_SYSTEM_ENVIRONMENT_PRIVILEGE   (22L)
+#define SE_CHANGE_NOTIFY_PRIVILEGE        (23L)
+#define SE_REMOTE_SHUTDOWN_PRIVILEGE      (24L)
+#define SE_MAX_WELL_KNOWN_PRIVILEGE       (SE_REMOTE_SHUTDOWN_PRIVILEGE)
+#endif
 
 /* ENUMERATIONS **************************************************************/
 
 /* TYPES *********************************************************************/
 
+#ifndef NTOS_MODE_USER
 typedef struct _SEP_AUDIT_POLICY_CATEGORIES
 {
     UCHAR System:4;
@@ -96,3 +125,4 @@
 } SE_AUDIT_PROCESS_CREATION_INFO, *PSE_AUDIT_PROCESS_CREATION_INFO;
 
 #endif
+#endif

Modified: trunk/reactos/include/ndk/umfuncs.h
--- trunk/reactos/include/ndk/umfuncs.h	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/include/ndk/umfuncs.h	2005-09-04 18:00:59 UTC (rev 17638)
@@ -138,10 +138,10 @@
 NTSTATUS
 STDCALL
 LdrGetDllHandle(
-    IN PWCHAR Path OPTIONAL,
-    IN ULONG Unknown2,
+    IN PWSTR DllPath OPTIONAL,
+    IN PULONG DllCharacteristics,
     IN PUNICODE_STRING DllName,
-    OUT PVOID *BaseAddress
+    OUT PVOID *DllHandle
 );
 
 NTSTATUS

Modified: trunk/reactos/include/ndk/zwfuncs.h
--- trunk/reactos/include/ndk/zwfuncs.h	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/include/ndk/zwfuncs.h	2005-09-04 18:00:59 UTC (rev 17638)
@@ -21,15 +21,26 @@
 STDCALL
 NtAcceptConnectPort(
     PHANDLE PortHandle,
-    HANDLE NamedPortHandle,
-    PPORT_MESSAGE ServerReply,
-    BOOLEAN AcceptIt,
-    PPORT_VIEW WriteMap,
-    PREMOTE_PORT_VIEW ReadMap
+    PVOID PortContext OPTIONAL,
+    PPORT_MESSAGE ConnectionRequest,
+    BOOLEAN AcceptConnection,
+    PPORT_VIEW ServerView OPTIONAL,
+    PREMOTE_PORT_VIEW ClientView OPTIONAL
 );
 
 NTSTATUS
 STDCALL
+ZwAcceptConnectPort(
+    PHANDLE PortHandle,
+    PVOID PortContext OPTIONAL,
+    PPORT_MESSAGE ConnectionRequest,
+    BOOLEAN AcceptConnection,
+    PPORT_VIEW ServerView OPTIONAL,
+    PREMOTE_PORT_VIEW ClientView OPTIONAL
+);
+
+NTSTATUS
+STDCALL
 NtAccessCheck(
     IN PSECURITY_DESCRIPTOR SecurityDescriptor,
     IN HANDLE ClientToken,
@@ -347,11 +358,11 @@
     PHANDLE PortHandle,
     PUNICODE_STRING PortName,
     PSECURITY_QUALITY_OF_SERVICE SecurityQos,
-    PPORT_VIEW SectionInfo,
-    PREMOTE_PORT_VIEW MapInfo,
-    PULONG MaxMessageSize,
-    PVOID ConnectInfo,
-    PULONG ConnectInfoLength
+    PPORT_VIEW ClientView OPTIONAL,
+    PREMOTE_PORT_VIEW ServerView OPTIONAL,
+    PULONG MaxMessageLength OPTIONAL,
+    PVOID ConnectionInformation OPTIONAL,
+    PULONG ConnectionInformationLength OPTIONAL
 );
 
 NTSTATUS
@@ -360,11 +371,11 @@
     PHANDLE PortHandle,
     PUNICODE_STRING PortName,
     PSECURITY_QUALITY_OF_SERVICE SecurityQos,
-    PPORT_VIEW SectionInfo,
-    PREMOTE_PORT_VIEW MapInfo,
-    PULONG MaxMessageSize,
-    PVOID ConnectInfo,
-    PULONG ConnectInfoLength
+    PPORT_VIEW ClientView OPTIONAL,
+    PREMOTE_PORT_VIEW ServerView OPTIONAL,
+    PULONG MaxMessageLength OPTIONAL,
+    PVOID ConnectionInformation OPTIONAL,
+    PULONG ConnectionInformationLength OPTIONAL
 );
 
 NTSTATUS
@@ -612,19 +623,19 @@
 NtCreatePort(
     PHANDLE PortHandle,
     POBJECT_ATTRIBUTES ObjectAttributes,
-    ULONG MaxConnectInfoLength,
-    ULONG MaxDataLength,
-    ULONG NPMessageQueueSize OPTIONAL
+    ULONG MaxConnectionInfoLength,
+    ULONG MaxMessageLength,
+    ULONG MaxPoolUsage
 );
 
 NTSTATUS
 STDCALL
-NtCreatePort(
+ZwCreatePort(
     PHANDLE PortHandle,
     POBJECT_ATTRIBUTES ObjectAttributes,
-    ULONG MaxConnectInfoLength,
-    ULONG MaxDataLength,
-    ULONG NPMessageQueueSize OPTIONAL
+    ULONG MaxConnectionInfoLength,
+    ULONG MaxMessageLength,
+    ULONG MaxPoolUsage
 );
 
 NTSTATUS
@@ -1313,13 +1324,13 @@
 NTSTATUS
 STDCALL
 NtListenPort(HANDLE PortHandle,
-             PPORT_MESSAGE LpcMessage
+             PPORT_MESSAGE ConnectionRequest
 );
 
 NTSTATUS
 STDCALL
 ZwListenPort(HANDLE PortHandle,
-             PPORT_MESSAGE LpcMessage
+             PPORT_MESSAGE ConnectionRequest
 );
 
 NTSTATUS
@@ -2745,11 +2756,11 @@
 NtRaiseHardError(
     IN NTSTATUS ErrorStatus,
     IN ULONG NumberOfParameters,
-    IN PUNICODE_STRING UnicodeStringParameterMask OPTIONAL,
-    IN PVOID *Parameters,
-    IN HARDERROR_RESPONSE_OPTION ResponseOption,
-    OUT PHARDERROR_RESPONSE Response
-);
+    IN ULONG UnicodeStringParameterMask,
+    IN PULONG_PTR Parameters,
+    IN ULONG ValidResponseOptions,
+    OUT PULONG Response
+); 
 
 NTSTATUS
 STDCALL
@@ -2955,18 +2966,18 @@
 STDCALL
 NtReplyWaitReceivePort(
     HANDLE PortHandle,
-    PULONG PortId,
-    PPORT_MESSAGE MessageReply,
-    PPORT_MESSAGE MessageRequest
+    PVOID *PortContext OPTIONAL,
+    PPORT_MESSAGE ReplyMessage OPTIONAL,
+    PPORT_MESSAGE ReceiveMessage
 );
 
 NTSTATUS
 STDCALL
 ZwReplyWaitReceivePort(
     HANDLE PortHandle,
-    PULONG PortId,
-    PPORT_MESSAGE MessageReply,
-    PPORT_MESSAGE MessageRequest
+    PVOID *PortContext OPTIONAL,
+    PPORT_MESSAGE ReplyMessage,
+    PPORT_MESSAGE ReceiveMessage
 );
 
 NTSTATUS

Modified: trunk/reactos/lib/ntdll/ldr/utils.c
--- trunk/reactos/lib/ntdll/ldr/utils.c	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/lib/ntdll/ldr/utils.c	2005-09-04 18:00:59 UTC (rev 17638)
@@ -2285,33 +2285,34 @@
  * @implemented
  */
 NTSTATUS STDCALL
-LdrGetDllHandle(IN PWCHAR Path OPTIONAL,
-                IN ULONG Unknown2,
+LdrGetDllHandle(IN PWSTR DllPath OPTIONAL,
+                IN PULONG DllCharacteristics,
                 IN PUNICODE_STRING DllName,
-                OUT PVOID* BaseAddress)
+                OUT PVOID *DllHandle)
 {
     PLDR_DATA_TABLE_ENTRY Module;
     NTSTATUS Status;
 
-    TRACE_LDR("LdrGetDllHandle, searching for %wZ from %S\n", DllName, Path ? Path : L"");
+    TRACE_LDR("LdrGetDllHandle, searching for %wZ from %S\n",
+               DllName, DllPath ? DllPath : L"");
 
     /* NULL is the current executable */
     if (DllName == NULL)
       {
-        *BaseAddress = ExeModule->DllBase;
-        DPRINT("BaseAddress %x\n", *BaseAddress);
+        *DllHandle = ExeModule->DllBase;
+        DPRINT("BaseAddress %x\n", *DllHandle);
         return STATUS_SUCCESS;
       }
 
     Status = LdrFindEntryForName(DllName, &Module, FALSE);
     if (NT_SUCCESS(Status))
       {
-        *BaseAddress = Module->DllBase;
+        *DllHandle = Module->DllBase;
         return STATUS_SUCCESS;
       }
 
     DPRINT("Failed to find dll %wZ\n", DllName);
-    *BaseAddress = NULL;
+    *DllHandle = NULL;
     return STATUS_DLL_NOT_FOUND;
 }
 

Modified: trunk/reactos/ntoskrnl/ex/error.c
--- trunk/reactos/ntoskrnl/ex/error.c	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/ntoskrnl/ex/error.c	2005-09-04 18:00:59 UTC (rev 17638)
@@ -92,10 +92,10 @@
 STDCALL
 ExRaiseHardError(IN NTSTATUS ErrorStatus,
                  IN ULONG NumberOfParameters,
-                 IN PUNICODE_STRING UnicodeStringParameterMask OPTIONAL,
-                 IN PVOID *Parameters,
-                 IN HARDERROR_RESPONSE_OPTION ResponseOption,
-                 OUT PHARDERROR_RESPONSE Response)
+                 IN ULONG UnicodeStringParameterMask,
+                 IN PULONG_PTR Parameters,
+                 IN ULONG ValidResponseOptions,
+                 OUT PULONG Response)
 {
     UNIMPLEMENTED;
 }
@@ -104,10 +104,10 @@
 STDCALL
 NtRaiseHardError(IN NTSTATUS ErrorStatus,
                  IN ULONG NumberOfParameters,
-                 IN PUNICODE_STRING UnicodeStringParameterMask  OPTIONAL,
-                 IN PVOID *Parameters,
-                 IN HARDERROR_RESPONSE_OPTION ResponseOption,
-                 OUT PHARDERROR_RESPONSE Response)
+                 IN ULONG UnicodeStringParameterMask,
+                 IN PULONG_PTR Parameters,
+                 IN ULONG ValidResponseOptions,
+                 OUT PULONG Response)
 {
     DPRINT1("Hard error %x\n", ErrorStatus);
 
@@ -116,7 +116,7 @@
                      NumberOfParameters,
                      UnicodeStringParameterMask,
                      Parameters,
-                     ResponseOption,
+                     ValidResponseOptions,
                      Response);
 
     /* Return Success */

Modified: trunk/reactos/ntoskrnl/include/internal/port.h
--- trunk/reactos/ntoskrnl/include/internal/port.h	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/ntoskrnl/include/internal/port.h	2005-09-04 18:00:59 UTC (rev 17638)
@@ -90,61 +90,6 @@
   PORT_MESSAGE	Message;
 } QUEUEDMESSAGE,  *PQUEUEDMESSAGE;
 
-typedef struct _LPC_DBG_MESSAGE
-{
-   PORT_MESSAGE Header;
-   ULONG Type;
-   ULONG Status;
-   union
-     {
-	struct
-	  {
-	     EXCEPTION_RECORD ExceptionRecord;
-	     ULONG FirstChance;
-	  } Exception;
-	struct
-	  {
-	     ULONG Reserved;
-	     PVOID StartAddress;
-	  } CreateThread;
-	struct
-	  {
-	     ULONG Reserved;
-	     HANDLE FileHandle;
-	     PVOID Base;
-	     ULONG PointerToSymbolTable;
-	     ULONG NumberOfSymbols;
-	     ULONG Reserved2;
-	     PVOID EntryPoint;
-	  } CreateProcess;
-	struct
-	  {
-	     ULONG ExitCode;
-	  } ExitThread;
-	struct
-	  {
-	     ULONG ExitCode;
-	  } ExitProcess;
-	struct
-	  {
-	     HANDLE FileHandle;
-	     PVOID Base;
-	     ULONG PointerToSymbolTable;
-	     ULONG NumberOfSymbols;
-	  } LoadDll;
-	struct
-	  {
-	     PVOID Base;
-	  } UnloadDll;
-     } Data;
-} LPC_DBG_MESSAGE, *PLPC_DBG_MESSAGE;
-
-typedef struct _LPC_TERMINATION_MESSAGE
-{
-   PORT_MESSAGE Header;
-   LARGE_INTEGER CreationTime;
-} LPC_TERMINATION_MESSAGE, *PLPC_TERMINATION_MESSAGE;
-
 /* Code in ntoskrnl/lpc/close.h */
 
 VOID STDCALL

Modified: trunk/reactos/ntoskrnl/lpc/reply.c
--- trunk/reactos/ntoskrnl/lpc/reply.c	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/ntoskrnl/lpc/reply.c	2005-09-04 18:00:59 UTC (rev 17638)
@@ -146,11 +146,11 @@
  * 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;
@@ -169,7 +169,7 @@
      {
        _SEH_TRY
          {
-           ProbeForWrite(LpcMessage,
+           ProbeForWrite(ReceiveMessage,
                          sizeof(PORT_MESSAGE),
                          1);
          }
@@ -211,10 +211,10 @@
    /*
     * 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,
@@ -283,14 +283,14 @@
          {
            _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);
              }
@@ -302,10 +302,10 @@
          }
        else
          {
-           RtlCopyMemory(LpcMessage,
+           RtlCopyMemory(ReceiveMessage,
                          &Header,
                          sizeof(PORT_MESSAGE));
-           RtlCopyMemory((PVOID)(LpcMessage + 1),
+           RtlCopyMemory((PVOID)(ReceiveMessage + 1),
                          CRequest->ConnectData,
                          CRequest->ConnectDataLength);
          }
@@ -316,11 +316,11 @@
          {
            _SEH_TRY
              {
-               ProbeForWrite(LpcMessage,
+               ProbeForWrite(ReceiveMessage,
                              Request->Message.u1.s1.TotalLength,
                              1);
 
-               RtlCopyMemory(LpcMessage,
+               RtlCopyMemory(ReceiveMessage,
                              &Request->Message,
                              Request->Message.u1.s1.TotalLength);
              }
@@ -332,7 +332,7 @@
          }
        else
          {
-           RtlCopyMemory(LpcMessage,
+           RtlCopyMemory(ReceiveMessage,
                          &Request->Message,
                          Request->Message.u1.s1.TotalLength);
          }
@@ -387,16 +387,16 @@
  * 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);
 }
 
 /**********************************************************************

Modified: trunk/reactos/ntoskrnl/lpc/send.c
--- trunk/reactos/ntoskrnl/lpc/send.c	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/ntoskrnl/lpc/send.c	2005-09-04 18:00:59 UTC (rev 17638)
@@ -30,16 +30,16 @@
  */
 NTSTATUS STDCALL
 LpcSendTerminationPort (IN PEPORT Port,
-			IN LARGE_INTEGER CreationTime)
+			IN LARGE_INTEGER CreateTime)
 {
   NTSTATUS Status;
-  LPC_TERMINATION_MESSAGE Msg;
+  CLIENT_DIED_MSG Msg;
 
 #ifdef __USE_NT_LPC__
-  Msg.Header.u2.s2.Type = LPC_NEW_MESSAGE;
+  Msg.h.u2.s2.Type = LPC_CLIENT_DIED;
 #endif
-  Msg.CreationTime = CreationTime;
-  Status = LpcRequestPort (Port, &Msg.Header);
+  Msg.CreateTime = CreateTime;
+  Status = LpcRequestPort (Port, &Msg.h);
   return(Status);
 }
 
@@ -58,15 +58,15 @@
  */
 NTSTATUS STDCALL
 LpcSendDebugMessagePort (IN PEPORT Port,
-			 IN PLPC_DBG_MESSAGE Message,
-			 OUT PLPC_DBG_MESSAGE Reply)
+			 IN PDBGKM_MSG Message,
+			 OUT PDBGKM_MSG Reply)
 {
    NTSTATUS Status;
    KIRQL oldIrql;
    PQUEUEDMESSAGE ReplyMessage;
 
    Status = EiReplyOrRequestPort(Port,
-				 &Message->Header,
+				 &Message->h,
 				 LPC_REQUEST,
 				 Port);
    if (!NT_SUCCESS(Status))

Modified: trunk/reactos/subsys/smss/smapi.c
--- trunk/reactos/subsys/smss/smapi.c	2005-09-04 15:57:17 UTC (rev 17637)
+++ trunk/reactos/subsys/smss/smapi.c	2005-09-04 18:00:59 UTC (rev 17638)
@@ -107,7 +107,6 @@
 SmpApiConnectedThread(PVOID pConnectedPort)
 {
 	NTSTATUS	Status = STATUS_SUCCESS;
-	PVOID		Unknown = NULL;
 	PPORT_MESSAGE	Reply = NULL;
 	SM_PORT_MESSAGE	Request;
 	HANDLE          ConnectedPort = * (PHANDLE) pConnectedPort;
@@ -120,7 +119,7 @@
 		DPRINT("SM: %s: waiting for message\n",__FUNCTION__);
 
 		Status = NtReplyWaitReceivePort(ConnectedPort,
-						(PULONG) & Unknown,
+						NULL,
 						Reply,
 						(PPORT_MESSAGE) & Request);
 		if (NT_SUCCESS(Status))