mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 17:56:06 +00:00
[USERSRV] Hard-error improvements 3/7
- Cache localized hard error message components: the status severity, the system process name and the unhandled exception debug strings. - Try not to fail too much. In particular, don't fail if a string could not be correctly captured in UserpCaptureStringParameters() (we then use a default empty string). The next aim is to make UserpFormatMessages() not failing at all. - Use RtlStringCbPrintf(Ex)W where possible so that one can use counted (and not NULL-terminated) UNICODE_STRINGs where possible. This allows using counted resource strings without having to allocate memory. - If available, prepend the window title of the application that triggered the hard error to the hard error message box caption.
This commit is contained in:
parent
2b299f5fec
commit
5a1a35ca5a
27 changed files with 601 additions and 117 deletions
|
@ -18,14 +18,49 @@
|
|||
#include <undocelfapi.h>
|
||||
#include <ntstrsafe.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#define IDTRYAGAIN 10
|
||||
#define IDCONTINUE 11
|
||||
|
||||
/* FUNCTIONS ******************************************************************/
|
||||
|
||||
/* Cache for the localized hard-error message box strings */
|
||||
LANGID g_CurrentUserLangId = 0;
|
||||
UNICODE_STRING g_SuccessU = {0, 0, NULL};
|
||||
UNICODE_STRING g_InformationU = {0, 0, NULL};
|
||||
UNICODE_STRING g_WarningU = {0, 0, NULL};
|
||||
UNICODE_STRING g_ErrorU = {0, 0, NULL};
|
||||
UNICODE_STRING g_SystemProcessU = {0, 0, NULL};
|
||||
UNICODE_STRING g_OKTerminateU = {0, 0, NULL};
|
||||
UNICODE_STRING g_CancelDebugU = {0, 0, NULL};
|
||||
|
||||
VOID
|
||||
RtlLoadUnicodeString(
|
||||
IN HINSTANCE hInstance OPTIONAL,
|
||||
IN UINT uID,
|
||||
OUT PUNICODE_STRING pUnicodeString,
|
||||
IN PCWSTR pDefaultString)
|
||||
{
|
||||
UINT Length;
|
||||
|
||||
/* Try to load the string from the resource */
|
||||
Length = LoadStringW(hInstance, uID, (LPWSTR)&pUnicodeString->Buffer, 0);
|
||||
if (Length == 0)
|
||||
{
|
||||
/* If the resource string was not found, use the fallback default one */
|
||||
RtlInitUnicodeString(pUnicodeString, pDefaultString);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Set the string length (not NULL-terminated!) */
|
||||
pUnicodeString->MaximumLength = (USHORT)(Length * sizeof(WCHAR));
|
||||
pUnicodeString->Length = pUnicodeString->MaximumLength;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* FIXME */
|
||||
int
|
||||
WINAPI
|
||||
|
@ -133,15 +168,15 @@ static
|
|||
VOID
|
||||
UserpFreeStringParameters(
|
||||
IN OUT PULONG_PTR Parameters,
|
||||
IN PHARDERROR_MSG HardErrorMessage)
|
||||
IN PHARDERROR_MSG Message)
|
||||
{
|
||||
ULONG nParam;
|
||||
|
||||
/* Loop all parameters */
|
||||
for (nParam = 0; nParam < HardErrorMessage->NumberOfParameters; nParam++)
|
||||
for (nParam = 0; nParam < Message->NumberOfParameters; ++nParam)
|
||||
{
|
||||
/* Check if the current parameter is a string */
|
||||
if ((HardErrorMessage->UnicodeStringParameterMask & (1 << nParam)) && (Parameters[nParam] != 0))
|
||||
if ((Message->UnicodeStringParameterMask & (1 << nParam)) && (Parameters[nParam] != 0))
|
||||
{
|
||||
/* Free the string buffer */
|
||||
RtlFreeHeap(RtlGetProcessHeap(), 0, (PVOID)Parameters[nParam]);
|
||||
|
@ -150,14 +185,14 @@ UserpFreeStringParameters(
|
|||
}
|
||||
|
||||
static
|
||||
NTSTATUS
|
||||
VOID
|
||||
UserpCaptureStringParameters(
|
||||
OUT PULONG_PTR Parameters,
|
||||
OUT PULONG SizeOfAllUnicodeStrings,
|
||||
IN PHARDERROR_MSG HardErrorMessage,
|
||||
IN PHARDERROR_MSG Message,
|
||||
IN HANDLE hProcess OPTIONAL)
|
||||
{
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
NTSTATUS Status;
|
||||
ULONG nParam, Size = 0;
|
||||
UNICODE_STRING TempStringU, ParamStringU;
|
||||
ANSI_STRING TempStringA;
|
||||
|
@ -166,12 +201,12 @@ UserpCaptureStringParameters(
|
|||
*SizeOfAllUnicodeStrings = 0;
|
||||
|
||||
/* Read all strings from client space */
|
||||
for (nParam = 0; nParam < HardErrorMessage->NumberOfParameters; nParam++)
|
||||
for (nParam = 0; nParam < Message->NumberOfParameters; ++nParam)
|
||||
{
|
||||
Parameters[nParam] = 0;
|
||||
|
||||
/* Check if the current parameter is a unicode string */
|
||||
if (HardErrorMessage->UnicodeStringParameterMask & (1 << nParam))
|
||||
if (Message->UnicodeStringParameterMask & (1 << nParam))
|
||||
{
|
||||
/* Skip this string if we do not have a client process */
|
||||
if (!hProcess)
|
||||
|
@ -179,14 +214,14 @@ UserpCaptureStringParameters(
|
|||
|
||||
/* Read the UNICODE_STRING from the process memory */
|
||||
Status = NtReadVirtualMemory(hProcess,
|
||||
(PVOID)HardErrorMessage->Parameters[nParam],
|
||||
(PVOID)Message->Parameters[nParam],
|
||||
&ParamStringU,
|
||||
sizeof(ParamStringU),
|
||||
NULL);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
/* We failed, skip this string */
|
||||
DPRINT1("NtReadVirtualMemory(HardErrorMessage->Parameters) failed, Status 0x%lx\n", Status);
|
||||
DPRINT1("NtReadVirtualMemory(Message->Parameters) failed, Status 0x%lx, skipping.\n", Status);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -199,8 +234,7 @@ UserpCaptureStringParameters(
|
|||
if (!TempStringU.Buffer)
|
||||
{
|
||||
/* We failed, skip this string */
|
||||
DPRINT1("Cannot allocate memory with size %u\n", TempStringU.MaximumLength);
|
||||
Status = STATUS_NO_MEMORY;
|
||||
DPRINT1("Cannot allocate memory with size %u, skipping.\n", TempStringU.MaximumLength);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -213,7 +247,7 @@ UserpCaptureStringParameters(
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
/* We failed, skip this string */
|
||||
DPRINT1("NtReadVirtualMemory(ParamStringU) failed, Status 0x%lx\n", Status);
|
||||
DPRINT1("NtReadVirtualMemory(ParamStringU) failed, Status 0x%lx, skipping.\n", Status);
|
||||
RtlFreeHeap(RtlGetProcessHeap(), 0, TempStringU.Buffer);
|
||||
continue;
|
||||
}
|
||||
|
@ -228,9 +262,8 @@ UserpCaptureStringParameters(
|
|||
if (!TempStringA.Buffer)
|
||||
{
|
||||
/* We failed, skip this string */
|
||||
DPRINT1("Cannot allocate memory with size %u\n", TempStringA.MaximumLength);
|
||||
DPRINT1("Cannot allocate memory with size %u, skipping.\n", TempStringA.MaximumLength);
|
||||
RtlFreeHeap(RtlGetProcessHeap(), 0, TempStringU.Buffer);
|
||||
Status = STATUS_NO_MEMORY;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -240,6 +273,7 @@ UserpCaptureStringParameters(
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
/* We failed, skip this string */
|
||||
DPRINT1("RtlUnicodeStringToAnsiString() failed, Status 0x%lx, skipping.\n", Status);
|
||||
RtlFreeHeap(RtlGetProcessHeap(), 0, TempStringA.Buffer);
|
||||
continue;
|
||||
}
|
||||
|
@ -251,22 +285,12 @@ UserpCaptureStringParameters(
|
|||
else
|
||||
{
|
||||
/* It's not a unicode string, just copy the parameter */
|
||||
Parameters[nParam] = HardErrorMessage->Parameters[nParam];
|
||||
Parameters[nParam] = Message->Parameters[nParam];
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
UserpFreeStringParameters(Parameters, HardErrorMessage);
|
||||
return Status;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (SizeOfAllUnicodeStrings)
|
||||
*SizeOfAllUnicodeStrings = Size;
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
static
|
||||
|
@ -280,11 +304,13 @@ UserpFormatMessages(
|
|||
IN HANDLE hProcess OPTIONAL)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING FileNameU, TempStringU, FormatU, Format2U;
|
||||
UNICODE_STRING FileNameU, TempStringU, WindowTitleU, FormatU, Format2U;
|
||||
ANSI_STRING FormatA, Format2A;
|
||||
HWND hwndOwner;
|
||||
PMESSAGE_RESOURCE_ENTRY MessageResource;
|
||||
ULONG_PTR CapturedParameters[MAXIMUM_HARDERROR_PARAMETERS];
|
||||
PWSTR FormatString;
|
||||
PWSTR FormatString, pszBuffer;
|
||||
size_t cchBuffer;
|
||||
ULONG ExceptionCode, Severity;
|
||||
ULONG Size;
|
||||
|
||||
|
@ -302,8 +328,8 @@ UserpFormatMessages(
|
|||
*/
|
||||
if (!hProcess || !NT_SUCCESS(Status) || !FileNameU.Buffer)
|
||||
{
|
||||
RtlInitUnicodeString(&FileNameU, L"System Process");
|
||||
hProcess = NULL;
|
||||
hProcess = NULL;
|
||||
FileNameU = g_SystemProcessU;
|
||||
}
|
||||
|
||||
Severity = (ULONG)(Message->Status) >> 30;
|
||||
|
@ -324,7 +350,7 @@ UserpFormatMessages(
|
|||
else
|
||||
{
|
||||
RtlInitAnsiString(&FormatA, (PCHAR)MessageResource->Text);
|
||||
RtlAnsiStringToUnicodeString(&FormatU, &FormatA, TRUE);
|
||||
/* Status = */ RtlAnsiStringToUnicodeString(&FormatU, &FormatA, TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -354,23 +380,52 @@ UserpFormatMessages(
|
|||
}
|
||||
else
|
||||
{
|
||||
/* FIXME: Use localized strings! */
|
||||
|
||||
if (Severity == STATUS_SEVERITY_SUCCESS)
|
||||
RtlInitUnicodeString(&TempStringU, L"Success");
|
||||
TempStringU = g_SuccessU;
|
||||
else if (Severity == STATUS_SEVERITY_INFORMATIONAL)
|
||||
RtlInitUnicodeString(&TempStringU, L"System Information");
|
||||
TempStringU = g_InformationU;
|
||||
else if (Severity == STATUS_SEVERITY_WARNING)
|
||||
RtlInitUnicodeString(&TempStringU, L"System Warning");
|
||||
TempStringU = g_WarningU;
|
||||
else if (Severity == STATUS_SEVERITY_ERROR)
|
||||
RtlInitUnicodeString(&TempStringU, L"System Error");
|
||||
TempStringU = g_ErrorU;
|
||||
else
|
||||
RtlInitEmptyUnicodeString(&TempStringU, NULL, 0);
|
||||
}
|
||||
|
||||
/* Retrieve the window title of the client, if it has one */
|
||||
RtlInitEmptyUnicodeString(&WindowTitleU, NULL, 0);
|
||||
hwndOwner = NULL;
|
||||
EnumThreadWindows(HandleToUlong(Message->h.ClientId.UniqueThread),
|
||||
FindTopLevelWnd, (LPARAM)&hwndOwner);
|
||||
if (hwndOwner)
|
||||
{
|
||||
cchBuffer = GetWindowTextLengthW(hwndOwner);
|
||||
if (cchBuffer != 0)
|
||||
{
|
||||
cchBuffer += 3; // 2 characters for ": " and a NULL terminator.
|
||||
WindowTitleU.MaximumLength = (USHORT)(cchBuffer * sizeof(WCHAR));
|
||||
WindowTitleU.Buffer = RtlAllocateHeap(RtlGetProcessHeap(),
|
||||
HEAP_ZERO_MEMORY,
|
||||
WindowTitleU.MaximumLength);
|
||||
if (WindowTitleU.Buffer)
|
||||
{
|
||||
cchBuffer = GetWindowTextW(hwndOwner,
|
||||
WindowTitleU.Buffer,
|
||||
WindowTitleU.MaximumLength / sizeof(WCHAR));
|
||||
WindowTitleU.Length = (USHORT)(cchBuffer * sizeof(WCHAR));
|
||||
RtlAppendUnicodeToString(&WindowTitleU, L": ");
|
||||
}
|
||||
else
|
||||
{
|
||||
RtlInitEmptyUnicodeString(&WindowTitleU, NULL, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Calculate buffer length for the caption */
|
||||
CaptionStringU->MaximumLength = FileNameU.Length + TempStringU.Length +
|
||||
4 * sizeof(WCHAR);
|
||||
CaptionStringU->MaximumLength = WindowTitleU.Length +
|
||||
FileNameU.Length + TempStringU.Length +
|
||||
3 * sizeof(WCHAR) + sizeof(UNICODE_NULL);
|
||||
|
||||
/* Allocate a buffer for the caption */
|
||||
CaptionStringU->Buffer = RtlAllocateHeap(RtlGetProcessHeap(),
|
||||
|
@ -382,17 +437,16 @@ UserpFormatMessages(
|
|||
Status = STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
/* Append the file name, seperator and the caption text */
|
||||
CaptionStringU->Length = 0;
|
||||
RtlAppendUnicodeStringToString(CaptionStringU, &FileNameU);
|
||||
RtlAppendUnicodeToString(CaptionStringU, L" - ");
|
||||
RtlAppendUnicodeStringToString(CaptionStringU, &TempStringU);
|
||||
/* Append the file name, the separator and the caption text */
|
||||
RtlStringCbPrintfW(CaptionStringU->Buffer,
|
||||
CaptionStringU->MaximumLength,
|
||||
L"%wZ%wZ - %wZ",
|
||||
&WindowTitleU, &FileNameU, &TempStringU);
|
||||
CaptionStringU->Length = wcslen(CaptionStringU->Buffer) * sizeof(WCHAR);
|
||||
|
||||
/* Zero terminate the buffer */
|
||||
CaptionStringU->Buffer[CaptionStringU->Length / sizeof(WCHAR)] = UNICODE_NULL;
|
||||
|
||||
/* Free the file name buffer */
|
||||
RtlFreeUnicodeString(&FileNameU);
|
||||
/* Free string buffers if needed */
|
||||
if (WindowTitleU.Buffer) RtlFreeUnicodeString(&WindowTitleU);
|
||||
if (hProcess) RtlFreeUnicodeString(&FileNameU);
|
||||
|
||||
// FIXME: What is 42 == ??
|
||||
Size = 42;
|
||||
|
@ -418,7 +472,7 @@ UserpFormatMessages(
|
|||
else
|
||||
{
|
||||
RtlInitAnsiString(&Format2A, (PCHAR)MessageResource->Text);
|
||||
RtlAnsiStringToUnicodeString(&Format2U, &Format2A, TRUE);
|
||||
/* Status = */ RtlAnsiStringToUnicodeString(&Format2U, &Format2A, TRUE);
|
||||
}
|
||||
|
||||
/* Handle special cases */
|
||||
|
@ -440,25 +494,23 @@ UserpFormatMessages(
|
|||
}
|
||||
else
|
||||
{
|
||||
PWSTR pTmp;
|
||||
|
||||
/* Keep the existing FormatString */
|
||||
CapturedParameters[2] = CapturedParameters[1];
|
||||
CapturedParameters[1] = CapturedParameters[0];
|
||||
|
||||
pTmp = Format2U.Buffer;
|
||||
if (!_wcsnicmp(pTmp, L"{EXCEPTION}", 11))
|
||||
pszBuffer = Format2U.Buffer;
|
||||
if (!_wcsnicmp(pszBuffer, L"{EXCEPTION}", 11))
|
||||
{
|
||||
/*
|
||||
* This is a named exception. Skip the mark and
|
||||
* retrieve the exception name that follows it.
|
||||
*/
|
||||
pTmp += 11;
|
||||
pszBuffer += 11;
|
||||
|
||||
/* Skip '\r', '\n' */
|
||||
pTmp += 2;
|
||||
pszBuffer += 2;
|
||||
|
||||
CapturedParameters[0] = (ULONG_PTR)pTmp;
|
||||
CapturedParameters[0] = (ULONG_PTR)pszBuffer;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -475,18 +527,16 @@ UserpFormatMessages(
|
|||
CapturedParameters[0] = (ULONG_PTR)L"unknown software exception";
|
||||
}
|
||||
|
||||
/* FIXME: Use localized strings! */
|
||||
if (Message->ValidResponseOptions == OptionOk ||
|
||||
Message->ValidResponseOptions == OptionOkCancel)
|
||||
{
|
||||
// Tmp = FormatString + wcslen(FormatString);
|
||||
// *++Tmp = L'\n';
|
||||
// *++Tmp = L'\n';
|
||||
Size += 1 + wcslen(L"Click on OK to terminate the program.");
|
||||
/* Reserve space for one newline and the OK-terminate-program string */
|
||||
Size += 1 + (g_OKTerminateU.Length / sizeof(WCHAR));
|
||||
}
|
||||
if (Message->ValidResponseOptions == OptionOkCancel)
|
||||
{
|
||||
Size += 1 + wcslen(L"Click on CANCEL to debug the program.");
|
||||
/* Reserve space for one newline and the CANCEL-debug-program string */
|
||||
Size += 1 + (g_CancelDebugU.Length / sizeof(WCHAR));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -505,50 +555,50 @@ UserpFormatMessages(
|
|||
Status = STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
Status = STATUS_SUCCESS;
|
||||
|
||||
/* Wrap in SEH to protect from invalid string parameters */
|
||||
_SEH2_TRY
|
||||
{
|
||||
/* Print the string into the buffer */
|
||||
RtlStringCbPrintfW(TextStringU->Buffer,
|
||||
TextStringU->MaximumLength,
|
||||
FormatString,
|
||||
CapturedParameters[0],
|
||||
CapturedParameters[1],
|
||||
CapturedParameters[2],
|
||||
CapturedParameters[3]);
|
||||
pszBuffer = TextStringU->Buffer;
|
||||
cchBuffer = TextStringU->MaximumLength;
|
||||
RtlStringCbPrintfExW(pszBuffer, cchBuffer,
|
||||
&pszBuffer, &cchBuffer,
|
||||
STRSAFE_IGNORE_NULLS,
|
||||
FormatString,
|
||||
CapturedParameters[0],
|
||||
CapturedParameters[1],
|
||||
CapturedParameters[2],
|
||||
CapturedParameters[3]);
|
||||
|
||||
if (Message->Status == STATUS_UNHANDLED_EXCEPTION)
|
||||
{
|
||||
/* FIXME: Use localized strings! */
|
||||
if (Message->ValidResponseOptions == OptionOk ||
|
||||
Message->ValidResponseOptions == OptionOkCancel)
|
||||
{
|
||||
// Tmp = FormatString + wcslen(FormatString);
|
||||
// *++Tmp = L'\n';
|
||||
// *++Tmp = L'\n';
|
||||
RtlStringCbCatW(TextStringU->Buffer,
|
||||
TextStringU->MaximumLength,
|
||||
L"\n");
|
||||
RtlStringCbCatW(TextStringU->Buffer,
|
||||
TextStringU->MaximumLength,
|
||||
L"Click on OK to terminate the program.");
|
||||
RtlStringCbPrintfExW(pszBuffer, cchBuffer,
|
||||
&pszBuffer, &cchBuffer,
|
||||
STRSAFE_IGNORE_NULLS,
|
||||
L"\n%wZ",
|
||||
&g_OKTerminateU);
|
||||
}
|
||||
if (Message->ValidResponseOptions == OptionOkCancel)
|
||||
{
|
||||
RtlStringCbCatW(TextStringU->Buffer,
|
||||
TextStringU->MaximumLength,
|
||||
L"\n");
|
||||
RtlStringCbCatW(TextStringU->Buffer,
|
||||
TextStringU->MaximumLength,
|
||||
L"Click on CANCEL to debug the program.");
|
||||
RtlStringCbPrintfExW(pszBuffer, cchBuffer,
|
||||
&pszBuffer, &cchBuffer,
|
||||
STRSAFE_IGNORE_NULLS,
|
||||
L"\n%wZ",
|
||||
&g_CancelDebugU);
|
||||
}
|
||||
}
|
||||
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
/* An exception occurred, use a default string */
|
||||
DPRINT1("Exception 0x%08lx occurred while building hard-error message, fall back to default message.\n",
|
||||
_SEH2_GetExceptionCode());
|
||||
|
||||
RtlStringCbPrintfW(TextStringU->Buffer,
|
||||
TextStringU->MaximumLength,
|
||||
L"Exception processing message 0x%08lx\n"
|
||||
|
@ -559,8 +609,6 @@ UserpFormatMessages(
|
|||
|
||||
/* Set error and free buffers */
|
||||
// Status = _SEH2_GetExceptionCode();
|
||||
// RtlFreeHeap(RtlGetProcessHeap(), 0, TextStringU->Buffer);
|
||||
// RtlFreeHeap(RtlGetProcessHeap(), 0, CaptionStringU->Buffer);
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
|
@ -569,7 +617,7 @@ UserpFormatMessages(
|
|||
TextStringU->Length = wcslen(TextStringU->Buffer) * sizeof(WCHAR);
|
||||
}
|
||||
|
||||
/* Free converted Unicode strings if the original format strings were Ansi */
|
||||
/* Free converted Unicode strings */
|
||||
if (Format2A.Buffer) RtlFreeUnicodeString(&Format2U);
|
||||
if (FormatA.Buffer) RtlFreeUnicodeString(&FormatU);
|
||||
|
||||
|
@ -863,13 +911,11 @@ UserServerHardError(
|
|||
hProcess = NULL;
|
||||
}
|
||||
|
||||
/* Re-initialize the hard errors cache */
|
||||
UserInitHardErrorsCache();
|
||||
|
||||
/* Capture all string parameters from the process memory */
|
||||
Status = UserpCaptureStringParameters(Parameters, &Size, Message, hProcess);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
if (hProcess) NtClose(hProcess);
|
||||
return;
|
||||
}
|
||||
UserpCaptureStringParameters(Parameters, &Size, Message, hProcess);
|
||||
|
||||
/* Format the message caption and text */
|
||||
Status = UserpFormatMessages(&TextU,
|
||||
|
@ -930,4 +976,45 @@ Quit:
|
|||
return;
|
||||
}
|
||||
|
||||
VOID
|
||||
UserInitHardErrorsCache(VOID)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
LCID CurrentUserLCID = 0;
|
||||
|
||||
Status = NtQueryDefaultLocale(TRUE, &CurrentUserLCID);
|
||||
if (!NT_SUCCESS(Status) || CurrentUserLCID == 0)
|
||||
{
|
||||
/* Fall back to english locale */
|
||||
DPRINT1("NtQueryDefaultLocale failed with Status = 0x%08lx\n", Status);
|
||||
// LOCALE_SYSTEM_DEFAULT;
|
||||
CurrentUserLCID = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT);
|
||||
}
|
||||
if (g_CurrentUserLangId == LANGIDFROMLCID(CurrentUserLCID))
|
||||
{
|
||||
/* The current lang ID and the hard error strings have already been cached */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Load the strings using the current system locale */
|
||||
RtlLoadUnicodeString(UserServerDllInstance, IDS_SEVERITY_SUCCESS,
|
||||
&g_SuccessU, L"Success");
|
||||
RtlLoadUnicodeString(UserServerDllInstance, IDS_SEVERITY_INFORMATIONAL,
|
||||
&g_InformationU, L"System Information");
|
||||
RtlLoadUnicodeString(UserServerDllInstance, IDS_SEVERITY_WARNING,
|
||||
&g_WarningU, L"System Warning");
|
||||
RtlLoadUnicodeString(UserServerDllInstance, IDS_SEVERITY_ERROR,
|
||||
&g_ErrorU, L"System Error");
|
||||
// "unknown software exception"
|
||||
RtlLoadUnicodeString(UserServerDllInstance, IDS_SYSTEM_PROCESS,
|
||||
&g_SystemProcessU, L"System Process");
|
||||
RtlLoadUnicodeString(UserServerDllInstance, IDS_OK_TERMINATE_PROGRAM,
|
||||
&g_OKTerminateU, L"Click on OK to terminate the program.");
|
||||
RtlLoadUnicodeString(UserServerDllInstance, IDS_CANCEL_DEBUG_PROGRAM,
|
||||
&g_CancelDebugU, L"Click on CANCEL to debug the program.");
|
||||
|
||||
/* Remember that we cached the hard error strings */
|
||||
g_CurrentUserLangId = LANGIDFROMLCID(CurrentUserLCID);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -90,6 +90,19 @@ PCHAR UserServerApiNameTable[UserpMaxApiNumber - USERSRV_FIRST_API_NUMBER] =
|
|||
|
||||
/* FUNCTIONS ******************************************************************/
|
||||
|
||||
BOOL CALLBACK
|
||||
FindTopLevelWnd(
|
||||
IN HWND hWnd,
|
||||
IN LPARAM lParam)
|
||||
{
|
||||
if (GetWindow(hWnd, GW_OWNER) == NULL)
|
||||
{
|
||||
*(HWND*)lParam = hWnd;
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// PUSER_SOUND_SENTRY. Used in basesrv.dll
|
||||
BOOL NTAPI _UserSoundSentry(VOID)
|
||||
{
|
||||
|
@ -256,6 +269,9 @@ CSR_SERVER_DLL_INIT(UserServerDllInitialization)
|
|||
/* Set the process creation notify routine for BASE */
|
||||
BaseSetProcessCreateNotify(NtUserNotifyProcessCreate);
|
||||
|
||||
/* Initialize the hard errors cache */
|
||||
UserInitHardErrorsCache();
|
||||
|
||||
/* Initialize the kernel mode subsystem */
|
||||
Status = NtUserInitialize(USER_VERSION,
|
||||
ghPowerRequestEvent,
|
||||
|
|
|
@ -22,3 +22,20 @@ BEGIN
|
|||
LTEXT "За да се върнете в РеактОС и да проверите състоянието на приложението, натиснете „Отказ“.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Ако решите да затворите приложението веднага, ще изгубите всички незаписани данни. За да прекратите приложението веднага, натиснете „Прекратяване веднага“.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -24,3 +24,20 @@ BEGIN
|
|||
LTEXT "Kliknutím na Storno se lze vrátit do systému ReactOS a ověřit stav programu.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Pokud zvolíte okamžité ukončení programu, všechna neuložená data budou ztracena. Kliknutím na Ukončit okamžitě ukončíte program.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -22,3 +22,20 @@ BEGIN
|
|||
LTEXT "Um zu ReactOS zurückzukehren und den Status der Anwendung zu überprüfen, wählen Sie Abbrechen.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Wenn Sie das Programm sofort beenden, werden Sie eventuell ungespeicherte Daten verlieren. Um das Programm zu beenden, wählen Sie Jetzt beenden.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -22,3 +22,20 @@ BEGIN
|
|||
LTEXT "Για να επιστρέψετε στο ReactOS και να ελέγξετε την κατάσταση του προγράμματος, πατήστε 'ʼκυρο'.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Αν κλείσετε την εφαρμογή τώρα , θα χάσετε όλα τα μη αποθηκευμένα δεδομένα. Για να κλείσετε το πρόγραμμα τώρα, πατήστε 'Κλείσιμο Τώρα'.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -22,3 +22,20 @@ BEGIN
|
|||
LTEXT "To return to ReactOS and check the status of the program, click Cancel.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "If you choose to end the program immediately, you will lose any unsaved data. To end the program now, click End Now.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -24,3 +24,20 @@ BEGIN
|
|||
LTEXT "Para volver a ReactOS y ver el estado del programa, haga clic en Cancelar.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Si elige finalizar el programa ahora, perderá todos los datos no guardados. Para finalizar el programa ahora, haga clic en Finalizar ahora.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -22,3 +22,20 @@ BEGIN
|
|||
LTEXT "Pour retourner à ReactOS et vérifier l'état du programme, cliquez sur Annuler.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Si vous choisissez de terminer le programme immédiatement, vous perdrez toutes les données non sauvegardées. Pour terminer le programme maintenant, cliquez sur Terminer maintenant.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Succès"
|
||||
IDS_SEVERITY_INFORMATIONAL "Information système"
|
||||
IDS_SEVERITY_WARNING "Avertissement système"
|
||||
IDS_SEVERITY_ERROR "Erreur système"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "Processus système"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "Exception logicielle inconnue"
|
||||
IDS_OK_TERMINATE_PROGRAM "Cliquez sur OK pour terminer le programme."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Cliquez sur Annuler pour déboguer le programme."
|
||||
END
|
||||
|
|
|
@ -24,3 +24,20 @@ BEGIN
|
|||
LTEXT "כדי לחזור לReactOS ולבדוק את מצב התכנית, לחץ ביטול.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "אם תבחר לסיים את התכנית באופן מיידי, אתה תאבד את כל המידע שלא נשמר. כדי לסיים את התכנית עכשיו, לחץ סיים כעת.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -22,3 +22,20 @@ BEGIN
|
|||
LTEXT "Untuk kembali ke ReactOS dan memeriksa status program, klik Batal.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Jika anda memilih untuk segera mengakhiri program, anda akan kehilangan data yang belum disimpan. Untuk mengakhiri program sekarang, klik Akhiri Sekarang.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -30,3 +30,20 @@ BEGIN
|
|||
LTEXT "Per tornare a ReactOS e controllare lo stato del programma, selezionare Annulla.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Se si sceglie di terminare il programma immediatamente, si perderanno tutti i dati non salvati. Per terminare il programma ora, selezionare Termina ora.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -22,3 +22,20 @@ BEGIN
|
|||
LTEXT "ReactOS に戻ってプログラムの状態を確認するには[キャンセル]をクリックしてください", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "プログラムをすぐに終了させるよう選択した場合、保存されていないデータはすべて失われます。プログラムを直ちに終了するには[すぐに終了]をクリックしてください", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -22,3 +22,20 @@ BEGIN
|
|||
LTEXT "For å returnere til ReactOS for å sjekke statusen på programmet, trykk på avbryt.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Hvis du velger å avslutte programmet øyeblikkelig, vil du miste alt data som ikke er lagret. For å avslutte programmet nå, Trykk på Avslutt nå.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -30,3 +30,20 @@ BEGIN
|
|||
LTEXT "Aby powrócić do ReactOS i sprawdzić status programu, kliknij Anuluj.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Jeśli zdecydujesz się zamknąć program natychmiastowo, utracisz wszelkie niezapisane dane. Aby zakończyć program, wciśnij Zakończ teraz.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -24,3 +24,20 @@ BEGIN
|
|||
LTEXT "Parar retornar ao ReactOS e verificar o estado do programa, pressione Cancelar.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Se você finalizar o programa imediatamente, você irá perder qualquer alteração não salva. Para finalizar o programa agora, pressione Finalizar Agora.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -24,3 +24,20 @@ BEGIN
|
|||
LTEXT "Pentru a vă întoarce în ReactOS și a verifica starea programului, apăsați „Anulează”.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Dacă alegeți închiderea imediată a programului, riscați pierderi de date. Pentru a forța închiderea, apăsați „Termină forțat”.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -22,3 +22,20 @@ BEGIN
|
|||
LTEXT "Для возврата в ReactOS и проверки состояния приложения нажмите ""Отмена"".", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Если вы завершите программу сейчас, то вы можете потерять несохраненные данные. Чтобы завершить программу сейчас нажмите ""Завершить"".", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -27,3 +27,20 @@ BEGIN
|
|||
LTEXT "Pre návrat do systému ReactOS a overenie stavu programu kliknite na tlačidlo Zrušiť.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Ak zvolíte okamžité ukončenie programu, stratíte všetky neuložené údaje. Ak chcete program ukončiť okamžite, kliknite na tlačidlo Ukončiť ihneď.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -24,3 +24,20 @@ BEGIN
|
|||
LTEXT "För att återgå till ReactOS och undersöka programmets status klicka Avbryt.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Om du väljer att avsluta programmet omedelbart kommer du att förlora all osparad data. För att avsluta programmet, klicka Avsluta nu.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -24,3 +24,20 @@ BEGIN
|
|||
LTEXT "ReactOS'a dönmek ve programın durumunu denetlemek için İptal'e tıklayınız.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Programı hemen kapatmayı seçerseniz, tüm saklanmamış veriyi yitireceksiniz. Programdan şimdi çıkmak için Şimdi Sonlandır'a tıklayınız.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -24,3 +24,20 @@ BEGIN
|
|||
LTEXT "Щоб повернутися у ReactOS і перевірити стан програми, натисніть 'Скасувати'.", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "Якщо завершити програму негайно, то можна втратити всі незбережені дані. Щоб завершити програму зараз, натисніть 'Завершити зараз'.", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -22,3 +22,20 @@ BEGIN
|
|||
LTEXT "若要返回至 ReactOS 并检查该程序的状态,请点击“取消”。", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "如果您选择立即终止程序,您将失去所有未保存的数据。若要立即结束程序,单击“立即终止”。", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -22,3 +22,20 @@ BEGIN
|
|||
LTEXT "若要返回至 ReactOS 並檢視程式的狀態,請按下“取消”", IDC_STATIC, 7, 26, 178, 16
|
||||
LTEXT "如果您選擇立即結束程式,您將失去所有未儲存的資料。若要立即結束程式,請按下“立即結束”。", IDC_STATIC, 7, 53, 178, 26
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SEVERITY_SUCCESS "Success"
|
||||
IDS_SEVERITY_INFORMATIONAL "System Information"
|
||||
IDS_SEVERITY_WARNING "System Warning"
|
||||
IDS_SEVERITY_ERROR "System Error"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_PROCESS "System Process"
|
||||
IDS_UNKNOWN_SOFTWARE_EXCEPT "unknown software exception"
|
||||
IDS_OK_TERMINATE_PROGRAM "Click on OK to terminate the program."
|
||||
IDS_CANCEL_DEBUG_PROGRAM "Click on CANCEL to debug the program."
|
||||
END
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS User API Server DLL
|
||||
* FILE: win32ss/user/winsrv/usersrv/resource.h
|
||||
* PURPOSE: Resource #defines
|
||||
* PROJECT: ReactOS User API Server DLL
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* PURPOSE: Resource #defines.
|
||||
* COPYRIGHT: Copyright 2012-2018 Hermes Belusca-Maito
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
@ -12,5 +12,16 @@
|
|||
|
||||
#define IDC_STATIC -1
|
||||
|
||||
#define IDC_PROGRESS 101
|
||||
#define IDC_END_NOW 102
|
||||
#define IDC_PROGRESS 20
|
||||
#define IDC_END_NOW 21
|
||||
|
||||
/* Strings */
|
||||
#define IDS_SEVERITY_SUCCESS 100
|
||||
#define IDS_SEVERITY_INFORMATIONAL 101
|
||||
#define IDS_SEVERITY_WARNING 102
|
||||
#define IDS_SEVERITY_ERROR 103
|
||||
|
||||
#define IDS_SYSTEM_PROCESS 104
|
||||
#define IDS_UNKNOWN_SOFTWARE_EXCEPT 105
|
||||
#define IDS_OK_TERMINATE_PROGRAM 106
|
||||
#define IDS_CANCEL_DEBUG_PROGRAM 107
|
||||
|
|
|
@ -413,18 +413,6 @@ ConioConsoleCtrlEventTimeout(DWORD Event, PCSR_PROCESS ProcessData, DWORD Timeou
|
|||
/************************************************/
|
||||
|
||||
|
||||
static BOOL CALLBACK
|
||||
FindTopLevelWnd(IN HWND hWnd,
|
||||
IN LPARAM lParam)
|
||||
{
|
||||
if (GetWindow(hWnd, GW_OWNER) == NULL)
|
||||
{
|
||||
*(HWND*)lParam = hWnd;
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static VOID
|
||||
ThreadShutdownNotify(IN PCSR_THREAD CsrThread,
|
||||
IN ULONG Flags,
|
||||
|
|
|
@ -33,4 +33,12 @@ extern HANDLE UserServerHeap;
|
|||
extern ULONG_PTR ServicesProcessId;
|
||||
extern ULONG_PTR LogonProcessId;
|
||||
|
||||
BOOL CALLBACK
|
||||
FindTopLevelWnd(
|
||||
IN HWND hWnd,
|
||||
IN LPARAM lParam);
|
||||
|
||||
VOID
|
||||
UserInitHardErrorsCache(VOID);
|
||||
|
||||
#endif /* __USERSRV_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue