[EVENTVWR] Add support for a command-line for the Event Log Viewer.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Thu, 12 Apr 2018 00:45:37 +0000 (02:45 +0200)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Thu, 12 Apr 2018 00:45:37 +0000 (02:45 +0200)
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.

25 files changed:
base/applications/mscutils/eventvwr/eventvwr.c
base/applications/mscutils/eventvwr/lang/bg-BG.rc
base/applications/mscutils/eventvwr/lang/cs-CZ.rc
base/applications/mscutils/eventvwr/lang/de-DE.rc
base/applications/mscutils/eventvwr/lang/el-GR.rc
base/applications/mscutils/eventvwr/lang/en-US.rc
base/applications/mscutils/eventvwr/lang/es-ES.rc
base/applications/mscutils/eventvwr/lang/fr-FR.rc
base/applications/mscutils/eventvwr/lang/he-IL.rc
base/applications/mscutils/eventvwr/lang/it-IT.rc
base/applications/mscutils/eventvwr/lang/ja-JP.rc
base/applications/mscutils/eventvwr/lang/ko-KR.rc
base/applications/mscutils/eventvwr/lang/no-NO.rc
base/applications/mscutils/eventvwr/lang/pl-PL.rc
base/applications/mscutils/eventvwr/lang/pt-BR.rc
base/applications/mscutils/eventvwr/lang/ro-RO.rc
base/applications/mscutils/eventvwr/lang/ru-RU.rc
base/applications/mscutils/eventvwr/lang/sk-SK.rc
base/applications/mscutils/eventvwr/lang/sq-AL.rc
base/applications/mscutils/eventvwr/lang/sv-SE.rc
base/applications/mscutils/eventvwr/lang/tr-TR.rc
base/applications/mscutils/eventvwr/lang/uk-UA.rc
base/applications/mscutils/eventvwr/lang/zh-CN.rc
base/applications/mscutils/eventvwr/lang/zh-TW.rc
base/applications/mscutils/eventvwr/resource.h

index c184bb2..6801b27 100644 (file)
@@ -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)
index 53eda36..5f65551 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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"
index 7fcc447..cb2abd9 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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"
index cbfd581..b87bddf 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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"
index d013895..0eafda6 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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 "Αφάλμα"
index c1c776e..0d4ab4a 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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"
index 992f707..5c3da85 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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"
index ba64ada..cc71f90 100644 (file)
@@ -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:<fichier journal>] [/?]\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:<fichier journal> : 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
index f42f474..85e2667 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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 "שגיאה"
index 24cc8ad..b86672b 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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"
index 29bea7d..817c30e 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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 "エラー"
index de0f02f..3749b92 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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 "에러"
index a979794..21944f9 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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"
index 04a028d..5e6cd7d 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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"
index 3e0e30c..e560075 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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"
index f479f2e..b63ba71 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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
index b50945b..e996941 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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 "Ошибка"
index a89594b..aed4e95 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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"
index 897daa8..08c7bd0 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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"
index b06daf2..77e4a32 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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"
index 1d1e692..221660b 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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"
index b7d863e..8a5dc3c 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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 "Помилка"
index 5109870..bcac239 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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
index 3bed36a..b43acc5 100644 (file)
@@ -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:<event log file>] [/?]\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:<event log file> : 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
index 525cce9..a5c88a4 100644 (file)
@@ -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