Synchronize with trunk.
[reactos.git] / base / services / umpnpmgr / umpnpmgr.c
index 2a56973..1225426 100644 (file)
 /* INCLUDES *****************************************************************/
 //#define HAVE_SLIST_ENTRY_IMPLEMENTED
 #define WIN32_NO_STATUS
-#include <windows.h>
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+#include <stdarg.h>
+#include <windef.h>
+#include <winbase.h>
+#include <winreg.h>
+#include <winsvc.h>
 #include <stdio.h>
-#include <cmtypes.h>
 #include <cmfuncs.h>
 #include <rtlfuncs.h>
 #include <setypes.h>
 #include <umpnpmgr/sysguid.h>
-#include <wdmguid.h>
 #include <cfgmgr32.h>
 #include <regstr.h>
 #include <userenv.h>
-
-#include <rpc.h>
-#include <rpcdce.h>
-
-#include "pnp_s.h"
+#include <pnp_s.h>
 
 #define NDEBUG
 #include <debug.h>
@@ -2886,8 +2886,11 @@ InstallDevice(PCWSTR DeviceInstance, BOOL ShowWizard)
     /* Wait for the function to connect to our pipe */
     if(!ConnectNamedPipe(hPipe, NULL))
     {
-        DPRINT1("ConnectNamedPipe failed with error %u\n", GetLastError());
-        goto cleanup;
+        if (GetLastError() != ERROR_PIPE_CONNECTED)
+        {
+            DPRINT1("ConnectNamedPipe failed with error %u\n", GetLastError());
+            goto cleanup;
+        }
     }
 
     /* Pass the data. The following output is partly compatible to Windows XP SP2 (researched using a modified newdev.dll to log this stuff) */
@@ -3025,7 +3028,7 @@ IsConsoleBoot(VOID)
     if (rc != ERROR_SUCCESS)
         goto cleanup;
 
-    /* Check for CMDCONS in SystemStartOptions */
+    /* Check for CONSOLE switch in SystemStartOptions */
     CurrentOption = SystemStartOptions;
     while (CurrentOption)
     {