From 1afc87ee572d4306564ea5fb1e8a325f0fee89a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Thu, 12 Apr 2018 02:45:37 +0200 Subject: [PATCH] [EVENTVWR] Add support for a command-line for the Event Log Viewer. CORE-12269 - Add support for '/?' and '/l:' switches. The former displays usage information. The latter allows to specify an event log file to load. Also one can specify the computer name from which one wants to retrieve events for display (work in progress). - In EnumEventsThread(), move around the code that updates the application title and status bar, so that the selected event log name and loading status is always displayed first, while loading itself is in progress. --- .../applications/mscutils/eventvwr/eventvwr.c | 294 ++++++++++++++++-- .../mscutils/eventvwr/lang/bg-BG.rc | 18 ++ .../mscutils/eventvwr/lang/cs-CZ.rc | 18 ++ .../mscutils/eventvwr/lang/de-DE.rc | 18 ++ .../mscutils/eventvwr/lang/el-GR.rc | 18 ++ .../mscutils/eventvwr/lang/en-US.rc | 18 ++ .../mscutils/eventvwr/lang/es-ES.rc | 20 +- .../mscutils/eventvwr/lang/fr-FR.rc | 36 ++- .../mscutils/eventvwr/lang/he-IL.rc | 18 ++ .../mscutils/eventvwr/lang/it-IT.rc | 18 ++ .../mscutils/eventvwr/lang/ja-JP.rc | 18 ++ .../mscutils/eventvwr/lang/ko-KR.rc | 18 ++ .../mscutils/eventvwr/lang/no-NO.rc | 18 ++ .../mscutils/eventvwr/lang/pl-PL.rc | 18 ++ .../mscutils/eventvwr/lang/pt-BR.rc | 18 ++ .../mscutils/eventvwr/lang/ro-RO.rc | 20 +- .../mscutils/eventvwr/lang/ru-RU.rc | 18 ++ .../mscutils/eventvwr/lang/sk-SK.rc | 18 ++ .../mscutils/eventvwr/lang/sq-AL.rc | 18 ++ .../mscutils/eventvwr/lang/sv-SE.rc | 18 ++ .../mscutils/eventvwr/lang/tr-TR.rc | 18 ++ .../mscutils/eventvwr/lang/uk-UA.rc | 20 +- .../mscutils/eventvwr/lang/zh-CN.rc | 36 ++- .../mscutils/eventvwr/lang/zh-TW.rc | 36 ++- .../applications/mscutils/eventvwr/resource.h | 2 + 25 files changed, 715 insertions(+), 55 deletions(-) diff --git a/base/applications/mscutils/eventvwr/eventvwr.c b/base/applications/mscutils/eventvwr/eventvwr.c index c184bb2a6a9..6801b275e4d 100644 --- a/base/applications/mscutils/eventvwr/eventvwr.c +++ b/base/applications/mscutils/eventvwr/eventvwr.c @@ -87,6 +87,10 @@ HMENU hMainMenu; /* The application's main menu */ HTREEITEM htiSystemLogs = NULL, htiAppLogs = NULL, htiUserLogs = NULL; +LPWSTR lpComputerName = NULL; /* NULL: local user computer (default) */ +LPWSTR lpszzUserLogsToLoad = NULL; /* The list of user logs to load at startup (multi-string) */ +SIZE_T cbUserLogsSize = 0; + /* Global event records cache for the current active event log filter */ DWORD g_TotalRecords = 0; @@ -118,6 +122,8 @@ OPENFILENAMEW sfn; static DWORD WINAPI StartStopEnumEventsThread(IN LPVOID lpParameter); +VOID OpenUserEventLogFile(IN LPCWSTR lpszFileName); + VOID BuildLogListAndFilterList(IN LPCWSTR lpComputerName); VOID FreeLogList(VOID); VOID FreeLogFilterList(VOID); @@ -155,6 +161,184 @@ ShowWin32Error(IN DWORD dwError) LocalFree(lpMessageBuffer); } +VOID +DisplayUsage(VOID) +{ + LPWSTR lpBuffer; + LPCWSTR lpUsage; + INT iUsageLen = LoadStringW(hInst, IDS_USAGE, (LPWSTR)&lpUsage, 0); + + if (iUsageLen == 0) + return; + + lpBuffer = HeapAlloc(GetProcessHeap(), 0, (iUsageLen + 1) * sizeof(WCHAR)); + if (!lpBuffer) + return; + + StringCchCopyNW(lpBuffer, iUsageLen + 1, lpUsage, iUsageLen); + MessageBoxW(NULL, lpBuffer, szTitle, MB_OK | MB_ICONINFORMATION); + + HeapFree(GetProcessHeap(), 0, lpBuffer); +} + +BOOL +ProcessCmdLine(IN LPWSTR lpCmdLine) +{ + BOOL Success = FALSE; + INT i, argc; + LPWSTR* argv; + + /* Skip any leading whitespace */ + if (lpCmdLine) + { + while (iswspace(*lpCmdLine)) + ++lpCmdLine; + } + + /* No command line means no processing needed */ + if (!lpCmdLine || !*lpCmdLine) + return TRUE; + + /* Build the arguments vector */ + argv = CommandLineToArgvW(lpCmdLine, &argc); + if (!argv) + return FALSE; + + /* Parse the command line for options (skip the program name) */ + for (i = 1; i < argc; ++i) + { + /* Check for new options */ + if (argv[i][0] == L'-' || argv[i][0] == L'/') + { + if (argv[i][1] == L'?' && argv[i][2] == 0) + { + /* Display help */ + DisplayUsage(); + goto Quit; + } + else + if (argv[i][2] == L':') + { + switch (towupper(argv[i][1])) + { + case L'L': + { + LPWSTR lpNewBuffer; + LPWSTR lpFileName = argv[i] + 3; + SIZE_T cbFileName; + + /* Check for a quoted file name */ + if (*lpFileName == L'\"') + { + /* Skip this quote, and the last one too if any */ + ++lpFileName; + cbFileName = wcslen(lpFileName); + if (cbFileName > 0 && lpFileName[cbFileName - 1] == L'\"') + lpFileName[cbFileName - 1] = UNICODE_NULL; + } + + /* Skip this one if we do not actually have a file name */ + if (!*lpFileName) + continue; + + cbFileName = (wcslen(lpFileName) + 1) * sizeof(WCHAR); + + /* Reallocate the list of user logs to load */ + if (lpszzUserLogsToLoad) + { + lpNewBuffer = HeapReAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + lpszzUserLogsToLoad, + /* Count the multi-string NULL-terminator */ + cbUserLogsSize + cbFileName + sizeof(WCHAR)); + } + else + { + cbUserLogsSize = 0; + lpNewBuffer = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + /* Count the multi-string NULL-terminator */ + cbUserLogsSize + cbFileName + sizeof(WCHAR)); + } + + if (!lpNewBuffer) + { + ShowWin32Error(ERROR_NOT_ENOUGH_MEMORY); + goto Quit; + } + + lpszzUserLogsToLoad = lpNewBuffer; + lpNewBuffer = (LPWSTR)((ULONG_PTR)lpNewBuffer + cbUserLogsSize); + cbUserLogsSize += cbFileName; + + /* Save the file name */ + StringCbCopyW(lpNewBuffer, cbFileName, lpFileName); + + continue; + } + + default: + break; + } + } + + /* Unknown argument: display help and bail out */ + DisplayUsage(); + goto Quit; + } + else + { + /* + * An argument that does not start with the switch character. + * If this is the first argument then this corresponds to the + * optional computer name. Otherwise this is a wrong argument. + */ + if (i == 1) + { + /* Store the computer name */ + SIZE_T cbLength; + + cbLength = (wcslen(argv[i]) + 1) * sizeof(WCHAR); + lpComputerName = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cbLength); + if (lpComputerName) + { + StringCbCopyW(lpComputerName, cbLength, argv[i]); + } + /* else, fall back to local computer */ + } + else + { + /* Invalid syntax: display help and bail out */ + DisplayUsage(); + goto Quit; + } + } + } + + Success = TRUE; + +Quit: + /* In case of failure, free anything we have allocated */ + if (!Success) + { + if (lpszzUserLogsToLoad) + { + cbUserLogsSize = 0; + HeapFree(GetProcessHeap(), 0, lpszzUserLogsToLoad); + lpszzUserLogsToLoad = NULL; + } + if (lpComputerName) + { + HeapFree(GetProcessHeap(), 0, lpComputerName); + lpComputerName = NULL; + } + } + + /* Free the arguments vector and exit */ + LocalFree(argv); + return Success; +} + int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, @@ -194,6 +378,14 @@ wWinMain(HINSTANCE hInstance, LoadStringW(hInstance, IDS_LOADING_WAIT, szLoadingWait, ARRAYSIZE(szLoadingWait)); LoadStringW(hInstance, IDS_NO_ITEMS, szEmptyList, ARRAYSIZE(szEmptyList)); + /* + * Process the command-line arguments. Note that we need the full + * command-line, with the program file included, and not just what + * WinMain() provides in its lpCmdLine parameter. + */ + if (!ProcessCmdLine(GetCommandLineW())) + goto Quit; + if (!MyRegisterClass(hInstance)) goto Quit; @@ -223,12 +415,22 @@ wWinMain(HINSTANCE hInstance, /* Retrieve the available event logs on this computer and create filters for them */ InitializeListHead(&EventLogList); InitializeListHead(&EventLogFilterList); - // TODO: Implement connection to remote computer... - // At the moment we only support the user local computer. - BuildLogListAndFilterList(NULL); + BuildLogListAndFilterList(lpComputerName); - // TODO: If the user wants to open an external event log with the Event Log Viewer - // (via the command line), it's here that the log should be opened. + /* Open the user-specified logs if any are present on the command-line */ + if (lpszzUserLogsToLoad) + { + LPWSTR lpUserLog; + for (lpUserLog = lpszzUserLogsToLoad; *lpUserLog; lpUserLog += wcslen(lpUserLog) + 1) + { + OpenUserEventLogFile(lpUserLog); + } + + /* Now cleanup the list of user logs */ + cbUserLogsSize = 0; + HeapFree(GetProcessHeap(), 0, lpszzUserLogsToLoad); + lpszzUserLogsToLoad = NULL; + } /* Main message loop */ while (GetMessageW(&msg, NULL, 0, 0)) @@ -256,6 +458,18 @@ Cleanup: CloseHandle(hStartStopEnumEvent); Quit: + /* Final cleanup */ + if (lpszzUserLogsToLoad) + { + cbUserLogsSize = 0; + HeapFree(GetProcessHeap(), 0, lpszzUserLogsToLoad); + lpszzUserLogsToLoad = NULL; + } + if (lpComputerName) + { + HeapFree(GetProcessHeap(), 0, lpComputerName); + lpComputerName = NULL; + } FreeLibrary(hRichEdit); return (int)msg.wParam; @@ -1433,7 +1647,6 @@ static DWORD WINAPI EnumEventsThread(IN LPVOID lpParameter) { PEVENTLOGFILTER EventLogFilter = (PEVENTLOGFILTER)lpParameter; - LPWSTR lpMachineName = NULL; // EventLogFilter->ComputerName; PEVENTLOG EventLog; ULONG LogIndex; @@ -1473,6 +1686,54 @@ EnumEventsThread(IN LPVOID lpParameter) EventLogFilter_AddRef(EventLogFilter); ActiveFilter = EventLogFilter; + + /** HACK!! **/ + EventLog = EventLogFilter->EventLogs[0]; + + // FIXME: Use something else instead of EventLog->LogName !! + + /* + * Use a different formatting, whether the event log filter holds + * only one log, or many logs (the latter case is WIP TODO!) + */ + if (EventLogFilter->NumOfEventLogs <= 1) + { + StringCchPrintfExW(szWindowTitle, + ARRAYSIZE(szWindowTitle), + &lpTitleTemplateEnd, + &cchRemaining, + 0, + szTitleTemplate, szTitle, EventLog->LogName); /* i = number of characters written */ + dwMaxLength = (DWORD)cchRemaining; + if (!EventLog->ComputerName) + GetComputerNameW(lpTitleTemplateEnd, &dwMaxLength); + else + StringCchCopyW(lpTitleTemplateEnd, dwMaxLength, EventLog->ComputerName); + + StringCbPrintfW(szStatusText, + sizeof(szStatusText), + szStatusBarTemplate, + EventLog->LogName, + 0, + 0); + } + else + { + // TODO: Use a different title & implement filtering for multi-log filters !! + // (EventLogFilter->NumOfEventLogs > 1) + MessageBoxW(hwndMainWindow, + L"Many-logs filtering is not implemented yet!!", + L"Event Log", + MB_OK | MB_ICONINFORMATION); + } + + /* Set the window title */ + SetWindowTextW(hwndMainWindow, szWindowTitle); + + /* Update the status bar */ + StatusBar_SetText(hwndStatus, 0, szStatusText); + + /* Disable list view redraw */ SendMessageW(hwndListView, WM_SETREDRAW, FALSE, 0); @@ -1699,18 +1960,6 @@ Cleanup: */ if (EventLogFilter->NumOfEventLogs <= 1) { - StringCchPrintfExW(szWindowTitle, - ARRAYSIZE(szWindowTitle), - &lpTitleTemplateEnd, - &cchRemaining, - 0, - szTitleTemplate, szTitle, EventLog->LogName); /* i = number of characters written */ - dwMaxLength = (DWORD)cchRemaining; - if (!lpMachineName) - GetComputerNameW(lpTitleTemplateEnd, &dwMaxLength); - else - StringCchCopyW(lpTitleTemplateEnd, dwMaxLength, lpMachineName); - StringCbPrintfW(szStatusText, sizeof(szStatusText), szStatusBarTemplate, @@ -1722,18 +1971,11 @@ Cleanup: { // TODO: Use a different title & implement filtering for multi-log filters !! // (EventLogFilter->NumOfEventLogs > 1) - MessageBoxW(hwndMainWindow, - L"Many-logs filtering is not implemented yet!!", - L"Event Log", - MB_OK | MB_ICONINFORMATION); } /* Update the status bar */ StatusBar_SetText(hwndStatus, 0, szStatusText); - /* Set the window title */ - SetWindowTextW(hwndMainWindow, szWindowTitle); - /* Resume list view redraw */ SendMessageW(hwndListView, WM_SETREDRAW, TRUE, 0); @@ -2240,6 +2482,8 @@ BuildLogListAndFilterList(IN LPCWSTR lpComputerName) HTREEITEM hRootNode = NULL, hItem = NULL, hItemDefault = NULL; /* Open the EventLog key */ + // TODO: Implement connection to remote computer... + // At the moment we only support the user local computer. // FIXME: Use local or remote computer Result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, EVENTLOG_BASE_KEY, 0, KEY_READ, &hEventLogKey); if (Result != ERROR_SUCCESS) diff --git a/base/applications/mscutils/eventvwr/lang/bg-BG.rc b/base/applications/mscutils/eventvwr/lang/bg-BG.rc index 53eda36d8b3..5f655515489 100644 --- a/base/applications/mscutils/eventvwr/lang/bg-BG.rc +++ b/base/applications/mscutils/eventvwr/lang/bg-BG.rc @@ -142,6 +142,24 @@ BEGIN IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Error" diff --git a/base/applications/mscutils/eventvwr/lang/cs-CZ.rc b/base/applications/mscutils/eventvwr/lang/cs-CZ.rc index 7fcc447c0b7..cb2abd9fde2 100644 --- a/base/applications/mscutils/eventvwr/lang/cs-CZ.rc +++ b/base/applications/mscutils/eventvwr/lang/cs-CZ.rc @@ -142,6 +142,24 @@ BEGIN IDS_SAVE_FILTER "Protokol událostí (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Chyba" diff --git a/base/applications/mscutils/eventvwr/lang/de-DE.rc b/base/applications/mscutils/eventvwr/lang/de-DE.rc index cbfd581e601..b87bddf4fae 100644 --- a/base/applications/mscutils/eventvwr/lang/de-DE.rc +++ b/base/applications/mscutils/eventvwr/lang/de-DE.rc @@ -144,6 +144,24 @@ BEGIN IDS_SAVE_FILTER "Ereignisprotokoll (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Fehler" diff --git a/base/applications/mscutils/eventvwr/lang/el-GR.rc b/base/applications/mscutils/eventvwr/lang/el-GR.rc index d0138956972..0eafda6725b 100644 --- a/base/applications/mscutils/eventvwr/lang/el-GR.rc +++ b/base/applications/mscutils/eventvwr/lang/el-GR.rc @@ -144,6 +144,24 @@ BEGIN IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Αφάλμα" diff --git a/base/applications/mscutils/eventvwr/lang/en-US.rc b/base/applications/mscutils/eventvwr/lang/en-US.rc index c1c776e90f8..0d4ab4af97a 100644 --- a/base/applications/mscutils/eventvwr/lang/en-US.rc +++ b/base/applications/mscutils/eventvwr/lang/en-US.rc @@ -150,6 +150,24 @@ BEGIN IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Error" diff --git a/base/applications/mscutils/eventvwr/lang/es-ES.rc b/base/applications/mscutils/eventvwr/lang/es-ES.rc index 992f70768e5..5c3da85040d 100644 --- a/base/applications/mscutils/eventvwr/lang/es-ES.rc +++ b/base/applications/mscutils/eventvwr/lang/es-ES.rc @@ -139,11 +139,29 @@ BEGIN IDS_EVENTLOG_SYSTEM "System Logs" IDS_EVENTLOG_APP "Application Logs" IDS_EVENTLOG_USER "User Logs" - IDS_EVENTSTRINGIDNOTFOUND "No se pudo recuperar la descripción para el evento con ID (%lu) y origen (%s). El equipo local puede no tener la información necesaria en el registro o las DLLs necesarias para mostrar los mensajes de un equipo remoto.\n\nThe following information is part of the event:\n\n" + IDS_EVENTSTRINGIDNOTFOUND "No se pudo recuperar la descripción para el evento con ID ( %lu ) y origen ( %s ). El equipo local puede no tener la información necesaria en el registro o las DLLs necesarias para mostrar los mensajes de un equipo remoto.\n\nThe following information is part of the event:\n\n" IDS_CLEAREVENTS_MSG "¿Desea guardar este registro de eventos antes de borrarlo?" IDS_SAVE_FILTER "Registro de eventos (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Error" diff --git a/base/applications/mscutils/eventvwr/lang/fr-FR.rc b/base/applications/mscutils/eventvwr/lang/fr-FR.rc index ba64ada0e93..cc71f905149 100644 --- a/base/applications/mscutils/eventvwr/lang/fr-FR.rc +++ b/base/applications/mscutils/eventvwr/lang/fr-FR.rc @@ -144,6 +144,24 @@ BEGIN IDS_SAVE_FILTER "Journal d'événements (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "Visionneuse d'événements ReactOS\n\ +\n\ +EventVwr [nom ordinateur] [/l:] [/?]\n\ +\n\ +""nom ordinateur"" : Spécifie l'ordinateur distant auquel se connecter\n\ +\tpour récupérer les événements à afficher. Si aucun nom n'est spécifié,\n\ +\tl'ordinateur local est utilisé.\n\ +\n\ +/l: : Spécifie quel fichier journal ouvrir.\n\ +\tSeuls les fichiers au format .evt (NT ≤ 5.2) sont supportés.\n\ +\n\ +/? : Affiche ce message d'aide.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Erreur" @@ -175,15 +193,15 @@ END STRINGTABLE BEGIN - IDS_COPY "Event Type: %s\r\n\ -Event Source: %s\r\n\ -Event Category: %s\r\n\ -Event ID: %s\r\n\ -Date: %s\r\n\ -Time: %s\r\n\ -User: %s\r\n\ -Computer: %s\r\n\ -Description:\r\n%s" + IDS_COPY "Type d'événement : %s\r\n\ +Source de l'événement : %s\r\n\ +Catégorie de l'événement : %s\r\n\ +ID de l'événement : %s\r\n\ +Date : %s\r\n\ +Heure : %s\r\n\ +Utilisateur : %s\r\n\ +Ordinateur : %s\r\n\ +Description :\r\n%s" END STRINGTABLE diff --git a/base/applications/mscutils/eventvwr/lang/he-IL.rc b/base/applications/mscutils/eventvwr/lang/he-IL.rc index f42f474c9d1..85e2667ff2c 100644 --- a/base/applications/mscutils/eventvwr/lang/he-IL.rc +++ b/base/applications/mscutils/eventvwr/lang/he-IL.rc @@ -144,6 +144,24 @@ BEGIN IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "שגיאה" diff --git a/base/applications/mscutils/eventvwr/lang/it-IT.rc b/base/applications/mscutils/eventvwr/lang/it-IT.rc index 24cc8adaed0..b86672b3883 100644 --- a/base/applications/mscutils/eventvwr/lang/it-IT.rc +++ b/base/applications/mscutils/eventvwr/lang/it-IT.rc @@ -144,6 +144,24 @@ BEGIN IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Errore" diff --git a/base/applications/mscutils/eventvwr/lang/ja-JP.rc b/base/applications/mscutils/eventvwr/lang/ja-JP.rc index 29bea7d8c20..817c30e4dd6 100644 --- a/base/applications/mscutils/eventvwr/lang/ja-JP.rc +++ b/base/applications/mscutils/eventvwr/lang/ja-JP.rc @@ -144,6 +144,24 @@ BEGIN IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "エラー" diff --git a/base/applications/mscutils/eventvwr/lang/ko-KR.rc b/base/applications/mscutils/eventvwr/lang/ko-KR.rc index de0f02fe266..3749b927328 100644 --- a/base/applications/mscutils/eventvwr/lang/ko-KR.rc +++ b/base/applications/mscutils/eventvwr/lang/ko-KR.rc @@ -144,6 +144,24 @@ BEGIN IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "에러" diff --git a/base/applications/mscutils/eventvwr/lang/no-NO.rc b/base/applications/mscutils/eventvwr/lang/no-NO.rc index a979794d0dd..21944f9d5c0 100644 --- a/base/applications/mscutils/eventvwr/lang/no-NO.rc +++ b/base/applications/mscutils/eventvwr/lang/no-NO.rc @@ -142,6 +142,24 @@ BEGIN IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Feil" diff --git a/base/applications/mscutils/eventvwr/lang/pl-PL.rc b/base/applications/mscutils/eventvwr/lang/pl-PL.rc index 04a028dd480..5e6cd7de615 100644 --- a/base/applications/mscutils/eventvwr/lang/pl-PL.rc +++ b/base/applications/mscutils/eventvwr/lang/pl-PL.rc @@ -146,6 +146,24 @@ BEGIN IDS_SAVE_FILTER "Dziennik zdarzeń (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Błąd" diff --git a/base/applications/mscutils/eventvwr/lang/pt-BR.rc b/base/applications/mscutils/eventvwr/lang/pt-BR.rc index 3e0e30c4acf..e56007504b6 100644 --- a/base/applications/mscutils/eventvwr/lang/pt-BR.rc +++ b/base/applications/mscutils/eventvwr/lang/pt-BR.rc @@ -144,6 +144,24 @@ BEGIN IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Erro" diff --git a/base/applications/mscutils/eventvwr/lang/ro-RO.rc b/base/applications/mscutils/eventvwr/lang/ro-RO.rc index f479f2ed02c..b63ba71def8 100644 --- a/base/applications/mscutils/eventvwr/lang/ro-RO.rc +++ b/base/applications/mscutils/eventvwr/lang/ro-RO.rc @@ -147,6 +147,24 @@ BEGIN IDS_SAVE_FILTER "Jurnal de evenimente (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Eroare" @@ -186,7 +204,7 @@ Dată: %s\r\n\ Oră: %s\r\n\ Utilizator: %s\r\n\ Calculator: %s\r\n\ -Descriere :\r\n%s" +Descriere:\r\n%s" END STRINGTABLE diff --git a/base/applications/mscutils/eventvwr/lang/ru-RU.rc b/base/applications/mscutils/eventvwr/lang/ru-RU.rc index b50945b7938..e9969417b62 100644 --- a/base/applications/mscutils/eventvwr/lang/ru-RU.rc +++ b/base/applications/mscutils/eventvwr/lang/ru-RU.rc @@ -144,6 +144,24 @@ BEGIN IDS_SAVE_FILTER "Журнал событий (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Ошибка" diff --git a/base/applications/mscutils/eventvwr/lang/sk-SK.rc b/base/applications/mscutils/eventvwr/lang/sk-SK.rc index a89594bbe08..aed4e951d85 100644 --- a/base/applications/mscutils/eventvwr/lang/sk-SK.rc +++ b/base/applications/mscutils/eventvwr/lang/sk-SK.rc @@ -147,6 +147,24 @@ BEGIN IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Chyba" diff --git a/base/applications/mscutils/eventvwr/lang/sq-AL.rc b/base/applications/mscutils/eventvwr/lang/sq-AL.rc index 897daa8f59d..08c7bd0fe34 100644 --- a/base/applications/mscutils/eventvwr/lang/sq-AL.rc +++ b/base/applications/mscutils/eventvwr/lang/sq-AL.rc @@ -150,6 +150,24 @@ BEGIN IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Error" diff --git a/base/applications/mscutils/eventvwr/lang/sv-SE.rc b/base/applications/mscutils/eventvwr/lang/sv-SE.rc index b06daf20fb6..77e4a321d02 100644 --- a/base/applications/mscutils/eventvwr/lang/sv-SE.rc +++ b/base/applications/mscutils/eventvwr/lang/sv-SE.rc @@ -144,6 +144,24 @@ BEGIN IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Fel" diff --git a/base/applications/mscutils/eventvwr/lang/tr-TR.rc b/base/applications/mscutils/eventvwr/lang/tr-TR.rc index 1d1e6925e82..221660b3791 100644 --- a/base/applications/mscutils/eventvwr/lang/tr-TR.rc +++ b/base/applications/mscutils/eventvwr/lang/tr-TR.rc @@ -150,6 +150,24 @@ BEGIN IDS_SAVE_FILTER "Olay Kaydı (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Yanlışlık" diff --git a/base/applications/mscutils/eventvwr/lang/uk-UA.rc b/base/applications/mscutils/eventvwr/lang/uk-UA.rc index b7d863e2522..8a5dc3cbbb3 100644 --- a/base/applications/mscutils/eventvwr/lang/uk-UA.rc +++ b/base/applications/mscutils/eventvwr/lang/uk-UA.rc @@ -139,11 +139,29 @@ BEGIN IDS_EVENTLOG_SYSTEM "System Logs" IDS_EVENTLOG_APP "Application Logs" IDS_EVENTLOG_USER "User Logs" - IDS_EVENTSTRINGIDNOTFOUND "Опис для Ідентифікатора події( %lu ) за джерелом ( %s ) не знайдено. Локальний комп'ютер може не мати необхідної інформації в реєстрі чи DLL файлів повідомлень для відображення повідомлень, що надходять від віддаленого комп'ютера.\n\nThe following information is part of the event:\n\n" + IDS_EVENTSTRINGIDNOTFOUND "Опис для Ідентифікатора події ( %lu ) за джерелом ( %s ) не знайдено. Локальний комп'ютер може не мати необхідної інформації в реєстрі чи DLL файлів повідомлень для відображення повідомлень, що надходять від віддаленого комп'ютера.\n\nThe following information is part of the event:\n\n" IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?" IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "Помилка" diff --git a/base/applications/mscutils/eventvwr/lang/zh-CN.rc b/base/applications/mscutils/eventvwr/lang/zh-CN.rc index 510987035c0..bcac2394b97 100644 --- a/base/applications/mscutils/eventvwr/lang/zh-CN.rc +++ b/base/applications/mscutils/eventvwr/lang/zh-CN.rc @@ -144,6 +144,24 @@ BEGIN IDS_SAVE_FILTER "事件日志 (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "错误" @@ -175,15 +193,15 @@ END STRINGTABLE BEGIN - IDS_COPY "事件类型: %s\r\n\ -事件源: %s\r\n\ -事件类别: %s\r\n\ -事件 ID: %s\r\n\ -日期: %s\r\n\ -时间: %s\r\n\ -用户: %s\r\n\ -电脑: %s\r\n\ -描述:\n%s" + IDS_COPY "事件类型: %s\r\n\ +事件源: %s\r\n\ +事件类别: %s\r\n\ +事件 ID: %s\r\n\ +日期: %s\r\n\ +时间: %s\r\n\ +用户: %s\r\n\ +电脑: %s\r\n\ +描述:\r\n%s" END STRINGTABLE diff --git a/base/applications/mscutils/eventvwr/lang/zh-TW.rc b/base/applications/mscutils/eventvwr/lang/zh-TW.rc index 3bed36acd42..b43acc5f843 100644 --- a/base/applications/mscutils/eventvwr/lang/zh-TW.rc +++ b/base/applications/mscutils/eventvwr/lang/zh-TW.rc @@ -144,6 +144,24 @@ BEGIN IDS_SAVE_FILTER "事件日誌 (*.evt)\0*.evt\0" END +STRINGTABLE +BEGIN +/* Please note that explicit TAB characters '\t' are used to fix the alignment of the message in the MessageBox */ + IDS_USAGE "ReactOS Event Viewer\n\ +\n\ +EventVwr [computer name] [/l:] [/?]\n\ +\n\ +""computer name"" : Specifies the remote computer where to connect\n\ +\tto retrieve the events to display. If no name is specified, the\n\ +\tlocal computer is used.\n\ +\n\ +/l: : Specifies which event log file to open.\n\ +\tOnly files in the .evt format (NT ≤ 5.2) are supported.\n\ +\n\ +/? : Displays this help message.\n\ +" +END + STRINGTABLE BEGIN IDS_EVENTLOG_ERROR_TYPE "錯誤" @@ -175,15 +193,15 @@ END STRINGTABLE BEGIN - IDS_COPY "事件種類: %s\r\n\ -事件源: %s\r\n\ -事件種類: %s\r\n\ -事件 ID: %s\r\n\ -日期: %s\r\n\ -時間: %s\r\n\ -使用者: %s\r\n\ -電腦: %s\r\n\ -描述:\n%s" + IDS_COPY "事件種類: %s\r\n\ +事件源: %s\r\n\ +事件種類: %s\r\n\ +事件 ID: %s\r\n\ +日期: %s\r\n\ +時間: %s\r\n\ +使用者: %s\r\n\ +電腦: %s\r\n\ +描述:\r\n%s" END STRINGTABLE diff --git a/base/applications/mscutils/eventvwr/resource.h b/base/applications/mscutils/eventvwr/resource.h index 525cce9c55f..a5c88a4a059 100644 --- a/base/applications/mscutils/eventvwr/resource.h +++ b/base/applications/mscutils/eventvwr/resource.h @@ -93,6 +93,8 @@ #define IDS_CLEAREVENTS_MSG 110 #define IDS_SAVE_FILTER 111 +#define IDS_USAGE 120 + #define IDS_EVENTLOG_ERROR_TYPE 200 #define IDS_EVENTLOG_WARNING_TYPE 201 #define IDS_EVENTLOG_INFORMATION_TYPE 202