Add SetupPromptReboot stub
In SetupInstallServicesFromInfSectionExW, LoadOrderGroup value is optional. Don't break if it is missing
Modified: trunk/reactos/lib/setupapi/install.c
Modified: trunk/reactos/lib/setupapi/setupapi.spec
Modified: trunk/reactos/lib/setupapi/stubs.c

Modified: trunk/reactos/lib/setupapi/install.c
--- trunk/reactos/lib/setupapi/install.c	2005-10-03 07:22:19 UTC (rev 18237)
+++ trunk/reactos/lib/setupapi/install.c	2005-10-03 07:26:39 UTC (rev 18238)
@@ -1087,11 +1087,8 @@
         return FALSE;
     }
     if (!GetLineText(hinf, sectionname, L"LoadOrderGroup", &LoadOrderGroup))
-    {
-        CloseServiceHandle(hSCManager);
-        HeapFree(GetProcessHeap(), 0, ServiceBinary);
-        return FALSE;
-    }
+        /* LoadOrderGroup value is optional. Ignore the error */
+        LoadOrderGroup = NULL;
 
     /* Don't check return value, as these fields are optional and
      * GetLineText initialize output parameter even on failure */

Modified: trunk/reactos/lib/setupapi/setupapi.spec
--- trunk/reactos/lib/setupapi/setupapi.spec	2005-10-03 07:22:19 UTC (rev 18237)
+++ trunk/reactos/lib/setupapi/setupapi.spec	2005-10-03 07:26:39 UTC (rev 18238)
@@ -455,7 +455,7 @@
 @ stdcall SetupOpenMasterInf()
 @ stub SetupPromptForDiskA
 @ stub SetupPromptForDiskW
-@ stub SetupPromptReboot
+@ stdcall SetupPromptReboot(ptr ptr long)
 @ stub SetupQueryDrivesInDiskSpaceListA
 @ stub SetupQueryDrivesInDiskSpaceListW
 @ stub SetupQueryFileLogA

Modified: trunk/reactos/lib/setupapi/stubs.c
--- trunk/reactos/lib/setupapi/stubs.c	2005-10-03 07:22:19 UTC (rev 18237)
+++ trunk/reactos/lib/setupapi/stubs.c	2005-10-03 07:26:39 UTC (rev 18238)
@@ -125,6 +125,57 @@
 }
 
 /***********************************************************************
+ *		SetupPromptReboot(SETUPAPI.@)
+ */
+INT WINAPI SetupPromptReboot(HSPFILEQ FileQueue, HWND Owner, BOOL ScanOnly)
+{
+#if 0
+    int ret;
+    TCHAR RebootText[RC_STRING_MAX_SIZE];
+    TCHAR RebootCaption[RC_STRING_MAX_SIZE];
+    INT rc = 0;
+
+    TRACE("%p %p %d\n", FileQueue, Owner, ScanOnly);
+
+    if (ScanOnly && !FileQueue)
+    {
+        SetLastError(ERROR_INVALID_PARAMETER);
+        return -1;
+    }
+
+    if (FileQueue)
+    {
+        FIXME("Case 'FileQueue != NULL' not implemented\n");
+        /* In some cases, do 'rc |= SPFILEQ_FILE_IN_USE' */
+    }
+
+    if (ScanOnly)
+        return rc;
+
+    /* We need to ask the question to the user. */
+    rc |= SPFILEQ_REBOOT_RECOMMENDED;
+    if (0 == LoadString(hInstance, IDS_QUERY_REBOOT_TEXT, RebootText, RC_STRING_MAX_SIZE))
+        return -1;
+    if (0 == LoadString(hInstance, IDS_QUERY_REBOOT_CAPTION, RebootCaption, RC_STRING_MAX_SIZE))
+        return -1;
+    ret = MessageBox(Owner, RebootText, RebootCaption, MB_YESNO | MB_DEFBUTTON1);
+    if (IDNO == ret)
+        return rc;
+    else
+    {
+        if (ExitWindowsEx(EWX_REBOOT, 0))
+            return rc | SPFILEQ_REBOOT_IN_PROGRESS;
+        else
+            return -1;
+    }
+#endif
+    FIXME("Stub %p %p %d\n", FileQueue, Owner, ScanOnly);
+    SetLastError(ERROR_GEN_FAILURE);
+    return -1;
+}
+
+
+/***********************************************************************
  *		SetupTerminateFileLog(SETUPAPI.@)
  */
 BOOL WINAPI SetupTerminateFileLog(HANDLE FileLogHandle)