mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 13:34:53 +00:00
[USERSRV] Hard-error improvements 6/7
Make UserpFormatMessages() return the possible timeout for the hard error; use it when displaying the hard error message boxes.
This commit is contained in:
parent
08d70697a3
commit
2363fee51f
|
@ -346,6 +346,7 @@ UserpFormatMessages(
|
|||
IN OUT PUNICODE_STRING TextStringU,
|
||||
IN OUT PUNICODE_STRING CaptionStringU,
|
||||
OUT PUINT pdwType,
|
||||
OUT PULONG pdwTimeout,
|
||||
IN PHARDERROR_MSG Message)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
@ -418,6 +419,12 @@ UserpFormatMessages(
|
|||
CaptionStringU->Length = 0;
|
||||
}
|
||||
|
||||
/* Set the timeout */
|
||||
if (Message->NumberOfParameters >= 4)
|
||||
*pdwTimeout = (ULONG)Parameters[3];
|
||||
else
|
||||
*pdwTimeout = INFINITE;
|
||||
|
||||
goto Quit;
|
||||
}
|
||||
|
||||
|
@ -462,6 +469,9 @@ UserpFormatMessages(
|
|||
|
||||
*pdwType |= MB_SYSTEMMODAL | MB_SETFOREGROUND;
|
||||
|
||||
/* Set the timeout */
|
||||
*pdwTimeout = INFINITE;
|
||||
|
||||
/* Copy the Parameters array locally */
|
||||
RtlCopyMemory(&CopyParameters, Parameters, sizeof(CopyParameters));
|
||||
|
||||
|
@ -991,7 +1001,8 @@ UserServerHardError(
|
|||
IN PHARDERROR_MSG Message)
|
||||
{
|
||||
ULONG ErrorMode;
|
||||
UINT dwType = 0;
|
||||
UINT dwType = 0;
|
||||
ULONG Timeout = INFINITE;
|
||||
UNICODE_STRING TextU, CaptionU;
|
||||
WCHAR LocalTextBuffer[256];
|
||||
WCHAR LocalCaptionBuffer[256];
|
||||
|
@ -1029,7 +1040,7 @@ UserServerHardError(
|
|||
/* Format the message caption and text */
|
||||
RtlInitEmptyUnicodeString(&TextU, LocalTextBuffer, sizeof(LocalTextBuffer));
|
||||
RtlInitEmptyUnicodeString(&CaptionU, LocalCaptionBuffer, sizeof(LocalCaptionBuffer));
|
||||
UserpFormatMessages(&TextU, &CaptionU, &dwType, /* &Timeout, */ Message);
|
||||
UserpFormatMessages(&TextU, &CaptionU, &dwType, &Timeout, Message);
|
||||
|
||||
/* Log the hard error message */
|
||||
UserpLogHardError(&TextU, &CaptionU);
|
||||
|
@ -1065,7 +1076,7 @@ UserServerHardError(
|
|||
Message->Response = UserpMessageBox(TextU.Buffer,
|
||||
CaptionU.Buffer,
|
||||
dwType,
|
||||
(ULONG)-1);
|
||||
Timeout);
|
||||
|
||||
Quit:
|
||||
/* Free the strings if they have been reallocated */
|
||||
|
|
Loading…
Reference in a new issue