mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 16:36:07 +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
1 changed files with 14 additions and 3 deletions
|
@ -346,6 +346,7 @@ UserpFormatMessages(
|
||||||
IN OUT PUNICODE_STRING TextStringU,
|
IN OUT PUNICODE_STRING TextStringU,
|
||||||
IN OUT PUNICODE_STRING CaptionStringU,
|
IN OUT PUNICODE_STRING CaptionStringU,
|
||||||
OUT PUINT pdwType,
|
OUT PUINT pdwType,
|
||||||
|
OUT PULONG pdwTimeout,
|
||||||
IN PHARDERROR_MSG Message)
|
IN PHARDERROR_MSG Message)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
@ -418,6 +419,12 @@ UserpFormatMessages(
|
||||||
CaptionStringU->Length = 0;
|
CaptionStringU->Length = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set the timeout */
|
||||||
|
if (Message->NumberOfParameters >= 4)
|
||||||
|
*pdwTimeout = (ULONG)Parameters[3];
|
||||||
|
else
|
||||||
|
*pdwTimeout = INFINITE;
|
||||||
|
|
||||||
goto Quit;
|
goto Quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -462,6 +469,9 @@ UserpFormatMessages(
|
||||||
|
|
||||||
*pdwType |= MB_SYSTEMMODAL | MB_SETFOREGROUND;
|
*pdwType |= MB_SYSTEMMODAL | MB_SETFOREGROUND;
|
||||||
|
|
||||||
|
/* Set the timeout */
|
||||||
|
*pdwTimeout = INFINITE;
|
||||||
|
|
||||||
/* Copy the Parameters array locally */
|
/* Copy the Parameters array locally */
|
||||||
RtlCopyMemory(&CopyParameters, Parameters, sizeof(CopyParameters));
|
RtlCopyMemory(&CopyParameters, Parameters, sizeof(CopyParameters));
|
||||||
|
|
||||||
|
@ -991,7 +1001,8 @@ UserServerHardError(
|
||||||
IN PHARDERROR_MSG Message)
|
IN PHARDERROR_MSG Message)
|
||||||
{
|
{
|
||||||
ULONG ErrorMode;
|
ULONG ErrorMode;
|
||||||
UINT dwType = 0;
|
UINT dwType = 0;
|
||||||
|
ULONG Timeout = INFINITE;
|
||||||
UNICODE_STRING TextU, CaptionU;
|
UNICODE_STRING TextU, CaptionU;
|
||||||
WCHAR LocalTextBuffer[256];
|
WCHAR LocalTextBuffer[256];
|
||||||
WCHAR LocalCaptionBuffer[256];
|
WCHAR LocalCaptionBuffer[256];
|
||||||
|
@ -1029,7 +1040,7 @@ UserServerHardError(
|
||||||
/* Format the message caption and text */
|
/* Format the message caption and text */
|
||||||
RtlInitEmptyUnicodeString(&TextU, LocalTextBuffer, sizeof(LocalTextBuffer));
|
RtlInitEmptyUnicodeString(&TextU, LocalTextBuffer, sizeof(LocalTextBuffer));
|
||||||
RtlInitEmptyUnicodeString(&CaptionU, LocalCaptionBuffer, sizeof(LocalCaptionBuffer));
|
RtlInitEmptyUnicodeString(&CaptionU, LocalCaptionBuffer, sizeof(LocalCaptionBuffer));
|
||||||
UserpFormatMessages(&TextU, &CaptionU, &dwType, /* &Timeout, */ Message);
|
UserpFormatMessages(&TextU, &CaptionU, &dwType, &Timeout, Message);
|
||||||
|
|
||||||
/* Log the hard error message */
|
/* Log the hard error message */
|
||||||
UserpLogHardError(&TextU, &CaptionU);
|
UserpLogHardError(&TextU, &CaptionU);
|
||||||
|
@ -1065,7 +1076,7 @@ UserServerHardError(
|
||||||
Message->Response = UserpMessageBox(TextU.Buffer,
|
Message->Response = UserpMessageBox(TextU.Buffer,
|
||||||
CaptionU.Buffer,
|
CaptionU.Buffer,
|
||||||
dwType,
|
dwType,
|
||||||
(ULONG)-1);
|
Timeout);
|
||||||
|
|
||||||
Quit:
|
Quit:
|
||||||
/* Free the strings if they have been reallocated */
|
/* Free the strings if they have been reallocated */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue