diff --git a/reactos/lib/setupapi/install.c b/reactos/lib/setupapi/install.c index a5863a25a9c..a91282a5b9e 100644 --- a/reactos/lib/setupapi/install.c +++ b/reactos/lib/setupapi/install.c @@ -1087,11 +1087,8 @@ BOOL WINAPI SetupInstallServicesFromInfSectionExW( HINF hinf, PCWSTR sectionname 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 */ diff --git a/reactos/lib/setupapi/setupapi.spec b/reactos/lib/setupapi/setupapi.spec index 4ae6326c1d5..328dda6c70d 100644 --- a/reactos/lib/setupapi/setupapi.spec +++ b/reactos/lib/setupapi/setupapi.spec @@ -455,7 +455,7 @@ @ stdcall SetupOpenMasterInf() @ stub SetupPromptForDiskA @ stub SetupPromptForDiskW -@ stub SetupPromptReboot +@ stdcall SetupPromptReboot(ptr ptr long) @ stub SetupQueryDrivesInDiskSpaceListA @ stub SetupQueryDrivesInDiskSpaceListW @ stub SetupQueryFileLogA diff --git a/reactos/lib/setupapi/stubs.c b/reactos/lib/setupapi/stubs.c index 03e6fa841f8..810d71f0b61 100644 --- a/reactos/lib/setupapi/stubs.c +++ b/reactos/lib/setupapi/stubs.c @@ -124,6 +124,57 @@ HANDLE WINAPI SetupInitializeFileLogA(LPCSTR LogFileName, DWORD Flags) return INVALID_HANDLE_VALUE; } +/*********************************************************************** + * 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.@) */