mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 20:01:50 +00:00
Add SetupPromptReboot stub
In SetupInstallServicesFromInfSectionExW, LoadOrderGroup value is optional. Don't break if it is missing svn path=/trunk/; revision=18238
This commit is contained in:
parent
cd5d63f1b8
commit
88f8bc8a25
3 changed files with 54 additions and 6 deletions
|
@ -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 */
|
||||
|
|
|
@ -455,7 +455,7 @@
|
|||
@ stdcall SetupOpenMasterInf()
|
||||
@ stub SetupPromptForDiskA
|
||||
@ stub SetupPromptForDiskW
|
||||
@ stub SetupPromptReboot
|
||||
@ stdcall SetupPromptReboot(ptr ptr long)
|
||||
@ stub SetupQueryDrivesInDiskSpaceListA
|
||||
@ stub SetupQueryDrivesInDiskSpaceListW
|
||||
@ stub SetupQueryFileLogA
|
||||
|
|
|
@ -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.@)
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue