IN OUT PUNICODE_STRING TextStringU,
IN OUT PUNICODE_STRING CaptionStringU,
OUT PUINT pdwType,
+ OUT PULONG pdwTimeout,
IN PHARDERROR_MSG Message)
{
NTSTATUS Status;
CaptionStringU->Length = 0;
}
+ /* Set the timeout */
+ if (Message->NumberOfParameters >= 4)
+ *pdwTimeout = (ULONG)Parameters[3];
+ else
+ *pdwTimeout = INFINITE;
+
goto Quit;
}
*pdwType |= MB_SYSTEMMODAL | MB_SETFOREGROUND;
+ /* Set the timeout */
+ *pdwTimeout = INFINITE;
+
/* Copy the Parameters array locally */
RtlCopyMemory(&CopyParameters, Parameters, sizeof(CopyParameters));
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];
/* 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);
Message->Response = UserpMessageBox(TextU.Buffer,
CaptionU.Buffer,
dwType,
- (ULONG)-1);
+ Timeout);
Quit:
/* Free the strings if they have been reallocated */