[MSIEXEC] Sync with Wine Staging 2.16. CORE-13762
[reactos.git] / base / system / smss / smss.c
index 8da368a..28bd66f 100644 (file)
@@ -9,8 +9,11 @@
 /* INCLUDES *******************************************************************/
 
 #include "smss.h"
+
+#include <pseh/pseh2.h>
+
 #define NDEBUG
-#include "debug.h"
+#include <debug.h>
 
 /* GLOBALS ********************************************************************/
 
@@ -67,7 +70,7 @@ SmpExecuteImage(IN PUNICODE_STRING FileName,
     if (!NT_SUCCESS(Status))
     {
         /* This is a pretty bad failure. ASSERT on checked builds and exit */
-        ASSERTMSG(NT_SUCCESS(Status), "RtlCreateProcessParameters");
+        ASSERTMSG("RtlCreateProcessParameters", NT_SUCCESS(Status));
         DPRINT1("SMSS: RtlCreateProcessParameters failed for %wZ - Status == %lx\n",
                 FileName, Status);
         return Status;
@@ -174,7 +177,7 @@ SmpInvokeAutoChk(IN PUNICODE_STRING FileName,
     {
         /* It wasn't, so create an error message to print on the screen */
         sprintf_nt(MessageBuffer,
-                   "%wZ program not found - skipping AUTOCHECK\n",
+                   "%wZ program not found - skipping AUTOCHECK\r\n",
                    FileName);
         RtlInitAnsiString(&MessageString, MessageBuffer);
         if (NT_SUCCESS(RtlAnsiStringToUnicodeString(&Destination,
@@ -235,7 +238,7 @@ SmpExecuteCommand(IN PUNICODE_STRING CommandLine,
     if (!NT_SUCCESS(Status))
     {
         /* Fail if we couldn't do that */
-        DPRINT1("SMSS: SmpParseCommand( %wZ ) failed - Status == %lx\n",
+        DPRINT1("SMSS: SmpParseCommandLine( %wZ ) failed - Status == %lx\n",
                 CommandLine, Status);
         return Status;
     }
@@ -312,7 +315,7 @@ SmpExecuteInitialCommand(IN ULONG MuSessionId,
 
     /* Parse the initial command line */
     Status = SmpParseCommandLine(InitialCommand,
-                                 (PULONG)&Flags,
+                                 &Flags,
                                  &ImageFileName,
                                  &ImageFileDirectory,
                                  &Arguments);
@@ -327,7 +330,7 @@ SmpExecuteInitialCommand(IN ULONG MuSessionId,
     /* And fail if any other reason is also true */
     if (!NT_SUCCESS(Status))
     {
-        DPRINT1("SMSS: SmpParseCommand( %wZ ) failed - Status == %lx\n",
+        DPRINT1("SMSS: SmpParseCommandLine( %wZ ) failed - Status == %lx\n",
                 InitialCommand, Status);
         return Status;
     }
@@ -420,7 +423,7 @@ SmpUnhandledExceptionFilter(IN PEXCEPTION_POINTERS ExceptionInfo)
     UNICODE_STRING DestinationString;
 
     /* Print and breakpoint into the debugger */
-    DbgPrint("SMSS: Unhandled exception - Status == %x  IP == %x\n",
+    DbgPrint("SMSS: Unhandled exception - Status == %x  IP == %p\n",
              ExceptionInfo->ExceptionRecord->ExceptionCode,
              ExceptionInfo->ExceptionRecord->ExceptionAddress);
     DbgPrint("      Memory Address: %x  Read/Write: %x\n",
@@ -436,12 +439,13 @@ SmpUnhandledExceptionFilter(IN PEXCEPTION_POINTERS ExceptionInfo)
     Parameters[3] = (ULONG_PTR)ExceptionInfo->ContextRecord;
     SmpTerminate(Parameters, 1, RTL_NUMBER_OF(Parameters));
 
-    /* We hould never get here */
+    /* We should never get here */
     ASSERT(FALSE);
     return EXCEPTION_EXECUTE_HANDLER;
 }
 
 NTSTATUS
+__cdecl
 _main(IN INT argc,
       IN PCHAR argv[],
       IN PCHAR envp[],